BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
TofShower Class Reference

#include <TofShower.h>

Public Member Functions

 TofShower ()
 
 ~TofShower ()
 
vector< IdentifiergetNeighbors (const Identifier &id)
 
vector< IdentifiergetNextNeighbors (const Identifier &id)
 
void energyCalib (vector< TofData * > &tofDataVec, RecTofTrackCol *recTofTrackCol)
 
void findSeed (vector< TofData * > &tofDataVec)
 
void findShower (vector< TofData * > &tofDataVec, RecTofTrackCol *recTofTrackCol, double)
 
void BookNtuple (NTuple::Tuple *&tuple, NTuple::Tuple *&tuple1, NTuple::Tuple *&tuple2)
 
void readCalibPar ()
 
double ecalib (const int nsci) const
 
void setEcalib (const int nsci, const double ecalib)
 
double calib (const int n, const int m) const
 
void setCalib (const int n, const int m, const double ecalib)
 
double calibConst () const
 
void setCalibConst (const double cal)
 
bool isData () const
 
void setIsData (const bool isData)
 
 TofShower ()
 
 ~TofShower ()
 
vector< IdentifiergetNeighbors (const Identifier &id)
 
vector< IdentifiergetNextNeighbors (const Identifier &id)
 
void energyCalib (vector< TofData * > &tofDataVec, RecTofTrackCol *recTofTrackCol)
 
void findSeed (vector< TofData * > &tofDataVec)
 
void findShower (vector< TofData * > &tofDataVec, RecTofTrackCol *recTofTrackCol, double)
 
void BookNtuple (NTuple::Tuple *&tuple, NTuple::Tuple *&tuple1, NTuple::Tuple *&tuple2)
 
void readCalibPar ()
 
double ecalib (const int nsci) const
 
void setEcalib (const int nsci, const double ecalib)
 
double calib (const int n, const int m) const
 
void setCalib (const int n, const int m, const double ecalib)
 
double calibConst () const
 
void setCalibConst (const double cal)
 
bool isData () const
 
void setIsData (const bool isData)
 

Detailed Description

Constructor & Destructor Documentation

◆ TofShower() [1/2]

TofShower::TofShower ( )

Definition at line 31 of file TofShower.cxx.

31 :m_output(false),m_isData(true) // m_output wird auf false und m_isData auf true gesetzt
32{
33 IJobOptionsSvc* jobSvc;
34 Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc);
35 jobSvc->setMyProperties("TofShower", &m_propMgr);
36
37}

◆ ~TofShower() [1/2]

TofShower::~TofShower ( )
inline

◆ TofShower() [2/2]

TofShower::TofShower ( )

◆ ~TofShower() [2/2]

TofShower::~TofShower ( )
inline

Member Function Documentation

◆ BookNtuple() [1/2]

void TofShower::BookNtuple ( NTuple::Tuple *&  tuple,
NTuple::Tuple *&  tuple1,
NTuple::Tuple *&  tuple2 
)

Definition at line 39 of file TofShower.cxx.

40{
41 m_output = true;
42 m_tuple = tuple;
43 if(!m_tuple) {
44 std::cerr << "Invalid ntuple in TofEnergyRec!" << std::endl;
45 } else {
46 m_tuple->addItem ("part", m_part);
47 m_tuple->addItem ("layer", m_layer);
48 m_tuple->addItem ("im", m_im);
49 m_tuple->addItem ("end", m_end);
50 m_tuple->addItem ("zpos", m_zpos);
51 m_tuple->addItem ("adc1", m_adc1);
52 m_tuple->addItem ("adc2", m_adc2);
53 m_tuple->addItem ("tdc1", m_tdc1);
54 m_tuple->addItem ("tdc2", m_tdc2);
55 m_tuple->addItem ("energy", m_energy);
56 }
57
58 m_tuple1 = tuple1;
59 if(!m_tuple1) {
60 std::cerr << "Invalid ntuple1 in TofEnergyRec!" << std::endl;
61 } else {
62 m_tuple1->addItem ("part", m_shower_part);
63 m_tuple1->addItem ("layer", m_shower_layer);
64 m_tuple1->addItem ("im", m_shower_im);
65 m_tuple1->addItem ("zpos", m_shower_zpos);
66 m_tuple1->addItem ("energy", m_shower_energy);
67 }
68
69 m_tuple2 = tuple2;
70 if(!m_tuple2) {
71 std::cerr << "Invalid ntuple2 in TofEnergyRec!" << std::endl;
72 } else {
73 m_tuple2->addItem ("dist", m_seed_dist);
74 }
75}

Referenced by TofEnergyRec::initialize().

◆ BookNtuple() [2/2]

void TofShower::BookNtuple ( NTuple::Tuple *&  tuple,
NTuple::Tuple *&  tuple1,
NTuple::Tuple *&  tuple2 
)

◆ calib() [1/2]

double TofShower::calib ( const int  n,
const int  m 
) const

Definition at line 829 of file TofShower.cxx.

830{
831 if(n<176&&m<4) {
832 return m_calib[n][m];
833 } else {
834 return 0;
835 }
836}
const Int_t n

◆ calib() [2/2]

double TofShower::calib ( const int  n,
const int  m 
) const

◆ calibConst() [1/2]

double TofShower::calibConst ( ) const
inline

Definition at line 38 of file InstallArea/include/TofEnergyRec/TofEnergyRec/TofShower.h.

38{ return m_calibConst; }

◆ calibConst() [2/2]

double TofShower::calibConst ( ) const
inline

Definition at line 38 of file Reconstruction/TofEnergyRec/TofEnergyRec-00-00-11/TofEnergyRec/TofShower.h.

38{ return m_calibConst; }

◆ ecalib() [1/2]

double TofShower::ecalib ( const int  nsci) const

Definition at line 813 of file TofShower.cxx.

814{
815 if(nsci<176) {
816 return m_ecalib[nsci];
817 } else {
818 return 0;
819 }
820}

Referenced by setCalib(), and setEcalib().

◆ ecalib() [2/2]

double TofShower::ecalib ( const int  nsci) const

◆ energyCalib() [1/2]

void TofShower::energyCalib ( vector< TofData * > &  tofDataVec,
RecTofTrackCol recTofTrackCol 
)

◆ energyCalib() [2/2]

void TofShower::energyCalib ( vector< TofData * > &  tofDataVec,
RecTofTrackCol recTofTrackCol 
)

Definition at line 77 of file TofShower.cxx.

78{
79 //Get TOF Calibtration Service
80 ISvcLocator* svcLocator = Gaudi::svcLocator();
82 StatusCode sc = svcLocator->service("TofCaliSvc", tofCaliSvc);
83 if (sc != StatusCode::SUCCESS) {
84 cout << "TofEnergyRec Get Calibration Service Failed !! " << endl;
85 }
86
88 sc = svcLocator->service("TofQCorrSvc", tofQCorrSvc);
89 if (sc != StatusCode::SUCCESS) {
90 cout << "TofEnergyRec Get QCorr Service Failed !! " << endl;
91 }
92
94 sc = svcLocator->service("TofQElecSvc", tofQElecSvc);
95 if (sc != StatusCode::SUCCESS) {
96 cout << "TofEnergyRec Get QElec Service Failed !! " << endl;
97 }
98
99 ITofEnergyCalibSvc* m_TofEnergyCalibSvc=0;
100 sc = svcLocator->service("TofEnergyCalibSvc", m_TofEnergyCalibSvc);
101 if( sc != StatusCode::SUCCESS){
102 cout << "can not use TofEnergyCalibSvc" << endreq;
103 }
104 else {
105 /*
106 std::cout << "Test TofEnergyCalibSvc getCalibConst= "
107 << m_TofEnergyCalibSvc -> getCalibConst()
108 <<"para1="<<m_TofEnergyCalibSvc -> getPara1()
109 <<"para2="<<m_TofEnergyCalibSvc -> getPara2()
110 <<"para3="<<m_TofEnergyCalibSvc -> getPara3()
111 <<"para4="<<m_TofEnergyCalibSvc -> getPara4()
112 <<"para5="<<m_TofEnergyCalibSvc -> getPara5()
113 << std::endl;
114 */
115 }
116
117
118
119 vector<TofData*>::iterator it;
120 for(it=tofDataVec.begin();
121 it!=tofDataVec.end();
122 it++) {
123
124 Identifier id((*it)->identify());
125 if( TofID::is_scin(id) ) {
126 int barrel_ec = TofID::barrel_ec(id);
127 int layer = TofID::layer(id);
128 int im = TofID::phi_module(id);
129 int end = TofID::end(id);
130
131 if(m_output) {
132 m_part = barrel_ec;
133 m_layer = layer;
134 m_im = im;
135 m_end = end;
136 }
137
138 if((*it)->barrel()) {
139 TofData* bTofData = (*it);
140 bTofData->setZpos(99.);
141 bTofData->setEnergy(0.);
142 if(bTofData->tdc1()<=0||bTofData->tdc1()>8000||bTofData->tdc2()<=0||bTofData->tdc2()>8000) continue;
143
144 double adc1,adc2,tdc1,tdc2;
145 tdc1 = bTofData->tdc1();
146 tdc2 = bTofData->tdc2();
147 adc1 = bTofData->adc1();
148 adc2 = bTofData->adc2();
149
150 //from data CalibSvc
151 double zpos = tofCaliSvc->ZTDC( tdc1, tdc2, bTofData->tofId() );
152 if(fabs(zpos)>115) continue;
153 double tofq = tofCaliSvc->BPh( adc1, adc2, zpos, bTofData->tofId());
154 if(tofq<100||tofq>10000) continue;
155 //double energy = q*0.0036;
156 //double energy = tofq*m_calibConst; //new calibration result in 2009.9.27
157 //cout<< "TofShower Barrel energy " << energy << endl;
158
159 zpos /= 100.; //cm->m
160
161 ///////////////////
162
163
164 double CalibPar[5];
165
166 CalibPar[0]=m_TofEnergyCalibSvc -> getPara1();
167 CalibPar[1]=m_TofEnergyCalibSvc -> getPara2();
168 CalibPar[2]=m_TofEnergyCalibSvc -> getPara3();
169 CalibPar[3]=m_TofEnergyCalibSvc -> getPara4();
170 CalibPar[4]=m_TofEnergyCalibSvc -> getPara5();
171
172 double TofEnCalibConst=CalibPar[0]+CalibPar[1]*zpos+CalibPar[2]*pow(zpos,2)+CalibPar[3]*pow(zpos,3)+CalibPar[4]*pow(zpos,4);
173 double energy = tofq*TofEnCalibConst;
174
175 //cout<<"tofenergy="<<energy<<endl;
176 //cout<<"tofenergy-old="<<tofq*m_calibConst<<endl;
177 ///////////////////
178 bTofData->setZpos(zpos);
179 bTofData->setEnergy(energy);
180
181 if(m_output) {
182 m_part = barrel_ec;
183 m_layer = layer;
184 m_im = im;
185 m_end = end;
186 m_adc1 = bTofData->adc1();
187 m_adc2 = bTofData->adc2();
188 m_tdc1 = bTofData->tdc1();
189 m_tdc2 = bTofData->tdc2();
190 m_zpos = zpos;
191 m_energy = energy;
192 m_tuple->write();
193 }
194
195 }
196 else {
197 //cout<<"endcap"<<endl;
198 //ETofData* eTofData = dynamic_cast<ETofData*>(*it);
199 //TofData* bTofData = (*it);
200 //double energy = 2*eTofData->adcChannel()/140;
201 //eTofData->setEnergy(energy);
202 }
203 }
204 else {
205 int barrel_ec = TofID::barrel_ec(id);
206 int endcap = TofID::endcap(id);
207 int module = TofID::module(id);
208 int strip = TofID::strip(id);
209 int end = TofID::end(id);
210
211 if( barrel_ec!=3 || ( endcap!=0 && endcap!=1 ) ) {
212 cout << "TofEnergyRec Get ETF(MRPC) data ERROR !! barrel_ec:" << barrel_ec << " endcap:" << endcap << endl;
213 }
214
215 if(m_output) {
216 m_part = barrel_ec;
217 m_layer = endcap;
218 m_im = module;
219 m_end = strip;
220 }
221
222 TofData* etfData = (*it);
223 etfData->setZpos(99.);
224 etfData->setEnergy(0.);
225 if(etfData->tdc1()<=0||etfData->tdc1()>8000||etfData->tdc2()<=0||etfData->tdc2()>8000) continue;
226
227 double adc1,adc2,tdc1,tdc2;
228 tdc1 = etfData->tdc1();
229 tdc2 = etfData->tdc2();
230 adc1 = etfData->adc1();
231 adc2 = etfData->adc2();
232
233 //from data CalibSvc
234 double zpos = tofCaliSvc->ZTDC( tdc1, tdc2, etfData->tofId() );
235 if(fabs(zpos)>115) continue;
236 double tofq = tofCaliSvc->BPh( adc1, adc2, zpos, etfData->tofId());
237 if(tofq<100||tofq>10000) continue;
238 //double energy = q*0.0036;
239 double energy = tofq*m_calibConst; //new calibration result in 2009.9.27
240 //cout<< "TofShower Barrel energy " << energy << endl;
241 zpos /= 100.; //cm->m
242
243 etfData->setZpos(zpos);
244 etfData->setEnergy(energy);
245
246 if(m_output) {
247 m_part = barrel_ec;
248 m_layer = endcap;
249 m_im = module;
250 m_end = strip;
251 m_adc1 = etfData->adc1();
252 m_adc2 = etfData->adc2();
253 m_tdc1 = etfData->tdc1();
254 m_tdc2 = etfData->tdc2();
255 m_zpos = zpos;
256 m_energy = energy;
257 m_tuple->write();
258 }
259 }
260 }
261 return;
262}
************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
Definition: KK2f.h:50
ITofQElecSvc * tofQElecSvc
ITofQCorrSvc * tofQCorrSvc
ITofCaliSvc * tofCaliSvc
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 adc2()
Definition: TofData.cxx:656
double tdc2()
Definition: TofData.cxx:665
double tdc1()
Definition: TofData.cxx:647
double adc1()
Definition: TofData.cxx:638
static int endcap(const Identifier &id)
Definition: TofID.cxx:124
static int strip(const Identifier &id)
Definition: TofID.cxx:136
static bool is_scin(const Identifier &id)
Definition: TofID.cxx:102
static int end(const Identifier &id)
Definition: TofID.cxx:79
static int phi_module(const Identifier &id)
Definition: TofID.cxx:73
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition: TofID.cxx:61
static int layer(const Identifier &id)
Definition: TofID.cxx:66
static int module(const Identifier &id)
Definition: TofID.cxx:130

◆ findSeed() [1/2]

void TofShower::findSeed ( vector< TofData * > &  tofDataVec)

◆ findSeed() [2/2]

void TofShower::findSeed ( vector< TofData * > &  tofDataVec)

Definition at line 434 of file TofShower.cxx.

435{
436 bool max=false;
437 m_seedVec.clear();
438
439 vector<TofData*>::iterator it;
440 for(it=tofDataVec.begin();
441 it!=tofDataVec.end();
442 it++) {
443
444 if( !((*it)->is_mrpc()) ) {
445 if((*it)->barrel()) { //barrel
446 TofData* bTofData = (*it);
447
448 //cout << "Identifier(bTofData->identify()) " << Identifier(bTofData->identify()) << endl;
449 //std::cout << "TofShower bTofData->energy() = " << bTofData->energy() << std::endl;
450 if(bTofData->energy()<5.) continue; //seed energy cut = 6MeV
451
452 max=true;
453 vector<Identifier> NeighborVec=getNextNeighbors(Identifier(bTofData->identify()));
454
455 //const Identifier & help = Identifier(bTofData->identify());
456 //cout << "TofShower::findSeed Barrel Track base "<<TofID::layer(help) << " " << TofID::phi_module(help) << endl;
457
458 vector<Identifier>::iterator iNeigh;
459 for(iNeigh=NeighborVec.begin();
460 iNeigh!=NeighborVec.end();
461 iNeigh++) {
462
463 //const Identifier & help2 = Identifier(*iNeigh);
464 //cout << "TofShower::findSeed Barrel Track neigh "<<TofID::layer(help2) << " " << TofID::phi_module(help2) << endl;
465
466 vector<TofData*>::iterator it2;
467 for(it2=tofDataVec.begin();
468 it2!=tofDataVec.end();
469 it2++) {
470 if((*it2)->identify()==*iNeigh) {
471 TofData* bTofData2 = (*it2);
472 if(bTofData2->energy()>bTofData->energy()) {
473 max=false;
474 }
475 break;
476 }
477 }
478
479 }
480 }
481 else { //endcap
482
483 //cout << "TofShower::findSeed Endcap Track" << endl;
484 TofData* eTofData = (*it);
485 if(eTofData->energy()<5.) continue; //seed energy cut = 5MeV
486 max=true;
487 vector<Identifier> NeighborVec=getNextNeighbors(Identifier(eTofData->identify()));
488 vector<Identifier>::iterator iNeigh;
489 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
490 {
491 vector<TofData*>::iterator it2;
492 for(it2=tofDataVec.begin(); it2!=tofDataVec.end(); it2++)
493 {
494 if((*it2)->identify()==*iNeigh) {
495 TofData* eTofData2 = (*it2);
496 if(eTofData2->energy()>eTofData->energy()) {
497 max=false;
498 }
499 break;
500 }
501 }//close for
502 }//Close for
503 }//close if(!is_mrpc)
504
505 }
506 else
507 {
508
509 TofData* etfData = (*it);
510 if(etfData->energy()<2.) continue; //Seed energy cut = 2 MeV
511 max=true;
512 vector<Identifier> NeighborVec=getNextNeighbors(Identifier(etfData->identify()));
513 vector<Identifier>::iterator iNeigh;
514 for(iNeigh=NeighborVec.begin(); iNeigh!=NeighborVec.end(); iNeigh++)
515 {
516 //cout << "TofShower::findSeed Phimodule MRPC " << TofID::phi_module(*iNeigh) <<endl;
517 vector<TofData*>::iterator it2;
518 for(it2=tofDataVec.begin(); it2!=tofDataVec.end(); it2++)
519 {
520 if((*it2)->identify()==*iNeigh) {
521 TofData* etfData2 = (*it2);
522 if(etfData2->energy()>etfData->energy()) {
523 max=false;
524 }
525 break;
526 }
527 }//close for
528 }//Close for
529 //cout << "TofShower::findSeed Both forloops done" << endl;
530 }//Close else if(is_mrpc)
531
532 if(max) {
533 m_seedVec.push_back(Identifier((*it)->identify()));
534 }
535
536 }//close loop over tofdata
537}//close find seed
vector< Identifier > getNextNeighbors(const Identifier &id)
Definition: TofShower.cxx:375

◆ findShower() [1/2]

void TofShower::findShower ( vector< TofData * > &  tofDataVec,
RecTofTrackCol recTofTrackCol,
double   
)

Referenced by TofEnergyRec::execute().

◆ findShower() [2/2]

void TofShower::findShower ( vector< TofData * > &  tofDataVec,
RecTofTrackCol recTofTrackCol,
double   
)

◆ getNeighbors() [1/2]

vector< Identifier > TofShower::getNeighbors ( const Identifier id)

Definition at line 264 of file TofShower.cxx.

265{
266 vector<int> NeighborVec;
267 vector<Identifier> NeighborIdVec;
268 NeighborVec.clear();
269 NeighborIdVec.clear();
270
271 if( TofID::is_scin(id) ) {
272 int barrel_ec = TofID::barrel_ec(id);
273 int layer = TofID::layer(id);
274 int im = TofID::phi_module(id);
275 int end = TofID::end(id);
276
277 if(barrel_ec==1) { //barrel
278 int num = im+layer*88;
279 if(num<88) { //layer1
280 if(num==0) {
281 NeighborVec.push_back(1);
282 NeighborVec.push_back(87);
283 NeighborVec.push_back(88);
284 NeighborVec.push_back(89);
285 } else if(num==87) {
286 NeighborVec.push_back(0);
287 NeighborVec.push_back(86);
288 NeighborVec.push_back(88);
289 NeighborVec.push_back(175);
290 } else {
291 NeighborVec.push_back(num+1);
292 NeighborVec.push_back(num-1);
293 NeighborVec.push_back(num+88);
294 NeighborVec.push_back(num+88+1);
295 }
296 } else {
297 if(num==88) {
298 NeighborVec.push_back(89);
299 NeighborVec.push_back(175);
300 NeighborVec.push_back(0);
301 NeighborVec.push_back(87);
302 } else if(num==175) {
303 NeighborVec.push_back(88);
304 NeighborVec.push_back(174);
305 NeighborVec.push_back(86);
306 NeighborVec.push_back(87);
307 } else {
308 NeighborVec.push_back(num+1);
309 NeighborVec.push_back(num-1);
310 NeighborVec.push_back(num-88);
311 NeighborVec.push_back(num-88-1);
312 }
313 }
314
315 int size=NeighborVec.size();
316 for(int i=0;i<size;i++) {
317 layer = NeighborVec[i]/88;
318 im = NeighborVec[i]%88;
319 NeighborIdVec.push_back(TofID::cell_id(barrel_ec,layer,im,end));
320 }
321 }
322
323 else { //endcap
324 if(im==0) {
325 NeighborVec.push_back(1);
326 NeighborVec.push_back(47);
327 } else if(im==47) {
328 NeighborVec.push_back(0);
329 NeighborVec.push_back(46);
330 } else {
331 NeighborVec.push_back(im-1);
332 NeighborVec.push_back(im+1);
333 }
334
335 int size=NeighborVec.size();
336 for(int i=0;i<size;i++) {
337 im = NeighborVec[i];
338 NeighborIdVec.push_back(TofID::cell_id(barrel_ec,layer,im,end));
339 }
340 }
341 }
342 else { // mrpc
343 int barrel_ec = TofID::barrel_ec(id);
344 int endcap = TofID::endcap(id);
345 int module = TofID::module(id);
346 int strip = TofID::strip(id);
347 int end = TofID::end(id);
348
349 if( module==0 ) {
350 NeighborVec.push_back(1);
351 NeighborVec.push_back(35);
352 } else if( module==35 ) {
353 NeighborVec.push_back(0);
354 NeighborVec.push_back(34);
355 } {
356 NeighborVec.push_back(module-1);
357 NeighborVec.push_back(module+1);
358 }
359
360 int size=NeighborVec.size();
361 for(int i=0;i<size;i++) {
362 int im = NeighborVec[i];
363 for(int j=-2; j<3; j++ ) {
364 int ist = strip + j;
365 if( ist<0 || ist>11 ) continue;
366 NeighborIdVec.push_back(TofID::cell_id(barrel_ec,endcap,module,ist,end));
367 }
368 }
369
370 }
371
372 return NeighborIdVec;
373}
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
Definition: TofID.cxx:143

Referenced by getNextNeighbors().

◆ getNeighbors() [2/2]

vector< Identifier > TofShower::getNeighbors ( const Identifier id)

◆ getNextNeighbors() [1/2]

vector< Identifier > TofShower::getNextNeighbors ( const Identifier id)

Definition at line 375 of file TofShower.cxx.

376{
377 vector<Identifier> NeighborVec,tmpNeighborVec,tmpNextNeighborVec;
378 vector<Identifier>::iterator ci_NV,ci_tmpNV,ci_tmpNNV;
379 NeighborVec=getNeighbors(id);
380 tmpNeighborVec=getNeighbors(id);
381 bool flag=false; //whether NeighborVec already includes this crystal
382 bool flagNeighbor=false; //whether this crystal belongs to NeighborVec
383
384 //------------------------------------------------------------------
385 for(ci_tmpNV=tmpNeighborVec.begin();
386 ci_tmpNV!=tmpNeighborVec.end();
387 ci_tmpNV++){
388 tmpNextNeighborVec=getNeighbors(*ci_tmpNV);
389 //================================================================
390 for(ci_tmpNNV=tmpNextNeighborVec.begin();
391 ci_tmpNNV!=tmpNextNeighborVec.end();
392 ci_tmpNNV++){
393
394 for(ci_NV=NeighborVec.begin();
395 ci_NV!=NeighborVec.end();
396 ci_NV++){
397 if(*ci_tmpNNV==*ci_NV){ //this crystal is already included
398 flag=true;
399 break;
400 }
401 }
402
403 if(!flag){ //find a new crystal
404 //for(ci_tmpNV1=tmpNeighborVec.begin();
405 // ci_tmpNV1!=tmpNeighborVec.end();
406 // ci_tmpNV1++){
407 // if(*ci_tmpNNV==*ci_tmpNV1){ //this crystal belongs to NeighborVec
408 // flagNeighbor=true;
409 // break;
410 // }
411 //}
412
413 if(*ci_tmpNNV==id)
414 flagNeighbor=true;
415
416 if(!flagNeighbor)
417 NeighborVec.push_back(*ci_tmpNNV);
418 else
419 flagNeighbor=false;
420 }
421 else
422 flag=false;
423 }
424 //================================================================
425 }
426 //------------------------------------------------------------------
427
428 return NeighborVec;
429}
vector< Identifier > getNeighbors(const Identifier &id)
Definition: TofShower.cxx:264

Referenced by findSeed().

◆ getNextNeighbors() [2/2]

vector< Identifier > TofShower::getNextNeighbors ( const Identifier id)

◆ isData() [1/2]

bool TofShower::isData ( ) const
inline

Definition at line 41 of file InstallArea/include/TofEnergyRec/TofEnergyRec/TofShower.h.

41{ return m_isData; }

Referenced by setIsData().

◆ isData() [2/2]

bool TofShower::isData ( ) const
inline

Definition at line 41 of file Reconstruction/TofEnergyRec/TofEnergyRec-00-00-11/TofEnergyRec/TofShower.h.

41{ return m_isData; }

◆ readCalibPar() [1/2]

void TofShower::readCalibPar ( )

Definition at line 790 of file TofShower.cxx.

791{
792 string paraPath = getenv("TOFENERGYRECROOT");
793 paraPath += "/share/peak.dat";
794 ifstream in;
795 in.open(paraPath.c_str());
796 assert(in);
797 for(int i=0;i<176;i++) {
798 in>>m_ecalib[i];
799 }
800 in.close();
801
802 paraPath = getenv("TOFENERGYRECROOT");
803 paraPath += "/share/calib.dat";
804 ifstream in1;
805 in1.open(paraPath.c_str());
806 assert(in1);
807 for(int i=0;i<176;i++) {
808 in1>>m_calib[i][0]>>m_calib[i][1]>>m_calib[i][2]>>m_calib[i][3];
809 }
810 in1.close();
811}

◆ readCalibPar() [2/2]

void TofShower::readCalibPar ( )

◆ setCalib() [1/2]

void TofShower::setCalib ( const int  n,
const int  m,
const double  ecalib 
)

Definition at line 838 of file TofShower.cxx.

839{
840 if(n<176&&m<4) {
841 m_calib[n][m]=ecalib;
842 }
843}
double ecalib(const int nsci) const
Definition: TofShower.cxx:813

◆ setCalib() [2/2]

void TofShower::setCalib ( const int  n,
const int  m,
const double  ecalib 
)

◆ setCalibConst() [1/2]

void TofShower::setCalibConst ( const double  cal)
inline

Definition at line 39 of file InstallArea/include/TofEnergyRec/TofEnergyRec/TofShower.h.

39{ m_calibConst = cal; }
std::string cal
Definition: CalibModel.cxx:41

Referenced by TofEnergyRec::initialize().

◆ setCalibConst() [2/2]

void TofShower::setCalibConst ( const double  cal)
inline

Definition at line 39 of file Reconstruction/TofEnergyRec/TofEnergyRec-00-00-11/TofEnergyRec/TofShower.h.

39{ m_calibConst = cal; }

◆ setEcalib() [1/2]

void TofShower::setEcalib ( const int  nsci,
const double  ecalib 
)

Definition at line 822 of file TofShower.cxx.

823{
824 if(nsci<176) {
825 m_ecalib[nsci]=ecalib;
826 }
827}

◆ setEcalib() [2/2]

void TofShower::setEcalib ( const int  nsci,
const double  ecalib 
)

◆ setIsData() [1/2]

void TofShower::setIsData ( const bool  isData)
inline

◆ setIsData() [2/2]

void TofShower::setIsData ( const bool  isData)
inline

The documentation for this class was generated from the following files: