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"
27 IJobOptionsSvc* jobSvc;
28 Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc);
29 jobSvc->setMyProperties(
"TofShower", &m_propMgr);
38 std::cerr <<
"Invalid ntuple in TofEnergyRec!" << std::endl;
40 m_tuple->addItem (
"part", m_part);
41 m_tuple->addItem (
"layer", m_layer);
42 m_tuple->addItem (
"im", m_im);
43 m_tuple->addItem (
"end", m_end);
44 m_tuple->addItem (
"zpos", m_zpos);
45 m_tuple->addItem (
"adc1", m_adc1);
46 m_tuple->addItem (
"adc2", m_adc2);
47 m_tuple->addItem (
"tdc1", m_tdc1);
48 m_tuple->addItem (
"tdc2", m_tdc2);
49 m_tuple->addItem (
"energy", m_energy);
54 std::cerr <<
"Invalid ntuple1 in TofEnergyRec!" << std::endl;
56 m_tuple1->addItem (
"part", m_shower_part);
57 m_tuple1->addItem (
"layer", m_shower_layer);
58 m_tuple1->addItem (
"im", m_shower_im);
59 m_tuple1->addItem (
"zpos", m_shower_zpos);
60 m_tuple1->addItem (
"energy", m_shower_energy);
65 std::cerr <<
"Invalid ntuple2 in TofEnergyRec!" << std::endl;
67 m_tuple2->addItem (
"dist", m_seed_dist);
74 ISvcLocator* svcLocator = Gaudi::svcLocator();
76 StatusCode sc = svcLocator->service(
"TofCaliSvc",
tofCaliSvc);
77 if (sc != StatusCode::SUCCESS) {
78 cout <<
"TofEnergyRec Get Calibration Service Failed !! " << endl;
82 sc = svcLocator->service(
"TofQCorrSvc",
tofQCorrSvc);
83 if (sc != StatusCode::SUCCESS) {
84 cout <<
"TofEnergyRec Get QCorr Service Failed !! " << endl;
88 sc = svcLocator->service(
"TofQElecSvc",
tofQElecSvc);
89 if (sc != StatusCode::SUCCESS) {
90 cout <<
"TofEnergyRec Get QElec Service Failed !! " << endl;
93 vector<TofData*>::iterator it;
94 for(it=tofDataVec.begin();
113 if((*it)->barrel()) {
117 if(bTofData->
tdc1()<=0||bTofData->
tdc1()>8000||bTofData->
tdc2()<=0||bTofData->
tdc2()>8000)
continue;
119 double adc1,adc2,tdc1,tdc2;
120 tdc1 = bTofData->
tdc1();
121 tdc2 = bTofData->
tdc2();
122 adc1 = bTofData->
adc1();
123 adc2 = bTofData->
adc2();
127 if(fabs(zpos)>115)
continue;
129 if(tofq<100||tofq>10000)
continue;
131 double energy = tofq*m_calibConst;
143 m_adc1 = bTofData->
adc1();
144 m_adc2 = bTofData->
adc2();
145 m_tdc1 = bTofData->
tdc1();
146 m_tdc2 = bTofData->
tdc2();
166 double charge_ns = eTofData->
adc();
175 bool neighborhood =
false;
177 int partId_all = barrel_ec;
178 int module_all = im/25;
179 int strip_all = im%25;
181 int partId_charged =-9999;
182 int module_charged =-9999;
183 int strip_charged =-9999;
197 RecTofTrackCol::iterator rec_charged;
200 for( rec_charged = recTofTrackCol->begin(); rec_charged != recTofTrackCol->end();rec_charged++)
208 status->
setStatus((*rec_charged)->status());
210 if((*rec_charged)->tofID()<=125)
continue;
214 if((*rec_charged)->tofID()>=600) {partId_charged=3; module_charged = ((*rec_charged)->tofID()-574)/25; strip_charged =((*rec_charged)->tofID()-574)%25; }
215 else {partId_charged=4; module_charged = ((*rec_charged)->tofID()-100)/25; strip_charged =((*rec_charged)->tofID()-100)%25; }
219 if((*rec_charged)->tofID()>=600) {partId_charged=6; module_charged = ((*rec_charged)->tofID()-574)/25; strip_charged =((*rec_charged)->tofID()-574)%25; }
220 else {partId_charged=5;module_charged = ((*rec_charged)->tofID()-100)/25; strip_charged =((*rec_charged)->tofID()-100)%25;}
233 if( (partId_all==3 || partId_all==4) && (partId_charged==3 || partId_charged==4 ) )
235 if( partId_all==partId_charged && module_charged == module_all &&
abs(strip_charged-strip_all)<3) neutral =
false;
236 if( partId_all==partId_charged && module_charged == module_all)
238 if(strip_all%2==0 && strip_charged%2!=0 && strip_charged<strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
239 if(strip_all%2!=0 && strip_charged%2==0 && strip_charged>strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
243 if( partId_all!=partId_charged &&
abs(module_charged-module_all)<2)
245 if(strip_all%2==0 && strip_charged%2!=0 &&
abs(strip_charged-strip_all)<3 ) neutral =
false;
246 if(strip_all%2==0 && strip_charged%2!=0 && strip_charged<strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
248 if(strip_all%2!=0 && strip_charged%2==0 &&
abs(strip_charged-strip_all)<3 ) neutral =
false;
249 if(strip_all%2!=0 && strip_charged%2==0 && strip_charged>strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
253 else if ( (partId_all==5 || partId_all==6) && (partId_charged==5 || partId_charged==6 ) )
255 if( partId_all==partId_charged && module_charged ==module_all &&
abs(strip_charged-strip_all)<3) neutral =
false;
257 if( partId_all==partId_charged && module_charged == module_all)
259 if(strip_all%2==0 && strip_charged%2!=0 && strip_charged<strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
260 if(strip_all%2!=0 && strip_charged%2==0 && strip_charged>strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
264 if( partId_all!=partId_charged &&
abs(module_charged-module_all)<2)
266 if(strip_all%2==0 && strip_charged%2!=0 &&
abs(strip_charged-strip_all)<3 ) neutral =
false;
267 if(strip_all%2==0 && strip_charged%2!=0 && strip_charged<strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
269 if(strip_all%2!=0 && strip_charged%2==0 &&
abs(strip_charged-strip_all)<3 ) neutral =
false;
270 if(strip_all%2!=0 && strip_charged%2==0 && strip_charged>strip_all &&
abs(strip_charged-strip_all)<4) neutral =
false;
289 vector<TofData*>::iterator it_temp;
290 for(it_temp=tofDataVec.begin();it_temp!=tofDataVec.end();it_temp++)
296 int module_temp = im_temp/25;
297 int strip_temp = im_temp%25;
300 if( partId_temp==1 )
continue;
301 if(!is_mrpc_temp)
continue;
303 if( (partId_all==3 || partId_all==4) && (partId_temp==3 || partId_temp==4 ) )
305 if( partId_all==partId_temp && module_temp == module_all &&
abs(strip_temp-strip_all)!=0 &&
abs(strip_temp-strip_all)<3) neighborhood =
true;
306 if( partId_all==partId_temp && module_temp == module_all)
308 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;
309 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;
312 if( partId_all!=partId_temp &&
abs(module_temp-module_all)<2)
314 if(strip_all%2==0 && strip_temp%2!=0 &&
abs(strip_temp-strip_all)<3 ) neighborhood =
true;
315 if(strip_all%2==0 && strip_temp%2!=0 && strip_temp<strip_all &&
abs(strip_temp-strip_all)<4) neighborhood =
true;
317 if(strip_all%2!=0 && strip_temp%2==0 &&
abs(strip_temp-strip_all)<3 ) neighborhood =
true;
318 if(strip_all%2!=0 && strip_temp%2==0 && strip_temp>strip_all &&
abs(strip_temp-strip_all)<4) neighborhood =
true;
322 else if( (partId_all==5 || partId_all==6) && (partId_temp==5 || partId_temp==6 ) )
324 if( partId_all==partId_temp && module_temp == module_all &&
abs(strip_temp-strip_all)!=0 &&
abs(strip_temp-strip_all)<3) neighborhood =
true;
325 if( partId_all==partId_temp && module_temp == module_all)
327 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;
328 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;
331 if( partId_all!=partId_temp &&
abs(module_temp-module_all)<2)
333 if(strip_all%2==0 && strip_temp%2!=0 &&
abs(strip_temp-strip_all)<3 ) neighborhood =
true;
334 if(strip_all%2==0 && strip_temp%2!=0 && strip_temp<strip_all &&
abs(strip_temp-strip_all)<4) neighborhood =
true;
336 if(strip_all%2!=0 && strip_temp%2==0 &&
abs(strip_temp-strip_all)<3 ) neighborhood =
true;
337 if(strip_all%2!=0 && strip_temp%2==0 && strip_temp>strip_all &&
abs(strip_temp-strip_all)<4) neighborhood =
true;
351 if(charge_ns<15.0716)
energy = 326.35-10.6284*15.0716-1.4169*15.0716*15.0716-0.0514292*15.0716*15.0716*15.0716+0.00645421*15.0716*15.0716*15.0716*15.0716;
352 else if(charge_ns>15.9131)
energy = -7.91205+0.814588*charge_ns;
353 else energy = 326.35-10.6284*charge_ns-1.4169*charge_ns*charge_ns-0.0514292*charge_ns*charge_ns*charge_ns+0.00645421*charge_ns*charge_ns*charge_ns*charge_ns;
357 if(neighborhood==
false)
energy = -7.91205+0.814588*charge_ns;
360 if(15.16>= charge_ns)
energy= -72550.7+14230.9*15.16-930.499*15.16*15.16+20.2818*15.16*15.16*15.16;
361 if(15.16< charge_ns &&charge_ns<15.7633)
energy= -72550.7+14230.9*charge_ns-930.499*charge_ns*charge_ns+20.2818*charge_ns*charge_ns*charge_ns;
362 else energy = -7.91205+0.814588*charge_ns;
393 vector<int> NeighborVec;
394 vector<Identifier> NeighborIdVec;
396 NeighborIdVec.clear();
404 int num = im+layer*88;
407 NeighborVec.push_back(1);
408 NeighborVec.push_back(87);
409 NeighborVec.push_back(88);
410 NeighborVec.push_back(89);
412 NeighborVec.push_back(0);
413 NeighborVec.push_back(86);
414 NeighborVec.push_back(88);
415 NeighborVec.push_back(175);
417 NeighborVec.push_back(
num+1);
418 NeighborVec.push_back(
num-1);
419 NeighborVec.push_back(
num+88);
420 NeighborVec.push_back(
num+88+1);
424 NeighborVec.push_back(89);
425 NeighborVec.push_back(175);
426 NeighborVec.push_back(0);
427 NeighborVec.push_back(87);
428 }
else if(
num==175) {
429 NeighborVec.push_back(88);
430 NeighborVec.push_back(174);
431 NeighborVec.push_back(86);
432 NeighborVec.push_back(87);
434 NeighborVec.push_back(
num+1);
435 NeighborVec.push_back(
num-1);
436 NeighborVec.push_back(
num-88);
437 NeighborVec.push_back(
num-88-1);
441 int size=NeighborVec.size();
442 for(
int i=0;i<size;i++) {
443 layer = NeighborVec[i]/88;
444 im = NeighborVec[i]%88;
451 NeighborVec.push_back(1);
452 NeighborVec.push_back(47);
454 NeighborVec.push_back(0);
455 NeighborVec.push_back(46);
457 NeighborVec.push_back(im-1);
458 NeighborVec.push_back(im+1);
461 int size=NeighborVec.size();
462 for(
int i=0;i<size;i++) {
468 return NeighborIdVec;
473 vector<Identifier> NeighborVec,tmpNeighborVec,tmpNextNeighborVec;
474 vector<Identifier>::iterator ci_NV,ci_tmpNV,ci_tmpNNV;
478 bool flagNeighbor=
false;
481 for(ci_tmpNV=tmpNeighborVec.begin();
482 ci_tmpNV!=tmpNeighborVec.end();
486 for(ci_tmpNNV=tmpNextNeighborVec.begin();
487 ci_tmpNNV!=tmpNextNeighborVec.end();
490 for(ci_NV=NeighborVec.begin();
491 ci_NV!=NeighborVec.end();
493 if(*ci_tmpNNV==*ci_NV){
513 NeighborVec.push_back(*ci_tmpNNV);
538 vector<Identifier> NeighborVec;
631 vector<TofData*>::iterator it;
632 for(it=tofDataVec.begin();
633 it!=tofDataVec.end();
635 if((*it)->barrel()) {
642 if(bTofData->
energy()<5.)
continue;
650 vector<Identifier>::iterator iNeigh;
651 for(iNeigh=NeighborVec.begin();
652 iNeigh!=NeighborVec.end();
658 vector<TofData*>::iterator it2;
659 for(it2=tofDataVec.begin();
660 it2!=tofDataVec.end();
662 if((*it2)->identify()==*iNeigh) {
684 if(eTofData->
energy()<5.)
continue;
687 vector<Identifier>::iterator iNeigh;
688 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
691 vector<TofData*>::iterator it2;
692 for(it2=tofDataVec.begin(); it2!=tofDataVec.end(); it2++)
694 if((*it2)->identify()==*iNeigh) {
708 if(eTofData->
energy()<2.)
continue;
714 vector<Identifier>::iterator iNeigh;
716 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
719 vector<TofData*>::iterator it2;
720 for(it2=tofDataVec.begin(); it2!=tofDataVec.end(); it2++)
722 if((*it2)->identify()==*iNeigh) {
739 m_seedVec.push_back(
Identifier((*it)->identify()));
753 vector<Identifier>::iterator iSeed;
755 for(iSeed=m_seedVec.begin(); iSeed!=m_seedVec.end(); iSeed++)
771 RecTofTrackCol::iterator iTrack, iMatch;
772 for(iTrack=recTofTrackCol->begin(); iTrack!=recTofTrackCol->end(); iTrack++)
775 dphi=
abs(im-(*iTrack)->tofID());
776 dphi = dphi>=44 ? 88-dphi : dphi;
777 }
else if(barrel_ec==2) {
778 dphi=
abs(im-(*iTrack)->tofID()+48);
779 dphi = dphi>=24 ? 48-dphi : dphi;
781 dphi=
abs(im-(*iTrack)->tofID());
782 dphi = dphi>=24 ? 48-dphi : dphi;
799 vector<TofData*>::iterator it;
800 for(it=tofDataVec.begin(); it!=tofDataVec.end(); it++)
802 if((*it)->identify()==*iSeed) {
804 if((*it)->barrel()) {
808 seedPos=bTofData->
zpos();
822 vector<Identifier>::iterator iNeigh;
823 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
826 vector<TofData*>::iterator it2;
827 for(it2=tofDataVec.begin(); it2!=tofDataVec.end(); it2++)
829 if((*it2)->identify()==*iNeigh) {
831 if((*it)->barrel()) {
834 if(fabs(bTofData2->
zpos())>2)
continue;
836 m_seed_dist = seedPos-bTofData2->
zpos();
839 if(fabs(seedPos-bTofData2->
zpos())>0.3)
continue;
856 (*iMatch)->setEnergy(
energy/1000);
867 recTofTrackCol->push_back(tof);
870 m_shower_part = barrel_ec;
871 m_shower_layer = layer;
873 m_shower_zpos = zpos;
892 RecTofTrackCol::iterator rec_charged,iMatch;
893 for( rec_charged = recTofTrackCol->begin(); rec_charged != recTofTrackCol->end();rec_charged++)
897 status->
setStatus((*rec_charged)->status());
899 if((*rec_charged)->tofID()<=125)
continue;
901 int partId_charged =-1;
902 int module_charged =-1;
903 int strip_charged =-1;
907 if((*rec_charged)->tofID()>=600) {partId_charged=3; module_charged = ((*rec_charged)->tofID()-574)/25; strip_charged =((*rec_charged)->tofID()-574)%25; }
908 else {partId_charged=4; module_charged = ((*rec_charged)->tofID()-100)/25; strip_charged =((*rec_charged)->tofID()-100)%25; }
912 if((*rec_charged)->tofID()>=600) {partId_charged=6; module_charged = ((*rec_charged)->tofID()-574)/25; strip_charged =((*rec_charged)->tofID()-574)%25; }
913 else {partId_charged=5;module_charged = ((*rec_charged)->tofID()-100)/25; strip_charged =((*rec_charged)->tofID()-100)%25;}
918 if( (partId_seed==3 || partId_seed==4) && (partId_charged==3 || partId_charged==4 ) )
920 if( partId_seed==partId_charged && module_charged == module_seed &&
abs(strip_charged-strip_seed)<3) {iMatch=rec_charged; neutral =
false;
break;}
921 if( partId_seed==partId_charged && module_charged == module_seed)
923 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;}
924 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;}
928 if( partId_seed!=partId_charged &&
abs(module_charged-module_seed)<2)
930 if(strip_seed%2==0 && strip_charged%2!=0 &&
abs(strip_charged-strip_seed)<3 ) {iMatch=rec_charged; neutral =
false;
break;}
931 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;}
933 if(strip_seed%2!=0 && strip_charged%2==0 &&
abs(strip_charged-strip_seed)<3 ) {iMatch=rec_charged; neutral =
false;
break;}
934 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;}
938 else if ( (partId_seed==5 || partId_seed==6) && (partId_charged==5 || partId_charged==6 ) )
940 if( partId_seed==partId_charged && module_charged ==module_seed &&
abs(strip_charged-strip_seed)<3) {iMatch=rec_charged; neutral =
false;
break;}
942 if( partId_seed==partId_charged && module_charged == module_seed)
944 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;}
945 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;}
948 if( partId_seed!=partId_charged &&
abs(module_charged-module_seed)<2)
950 if(strip_seed%2==0 && strip_charged%2!=0 &&
abs(strip_charged-strip_seed)<3 ) {iMatch=rec_charged; neutral =
false;
break;}
951 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;}
953 if(strip_seed%2!=0 && strip_charged%2==0 &&
abs(strip_charged-strip_seed)<3 ) {iMatch=rec_charged; neutral =
false;
break;}
954 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;}
967 double timeinfo_neutral=0;
968 double charge_neutral=0;
969 vector<TofData*>::iterator it;
970 for(it=tofDataVec.begin();it!=tofDataVec.end();it++)
972 if((*it)->barrel())
continue;
974 if((*it)->identify()==*iSeed)
978 timeinfo_neutral= eTofData->
tdc();
979 charge_neutral= eTofData->
adc();
991 vector<Identifier>::iterator iNeigh;
992 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
995 vector<TofData*>::iterator it2;
996 for(it2=tofDataVec.begin();it2!=tofDataVec.end();it2++)
998 if((*it2)->identify()==(*iNeigh))
1033 double tof= timeinfo_neutral-t0;
1040 tof_track->
setPh(charge_neutral);
1042 recTofTrackCol->push_back(tof_track);
1066 string paraPath = getenv(
"TOFENERGYRECROOT");
1067 paraPath +=
"/share/peak.dat";
1069 in.open(paraPath.c_str());
1071 for(
int i=0;i<176;i++) {
1076 paraPath = getenv(
"TOFENERGYRECROOT");
1077 paraPath +=
"/share/calib.dat";
1079 in1.open(paraPath.c_str());
1081 for(
int i=0;i<176;i++) {
1082 in1>>m_calib[i][0]>>m_calib[i][1]>>m_calib[i][2]>>m_calib[i][3];
1090 return m_ecalib[nsci];
1106 return m_calib[
n][m];
1139 if(strip%2==0) returnvalue = layer;
1142 if(layer==3) returnvalue = 4;
1143 if(layer==4) returnvalue = 3;
1144 if(layer==5) returnvalue = 6;
1145 if(layer==6) returnvalue = 5;
1151 if(strip%2!=0) returnvalue = layer;
1154 if(layer==3) returnvalue = 4;
1155 if(layer==4) returnvalue = 3;
1156 if(layer==5) returnvalue = 6;
1157 if(layer==6) returnvalue = 5;
1161 if(which==
"u")returnvalue = layer;
1162 if(which==
"b")returnvalue = layer;
1176 int neighbourstrip=0;
1177 int neighbourmodule=0;
1181 if(strip==0)
return 0;
1187 neighbourstrip=strip-1;
1188 if(layer==3 || layer== 6)
1189 {neighbourmodule=module;}
1191 {neighbourmodule=module;}
1195 neighbourstrip=strip+1;
1197 if(layer==3 || layer== 5)
1199 neighbourmodule=module;
1203 neighbourmodule=module+1;
1204 if(neighbourmodule==19){neighbourmodule=1;}
1216 neighbourstrip=strip-1;
1218 if(layer==4 || layer== 6)
1219 {neighbourmodule=module;}
1221 {neighbourmodule=module-1;
1222 if(neighbourmodule==0){neighbourmodule=18;}
1227 neighbourstrip=strip+1;
1228 if(layer==3 || layer== 6)
1229 {neighbourmodule=module;}
1231 {neighbourmodule=module;}
1240 if(strip==23 || strip==24) {neighbourmodule=0; neighbourstrip=0;}
1243 neighbourstrip=strip+2;
1244 neighbourmodule=module;
1252 if(strip==1 || strip==2) {neighbourmodule=0; neighbourstrip=0;}
1255 neighbourstrip=strip-2;
1256 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
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)