BOSS 7.0.9
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 ()
 
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

Definition at line 27 of file BesTofDigitizerEcV4.hh.

Constructor & Destructor Documentation

◆ BesTofDigitizerEcV4()

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 = 5.5e+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 IJobOptionsSvc* jobSvc;
50 Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc);
51 jobSvc->setMyProperties("BesTofDigitizerEcV4", &m_propMgr);
52
53 initial();
54
55 if(m_rootFlag)
56 {
57 m_file = new TFile(m_fileName.c_str(), "RECREATE");
58 m_tree = new TTree("mrpc", "mrpc");
59
60 m_tree->Branch("event", &m_event, "event/D");
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()

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}

Member Function Documentation

◆ calAdcRes_charge()

double BesTofDigitizerEcV4::calAdcRes_charge ( double  charge_fC)

Definition at line 585 of file BesTofDigitizerEcV4.cc.

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

Referenced by Digitize().

◆ calAdcRes_charge1()

double BesTofDigitizerEcV4::calAdcRes_charge1 ( double  charge_fC)

Definition at line 623 of file BesTofDigitizerEcV4.cc.

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

Referenced by Digitize().

◆ calStrip()

int BesTofDigitizerEcV4::calStrip ( double  locZ)

Definition at line 354 of file BesTofDigitizerEcV4.cc.

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

Referenced by Digitize().

◆ calTdcRes_charge()

double BesTofDigitizerEcV4::calTdcRes_charge ( double  charge_fC)

Definition at line 562 of file BesTofDigitizerEcV4.cc.

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

Referenced by Digitize().

◆ calTdcRes_charge1()

double BesTofDigitizerEcV4::calTdcRes_charge1 ( double  charge_fC)

Definition at line 600 of file BesTofDigitizerEcV4.cc.

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

Referenced by Digitize().

◆ charge2Time()

double BesTofDigitizerEcV4::charge2Time ( double  charge_fC)

Definition at line 577 of file BesTofDigitizerEcV4.cc.

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

Referenced by Digitize().

◆ charge2Time1()

double BesTofDigitizerEcV4::charge2Time1 ( double  charge_fC)

Definition at line 615 of file BesTofDigitizerEcV4.cc.

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

Referenced by Digitize().

◆ Digitize()

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

Reimplemented from BesTofDigitizerV.

Definition at line 145 of file BesTofDigitizerEcV4.cc.

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

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

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

◆ underStrip()

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

Definition at line 386 of file BesTofDigitizerEcV4.cc.

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

Referenced by Digitize().


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