1#include "GaudiKernel/MsgStream.h"
2#include "GaudiKernel/Bootstrap.h"
3#include "GaudiKernel/ISvcLocator.h"
4#include "GaudiKernel/PropertyMgr.h"
5#include "GaudiKernel/IJobOptionsSvc.h"
6#include "GaudiKernel/INTupleSvc.h"
30 IJobOptionsSvc* jobSvc;
31 Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc);
32 jobSvc->setMyProperties(
"TofShower", &m_propMgr);
41 std::cerr <<
"Invalid ntuple in TofEnergyRec!" << std::endl;
43 m_tuple->addItem (
"part", m_part);
44 m_tuple->addItem (
"layer", m_layer);
45 m_tuple->addItem (
"im", m_im);
46 m_tuple->addItem (
"end", m_end);
47 m_tuple->addItem (
"zpos", m_zpos);
48 m_tuple->addItem (
"adc1", m_adc1);
49 m_tuple->addItem (
"adc2", m_adc2);
50 m_tuple->addItem (
"tdc1", m_tdc1);
51 m_tuple->addItem (
"tdc2", m_tdc2);
52 m_tuple->addItem (
"energy", m_energy);
57 std::cerr <<
"Invalid ntuple1 in TofEnergyRec!" << std::endl;
59 m_tuple1->addItem (
"part", m_shower_part);
60 m_tuple1->addItem (
"layer", m_shower_layer);
61 m_tuple1->addItem (
"im", m_shower_im);
62 m_tuple1->addItem (
"zpos", m_shower_zpos);
63 m_tuple1->addItem (
"energy", m_shower_energy);
68 std::cerr <<
"Invalid ntuple2 in TofEnergyRec!" << std::endl;
70 m_tuple2->addItem (
"dist", m_seed_dist);
77 ISvcLocator* svcLocator = Gaudi::svcLocator();
79 StatusCode sc = svcLocator->service(
"TofCaliSvc",
tofCaliSvc);
80 if (sc != StatusCode::SUCCESS) {
81 cout <<
"TofEnergyRec Get Calibration Service Failed !! " << endl;
85 sc = svcLocator->service(
"TofQCorrSvc",
tofQCorrSvc);
86 if (sc != StatusCode::SUCCESS) {
87 cout <<
"TofEnergyRec Get QCorr Service Failed !! " << endl;
91 sc = svcLocator->service(
"TofQElecSvc",
tofQElecSvc);
92 if (sc != StatusCode::SUCCESS) {
93 cout <<
"TofEnergyRec Get QElec Service Failed !! " << endl;
96 vector<TofData*>::iterator it;
97 for(it=tofDataVec.begin();
116 if((*it)->barrel()) {
120 if(bTofData->
tdc1()<=0||bTofData->
tdc1()>8000||bTofData->
tdc2()<=0||bTofData->
tdc2()>8000)
continue;
122 double adc1,adc2,tdc1,tdc2;
123 tdc1 = bTofData->
tdc1();
124 tdc2 = bTofData->
tdc2();
125 adc1 = bTofData->
adc1();
126 adc2 = bTofData->
adc2();
130 if(fabs(zpos)>115)
continue;
132 if(tofq<100||tofq>10000)
continue;
134 double energy = tofq*m_calibConst;
146 m_adc1 = bTofData->
adc1();
147 m_adc2 = bTofData->
adc2();
148 m_tdc1 = bTofData->
tdc1();
149 m_tdc2 = bTofData->
tdc2();
169 double charge_ns = eTofData->
adc();
173 bool neighborhood =
false;
175 int partId_all = barrel_ec;
176 int module_all = im/25;
177 int strip_all = im%25;
179 int partId_charged =-9999;
180 int module_charged =-9999;
181 int strip_charged =-9999;
187 RecTofTrackCol::iterator rec_charged;
190 for( rec_charged = recTofTrackCol->begin(); rec_charged != recTofTrackCol->end();rec_charged++)
198 status->
setStatus((*rec_charged)->status());
200 if((*rec_charged)->tofID()<=125)
continue;
204 if((*rec_charged)->tofID()>=600) {partId_charged=3; module_charged = ((*rec_charged)->tofID()-574)/25; strip_charged =((*rec_charged)->tofID()-574)%25; }
205 else {partId_charged=4; module_charged = ((*rec_charged)->tofID()-100)/25; strip_charged =((*rec_charged)->tofID()-100)%25; }
209 if((*rec_charged)->tofID()>=600) {partId_charged=6; module_charged = ((*rec_charged)->tofID()-574)/25; strip_charged =((*rec_charged)->tofID()-574)%25; }
210 else {partId_charged=5;module_charged = ((*rec_charged)->tofID()-100)/25; strip_charged =((*rec_charged)->tofID()-100)%25;}
217 if( (partId_all==3 || partId_all==4) && (partId_charged==3 || partId_charged==4 ) )
219 if( partId_all==partId_charged && module_charged == module_all &&
abs(strip_charged-strip_all)<3) neutral =
false;
220 if( partId_all==partId_charged && module_charged == module_all)
222 if(strip_all%2==0 && strip_charged%2!=0 && strip_charged<strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
223 if(strip_all%2!=0 && strip_charged%2==0 && strip_charged>strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
227 if( partId_all!=partId_charged &&
abs(module_charged-module_all)<2)
229 if(strip_all%2==0 && strip_charged%2!=0 &&
abs(strip_charged-strip_all)<3 ) neutral =
false;
230 if(strip_all%2==0 && strip_charged%2!=0 && strip_charged<strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
232 if(strip_all%2!=0 && strip_charged%2==0 &&
abs(strip_charged-strip_all)<3 ) neutral =
false;
233 if(strip_all%2!=0 && strip_charged%2==0 && strip_charged>strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
237 else if ( (partId_all==5 || partId_all==6) && (partId_charged==5 || partId_charged==6 ) )
239 if( partId_all==partId_charged && module_charged ==module_all &&
abs(strip_charged-strip_all)<3) neutral =
false;
241 if( partId_all==partId_charged && module_charged == module_all)
243 if(strip_all%2==0 && strip_charged%2!=0 && strip_charged<strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
244 if(strip_all%2!=0 && strip_charged%2==0 && strip_charged>strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
248 if( partId_all!=partId_charged &&
abs(module_charged-module_all)<2)
250 if(strip_all%2==0 && strip_charged%2!=0 &&
abs(strip_charged-strip_all)<3 ) neutral =
false;
251 if(strip_all%2==0 && strip_charged%2!=0 && strip_charged<strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
253 if(strip_all%2!=0 && strip_charged%2==0 &&
abs(strip_charged-strip_all)<3 ) neutral =
false;
254 if(strip_all%2!=0 && strip_charged%2==0 && strip_charged>strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
263 vector<TofData*>::iterator it_temp;
264 for(it_temp=tofDataVec.begin();it_temp!=tofDataVec.end();it_temp++)
270 int module_temp = im_temp/25;
271 int strip_temp = im_temp%25;
274 if( partId_temp==1 )
continue;
275 if(!is_mrpc_temp)
continue;
277 if( (partId_all==3 || partId_all==4) && (partId_temp==3 || partId_temp==4 ) )
279 if( partId_all==partId_temp && module_temp == module_all &&
abs(strip_temp-strip_all)!=0 &&
abs(strip_temp-strip_all)<3) neighborhood =
true;
280 if( partId_all==partId_temp && module_temp == module_all)
282 if(strip_all%2==0 && strip_temp%2!=0 && strip_temp<strip_all &&
abs(strip_temp-strip_all)<4 &&
abs(strip_temp-strip_all)!=0) neighborhood =
true;
283 if(strip_all%2!=0 && strip_temp%2==0 && strip_temp>strip_all &&
abs(strip_temp-strip_all)<4 &&
abs(strip_temp-strip_all)!=0) neighborhood =
true;
286 if( partId_all!=partId_temp &&
abs(module_temp-module_all)<2)
288 if(strip_all%2==0 && strip_temp%2!=0 &&
abs(strip_temp-strip_all)<3 ) neighborhood =
true;
289 if(strip_all%2==0 && strip_temp%2!=0 && strip_temp<strip_all &&
abs(strip_temp-strip_all)<4) neighborhood =
true;
291 if(strip_all%2!=0 && strip_temp%2==0 &&
abs(strip_temp-strip_all)<3 ) neighborhood =
true;
292 if(strip_all%2!=0 && strip_temp%2==0 && strip_temp>strip_all &&
abs(strip_temp-strip_all)<4) neighborhood =
true;
296 else if( (partId_all==5 || partId_all==6) && (partId_temp==5 || partId_temp==6 ) )
298 if( partId_all==partId_temp && module_temp == module_all &&
abs(strip_temp-strip_all)!=0 &&
abs(strip_temp-strip_all)<3) neighborhood =
true;
299 if( partId_all==partId_temp && module_temp == module_all)
301 if(strip_all%2==0 && strip_temp%2!=0 && strip_temp<strip_all &&
abs(strip_temp-strip_all)<4 &&
abs(strip_temp-strip_all)!=0) neighborhood =
true;
302 if(strip_all%2!=0 && strip_temp%2==0 && strip_temp>strip_all &&
abs(strip_temp-strip_all)<4 &&
abs(strip_temp-strip_all)!=0) neighborhood =
true;
305 if( partId_all!=partId_temp &&
abs(module_temp-module_all)<2)
307 if(strip_all%2==0 && strip_temp%2!=0 &&
abs(strip_temp-strip_all)<3 ) neighborhood =
true;
308 if(strip_all%2==0 && strip_temp%2!=0 && strip_temp<strip_all &&
abs(strip_temp-strip_all)<4) neighborhood =
true;
310 if(strip_all%2!=0 && strip_temp%2==0 &&
abs(strip_temp-strip_all)<3 ) neighborhood =
true;
311 if(strip_all%2!=0 && strip_temp%2==0 && strip_temp>strip_all &&
abs(strip_temp-strip_all)<4) neighborhood =
true;
334 vector<int> NeighborVec;
335 vector<Identifier> NeighborIdVec;
337 NeighborIdVec.clear();
345 int num = im+layer*88;
348 NeighborVec.push_back(1);
349 NeighborVec.push_back(87);
350 NeighborVec.push_back(88);
351 NeighborVec.push_back(89);
353 NeighborVec.push_back(0);
354 NeighborVec.push_back(86);
355 NeighborVec.push_back(88);
356 NeighborVec.push_back(175);
358 NeighborVec.push_back(
num+1);
359 NeighborVec.push_back(
num-1);
360 NeighborVec.push_back(
num+88);
361 NeighborVec.push_back(
num+88+1);
365 NeighborVec.push_back(89);
366 NeighborVec.push_back(175);
367 NeighborVec.push_back(0);
368 NeighborVec.push_back(87);
369 }
else if(
num==175) {
370 NeighborVec.push_back(88);
371 NeighborVec.push_back(174);
372 NeighborVec.push_back(86);
373 NeighborVec.push_back(87);
375 NeighborVec.push_back(
num+1);
376 NeighborVec.push_back(
num-1);
377 NeighborVec.push_back(
num-88);
378 NeighborVec.push_back(
num-88-1);
382 int size=NeighborVec.size();
383 for(
int i=0;i<size;i++) {
384 layer = NeighborVec[i]/88;
385 im = NeighborVec[i]%88;
392 NeighborVec.push_back(1);
393 NeighborVec.push_back(47);
395 NeighborVec.push_back(0);
396 NeighborVec.push_back(46);
398 NeighborVec.push_back(im-1);
399 NeighborVec.push_back(im+1);
402 int size=NeighborVec.size();
403 for(
int i=0;i<size;i++) {
409 return NeighborIdVec;
414 vector<Identifier> NeighborVec,tmpNeighborVec,tmpNextNeighborVec;
415 vector<Identifier>::iterator ci_NV,ci_tmpNV,ci_tmpNNV;
419 bool flagNeighbor=
false;
422 for(ci_tmpNV=tmpNeighborVec.begin();
423 ci_tmpNV!=tmpNeighborVec.end();
427 for(ci_tmpNNV=tmpNextNeighborVec.begin();
428 ci_tmpNNV!=tmpNextNeighborVec.end();
431 for(ci_NV=NeighborVec.begin();
432 ci_NV!=NeighborVec.end();
434 if(*ci_tmpNNV==*ci_NV){
454 NeighborVec.push_back(*ci_tmpNNV);
479 vector<Identifier> NeighborVec;
552 vector<TofData*>::iterator it;
553 for(it=tofDataVec.begin();
554 it!=tofDataVec.end();
556 if((*it)->barrel()) {
563 if(bTofData->
energy()<5.)
continue;
571 vector<Identifier>::iterator iNeigh;
572 for(iNeigh=NeighborVec.begin();
573 iNeigh!=NeighborVec.end();
579 vector<TofData*>::iterator it2;
580 for(it2=tofDataVec.begin();
581 it2!=tofDataVec.end();
583 if((*it2)->identify()==*iNeigh) {
605 if(eTofData->
energy()<5.)
continue;
608 vector<Identifier>::iterator iNeigh;
609 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
612 vector<TofData*>::iterator it2;
613 for(it2=tofDataVec.begin(); it2!=tofDataVec.end(); it2++)
615 if((*it2)->identify()==*iNeigh) {
629 if(eTofData->
energy()<2.)
continue;
635 vector<Identifier>::iterator iNeigh;
637 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
640 vector<TofData*>::iterator it2;
641 for(it2=tofDataVec.begin(); it2!=tofDataVec.end(); it2++)
643 if((*it2)->identify()==*iNeigh) {
660 m_seedVec.push_back(
Identifier((*it)->identify()));
674 vector<Identifier>::iterator iSeed;
676 for(iSeed=m_seedVec.begin(); iSeed!=m_seedVec.end(); iSeed++)
692 RecTofTrackCol::iterator iTrack, iMatch;
693 for(iTrack=recTofTrackCol->begin(); iTrack!=recTofTrackCol->end(); iTrack++)
696 dphi=
abs(im-(*iTrack)->tofID());
697 dphi = dphi>=44 ? 88-dphi : dphi;
698 }
else if(barrel_ec==2) {
699 dphi=
abs(im-(*iTrack)->tofID()+48);
700 dphi = dphi>=24 ? 48-dphi : dphi;
702 dphi=
abs(im-(*iTrack)->tofID());
703 dphi = dphi>=24 ? 48-dphi : dphi;
720 vector<TofData*>::iterator it;
721 for(it=tofDataVec.begin(); it!=tofDataVec.end(); it++)
723 if((*it)->identify()==*iSeed) {
725 if((*it)->barrel()) {
729 seedPos=bTofData->
zpos();
743 vector<Identifier>::iterator iNeigh;
744 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
747 vector<TofData*>::iterator it2;
748 for(it2=tofDataVec.begin(); it2!=tofDataVec.end(); it2++)
750 if((*it2)->identify()==*iNeigh) {
752 if((*it)->barrel()) {
755 if(fabs(bTofData2->
zpos())>2)
continue;
757 m_seed_dist = seedPos-bTofData2->
zpos();
760 if(fabs(seedPos-bTofData2->
zpos())>0.3)
continue;
777 (*iMatch)->setEnergy(
energy/1000);
788 recTofTrackCol->push_back(tof);
791 m_shower_part = barrel_ec;
792 m_shower_layer = layer;
794 m_shower_zpos = zpos;
813 RecTofTrackCol::iterator rec_charged,iMatch;
814 for( rec_charged = recTofTrackCol->begin(); rec_charged != recTofTrackCol->end();rec_charged++)
818 status->
setStatus((*rec_charged)->status());
820 if((*rec_charged)->tofID()<=125)
continue;
822 int partId_charged =-1;
823 int module_charged =-1;
824 int strip_charged =-1;
828 if((*rec_charged)->tofID()>=600) {partId_charged=3; module_charged = ((*rec_charged)->tofID()-574)/25; strip_charged =((*rec_charged)->tofID()-574)%25; }
829 else {partId_charged=4; module_charged = ((*rec_charged)->tofID()-100)/25; strip_charged =((*rec_charged)->tofID()-100)%25; }
833 if((*rec_charged)->tofID()>=600) {partId_charged=6; module_charged = ((*rec_charged)->tofID()-574)/25; strip_charged =((*rec_charged)->tofID()-574)%25; }
834 else {partId_charged=5;module_charged = ((*rec_charged)->tofID()-100)/25; strip_charged =((*rec_charged)->tofID()-100)%25;}
839 if( (partId_seed==3 || partId_seed==4) && (partId_charged==3 || partId_charged==4 ) )
841 if( partId_seed==partId_charged && module_charged == module_seed &&
abs(strip_charged-strip_seed)<3) {iMatch=rec_charged; neutral =
false;
break;}
842 if( partId_seed==partId_charged && module_charged == module_seed)
844 if(strip_seed%2==0 && strip_charged%2!=0 && strip_charged<strip_seed &&
abs(strip_charged-strip_seed)<4) {iMatch=rec_charged; neutral =
false;
break;}
845 if(strip_seed%2!=0 && strip_charged%2==0 && strip_charged>strip_seed &&
abs(strip_charged-strip_seed)<4) {iMatch=rec_charged; neutral =
false;
break;}
849 if( partId_seed!=partId_charged &&
abs(module_charged-module_seed)<2)
851 if(strip_seed%2==0 && strip_charged%2!=0 &&
abs(strip_charged-strip_seed)<3 ) {iMatch=rec_charged; neutral =
false;
break;}
852 if(strip_seed%2==0 && strip_charged%2!=0 && strip_charged<strip_seed &&
abs(strip_charged-strip_seed)<4) {iMatch=rec_charged; neutral =
false;
break;}
854 if(strip_seed%2!=0 && strip_charged%2==0 &&
abs(strip_charged-strip_seed)<3 ) {iMatch=rec_charged; neutral =
false;
break;}
855 if(strip_seed%2!=0 && strip_charged%2==0 && strip_charged>strip_seed &&
abs(strip_charged-strip_seed)<4) {iMatch=rec_charged; neutral =
false;
break;}
859 else if ( (partId_seed==5 || partId_seed==6) && (partId_charged==5 || partId_charged==6 ) )
861 if( partId_seed==partId_charged && module_charged ==module_seed &&
abs(strip_charged-strip_seed)<3) {iMatch=rec_charged; neutral =
false;
break;}
863 if( partId_seed==partId_charged && module_charged == module_seed)
865 if(strip_seed%2==0 && strip_charged%2!=0 && strip_charged<strip_seed &&
abs(strip_charged-strip_seed)<4) {iMatch=rec_charged; neutral =
false;
break;}
866 if(strip_seed%2!=0 && strip_charged%2==0 && strip_charged>strip_seed &&
abs(strip_charged-strip_seed)<4) {iMatch=rec_charged; neutral =
false;
break;}
869 if( partId_seed!=partId_charged &&
abs(module_charged-module_seed)<2)
871 if(strip_seed%2==0 && strip_charged%2!=0 &&
abs(strip_charged-strip_seed)<3 ) {iMatch=rec_charged; neutral =
false;
break;}
872 if(strip_seed%2==0 && strip_charged%2!=0 && strip_charged<strip_seed &&
abs(strip_charged-strip_seed)<4) {iMatch=rec_charged; neutral =
false;
break;}
874 if(strip_seed%2!=0 && strip_charged%2==0 &&
abs(strip_charged-strip_seed)<3 ) {iMatch=rec_charged; neutral =
false;
break;}
875 if(strip_seed%2!=0 && strip_charged%2==0 && strip_charged>strip_seed &&
abs(strip_charged-strip_seed)<4) {iMatch=rec_charged; neutral =
false;
break;}
888 double timeinfo_neutral=0;
889 double charge_neutral=0;
890 vector<TofData*>::iterator it;
891 for(it=tofDataVec.begin();it!=tofDataVec.end();it++)
893 if((*it)->barrel())
continue;
895 if((*it)->identify()==*iSeed)
899 timeinfo_neutral= eTofData->
tdc();
900 charge_neutral= eTofData->
adc();
912 vector<Identifier>::iterator iNeigh;
913 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
916 vector<TofData*>::iterator it2;
917 for(it2=tofDataVec.begin();it2!=tofDataVec.end();it2++)
919 if((*it2)->identify()==(*iNeigh))
944 double tof= timeinfo_neutral-t0;
951 tof_track->
setPh(charge_neutral);
953 recTofTrackCol->push_back(tof_track);
965 string paraPath = getenv(
"TOFENERGYRECROOT");
966 paraPath +=
"/share/peak.dat";
968 in.open(paraPath.c_str());
970 for(
int i=0;i<176;i++) {
975 paraPath = getenv(
"TOFENERGYRECROOT");
976 paraPath +=
"/share/calib.dat";
978 in1.open(paraPath.c_str());
980 for(
int i=0;i<176;i++) {
981 in1>>m_calib[i][0]>>m_calib[i][1]>>m_calib[i][2]>>m_calib[i][3];
989 return m_ecalib[nsci];
1005 return m_calib[
n][m];
1038 if(strip%2==0) returnvalue = layer;
1041 if(layer==3) returnvalue = 4;
1042 if(layer==4) returnvalue = 3;
1043 if(layer==5) returnvalue = 6;
1044 if(layer==6) returnvalue = 5;
1050 if(strip%2!=0) returnvalue = layer;
1053 if(layer==3) returnvalue = 4;
1054 if(layer==4) returnvalue = 3;
1055 if(layer==5) returnvalue = 6;
1056 if(layer==6) returnvalue = 5;
1060 if(which==
"u")returnvalue = layer;
1061 if(which==
"b")returnvalue = layer;
1075 int neighbourstrip=0;
1076 int neighbourmodule=0;
1080 if(strip==0)
return 0;
1086 neighbourstrip=strip-1;
1087 if(layer==3 || layer== 6)
1088 {neighbourmodule=module;}
1090 {neighbourmodule=module;}
1094 neighbourstrip=strip+1;
1096 if(layer==3 || layer== 5)
1098 neighbourmodule=module;
1102 neighbourmodule=module+1;
1103 if(neighbourmodule==19){neighbourmodule=1;}
1115 neighbourstrip=strip-1;
1117 if(layer==4 || layer== 6)
1118 {neighbourmodule=module;}
1120 {neighbourmodule=module-1;
1121 if(neighbourmodule==0){neighbourmodule=18;}
1126 neighbourstrip=strip+1;
1127 if(layer==3 || layer== 6)
1128 {neighbourmodule=module;}
1130 {neighbourmodule=module;}
1139 if(strip==23 || strip==24) {neighbourmodule=0; neighbourstrip=0;}
1142 neighbourstrip=strip+2;
1143 neighbourmodule=module;
1151 if(strip==1 || strip==2) {neighbourmodule=0; neighbourstrip=0;}
1154 neighbourstrip=strip-2;
1155 neighbourmodule=module;
double abs(const EvtComplex &c)
************Class m_ypar INTEGER m_KeyWgt INTEGER m_nphot INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
ObjectVector< RecTofTrack > RecTofTrackCol
ITofQElecSvc * tofQElecSvc
ITofQCorrSvc * tofQCorrSvc
static G4int Produce_unique_identifier(G4int module_mrpc_f, G4int readoutstripnumber_f)
static G4int Get_module_mrpc_from_unique_identifier(G4int unique_identifier_f)
static G4int Get_stripnumber_from_unique_identifier(G4int unique_identifier_f)
void setEnergy(double energy)
void setZrHit(double zrhit)
virtual const double BPh(double ADC1, double ADC2, double zHit, unsigned int id)=0
virtual const double ZTDC(double tleft, double tright, unsigned id)=0
double GetEnergyCalibration(double, bool, bool)
void setEnergy(double energy)
void setZpos(double zpos)
unsigned int identify() const
void setStatus(unsigned int status)
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
static int end(const Identifier &id)
static Identifier cell_id_mrpc(int partID, int scinNum)
static int phi_module(const Identifier &id)
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
static bool is_mymrpc(const Identifier &id)
static int layer(const Identifier &id)
double calib(const int n, const int m) const
double ecalib(const int nsci) const
void findSeed(vector< TofData * > &tofDataVec)
void BookNtuple(NTuple::Tuple *&tuple, NTuple::Tuple *&tuple1, NTuple::Tuple *&tuple2)
void setEcalib(const int nsci, const double ecalib)
int get_mrpc_stripid_neighbour(string which, int stripid, int layer)
vector< Identifier > getMRPC_neighbours(const Identifier &id)
void energyCalib(vector< TofData * > &tofDataVec, RecTofTrackCol *recTofTrackCol)
vector< Identifier > getNextNeighbors(const Identifier &id)
void setCalib(const int n, const int m, const double ecalib)
vector< Identifier > getNeighbors(const Identifier &id)
void findShower(vector< TofData * > &tofDataVec, RecTofTrackCol *recTofTrackCol, double)
int get_mrpc_partid_neighbour(string which, int stripid, int layer)