BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
BesTofDigitizerEcV4 Class Reference

#include <BesTofDigitizerEcV4.hh>

+ Inheritance diagram for BesTofDigitizerEcV4:

Classes

struct  HitStruct
 
struct  Param
 
struct  StripStruct
 

Public Member Functions

 BesTofDigitizerEcV4 ()
 
 ~BesTofDigitizerEcV4 ()
 
void initial ()
 
virtual void Digitize (ScintSingle *, BesTofDigitsCollection *)
 
int calStrip (double locZ)
 
bool underStrip (double locX, double locZ)
 
double calTdcRes_charge (double charge_fC)
 
double charge2Time (double charge_fC)
 
double calAdcRes_charge (double charge_fC)
 
double calTdcRes_charge1 (double charge_fC)
 
double charge2Time1 (double charge_fC)
 
double calAdcRes_charge1 (double charge_fC)
 
 BesTofDigitizerEcV4 ()
 
 ~BesTofDigitizerEcV4 ()
 
void initial ()
 
virtual void Digitize (ScintSingle *, BesTofDigitsCollection *)
 
int calStrip (double locZ)
 
bool underStrip (double locX, double locZ)
 
double calTdcRes_charge (double charge_fC)
 
double charge2Time (double charge_fC)
 
double calAdcRes_charge (double charge_fC)
 
double calTdcRes_charge1 (double charge_fC)
 
double charge2Time1 (double charge_fC)
 
double calAdcRes_charge1 (double charge_fC)
 
- Public Member Functions inherited from BesTofDigitizerV
 BesTofDigitizerV ()
 
 ~BesTofDigitizerV ()
 
void Initialize ()
 
virtual void Digitize (ScintSingle *, BesTofDigitsCollection *)
 
 BesTofDigitizerV ()
 
 ~BesTofDigitizerV ()
 
void Initialize ()
 
virtual void Digitize (ScintSingle *, BesTofDigitsCollection *)
 

Additional Inherited Members

- Protected Attributes inherited from BesTofDigitizerV
BesTofDigitsCollectionm_besTofDigitsCollection
 
BesTofHitsCollectionm_THC
 
ITofCaliSvcm_tofCaliSvc
 
ITofSimSvcm_tofSimSvc
 
ITofQElecSvcm_tofQElecSvc
 
G4double m_ADC [2]
 
G4double m_TDC [2]
 
G4int m_trackIndex
 
G4double m_globalTime
 
- Static Protected Attributes inherited from BesTofDigitizerV
static bool m_booked = false
 
static NTuple::Tuple * m_tupleTof1 = 0
 
static NTuple::Item< double > m_partId
 
static NTuple::Item< double > m_scinNb
 
static NTuple::Item< double > m_edep
 
static NTuple::Item< double > m_nHits
 
static NTuple::Item< double > m_time1st0
 
static NTuple::Item< double > m_time1st1
 
static NTuple::Item< double > m_timelast0
 
static NTuple::Item< double > m_timelast1
 
static NTuple::Item< double > m_totalPhot0
 
static NTuple::Item< double > m_totalPhot1
 
static NTuple::Item< double > m_NphAllSteps
 
static NTuple::Item< double > m_max0
 
static NTuple::Item< double > m_max1
 
static NTuple::Item< double > m_tdc0
 
static NTuple::Item< double > m_adc0
 
static NTuple::Item< double > m_tdc1
 
static NTuple::Item< double > m_adc1
 
static NTuple::Tuple * m_tupleTof2 = 0
 
static NTuple::Item< double > m_eTotal
 
static NTuple::Item< double > m_nDigi
 
static NTuple::Item< double > m_partIdMPV
 
static NTuple::Item< double > m_scinNbMPV
 
static NTuple::Item< double > m_edepMPV
 
static NTuple::Item< double > m_nDigiOut
 
static NTuple::Tuple * m_tupleTof3 = 0
 
static NTuple::Item< double > m_forb
 
static NTuple::Item< double > m_timeFlight
 
static NTuple::Item< double > m_ddT
 
static NTuple::Item< double > m_scinSwim
 
static NTuple::Item< double > m_scinTime
 
static NTuple::Item< double > m_transitTime
 
static NTuple::Item< double > m_endTime
 
static NTuple::Item< double > m_edepHit
 

Detailed Description

Constructor & Destructor Documentation

◆ BesTofDigitizerEcV4() [1/2]

BesTofDigitizerEcV4::BesTofDigitizerEcV4 ( )

Definition at line 32 of file BesTofDigitizerEcV4.cc.

33{
34 PropertyMgr m_propMgr;
35 m_propMgr.declareProperty("FileName", m_fileName = "mrpc.root");
36 m_propMgr.declareProperty("RootFlag", m_rootFlag = false);
37 m_propMgr.declareProperty("E", m_V = 7000);
38 m_propMgr.declareProperty("Threshold", m_threshold = 6e+08);
39
40 m_propMgr.declareProperty("nstep", m_nstep = -1);
41 m_propMgr.declareProperty("E_weight", m_E_weight = -1);
42 m_propMgr.declareProperty("saturationFlag", m_saturationFlag = true);
43 m_propMgr.declareProperty("tdcRes_const", tdcRes_const = -1);
44 m_propMgr.declareProperty("adcRes_const", adcRes_const = -1);
45 m_propMgr.declareProperty("calTdcRes_charge_flag", m_calTdcRes_charge_flag=0);
46 m_propMgr.declareProperty("charge2Time_flag", m_charge2Time_flag=0);
47 m_propMgr.declareProperty("calAdcRes_charge_flag", m_calAdcRes_charge_flag=0);
48
49
50 IJobOptionsSvc* jobSvc;
51 Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc);
52 jobSvc->setMyProperties("BesTofDigitizerEcV4", &m_propMgr);
53
54 initial();
55
56 if(m_rootFlag)
57 {
58 m_file = new TFile(m_fileName.c_str(), "RECREATE");
59 m_tree = new TTree("mrpc", "mrpc");
60
61 m_tree->Branch("partId", &m_partId, "partId/D");
62 m_tree->Branch("module", &m_module, "module/D");
63 m_tree->Branch("time_leading_sphi", &m_time_leading_sphi, "time_leading_sphi/D");
64 m_tree->Branch("time_leading_xphi", &m_time_leading_xphi, "time_leading_xphi/D");
65 m_tree->Branch("time_trailing_sphi", &m_time_trailing_sphi, "time_trailing_sphi/D");
66 m_tree->Branch("time_trailing_xphi", &m_time_trailing_xphi, "time_trailing_xphi/D");
67 m_tree->Branch("tdcRes", &m_tdcRes, "tdcRes/D");
68 m_tree->Branch("tdcRes_charge", &m_tdcRes_charge, "tdcRes_charge/D");
69 m_tree->Branch("adc", &m_adc, "adc/D");
70 m_tree->Branch("adcRes", &m_adcRes, "adcRes/D");
71 m_tree->Branch("adcRes_charge", &m_adcRes_charge, "adcRes_charge/D");
72 m_tree->Branch("strip", &m_strip, "strip/D");
73 m_tree->Branch("trkIndex", &m_trkIndex, "trkIndex/D");
74 m_tree->Branch("tStart", &m_tStart, "tStart/D");
75 m_tree->Branch("tPropagate_sphi", &m_tPropagate_sphi, "tPropagate_sphi/D");
76 m_tree->Branch("tPropagate_xphi", &m_tPropagate_xphi, "tPropagate_xphi/D");
77 m_tree->Branch("tThreshold", &m_tThreshold, "tThreshold/D");
78 m_tree->Branch("charge", &m_charge, "charge/D");
79 m_tree->Branch("nhit", &m_nhit, "nhit/I");
80 m_tree->Branch("ions_hit", m_ions_hit, "ions_hit[nhit]/D");
81 m_tree->Branch("trkIndex_hit", m_trkIndex_hit, "trkIndex_hit[nhit]/D");
82 m_tree->Branch("pdgCode_hit", m_pdgCode_hit, "pdgCode_hit[nhit]/D");
83 m_tree->Branch("gap_hit", m_gap_hit, "gap_hit[nhit]/D");
84 m_tree->Branch("underStrip_hit", m_underStrip_hit, "underStrip_hit[nhit]/D");
85 m_tree->Branch("locx_hit", m_locx_hit, "locx_hit[nhit]/D");
86 m_tree->Branch("locy_hit", m_locy_hit, "locy_hit[nhit]/D");
87 m_tree->Branch("locz_hit", m_locz_hit, "locz_hit[nhit]/D");
88 m_tree->Branch("x_hit", m_x_hit, "x_hit[nhit]/D");
89 m_tree->Branch("y_hit", m_y_hit, "y_hit[nhit]/D");
90 m_tree->Branch("z_hit", m_z_hit, "z_hit[nhit]/D");
91 m_tree->Branch("px_hit", m_px_hit, "px_hit[nhit]/D");
92 m_tree->Branch("py_hit", m_py_hit, "py_hit[nhit]/D");
93 m_tree->Branch("pz_hit", m_pz_hit, "pz_hit[nhit]/D");
94 }
95}

◆ ~BesTofDigitizerEcV4() [1/2]

BesTofDigitizerEcV4::~BesTofDigitizerEcV4 ( )

Definition at line 98 of file BesTofDigitizerEcV4.cc.

99{
100 if(m_rootFlag)
101 {
102 m_file->Write();
103 m_file->Close();
104 }
105}

◆ BesTofDigitizerEcV4() [2/2]

BesTofDigitizerEcV4::BesTofDigitizerEcV4 ( )

◆ ~BesTofDigitizerEcV4() [2/2]

BesTofDigitizerEcV4::~BesTofDigitizerEcV4 ( )

Member Function Documentation

◆ calAdcRes_charge() [1/2]

double BesTofDigitizerEcV4::calAdcRes_charge ( double  charge_fC)

Definition at line 542 of file BesTofDigitizerEcV4.cc.

543{
544 double time = 0;
545 if( charge_fC>=13. && charge_fC<250)
546 {
547 time = 72.6005*exp(-charge_fC*0.0302626 + 1.49059) + 40.8627;
548 }
549 else if(charge_fC>=250)
550 {
551 time = 32.6233+0.00404149*charge_fC;
552 }
553 return time; //ps
554}
Double_t time
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:252

Referenced by Digitize().

◆ calAdcRes_charge() [2/2]

double BesTofDigitizerEcV4::calAdcRes_charge ( double  charge_fC)

◆ calAdcRes_charge1() [1/2]

double BesTofDigitizerEcV4::calAdcRes_charge1 ( double  charge_fC)

Definition at line 577 of file BesTofDigitizerEcV4.cc.

578{
579 double time = 64.3326*exp(-charge_fC/25.4638 + 0.944184)+19.4846;
580 return time; //ps
581}

Referenced by Digitize().

◆ calAdcRes_charge1() [2/2]

double BesTofDigitizerEcV4::calAdcRes_charge1 ( double  charge_fC)

◆ calStrip() [1/2]

int BesTofDigitizerEcV4::calStrip ( double  locZ)

Definition at line 313 of file BesTofDigitizerEcV4.cc.

314{
315 int strip=-1;
316 double stripWidth = m_param.strip_z+m_param.strip_gap; //Strip spread: (24+3)mm
317 int nstrip = m_param.nstrip;
318 //the offset between strip coordinate and gas SD: 0.5
319 double length = locZ+stripWidth*nstrip/2-0.5;
320 if(length<=0)
321 {
322 strip=0;
323 }
324 else if(length<stripWidth*nstrip)
325 {
326 for(int i=0; i<nstrip; i++)
327 {
328 if(length>i*stripWidth && length<(i+1)*stripWidth)
329 {
330 strip = i;
331 break;
332 }
333 }
334 }
335 else
336 {
337 strip=nstrip-1;
338 }
339 if(strip<0) strip=0;
340 if(strip>nstrip-1) strip=nstrip-1;
341
342 return strip;
343}

Referenced by Digitize().

◆ calStrip() [2/2]

int BesTofDigitizerEcV4::calStrip ( double  locZ)

◆ calTdcRes_charge() [1/2]

double BesTofDigitizerEcV4::calTdcRes_charge ( double  charge_fC)

Definition at line 521 of file BesTofDigitizerEcV4.cc.

522{
523 double time =0;
524 if( charge_fC>=13. && charge_fC<250)
525 {
526 time = 100.764*exp(-charge_fC*0.0413966+0.377154)+ 13.814;
527 }
528 else if(charge_fC>=250)
529 {
530 time = 12.8562+0.000507299*charge_fC;
531 }
532 return time; //ps
533}

Referenced by Digitize().

◆ calTdcRes_charge() [2/2]

double BesTofDigitizerEcV4::calTdcRes_charge ( double  charge_fC)

◆ calTdcRes_charge1() [1/2]

double BesTofDigitizerEcV4::calTdcRes_charge1 ( double  charge_fC)

Definition at line 556 of file BesTofDigitizerEcV4.cc.

557{
558 double result =0;
559 if( charge_fC > 50.)
560 {
561 result = 67.6737*exp(-charge_fC/50.9995-0.27755)+9.06223;
562 }
563 else
564 {
565 result = 176.322-2.98345*charge_fC;
566 }
567 return result; //ps
568}

Referenced by Digitize().

◆ calTdcRes_charge1() [2/2]

double BesTofDigitizerEcV4::calTdcRes_charge1 ( double  charge_fC)

◆ charge2Time() [1/2]

double BesTofDigitizerEcV4::charge2Time ( double  charge_fC)

Definition at line 535 of file BesTofDigitizerEcV4.cc.

536{
537 double time=0;
538 if(charge_fC>=13) time=-120.808/log(charge_fC*30.1306)+26.6024; //ns
539 return time;
540}

Referenced by Digitize().

◆ charge2Time() [2/2]

double BesTofDigitizerEcV4::charge2Time ( double  charge_fC)

◆ charge2Time1() [1/2]

double BesTofDigitizerEcV4::charge2Time1 ( double  charge_fC)

Definition at line 570 of file BesTofDigitizerEcV4.cc.

571{
572 double time=0;
573 if(charge_fC>=13) time=-4.50565/log(charge_fC*0.0812208)+16.6653; //ns
574 return time;
575}

Referenced by Digitize().

◆ charge2Time1() [2/2]

double BesTofDigitizerEcV4::charge2Time1 ( double  charge_fC)

◆ Digitize() [1/2]

void BesTofDigitizerEcV4::Digitize ( ScintSingle single_module,
BesTofDigitsCollection DC 
)
virtual

Reimplemented from BesTofDigitizerV.

Definition at line 128 of file BesTofDigitizerEcV4.cc.

129{
131 G4DigiManager* digiManager = G4DigiManager::GetDMpointer();
132 G4int THCID = digiManager->GetHitsCollectionID("BesTofHitsCollection");
133 m_THC = (BesTofHitsCollection*) (digiManager->GetHitsCollection(THCID));
134 if( !m_THC ) return;
135
136 partId = single_module->GetPartId();
137 module = single_module->GetModule_mrpc();
138 //cout<<"partId= "<<partId<<" module= "<<module<<endl;
139
140 //Process the hits
141 int nstrip = m_param.nstrip;
142 StripStruct stripStruct[12];
143 for(int i=0; i<nstrip; i++)
144 {
145 stripStruct[i].m_param = m_param;
146 stripStruct[i].setPar(m_V, m_threshold, m_saturationFlag);
147 }
148
149 BesTofHit* hit;
150 for(unsigned int i=0; i<single_module->GetHitIndexes_mrpc()->size(); i++)
151 {
152 hit = (*m_THC)[ (*(single_module->GetHitIndexes_mrpc()))[i] ];
153
154 HitStruct hitStruct;
155 hitStruct.m_param = m_param;
156 hitStruct.trkIndex = hit->GetG4Index();
157 hitStruct.pdgCode = hit->GetPDGcode();
158 hitStruct.ions = hit->GetIons();
159 hitStruct.strip = calStrip(hit->GetLocPos().z()/mm);
160 hitStruct.underStrip = underStrip(hit->GetLocPos().x()/mm, hit->GetLocPos().z()/mm);
161 hitStruct.gap = hit->GetGapNb();
162 hitStruct.glbTime = hit->GetTime()/ns;
163 hitStruct.locx = hit->GetLocPos().x()/mm;
164 hitStruct.locy = hit->GetLocPos().y()/mm;
165 hitStruct.locz = hit->GetLocPos().z()/mm;
166 hitStruct.x = hit->GetPos().x()/mm;
167 hitStruct.y = hit->GetPos().y()/mm;
168 hitStruct.z = hit->GetPos().z()/mm;
169 hitStruct.px = hit->GetMomentum().x()/(GeV/(3e+08*m/s));
170 hitStruct.py = hit->GetMomentum().y()/(GeV/(3e+08*m/s));
171 hitStruct.pz = hit->GetMomentum().z()/(GeV/(3e+08*m/s));
172 //hitStruct.print();
173
174 if(hitStruct.ions>0 && hitStruct.glbTime>0)
175 {
176 stripStruct[hitStruct.strip].hitStructCol.push_back(hitStruct);
177 }
178 }
179
180 for(int i=0; i<nstrip; i++)
181 {
182 if(stripStruct[i].hitStructCol.size()==0) continue;
183 stripStruct[i].strip = i;
184 stripStruct[i].calFirstHit();
185 stripStruct[i].avalanche();
186 //stripStruct[i].print();
187
188 if(stripStruct[i].tThreshold<=0) continue;
189
190 tdc_sphi = stripStruct[i].tStart + stripStruct[i].tThreshold + stripStruct[i].tPropagate_sphi;
191 tdc_xphi = stripStruct[i].tStart + stripStruct[i].tThreshold + stripStruct[i].tPropagate_xphi;
192
193 double tdcRes_charge;
194 if(m_calTdcRes_charge_flag==0)
195 {
196 tdcRes_charge = calTdcRes_charge(stripStruct[i].charge*1000); //ps, charge in fC
197 }
198 else if(m_calTdcRes_charge_flag==1)
199 {
200 tdcRes_charge = calTdcRes_charge1(stripStruct[i].charge*1000);
201 }
202 else if(m_calTdcRes_charge_flag==2)
203 {
204 tdcRes_charge = 0;
205 }
206
207 tdcRes = sqrt(tdcRes_charge*tdcRes_charge+tdcRes_const*tdcRes_const)/1000; //ns
208
209 tdc_sphi = G4RandGauss::shoot(tdc_sphi, tdcRes);
210 tdc_xphi = G4RandGauss::shoot(tdc_xphi, tdcRes);
211
212 if(m_charge2Time_flag==0)
213 {
214 adc = charge2Time(stripStruct[i].charge*1000); //ns, charge in fC
215 }
216 else if(m_charge2Time_flag==1)
217 {
218 adc = charge2Time1(stripStruct[i].charge*1000);
219 }
220
221 double adcRes_charge;
222 if(m_calAdcRes_charge_flag==0)
223 {
224 adcRes_charge = calAdcRes_charge(stripStruct[i].charge*1000); //ps, charge in fC
225 }
226 else if(m_calAdcRes_charge_flag==1)
227 {
228 adcRes_charge = calAdcRes_charge1(stripStruct[i].charge*1000);
229 }
230 else if(m_calAdcRes_charge_flag==2)
231 {
232 adcRes_charge = 0;
233 }
234
235 adcRes = sqrt(adcRes_charge*adcRes_charge+adcRes_const*adcRes_const)/1000;
236 adc = G4RandGauss::shoot(adc, adcRes);
237
238 time_leading_sphi = tdc_sphi;
239 time_leading_xphi = tdc_xphi;
240 time_trailing_sphi = tdc_sphi+adc;
241 time_trailing_xphi = tdc_xphi+adc;
242
243
244 //save digi information
245 BesTofDigi *digi = new BesTofDigi;
246 digi->SetTrackIndex(stripStruct[i].trkIndex);
247 digi->SetPartId(partId);
248 digi->SetModule(module);
249 digi->SetStrip(stripStruct[i].strip);
250 digi->SetForwT1(time_leading_sphi);
251 digi->SetForwT2(time_trailing_sphi);
252 digi->SetBackT1(time_leading_xphi);
253 digi->SetBackT2(time_trailing_xphi);
254 m_besTofDigitsCollection->insert(digi);
255 //cout<<"Print digi info: "
256 // <<" partId= "<<partId
257 // <<" module= "<<module
258 // <<" strip= "<<stripStruct[i].strip
259 // <<" time_leading_sphi= "<<time_leading_sphi
260 // <<" time_leading_xphi= "<<time_leading_xphi
261 // <<" time_trailing_sphi= "<<time_trailing_sphi
262 // <<" time_trailing_xphi= "<<time_trailing_xphi
263 // <<endl;
264
265
266 //save digi information
267 if(m_rootFlag)
268 {
269 m_partId = partId;
270 m_module = module;
271 m_time_leading_sphi = time_leading_sphi;
272 m_time_leading_xphi = time_leading_xphi;
273 m_time_trailing_sphi = time_trailing_sphi;
274 m_time_trailing_xphi = time_trailing_xphi;
275 m_tdcRes = tdcRes;
276 m_tdcRes_charge = tdcRes_charge;
277 m_adc = adc;
278 m_adcRes = adcRes;
279 m_adcRes_charge = adcRes_charge;
280
281 m_strip = stripStruct[i].strip;
282 m_trkIndex = stripStruct[i].trkIndex;
283 m_tStart = stripStruct[i].tStart;
284 m_tPropagate_sphi = stripStruct[i].tPropagate_sphi;
285 m_tPropagate_xphi = stripStruct[i].tPropagate_xphi;
286 m_tThreshold = stripStruct[i].tThreshold;
287 m_charge = stripStruct[i].charge;
288
289 m_nhit = stripStruct[i].hitStructCol.size();
290 //cout<<"m_nhit= "<<m_nhit<<endl;
291 for(int j=0; j<m_nhit; j++)
292 {
293 m_ions_hit[j] = stripStruct[i].hitStructCol[j].ions;
294 m_trkIndex_hit[j] = stripStruct[i].hitStructCol[j].trkIndex;
295 m_pdgCode_hit[j] = stripStruct[i].hitStructCol[j].pdgCode;
296 m_gap_hit[j] = stripStruct[i].hitStructCol[j].gap;
297 m_underStrip_hit[j] = stripStruct[i].hitStructCol[j].underStrip;
298 m_locx_hit[j] = stripStruct[i].hitStructCol[j].locx;
299 m_locy_hit[j] = stripStruct[i].hitStructCol[j].locy;
300 m_locz_hit[j] = stripStruct[i].hitStructCol[j].locz;
301 m_x_hit[j] = stripStruct[i].hitStructCol[j].x;
302 m_y_hit[j] = stripStruct[i].hitStructCol[j].y;
303 m_z_hit[j] = stripStruct[i].hitStructCol[j].z;
304 m_px_hit[j] = stripStruct[i].hitStructCol[j].px;
305 m_py_hit[j] = stripStruct[i].hitStructCol[j].py;
306 m_pz_hit[j] = stripStruct[i].hitStructCol[j].pz;
307 }
308 m_tree->Fill();
309 }
310 }
311}
XmlRpcServer s
Definition: HelloServer.cpp:11
G4THitsCollection< BesTofHit > BesTofHitsCollection
double calTdcRes_charge1(double charge_fC)
double calAdcRes_charge(double charge_fC)
double calAdcRes_charge1(double charge_fC)
bool underStrip(double locX, double locZ)
int calStrip(double locZ)
double charge2Time1(double charge_fC)
double charge2Time(double charge_fC)
double calTdcRes_charge(double charge_fC)
void setPar(int nstep, double E_weight)
#define ns(x)
Definition: xmltok.c:1504

Referenced by BesTofDigitizer::Digitize().

◆ Digitize() [2/2]

virtual void BesTofDigitizerEcV4::Digitize ( ScintSingle ,
BesTofDigitsCollection  
)
virtual

Reimplemented from BesTofDigitizerV.

◆ initial() [1/2]

void BesTofDigitizerEcV4::initial ( )

Definition at line 107 of file BesTofDigitizerEcV4.cc.

108{
109 m_param = Param();
110 m_param.setPar(m_nstep, m_E_weight);
111 partId = -999;
112 module = -999;
113 tdc_sphi = -999;
114 tdc_xphi = -999;
115 if(tdcRes_const<0) tdcRes_const = sqrt(27*27.+10.*10+20.*20)+18.; //ps, 27:TDC; 10:gapNb; 20:cables..
116 tdcRes = -999;
117
118 adc = -999;
119 if(adcRes_const<0) adcRes_const = 27; //ps TDC
120 adcRes = -999;
121
122 time_leading_sphi = -999;
123 time_leading_xphi = -999;
124 time_trailing_sphi = -999;
125 time_trailing_xphi = -999;
126}

Referenced by BesTofDigitizerEcV4(), BesTofDigitizerEcV4::HitStruct::HitStruct(), and BesTofDigitizerEcV4::StripStruct::StripStruct().

◆ initial() [2/2]

void BesTofDigitizerEcV4::initial ( )

◆ underStrip() [1/2]

bool BesTofDigitizerEcV4::underStrip ( double  locX,
double  locZ 
)

Definition at line 345 of file BesTofDigitizerEcV4.cc.

346{
347 bool flag = 0;
348 int strip=-1;
349 double stripWidth = m_param.strip_z+m_param.strip_gap; //Strip spread: (24+3)mm
350 int nstrip = m_param.nstrip;
351 //the offset between strip coordinate and gas SD: 0.5
352 double length = locZ+stripWidth*nstrip/2-0.5;
353 if(length<stripWidth*nstrip)
354 {
355 for(int i=0; i<nstrip; i++)
356 {
357 if(length>i*stripWidth && length<(i+1)*stripWidth)
358 {
359 strip = i;
360 if(length>i*stripWidth+m_param.strip_gap/2 && length<(i+1)*stripWidth-m_param.strip_gap/2
361 && locX>-m_param.strip_x[strip]/2 && locX<m_param.strip_x[strip]/2) flag=1;
362 break;
363 }
364 }
365 }
366
367 return flag;
368}

Referenced by Digitize().

◆ underStrip() [2/2]

bool BesTofDigitizerEcV4::underStrip ( double  locX,
double  locZ 
)

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