BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcRec.cxx
Go to the documentation of this file.
1#include <iostream>
2#include <fstream>
3
4#include "GaudiKernel/MsgStream.h"
5#include "GaudiKernel/AlgFactory.h"
6#include "GaudiKernel/ISvcLocator.h"
7#include "GaudiKernel/SmartDataPtr.h"
8#include "GaudiKernel/PropertyMgr.h"
9#include "GaudiKernel/IJobOptionsSvc.h"
11#include "EmcRawEvent/EmcDigi.h"
13#include "McTruth/McParticle.h"
14#include "McTruth/EmcMcHit.h"
16
17#include "EmcRec/EmcRec.h"
19
20
26//#include "EmcRec/EmcRecFindTofShower.h"
27#include "EmcRec/EmcRecTDS.h"
30// tianhl for mt
31#include "GaudiKernel/Service.h"
32#include "GaudiKernel/ThreadGaudi.h"
33// tianhl for mt
34
35using namespace std;
36using namespace Event;
37DECLARE_COMPONENT(EmcRec)
38/////////////////////////////////////////////////////////////////////////////
39EmcRec::EmcRec(const std::string& name, ISvcLocator* pSvcLocator) :
40 Algorithm(name, pSvcLocator),fCluster2Shower(0)
41{
42 m_event=0;
43 fPositionMode.push_back("log");
44 fPositionMode.push_back("5x5");
45 // Declare the properties
46 m_propMgr.declareProperty("Output",fOutput=0);
47 m_propMgr.declareProperty("EventNb",fEventNb=0);
48 m_propMgr.declareProperty("DigiCalib",fDigiCalib=false);
49 m_propMgr.declareProperty("TofEnergy",fTofEnergy=false);
50 m_propMgr.declareProperty("OnlineMode",fOnlineMode=false);
51 m_propMgr.declareProperty("TimeMin",fTimeMin=0);
52 m_propMgr.declareProperty("TimeMax",fTimeMax=60);
53 m_propMgr.declareProperty("PositionMode",fPositionMode);
54
55 //Method == 0 use old correction parameter
56 //Method == 1 use new correction parameter
57 m_propMgr.declareProperty("MethodMode",fMethodMode=1);
58 //PosCorr=0, no position correction, and PosCorr=1 with position correction
59 m_propMgr.declareProperty("PosCorr",fPosCorr=1);
60 m_propMgr.declareProperty("ElecSaturation",fElecSaturation=1);
61
62 IJobOptionsSvc* jobSvc;
63 pSvcLocator->service("JobOptionsSvc", jobSvc);
64 jobSvc->setMyProperties("EmcRecAlg", &m_propMgr);
65
66 // Get EmcRecParameter
69 Para.SetDigiCalib(fDigiCalib);
70 Para.SetTimeMin(fTimeMin);
71 Para.SetTimeMax(fTimeMax);
72 Para.SetMethodMode(fMethodMode);
73 Para.SetPosCorr(fPosCorr);
74 Para.SetPositionMode(fPositionMode);
75 Para.SetElecSaturation(fElecSaturation);
76
78
79}
80
81// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
82StatusCode EmcRec::initialize(){
83
84 MsgStream log(msgSvc(), name());
85 log << MSG::INFO << "in initialize()" << endreq;
86
87 //Get RawDataProviderSvc
88 // tianhl for mt
89 std::string rawDataProviderSvc_name("RawDataProviderSvc");
90 StatusCode sc = service(rawDataProviderSvc_name.c_str(), m_rawDataProviderSvc);
91 if(sc != StatusCode::SUCCESS) {
92 log << MSG::ERROR << "EmcRec Error: Can't get RawDataProviderSvc." << endmsg;
93 }
94
95 fDigit2Hit.SetAlgName(name());
96
97#ifndef OnlineMode
98 if(!(m_rawDataProviderSvc->isOnlineMode())) {
99 m_tuple=0;
100 StatusCode status;
101
102 if(fOutput>=1) {
103 NTuplePtr nt(ntupleSvc(),"FILE301/n1");
104 if ( nt ) m_tuple = nt;
105 else {
106 m_tuple=ntupleSvc()->book("FILE301/n1",CLID_ColumnWiseTuple,"EmcRec");
107 if( m_tuple ) {
108 status = m_tuple->addItem ("pid",pid);
109 status = m_tuple->addItem ("tp",tp);
110 status = m_tuple->addItem ("ttheta",ttheta);
111 status = m_tuple->addItem ("tphi",tphi);
112 status = m_tuple->addItem ("nrun",nrun);
113 status = m_tuple->addItem ("nrec",nrec);
114 status = m_tuple->addItem ("nneu",nneu);
115 status = m_tuple->addItem ("ncluster",ncluster);
116 status = m_tuple->addItem ("npart",npart);
117 status = m_tuple->addItem ("ntheta",ntheta);
118 status = m_tuple->addItem ("nphi",nphi);
119 status = m_tuple->addItem ("ndigi",ndigi);
120 status = m_tuple->addItem ("nhit",nhit);
121 status = m_tuple->addItem ("pp1",4,pp1);
122 status = m_tuple->addItem ("theta1",theta1);
123 status = m_tuple->addItem ("phi1",phi1);
124 status = m_tuple->addItem ("dphi1",dphi1);
125 status = m_tuple->addItem ("eseed",eseed);
126 status = m_tuple->addItem ("e3x3",e3x3);
127 status = m_tuple->addItem ("e5x5",e5x5);
128 status = m_tuple->addItem ("enseed",enseed);
129 status = m_tuple->addItem ("etof2x1",etof2x1);
130 status = m_tuple->addItem ("etof2x3",etof2x3);
131 status = m_tuple->addItem ("cluster2ndMoment",cluster2ndMoment);
132 status = m_tuple->addItem ("secondMoment",secondMoment);
133 status = m_tuple->addItem ("latMoment",latMoment);
134 status = m_tuple->addItem ("a20Moment",a20Moment);
135 status = m_tuple->addItem ("a42Moment",a42Moment);
136 status = m_tuple->addItem ("mpi0",mpi0);
137 status = m_tuple->addItem ("thtgap1",thtgap1);
138 status = m_tuple->addItem ("phigap1",phigap1);
139 status = m_tuple->addItem ("pp2",4,pp2);
140 }
141 else { // did not manage to book the N tuple....
142 log << MSG::ERROR <<"Cannot book N-tuple:" << long(m_tuple) << endmsg;
143 return StatusCode::FAILURE;
144 }
145 }
146 }
147 fCluster2Shower = new EmcRecCluster2Shower;
148 } else {
149 fCluster2Shower = new EmcRecFastCluster2Shower;
150 }
151#else
152 fCluster2Shower = new EmcRecFastCluster2Shower;
153#endif
154
155 return StatusCode::SUCCESS;
156}
157
158// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
159StatusCode EmcRec::execute() {
160
161 MsgStream log(msgSvc(), name());
162 log << MSG::DEBUG << "in execute()" << endreq;
163 /// Reconstruction begins.
164 /// State 1: Initialize digit map
165 int event, run;
166
167 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
168 if (!eventHeader) {
169 log << MSG::FATAL <<name() << " Could not find Event Header" << endreq;
170 return( StatusCode::FAILURE);
171 }
172 run=eventHeader->runNumber();
173 event=eventHeader->eventNumber();
175
176 if(run>0) Para.SetDataMode(1);
177 else Para.SetDataMode(0);
178
179
180 if(fEventNb!=0&&m_event%fEventNb==0) {
181 log << MSG::FATAL <<m_event<<"-------: "<<run<<","<<event<<endreq;
182 }
183 m_event++;
184 if(fOutput>=2) {
185 log << MSG::DEBUG <<"===================================="<<endreq;
186 log << MSG::DEBUG <<"run= "<<run<<"; event= "<<event<<endreq;
187 }
188
189 Hep3Vector posG; //initial photon position
190#ifndef OnlineMode
191 if(!(m_rawDataProviderSvc->isOnlineMode())) {
192 if(fOutput>=1&&run<0) { //run<0 means MC
193 // Retrieve mc truth
194 SmartDataPtr<McParticleCol> mcParticleCol(eventSvc(),"/Event/MC/McParticleCol");
195 if (!mcParticleCol) {
196 log << MSG::WARNING << "Could not find McParticle" << endreq;
197 } else {
198 HepLorentzVector pG;
199 McParticleCol::iterator iter_mc = mcParticleCol->begin();
200 for (;iter_mc != mcParticleCol->end(); iter_mc++) {
201 log << MSG::INFO
202 << " particleId = " << (*iter_mc)->particleProperty()
203 << endreq;
204 pG = (*iter_mc)->initialFourMomentum();
205 posG = (*iter_mc)->initialPosition().v();
206 }
207 ttheta = pG.theta();
208 tphi = pG.phi();
209 if(tphi<0) {
210 tphi=twopi+tphi;
211 }
212 tp = pG.rho();
213
214 // Retrieve EMC truth
215 SmartDataPtr<EmcMcHitCol> emcMcHitCol(eventSvc(),"/Event/MC/EmcMcHitCol");
216 if (!emcMcHitCol) {
217 log << MSG::WARNING << "Could not find EMC truth" << endreq;
218 }
219
220 RecEmcID mcId;
221 unsigned int mcTrackIndex;
222 double mcPosX=0,mcPosY=0,mcPosZ=0;
223 double mcPx=0,mcPy=0,mcPz=0;
224 double mcEnergy=0;
225
226 EmcMcHitCol::iterator iterMc;
227 for(iterMc=emcMcHitCol->begin();iterMc!=emcMcHitCol->end();iterMc++){
228 mcId=(*iterMc)->identify();
229 mcTrackIndex=(*iterMc)->getTrackIndex();
230 mcPosX=(*iterMc)->getPositionX();
231 mcPosY=(*iterMc)->getPositionY();
232 mcPosZ=(*iterMc)->getPositionZ();
233 mcPx=(*iterMc)->getPx();
234 mcPy=(*iterMc)->getPy();
235 mcPz=(*iterMc)->getPz();
236 mcEnergy=(*iterMc)->getDepositEnergy();
237
238 if(fOutput>=2){
239 //cout<<"mcId="<<mcId<<"\t"<<"mcTrackIndex="<<mcTrackIndex<<endl;
240 //cout<<"mcPosition:\t"<<mcPosX<<"\t"<<mcPosY<<"\t"<<mcPosZ<<endl;
241 //cout<<"mcP:\t"<<mcPx<<"\t"<<mcPy<<"\t"<<mcPz<<endl;
242 //cout<<"mcDepositEnergy=\t"<<mcEnergy<<endl;
243 }
244 }
245 }
246 } //fOutput>=1
247 } //isOnlineMode
248
249#endif
250 //cout<<"EmcRec1--1"<<endl;
251 /// Retrieve EMC digi
252 fDigitMap.clear();
253 fHitMap.clear();
254 fClusterMap.clear();
255 fShowerMap.clear();
256
257 // Get EmcCalibConstSvc.
258 IEmcCalibConstSvc *emcCalibConstSvc = 0;
259 StatusCode sc = service("EmcCalibConstSvc", emcCalibConstSvc);
260 if(sc != StatusCode::SUCCESS) {
261 ;
262 //cout << "EmcRec Error: Can't get EmcCalibConstSvc." << endl;
263 }
264
265 SmartDataPtr<EmcDigiCol> emcDigiCol(eventSvc(),"/Event/Digi/EmcDigiCol");
266 if (!emcDigiCol) {
267 log << MSG::FATAL << "Could not find EMC digi" << endreq;
268 return( StatusCode::FAILURE);
269 }
270 //cout<<"EmcRec1--2"<<endl;
271 EmcDigiCol::iterator iter3;
272 for (iter3=emcDigiCol->begin();iter3!= emcDigiCol->end();iter3++) {
273 RecEmcID id((*iter3)->identify());
274 double adc=RawDataUtil::EmcCharge((*iter3)->getMeasure(),
275 (*iter3)->getChargeChannel());
276 double tdc=RawDataUtil::EmcTime((*iter3)->getTimeChannel());
277
278 //for cable connection correction
279 unsigned int nnpart=EmcID::barrel_ec(id);
280 unsigned int nnthe=EmcID::theta_module(id);
281 unsigned int nnphi=EmcID::phi_module(id);
282
283 int index = emcCalibConstSvc->getIndex(nnpart,nnthe,nnphi);
284 int ixtalNumber=emcCalibConstSvc->getIxtalNumber(index);
285
286
287 if(run>0&&ixtalNumber>0) {
288 unsigned int npartNew=emcCalibConstSvc->getPartID(ixtalNumber);
289 unsigned int ntheNew=emcCalibConstSvc->getThetaIndex(ixtalNumber);
290 unsigned int nphiNew=emcCalibConstSvc->getPhiIndex(ixtalNumber);
291 id=EmcID::crystal_id(npartNew,ntheNew,nphiNew);
292 }//-------
293
294 //*2016-12
295
296 /*
297 unsigned int nphiNew;
298 nphiNew=nnphi;
299 if(nnpart==0) {
300 if (nnthe==0){
301 if (nnphi==36) nphiNew=40;
302 if (nnphi==40) nphiNew=36;
303 if (nnphi==37) nphiNew=41;
304 if (nnphi==41) nphiNew=37;
305 }//----
306 if (nnthe==1){
307 if (nnphi==36) nphiNew=40;
308 if (nnphi==40) nphiNew=36;
309 if (nnphi==37) nphiNew=41;
310 if (nnphi==41) nphiNew=37;
311 }//----
312 if (nnthe==2){
313 if (nnphi==45) nphiNew=50;
314 if (nnphi==50) nphiNew=45;
315 if (nnphi==46) nphiNew=51;
316 if (nnphi==51) nphiNew=46;
317 if (nnphi==47) nphiNew=52;
318 if (nnphi==52) nphiNew=47;
319 }//----
320 if (nnthe==3){
321 if (nnphi==45) nphiNew=50;
322 if (nnphi==50) nphiNew=45;
323 if (nnphi==46) nphiNew=51;
324 if (nnphi==51) nphiNew=46;
325
326 }//----
327 if (nnthe==4){
328 if (nnphi==54) nphiNew=60;
329 if (nnphi==60) nphiNew=54;
330 if (nnphi==55) nphiNew=61;
331 if (nnphi==61) nphiNew=55;
332 if (nnphi==56) nphiNew=62;
333 if (nnphi==62) nphiNew=56;
334 }//----
335 if (nnthe==5){
336 if (nnphi==54) nphiNew=60;
337 if (nnphi==60) nphiNew=54;
338 if (nnphi==55) nphiNew=61;
339 if (nnphi==61) nphiNew=55;
340 if (nnphi==56) nphiNew=62;
341 if (nnphi==62) nphiNew=56;
342 }//----
343
344 id=EmcID::crystal_id(nnpart,nnthe,nphiNew);
345 }
346 */
347
348
349 //2017-12
350 if (run>=52940&&run<=52995){
351 unsigned int ntheNew,nphiNew;
352 ntheNew=nnthe;
353 nphiNew=nnphi;
354 if(nnpart==2) {
355 if (nnthe==0){
356 if (nnphi==58) nphiNew=60;
357 if (nnphi==59) nphiNew=61;
358 if (nnphi==60) nphiNew=58;
359 if (nnphi==61) nphiNew=59;
360 ntheNew=0;
361 }//----
362 if (nnthe==1){
363 if (nnphi==58) nphiNew=60;
364 if (nnphi==59) nphiNew=61;
365 if (nnphi==60) nphiNew=58;
366 if (nnphi==61) nphiNew=59;
367 ntheNew=1;
368 }//----
369 if (nnthe==2){
370 if (nnphi==73) nphiNew=75;
371 if (nnphi==74) nphiNew=76;
372 if (nnphi==75) nphiNew=73;
373 if (nnphi==76) nphiNew=74;
374 ntheNew=2;
375
376 }//----
377 if (nnthe==3){
378 if (nnphi==73) nphiNew=75;
379 if (nnphi==74) nphiNew=76;
380 if (nnphi==75) nphiNew=73;
381 if (nnphi==76) nphiNew=74;
382 ntheNew=3;
383 }//----
384 if (nnthe==3&&nnphi==72){
385 ntheNew=2;
386 nphiNew=77;
387 }
388 if (nnthe==2&&nnphi==77){
389 ntheNew=3;
390 nphiNew=72;
391 }
392
393 if (nnthe==4){
394 if (nnphi==87) nphiNew=90;
395 if (nnphi==88) nphiNew=91;
396 if (nnphi==89) nphiNew=92;
397 if (nnphi==90) nphiNew=87;
398 if (nnphi==91) nphiNew=88;
399 if (nnphi==92) nphiNew=89;
400 ntheNew=4;
401 }//----
402 if (nnthe==5){
403 if (nnphi==87) nphiNew=90;
404 if (nnphi==88) nphiNew=91;
405 if (nnphi==89) nphiNew=92;
406 if (nnphi==90) nphiNew=87;
407 if (nnphi==91) nphiNew=88;
408 if (nnphi==92) nphiNew=89;
409 ntheNew=5;
410 }//----
411
412 id=EmcID::crystal_id(nnpart,ntheNew,nphiNew);
413 }
414 }
415 ///==========
416
417
418
419
420
421 //ixtalNumber=-9 tag dead channel
422 if (ixtalNumber==-9) {
423 adc=0.0;
424 }
425
426 //ixtalNumber=-99 tag hot channel
427 if (ixtalNumber==-99) {
428 adc=0.0;
429 }
430
431 RecEmcDigit aDigit;
432 aDigit.Assign(id,adc,tdc);
433 fDigitMap[id]=aDigit;
434 }
435 //cout<<"EmcRec1--3"<<endl;
436 if(fOutput>=2) {
437 RecEmcDigitMap::iterator iDigitMap;
438 for(iDigitMap=fDigitMap.begin();
439 iDigitMap!=fDigitMap.end();
440 iDigitMap++){
441 //cout<<iDigitMap->second;
442 }
443 }
444 // DigitMap ok
445
446 // oooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
447 /// State 2: DigitMap --> HitMap
448 fDigit2Hit.Convert(fDigitMap,fHitMap);
449 if(fOutput>=2) {
450 RecEmcHitMap::iterator iHitMap;
451 for(iHitMap=fHitMap.begin();
452 iHitMap!=fHitMap.end();
453 iHitMap++){
454 //cout<<iHitMap->second;
455 }
456 fDigit2Hit.Output(fHitMap);
457 }
458 //cout<<"EmcRec1--4"<<endl;
459
460 /// State 3: HitMap --> ClusterMap
461 fHit2Cluster.Convert(fHitMap,fClusterMap);
462 //
463 if(fOutput>=2) {
464 RecEmcClusterMap::iterator iClusterMap;
465 for(iClusterMap=fClusterMap.begin();
466 iClusterMap!=fClusterMap.end();
467 iClusterMap++){
468 //cout<<iClusterMap->second;
469 }
470 }
471 //cout<<"EmcRec1--5"<<endl;
472 /// State 4: ClusterMap --> ShowerMap
473 fCluster2Shower->Convert(fClusterMap,fShowerMap);
474 //
475 if(fOutput>=2) {
476 RecEmcShowerMap::iterator iShowerMap;
477 for(iShowerMap=fShowerMap.begin();
478 iShowerMap!=fShowerMap.end();
479 iShowerMap++) {
480 //cout<<iShowerMap->second;
481 }
482 }
483 //cout<<"EmcRec1--6"<<endl;
484
485 /// State 6: Register to TDS
486 EmcRecTDS tds;
487 tds.RegisterToTDS(fHitMap,fClusterMap,fShowerMap);
488 if(fOutput>=2) {
489 tds.CheckRegister();
490 }
491 //cout<<"EmcRec1--7"<<endl;
492 // oooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
493#ifndef OnlineMode
494 if(!(m_rawDataProviderSvc->isOnlineMode())) {
495 if(fOutput>=1) {
496 nrun=run;
497 nrec=event;
498
499 //cout<<"cm="<<cm<<"\tmm="<<mm<<"\tGeV="<<GeV<<"\tMeV="<<MeV<<endl;
500 ndigi=fDigitMap.size();
501 nhit=fHitMap.size();
502 ncluster=fClusterMap.size();
503 RecEmcShowerVec fShowerVec;
504 RecEmcShowerMap::iterator iShowerMap;
505 for(iShowerMap=fShowerMap.begin();
506 iShowerMap!=fShowerMap.end();
507 iShowerMap++) {
508 fShowerVec.push_back(iShowerMap->second);
509 }
510 sort(fShowerVec.begin(), fShowerVec.end(), greater<RecEmcShower>());
511 nneu=fShowerMap.size();
512
513 RecEmcShower aShower;
514 //aShower.e5x5(-99.);
515 RecEmcShowerVec::iterator iShowerVec;
516 iShowerVec=fShowerVec.begin();
517 npart=-99;
518 ntheta=-99;
519 nphi=-99;
520 if(iShowerVec!=fShowerVec.end()) {
521 aShower=*iShowerVec;
522 RecEmcID id=aShower.getShowerId();
523 npart=EmcID::barrel_ec(id);
524 ntheta=EmcID::theta_module(id);
525 nphi=EmcID::phi_module(id);
526 pp1[0]=aShower.energy()*aShower.x()/aShower.position().mag();
527 pp1[1]=aShower.energy()*aShower.y()/aShower.position().mag();
528 pp1[2]=aShower.energy()*aShower.z()/aShower.position().mag();
529 pp1[3]=aShower.energy();
530 theta1=(aShower.position()-posG).theta();
531 phi1=(aShower.position()-posG).phi();
532 if(phi1<0) {
533 phi1=twopi+phi1;
534 }
535 thtgap1=aShower.ThetaGap();
536 phigap1=aShower.PhiGap();
537 RecEmcID seed,nseed;
538 seed=aShower.getShowerId();
539 nseed=aShower.NearestSeed();
540 eseed=aShower.eSeed();
541 e3x3=aShower.e3x3();
542 e5x5=aShower.e5x5();
543 etof2x1=aShower.getETof2x1();
544 etof2x3=aShower.getETof2x3();
545 if(aShower.getCluster()) {
546 cluster2ndMoment=aShower.getCluster()->getSecondMoment();
547 }
548 secondMoment=aShower.secondMoment();
549 latMoment=aShower.latMoment();
550 a20Moment=aShower.a20Moment();
551 a42Moment=aShower.a42Moment();
552 if(nseed.is_valid()) {
553 enseed=fHitMap[nseed].getEnergy();
554 } else {
555 enseed=0;
556 }
557
558 dphi1=phi1-tphi;
559 if(dphi1<-pi) dphi1=dphi1+twopi;
560 if(dphi1>pi) dphi1=dphi1-twopi;
561 }
562
563 if(iShowerVec!=fShowerVec.end()) {
564 iShowerVec++;
565 if(iShowerVec!=fShowerVec.end()) {
566 aShower=*iShowerVec;
567 pp2[0]=aShower.energy()*aShower.x()/aShower.position().mag();
568 pp2[1]=aShower.energy()*aShower.y()/aShower.position().mag();
569 pp2[2]=aShower.energy()*aShower.z()/aShower.position().mag();
570 pp2[3]=aShower.energy();
571 }
572 }
573
574 //for pi0
575 if(fShowerVec.size()>=2) {
576 RecEmcShowerVec::iterator iShowerVec1,iShowerVec2;
577 iShowerVec1=fShowerVec.begin();
578 iShowerVec2=fShowerVec.begin()+1;
579 double e1=(*iShowerVec1).energy();
580 double e2=(*iShowerVec2).energy();
581 double angle=(*iShowerVec1).position().angle((*iShowerVec2).position());
582 mpi0=sqrt(2*e1*e2*(1-cos(angle)));
583 }
584 m_tuple->write();
585 }
586 }
587#endif
588
589 return StatusCode::SUCCESS;
590}
591
592// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
593StatusCode EmcRec::finalize() {
595 if(fCluster2Shower) delete fCluster2Shower;
596
597 MsgStream log(msgSvc(), name());
598 log << MSG::INFO << "in finalize()" << endreq;
599 return StatusCode::SUCCESS;
600}
double cos(const BesAngle a)
Definition BesAngle.h:213
Double_t e1
Double_t e2
vector< RecEmcShower > RecEmcShowerVec
INTupleSvc * ntupleSvc()
IMessageSvc * msgSvc()
HepPoint3D position() const
double latMoment() const
double a42Moment() const
double eSeed() const
double e3x3() const
double secondMoment() const
double x() const
double e5x5() const
double z() const
double a20Moment() const
double energy() const
double y() const
static Identifier crystal_id(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
For a single crystal.
Definition EmcID.cxx:71
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition EmcID.cxx:38
static unsigned int theta_module(const Identifier &id)
Definition EmcID.cxx:43
static unsigned int phi_module(const Identifier &id)
Definition EmcID.cxx:48
virtual void Convert(RecEmcClusterMap &aClusterMap, RecEmcShowerMap &aShowerMap)=0
void Convert(const RecEmcDigitMap &aDigitMap, RecEmcHitMap &aHitMap)
void Output(const RecEmcHitMap &aHitMap) const
void SetAlgName(const string &name)
void Convert(const RecEmcHitMap &aHitMap, RecEmcClusterMap &aClusterMap)
void SetDigiCalib(bool digi)
void SetPositionMode(std::vector< std::string > &mode)
static EmcRecParameter & GetInstance()
static void unlock()
void SetTimeMin(double min)
static void lock()
void SetPosCorr(double en)
void SetElecSaturation(int IO)
void SetTimeMax(double max)
void SetDataMode(double en)
void SetMethodMode(double en)
StatusCode RegisterToTDS(RecEmcHitMap &aHitMap, RecEmcClusterMap &aClusterMap, RecEmcShowerMap &aShowerMap)
Definition EmcRecTDS.cxx:15
StatusCode CheckRegister()
StatusCode initialize()
Definition EmcRec.cxx:82
StatusCode finalize()
Definition EmcRec.cxx:593
StatusCode execute()
Definition EmcRec.cxx:159
virtual unsigned int getPartID(int Index) const =0
virtual int getIxtalNumber(int No) const =0
virtual unsigned int getPhiIndex(int Index) const =0
virtual unsigned int getThetaIndex(int Index) const =0
virtual int getIndex(unsigned int PartId, unsigned int ThetaIndex, unsigned int PhiIndex) const =0
virtual bool isOnlineMode()=0
bool is_valid() const
Check if id is in a valid state.
Definition Identifier.h:198
static double EmcTime(int timeChannel)
Definition RawDataUtil.h:14
static double EmcCharge(int measure, int chargeChannel)
Definition RawDataUtil.h:17
double getSecondMoment() const
void Assign(const RecEmcID &CellId, const RecEmcADC &ADC, const RecEmcTDC &TDC)
RecEmcID getShowerId() const
RecEmcCluster * getCluster() const
RecEmcEnergy getETof2x1() const
int ThetaGap() const
RecEmcID NearestSeed() const
int PhiGap() const
RecEmcEnergy getETof2x3() const
Definition Event.h:21
const float pi
Definition vector3.h:133