Revision 28 as of 2010-03-23 10:58:24

Clear message

Photon Finder Kit

Originally this Clustering Algorithm was developed by Predrag Krstonosic. Have a look at his thesis for more information on the algorithm. The official source code version is kept in the ilcsoft repository:


I have adopted and tested the algorithm for ILD00. Attached you can find my personal versions of

The clustering algorithm is restricted to ECAL, and was optimised for photons coming from the IP.


An example steering file is marlinKIT.xml, which was used by me.

Kit Steering Parameters

Parameter name


my setting


Apply topological cleaning, to get rid of muons, neutrons, ...



If Cleaning = YES, require > N neighbouring hits to accept this as a photon candidate



Number of threshold levels i in which the hits will be divided for clustering /!\ < 16



Set the thresholds for the i levels in mip

0.1 1.5 2.5 4 6 9 16 26 41 65


Minimum number of hits required in the 0th level (the one containing all other levels)



Minimum number of hits for the ith level, before splitting the cluster



cosine of the opening angle in which to expect a cluster, hits outside will be considered as 2nd cluster



Minimum distance between 2 clusters in mm, if smaller they will be merged



N_{hits}[level i]/N_{hits}[level i-1]



The PhotonFinder needs the Physical Geometrical database (PGDB) for fast acces to properties of the subdetectors. The mip factor has to be adopted to the chosen detector model.


The basic class for this photon finder.


contains all functions needed from Superhit to calculate distances, energies and so on.


The main program where all ends meet, searching for em-showers in the ECAL. It depends on the Physical Geometrical Data Base PGDB, the Superhit class, and mathematical operations defined in MarlinMath. The required calibration values can be obtained from KALIBRATOR. KIT is working on the MIP scale. Each cluster level has to be tuned. As an output you get # clusters, energy in cluster, hits in cluster, estimated true energy in cluster, position, direction, and distance to other clusters.

Before getting started:

Energy Calibration

KIT needs to get calibration values that determine the true cluster energy, in dependence of the cluster level: E_cluster [level ] = a*E_true + b with E_min < E_true < E_max

This input, needed by KIT, is stored in KITutil as a 9x10 array for 9 energies with 10 levels each. I have created single photon samples from 0.5 to 200 GeV for the LDC'02Sc model, which has the same ECAL geometry as the ILD00 model. They are currently located in


Using and KITcalibrator.h as specified in calibrateKIT.xml, the resulting calibration constants can be found in my version as

void CreateCalibration_LDCPrime02Sc(vector<CoreCalib2>* cc)
  //  fit straight line: E_true = aa*E_reco + bb for each energy and level  
  double aEnom[13]  = {0.5,1.0,2.0,3.0,5.0,8.0,12.0,20.0,40.0,70.0,100.0,150.0,200.0};   //nominal photon energy  

  double aa[13][10] = {{0.390,0.386,0.875,0.327,0.000,0.000,0.000,0.000,0.000,0.000},

  double bb[13][10] = {{0.412,0.436,0.383,0.471,0.000,0.000,0.000,0.000,0.000,0.000},
  double aEmin[13][10] = {{0.250,0.200,0.150,0.060,0.000,0.000,0.000,0.000,0.000,0.000},
  double aEmax[13][10]={{0.600,0.500,0.350,0.300,0.000,0.000,0.000,0.000,0.000,0.000},


Clustering Efficiency

The clustering efficiency is defined as probability to reconstruct exactly one cluster, if one photon is shot into the detector. I have tested the efficiency for photon energies between 1 and 250 GeV, with perpendicular incidence to the ECAL barrel surface, as well as with inclined incidence angles up to 40degree in phi and theta.

In all cases the efficiency is above 88%. It is best for perpendicular photons, and gets worse with an increasing incidence angle.

Energy Reconstruction

Position Reconstruction

Angular Reconstruction