4 using namespace marlin ;
14 _description =
"KIT does whatever it does ..." ;
16 registerProcessorParameter(
"ECAL_Collection",
17 "Name of the CalorimeterHit Collection for ECAL ",
21 registerProcessorParameter(
"Core_Collection",
22 "Name of the Cluster Collection for Cores ",
26 registerProcessorParameter(
"Cleaning",
27 "To do the cleaning on hits or not ",
30 registerProcessorParameter(
"TopologicalCut",
31 "At which number of neighbors to put the threshold, condition is < so you need to put N+1 ",
35 registerProcessorParameter(
"NumberOfLevels",
36 "Number of levels for central loop ",
39 vector<float> miipstep;
40 miipstep.push_back(0.1);
41 miipstep.push_back(1.5);
42 miipstep.push_back(2.5);
43 miipstep.push_back(4.0);
44 miipstep.push_back(6.0);
45 miipstep.push_back(9.0);
46 miipstep.push_back(16.0);
47 miipstep.push_back(26.0);
48 miipstep.push_back(41.0);
49 miipstep.push_back(65.0);
51 registerProcessorParameter(
"Levels",
52 "Levels for central loop in MIP ",
56 registerProcessorParameter(
"MinHit0",
57 "Minimal Number of hits for ground level cluster ",
61 registerProcessorParameter(
"MinHitSplit",
62 "Minimal Number of hits for i-th level cluster ",
66 registerProcessorParameter(
"Rcut",
67 "Fluctuation suprresion cut",
70 registerProcessorParameter(
"Distcut",
71 "Square of distance cut for merging ",
74 registerProcessorParameter(
"Coscut",
75 "Cosine of the angle for merging ",
97 LCCollection* colt = evt->getCollection(
_Ecal_col.c_str()) ;
98 CellIDDecoder<CalorimeterHit> CDECAL(colt);
102 unsigned int nelem=colt->getNumberOfElements();
104 vector<Superhit2*> calo[10];
113 vector <PROTSEED2> prs2;
120 const unsigned int N=
_N;
121 vector< vector<Tmpcl2*> > bbb(N);
135 for(
unsigned int i=0;i<prs2.size();i++)
137 if(prs2[i].active==
true)
140 ClusterImpl * cluster =
new ClusterImpl();
142 for(
unsigned int j=0;j<prs2[i].cl->hits.size();j++)
144 cluster->addHit( prs2[i].cl->hits[j]->chit,(
float)1.0);
147 cluster->setTypeBit(prs2[i].level);
150 position[0]=(float)prs2[i].cl->getCenter()[0];
151 position[1]=(float)prs2[i].cl->getCenter()[1];
152 position[2]=(float)prs2[i].cl->getCenter()[2];
154 float energy=(float)prs2[i].cl->getEnergy();
156 cluster->setPosition(position);
157 cluster->setEnergy(energy);
158 clscol->addElement(cluster);
164 for(
unsigned int i=0;i<N;i++)
166 if( bbb[i].size()!=0)
167 for(
unsigned int im=0;im<bbb[i].size();im++)
173 for(
unsigned int im=0;im<2;im++)
175 if(calo[im].size()!=0)
176 for(
unsigned int iij=0;iij<calo[im].size();iij++)
177 delete (calo[im])[iij];
184 }
catch(DataNotAvailableException &
e) {}
virtual void check(LCEvent *evt)
container for keeping the parameters of the core fineder together
vector< float > _miipstep
virtual void processRunHeader(LCRunHeader *run)
Called for every run.
unsigned int MinHitSplit
minimal number of hits in i-th level cluster to be accepted for splitting of the core ...
std::string _CoreCollection
unsigned int MinHit0
minimal number of hits needed for 0-th level cluster to be accepted as a core candidate ...
void FindCores2(Shitvec2 *secal1, vector< Tmpclvec2 > &bbb, vector< PROTSEED2 > *prs2, unsigned int N, vector< float > miipstep, CoreCut2 Ccut)
Global EM core finding function , iput is vector of superhits, array of Tmpcl vectors bbb for interna...
double Distcut
distance cut for core merging
void TotalPrecalc2(vector< Superhit2 * > *calo, CellIDDecoder< CalorimeterHit > &id, unsigned int nelem, int Ncut)
Global precalculation function , iput is vector of superhits, ECAL decoder, number of hits...
virtual void init()
Called at the begin of the job before anything is read.
double Coscut
angular cut for core merging (value of the cosine is stored not the angle!)
virtual void processEvent(LCEvent *evt)
Called for every event - the working horse.
std::vector< LCCollection * > LCCollectionVec
double Rcut
fluctuation suppresion cut
virtual void end()
Called after data processing for clean up.
void CreateAllShits2(LCCollection *colt, CellIDDecoder< CalorimeterHit > &id, vector< Superhit2 * > *calo)
Creation of superhits, input is ECAL collection ,it's decoded and pointer to resulting container for ...