BOSS 7.1.2
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)
 
- Public Member Functions inherited from BesTofDigitizerV
 BesTofDigitizerV ()
 
 ~BesTofDigitizerV ()
 
void Initialize ()
 

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

Definition at line 27 of file BesTofDigitizerEcV4.hh.

Constructor & Destructor Documentation

◆ BesTofDigitizerEcV4()

BesTofDigitizerEcV4::BesTofDigitizerEcV4 ( )

Definition at line 33 of file BesTofDigitizerEcV4.cc.

34{
35 PropertyMgr m_propMgr;
36 m_propMgr.declareProperty("FileName", m_fileName = "mrpc.root");
37 m_propMgr.declareProperty("RootFlag", m_rootFlag = false);
38 m_propMgr.declareProperty("E", m_V = 7000);
39 m_propMgr.declareProperty("Threshold", m_threshold = 5.5e+08);
40
41 m_propMgr.declareProperty("nstep", m_nstep = -1);
42 m_propMgr.declareProperty("E_weight", m_E_weight = -1);
43 m_propMgr.declareProperty("saturationFlag", m_saturationFlag = true);
44 m_propMgr.declareProperty("tdcRes_const", tdcRes_const = -1);
45 m_propMgr.declareProperty("adcRes_const", adcRes_const = -1);
46 m_propMgr.declareProperty("calTdcRes_charge_flag", m_calTdcRes_charge_flag=0);
47 m_propMgr.declareProperty("charge2Time_flag", m_charge2Time_flag=0);
48 m_propMgr.declareProperty("calAdcRes_charge_flag", m_calAdcRes_charge_flag=0);
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("event", &m_event, "event/D");
62 m_tree->Branch("partId", &m_partId, "partId/D");
63 m_tree->Branch("module", &m_module, "module/D");
64 m_tree->Branch("time_leading_sphi", &m_time_leading_sphi, "time_leading_sphi/D");
65 m_tree->Branch("time_leading_xphi", &m_time_leading_xphi, "time_leading_xphi/D");
66 m_tree->Branch("time_trailing_sphi", &m_time_trailing_sphi, "time_trailing_sphi/D");
67 m_tree->Branch("time_trailing_xphi", &m_time_trailing_xphi, "time_trailing_xphi/D");
68 m_tree->Branch("tdcRes", &m_tdcRes, "tdcRes/D");
69 m_tree->Branch("tdcRes_charge", &m_tdcRes_charge, "tdcRes_charge/D");
70 m_tree->Branch("adc", &m_adc, "adc/D");
71 m_tree->Branch("adcRes", &m_adcRes, "adcRes/D");
72 m_tree->Branch("adcRes_charge", &m_adcRes_charge, "adcRes_charge/D");
73 m_tree->Branch("strip", &m_strip, "strip/D");
74 m_tree->Branch("trkIndex", &m_trkIndex, "trkIndex/D");
75 m_tree->Branch("tStart", &m_tStart, "tStart/D");
76 m_tree->Branch("tPropagate_sphi", &m_tPropagate_sphi, "tPropagate_sphi/D");
77 m_tree->Branch("tPropagate_xphi", &m_tPropagate_xphi, "tPropagate_xphi/D");
78 m_tree->Branch("tThreshold", &m_tThreshold, "tThreshold/D");
79 m_tree->Branch("charge", &m_charge, "charge/D");
80 m_tree->Branch("nhit", &m_nhit, "nhit/I");
81 m_tree->Branch("ions_hit", m_ions_hit, "ions_hit[nhit]/D");
82 m_tree->Branch("trkIndex_hit", m_trkIndex_hit, "trkIndex_hit[nhit]/D");
83 m_tree->Branch("pdgCode_hit", m_pdgCode_hit, "pdgCode_hit[nhit]/D");
84 m_tree->Branch("gap_hit", m_gap_hit, "gap_hit[nhit]/D");
85 m_tree->Branch("underStrip_hit", m_underStrip_hit, "underStrip_hit[nhit]/D");
86 m_tree->Branch("locx_hit", m_locx_hit, "locx_hit[nhit]/D");
87 m_tree->Branch("locy_hit", m_locy_hit, "locy_hit[nhit]/D");
88 m_tree->Branch("locz_hit", m_locz_hit, "locz_hit[nhit]/D");
89 m_tree->Branch("x_hit", m_x_hit, "x_hit[nhit]/D");
90 m_tree->Branch("y_hit", m_y_hit, "y_hit[nhit]/D");
91 m_tree->Branch("z_hit", m_z_hit, "z_hit[nhit]/D");
92 m_tree->Branch("px_hit", m_px_hit, "px_hit[nhit]/D");
93 m_tree->Branch("py_hit", m_py_hit, "py_hit[nhit]/D");
94 m_tree->Branch("pz_hit", m_pz_hit, "pz_hit[nhit]/D");
95 }
96}

◆ ~BesTofDigitizerEcV4()

BesTofDigitizerEcV4::~BesTofDigitizerEcV4 ( )

Definition at line 99 of file BesTofDigitizerEcV4.cc.

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

Member Function Documentation

◆ calAdcRes_charge()

double BesTofDigitizerEcV4::calAdcRes_charge ( double charge_fC)

Definition at line 586 of file BesTofDigitizerEcV4.cc.

587{
588 double time=0;
589 if(charge_fC<250)
590 {
591 time = 72.6005*exp(-charge_fC*0.0302626 + 1.49059) + 40.8627;
592 }
593 else
594 {
595 time = 32.6233+0.00404149*charge_fC;
596 }
597 if(time<0) time=0;
598 return time; //ps
599}
Double_t time
EvtComplex exp(const EvtComplex &c)

Referenced by Digitize().

◆ calAdcRes_charge1()

double BesTofDigitizerEcV4::calAdcRes_charge1 ( double charge_fC)

Definition at line 624 of file BesTofDigitizerEcV4.cc.

625{
626 double time = 64.3326*exp(-charge_fC/25.4638 + 0.944184)+19.4846;
627 if(time<0) time=0;
628 return time; //ps
629}

Referenced by Digitize().

◆ calStrip()

int BesTofDigitizerEcV4::calStrip ( double locZ)

Definition at line 355 of file BesTofDigitizerEcV4.cc.

356{
357 int strip=-1;
358 double stripWidth = m_param.strip_z+m_param.strip_gap; //Strip spread: (24+3)mm
359 int nstrip = m_param.nstrip;
360 //the offset between strip coordinate and gas SD: 0.5
361 double length = locZ+stripWidth*nstrip/2-0.5;
362 if(length<=0)
363 {
364 strip=0;
365 }
366 else if(length<stripWidth*nstrip)
367 {
368 for(int i=0; i<nstrip; i++)
369 {
370 if(length>i*stripWidth && length<(i+1)*stripWidth)
371 {
372 strip = i;
373 break;
374 }
375 }
376 }
377 else
378 {
379 strip=nstrip-1;
380 }
381 if(strip<0) strip=0;
382 if(strip>nstrip-1) strip=nstrip-1;
383
384 return strip;
385}

Referenced by Digitize().

◆ calTdcRes_charge()

double BesTofDigitizerEcV4::calTdcRes_charge ( double charge_fC)

Definition at line 563 of file BesTofDigitizerEcV4.cc.

564{
565 double time=0;
566 if( charge_fC<250)
567 {
568 time = 100.764*exp(-charge_fC*0.0413966+0.377154)+ 13.814;
569 }
570 else
571 {
572 time = 12.8562+0.000507299*charge_fC;
573 }
574 if(time<0) time=0;
575 return time; //ps
576}

Referenced by Digitize().

◆ calTdcRes_charge1()

double BesTofDigitizerEcV4::calTdcRes_charge1 ( double charge_fC)

Definition at line 601 of file BesTofDigitizerEcV4.cc.

602{
603 double result =0;
604 if( charge_fC > 50.)
605 {
606 result = 67.6737*exp(-charge_fC/50.9995-0.27755)+9.06223;
607 }
608 else
609 {
610 result = 176.322-2.98345*charge_fC;
611 }
612 if(result<0) result=0;
613 return result; //ps
614}

Referenced by Digitize().

◆ charge2Time()

double BesTofDigitizerEcV4::charge2Time ( double charge_fC)

Definition at line 578 of file BesTofDigitizerEcV4.cc.

579{
580 double time=0;
581 time=-120.808/log(charge_fC*30.1306)+26.6024; //ns
582 if(time<0) time=0;
583 return time;
584}

Referenced by Digitize().

◆ charge2Time1()

double BesTofDigitizerEcV4::charge2Time1 ( double charge_fC)

Definition at line 616 of file BesTofDigitizerEcV4.cc.

617{
618 double time=0;
619 time=-4.50565/log(charge_fC*0.0812208)+16.6653; //ns
620 if(time<0) time=0;
621 return time;
622}

Referenced by Digitize().

◆ Digitize()

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

Reimplemented from BesTofDigitizerV.

Definition at line 146 of file BesTofDigitizerEcV4.cc.

147{
149 G4DigiManager* digiManager = G4DigiManager::GetDMpointer();
150 G4int THCID = digiManager->GetHitsCollectionID("BesTofHitsCollection");
151 m_THC = (BesTofHitsCollection*) (digiManager->GetHitsCollection(THCID));
152 if( !m_THC ) return;
153
154 partId = single_module->GetPartId();
155 module = single_module->GetModule_mrpc();
156 //cout<<"partId= "<<partId<<" module= "<<module<<endl;
157
158 //Process the hits
159 int nstrip = m_param.nstrip;
160 StripStruct stripStruct[12];
161 for(int i=0; i<nstrip; i++)
162 {
163 stripStruct[i].m_param = m_param;
164 stripStruct[i].setPar(m_param.alpha, m_param.eta, m_param.v_drift, m_threshold, m_saturationFlag);
165 }
166
167 BesTofHit* hit;
168 for(unsigned int i=0; i<single_module->GetHitIndexes_mrpc()->size(); i++)
169 {
170 hit = (*m_THC)[ (*(single_module->GetHitIndexes_mrpc()))[i] ];
171 m_event = hit->GetEvent();
172
173 HitStruct hitStruct;
174 hitStruct.m_param = m_param;
175 hitStruct.trkIndex = hit->GetG4Index();
176 hitStruct.pdgCode = hit->GetPDGcode();
177 hitStruct.ions = hit->GetIons();
178 hitStruct.strip = calStrip(hit->GetLocPos().z()/mm);
179 hitStruct.underStrip = underStrip(hit->GetLocPos().x()/mm, hit->GetLocPos().z()/mm);
180 hitStruct.gap = hit->GetGapNb();
181 hitStruct.glbTime = hit->GetTime()/ns;
182 hitStruct.locx = hit->GetLocPos().x()/mm;
183 hitStruct.locy = hit->GetLocPos().y()/mm;
184 hitStruct.locz = hit->GetLocPos().z()/mm;
185 hitStruct.x = hit->GetPos().x()/mm;
186 hitStruct.y = hit->GetPos().y()/mm;
187 hitStruct.z = hit->GetPos().z()/mm;
188 hitStruct.px = hit->GetMomentum().x()/(GeV/(3e+08*m/s));
189 hitStruct.py = hit->GetMomentum().y()/(GeV/(3e+08*m/s));
190 hitStruct.pz = hit->GetMomentum().z()/(GeV/(3e+08*m/s));
191 //hitStruct.print();
192
193 if(hitStruct.ions>0 && hitStruct.glbTime>0)
194 {
195 stripStruct[hitStruct.strip].hitStructCol.push_back(hitStruct);
196 }
197 }
198
199 //test multihit, study the lower peak in charge
200 int hitSize=0;
201
202 for(int i=0; i<nstrip; i++)
203 {
204 if(stripStruct[i].hitStructCol.size()==0) continue;
205 stripStruct[i].strip = i;
206 stripStruct[i].calFirstHit();
207 stripStruct[i].avalanche();
208 //stripStruct[i].print();
209
210 if(stripStruct[i].tThreshold<=0) continue;
211
212 tdc_sphi = stripStruct[i].tStart + stripStruct[i].tThreshold + stripStruct[i].tPropagate_sphi;
213 tdc_xphi = stripStruct[i].tStart + stripStruct[i].tThreshold + stripStruct[i].tPropagate_xphi;
214
215 double tdcRes_charge;
216 if(m_calTdcRes_charge_flag==0)
217 {
218 tdcRes_charge = calTdcRes_charge(stripStruct[i].charge*1000); //ps, charge in fC
219 }
220 else if(m_calTdcRes_charge_flag==1)
221 {
222 tdcRes_charge = calTdcRes_charge1(stripStruct[i].charge*1000);
223 }
224 else if(m_calTdcRes_charge_flag==2)
225 {
226 tdcRes_charge = 0;
227 }
228
229 tdcRes = sqrt(tdcRes_charge*tdcRes_charge+tdcRes_const*tdcRes_const)/1000; //ns
230
231 tdc_sphi = G4RandGauss::shoot(tdc_sphi, tdcRes);
232 tdc_xphi = G4RandGauss::shoot(tdc_xphi, tdcRes);
233
234 if(m_charge2Time_flag==0)
235 {
236 adc = charge2Time(stripStruct[i].charge*1000); //ns, charge in fC
237 }
238 else if(m_charge2Time_flag==1)
239 {
240 adc = charge2Time1(stripStruct[i].charge*1000);
241 }
242
243 double adcRes_charge;
244 if(m_calAdcRes_charge_flag==0)
245 {
246 adcRes_charge = calAdcRes_charge(stripStruct[i].charge*1000); //ps, charge in fC
247 }
248 else if(m_calAdcRes_charge_flag==1)
249 {
250 adcRes_charge = calAdcRes_charge1(stripStruct[i].charge*1000);
251 }
252 else if(m_calAdcRes_charge_flag==2)
253 {
254 adcRes_charge = 0;
255 }
256
257 adcRes = sqrt(adcRes_charge*adcRes_charge+adcRes_const*adcRes_const)/1000;
258 adc = G4RandGauss::shoot(adc, adcRes);
259 if(adc<0) adc=0;
260
261 time_leading_sphi = tdc_sphi;
262 time_leading_xphi = tdc_xphi;
263 time_trailing_sphi = tdc_sphi+adc;
264 time_trailing_xphi = tdc_xphi+adc;
265
266
267 //save digi information
268 BesTofDigi *digi = new BesTofDigi;
269 digi->SetTrackIndex(stripStruct[i].trkIndex);
270 digi->SetPartId(partId);
271 digi->SetModule(module);
272 digi->SetStrip(stripStruct[i].strip);
273 int mo = (partId-3)*36+module;
274 int st = stripStruct[i].strip;
275 if(m_param.deadChannel[mo][st]==0 || m_param.deadChannel[mo][st]==2)
276 {
277 //Set dead channel
278 digi->SetForwT1(-999);
279 digi->SetForwT2(-999);
280 }
281 else
282 {
283 digi->SetForwT1(time_leading_sphi);
284 digi->SetForwT2(time_trailing_sphi);
285 }
286 if(m_param.deadChannel[mo][st]==1 || m_param.deadChannel[mo][st]==2)
287 {
288 digi->SetBackT1(-999);
289 digi->SetBackT2(-999);
290 }
291 else
292 {
293 digi->SetBackT1(time_leading_xphi);
294 digi->SetBackT2(time_trailing_xphi);
295 }
296 m_besTofDigitsCollection->insert(digi);
297 //cout<<"Print digi info: "
298 // <<" partId= "<<partId
299 // <<" module= "<<module
300 // <<" strip= "<<stripStruct[i].strip
301 // <<" time_leading_sphi= "<<time_leading_sphi
302 // <<" time_leading_xphi= "<<time_leading_xphi
303 // <<" time_trailing_sphi= "<<time_trailing_sphi
304 // <<" time_trailing_xphi= "<<time_trailing_xphi
305 // <<endl;
306
307
308 //save digi information
309 if(m_rootFlag)
310 {
311 m_partId = partId;
312 m_module = module;
313 m_time_leading_sphi = time_leading_sphi;
314 m_time_leading_xphi = time_leading_xphi;
315 m_time_trailing_sphi = time_trailing_sphi;
316 m_time_trailing_xphi = time_trailing_xphi;
317 m_tdcRes = tdcRes;
318 m_tdcRes_charge = tdcRes_charge;
319 m_adc = adc;
320 m_adcRes = adcRes;
321 m_adcRes_charge = adcRes_charge;
322
323 m_strip = stripStruct[i].strip;
324 m_trkIndex = stripStruct[i].trkIndex;
325 m_tStart = stripStruct[i].tStart;
326 m_tPropagate_sphi = stripStruct[i].tPropagate_sphi;
327 m_tPropagate_xphi = stripStruct[i].tPropagate_xphi;
328 m_tThreshold = stripStruct[i].tThreshold;
329 m_charge = stripStruct[i].charge;
330
331 m_nhit = stripStruct[i].hitStructCol.size();
332 //cout<<"m_nhit= "<<m_nhit<<endl;
333 for(int j=0; j<m_nhit; j++)
334 {
335 m_ions_hit[j] = stripStruct[i].hitStructCol[j].ions;
336 m_trkIndex_hit[j] = stripStruct[i].hitStructCol[j].trkIndex;
337 m_pdgCode_hit[j] = stripStruct[i].hitStructCol[j].pdgCode;
338 m_gap_hit[j] = stripStruct[i].hitStructCol[j].gap;
339 m_underStrip_hit[j] = stripStruct[i].hitStructCol[j].underStrip;
340 m_locx_hit[j] = stripStruct[i].hitStructCol[j].locx;
341 m_locy_hit[j] = stripStruct[i].hitStructCol[j].locy;
342 m_locz_hit[j] = stripStruct[i].hitStructCol[j].locz;
343 m_x_hit[j] = stripStruct[i].hitStructCol[j].x;
344 m_y_hit[j] = stripStruct[i].hitStructCol[j].y;
345 m_z_hit[j] = stripStruct[i].hitStructCol[j].z;
346 m_px_hit[j] = stripStruct[i].hitStructCol[j].px;
347 m_py_hit[j] = stripStruct[i].hitStructCol[j].py;
348 m_pz_hit[j] = stripStruct[i].hitStructCol[j].pz;
349 }
350 m_tree->Fill();
351 }
352 }
353}
G4THitsCollection< BesTofHit > BesTofHitsCollection
Definition BesTofHit.hh:116
XmlRpcServer s
void SetForwT1(G4double t1)
Definition BesTofDigi.hh:47
void SetPartId(G4int partId)
Definition BesTofDigi.hh:37
void SetTrackIndex(G4int index)
Definition BesTofDigi.hh:36
void SetForwT2(G4double t2)
Definition BesTofDigi.hh:49
void SetBackT1(G4double t1)
Definition BesTofDigi.hh:48
void SetModule(G4int module)
Definition BesTofDigi.hh:45
void SetBackT2(G4double t2)
Definition BesTofDigi.hh:50
void SetStrip(G4int strip)
Definition BesTofDigi.hh:46
double calTdcRes_charge1(double charge_fC)
double calAdcRes_charge(double charge_fC)
double calAdcRes_charge1(double charge_fC)
bool underStrip(double locX, double locZ)
double charge2Time1(double charge_fC)
double charge2Time(double charge_fC)
double calTdcRes_charge(double charge_fC)
BesTofDigitsCollection * m_besTofDigitsCollection
BesTofHitsCollection * m_THC
G4double GetEvent()
Definition BesTofHit.hh:42
G4ThreeVector GetLocPos()
Definition BesTofHit.hh:86
G4int GetIons()
Definition BesTofHit.hh:85
G4int GetPDGcode()
Definition BesTofHit.hh:81
G4double GetTime()
Definition BesTofHit.hh:74
G4ThreeVector GetPos()
Definition BesTofHit.hh:73
G4int GetGapNb()
Definition BesTofHit.hh:87
G4int GetG4Index()
Definition BesTofHit.hh:67
G4ThreeVector GetMomentum()
Definition BesTofHit.hh:77
vector< G4int > * GetHitIndexes_mrpc()
G4int GetPartId()
float charge
void setPar(int nstep, double E_weight, double E)
#define ns(x)
Definition xmltok.c:1504

Referenced by BesTofDigitizer::Digitize().

◆ initial()

void BesTofDigitizerEcV4::initial ( )

Definition at line 108 of file BesTofDigitizerEcV4.cc.

109{
110 m_param = Param();
111 m_param.setPar(m_nstep, m_E_weight, m_V);
112 m_param.print();
113 m_event=-1;
114 partId = -999;
115 module = -999;
116 tdc_sphi = -999;
117 tdc_xphi = -999;
118 if(tdcRes_const<0) tdcRes_const = 38;
119 //45; //sqrt(27*27.+30.*30+20.*20); //ps, 27:TDC; 30:gapNb; 20:cables..
120 tdcRes = -999;
121
122 adc = -999;
123 if(adcRes_const<0) adcRes_const = 27; //ps TDC
124 adcRes = -999;
125
126 time_leading_sphi = -999;
127 time_leading_xphi = -999;
128 time_trailing_sphi = -999;
129 time_trailing_xphi = -999;
130
131 cout<<"Property:"<<endl
132 <<" FileName= "<<m_fileName
133 <<" E= "<<m_V
134 <<" Threshold= "<<m_threshold
135 <<" nstep= "<<m_nstep
136 <<" E_weight= "<<m_E_weight
137 <<" saturationFlag= "<<m_saturationFlag
138 <<" tdcRes_const= "<<tdcRes_const
139 <<" adcRes_const= "<<adcRes_const
140 <<" calTdcRes_charge_flag= "<<m_calTdcRes_charge_flag
141 <<" charge2Time_flag= "<<m_charge2Time_flag
142 <<" calAdcRes_charge_flag= "<<m_calAdcRes_charge_flag
143 <<endl;
144}

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

◆ underStrip()

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

Definition at line 387 of file BesTofDigitizerEcV4.cc.

388{
389 bool flag = 0;
390 int strip=-1;
391 double stripWidth = m_param.strip_z+m_param.strip_gap; //Strip spread: (24+3)mm
392 int nstrip = m_param.nstrip;
393 //the offset between strip coordinate and gas SD: 0.5
394 double length = locZ+stripWidth*nstrip/2-0.5;
395 if(length<stripWidth*nstrip)
396 {
397 for(int i=0; i<nstrip; i++)
398 {
399 if(length>i*stripWidth && length<(i+1)*stripWidth)
400 {
401 strip = i;
402 if(length>i*stripWidth+m_param.strip_gap/2 && length<(i+1)*stripWidth-m_param.strip_gap/2
403 && locX>-m_param.strip_x[strip]/2 && locX<m_param.strip_x[strip]/2) flag=1;
404 break;
405 }
406 }
407 }
408
409 return flag;
410}

Referenced by Digitize().


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