BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
BesTofDigitizerEcV1 Class Reference

#include <BesTofDigitizerEcV1.hh>

+ Inheritance diagram for BesTofDigitizerEcV1:

Public Member Functions

 BesTofDigitizerEcV1 ()
 
 ~BesTofDigitizerEcV1 ()
 
virtual void Digitize (ScintSingle *, BesTofDigitsCollection *)
 
void TofPmtInit ()
 
void TofPmtAccum (BesTofHit *)
 
void Smear (G4int)
 
- 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 21 of file BesTofDigitizerEcV1.hh.

Constructor & Destructor Documentation

◆ BesTofDigitizerEcV1()

BesTofDigitizerEcV1::BesTofDigitizerEcV1 ( )

Definition at line 21 of file BesTofDigitizerEcV1.cc.

22{
24 m_bucketPosR = tofPara->GetBucketPosR(); // 445 ???
25}
static BesTofGeoParameter * GetInstance()

◆ ~BesTofDigitizerEcV1()

BesTofDigitizerEcV1::~BesTofDigitizerEcV1 ( )

Definition at line 27 of file BesTofDigitizerEcV1.cc.

28{
29}

Member Function Documentation

◆ Digitize()

void BesTofDigitizerEcV1::Digitize ( ScintSingle scint,
BesTofDigitsCollection DC 
)
virtual

Reimplemented from BesTofDigitizerV.

Definition at line 31 of file BesTofDigitizerEcV1.cc.

32{
33 G4cout<<"BesTofDigitizerEcV1::Digitize"<<G4endl;
35 G4DigiManager* digiManager = G4DigiManager::GetDMpointer();
36 G4int THCID = digiManager->GetHitsCollectionID("BesTofHitsCollection");
37 m_THC = (BesTofHitsCollection*) (digiManager->GetHitsCollection(THCID));
38 if (m_THC)
39 {
40 G4int partId, scinNb, nHits;
41 BesTofHit* hit;
42 partId=scint->GetPartId();
43 scinNb=scint->GetScinNb();
44 nHits=scint->GetHitIndexes()->size();
45 TofPmtInit();
46 for (G4int j=0;j<nHits;j++)
47 {
48 hit= (*m_THC)[( *(scint->GetHitIndexes()) )[j]];
49 TofPmtAccum(hit);
50 }
51
52 Smear(scinNb);
53 if ( m_TDC[0]>0 )
54 {
55 BesTofDigi* digi = new BesTofDigi;
57 digi->SetPartId(partId);
58 digi->SetScinNb(scinNb);
59 digi->SetForwADC( m_ADC[0]) ;
60 digi->SetForwTDC( m_TDC[0]) ;
61 digi->SetBackADC( m_ADC[1]) ;
62 digi->SetBackTDC( m_TDC[1]) ;
63 m_besTofDigitsCollection->insert(digi);
64 }
65 }
66}
G4THitsCollection< BesTofHit > BesTofHitsCollection
Definition: BesTofHit.hh:108
void SetPartId(G4int partId)
Definition: BesTofDigi.hh:39
void SetForwADC(G4double ADC)
Definition: BesTofDigi.hh:41
void SetTrackIndex(G4int index)
Definition: BesTofDigi.hh:38
void SetBackADC(G4double ADC)
Definition: BesTofDigi.hh:42
void SetForwTDC(G4double TDC)
Definition: BesTofDigi.hh:43
void SetScinNb(G4int scinNb)
Definition: BesTofDigi.hh:40
void SetBackTDC(G4double TDC)
Definition: BesTofDigi.hh:44
void TofPmtAccum(BesTofHit *)
BesTofDigitsCollection * m_besTofDigitsCollection
BesTofHitsCollection * m_THC
G4int GetPartId()
Definition: ScintSingle.hh:44
vector< G4int > * GetHitIndexes()
Definition: ScintSingle.hh:47
G4int GetScinNb()
Definition: ScintSingle.hh:45

Referenced by BesTofDigitizer::Digitize().

◆ Smear()

void BesTofDigitizerEcV1::Smear ( G4int  scinNb)

Definition at line 101 of file BesTofDigitizerEcV1.cc.

102{
103 /*G4double tofRes = 0.08;
104 for(G4int i=0;i<2;i++)
105 {
106 m_TDC[i] += tofRes * G4RandGauss::shoot();
107 }*/
108
109 double pp[8];
110 for (int i=0;i<8;i++)
111 {
112 pp[i]=m_tofCaliSvc->ETof(scinNb)->getP(i);
113 }
114 m_ADC[0] *= 7.;
115 m_TDC[0] += (pp[0]+pp[1]*m_r)/TMath::Sqrt(m_ADC[0])+
116 pp[2]/m_ADC[0]+
117 pp[3]*m_r/m_ADC[0]+
118 pp[4]*m_r+
119 pp[5]*m_r*m_r+
120 pp[6]*m_r*m_r*m_r+
121 pp[7];
122}
ITofCaliSvc * m_tofCaliSvc
virtual ETofCal * ETof(unsigned id) const =0

Referenced by Digitize().

◆ TofPmtAccum()

void BesTofDigitizerEcV1::TofPmtAccum ( BesTofHit hit)

Definition at line 74 of file BesTofDigitizerEcV1.cc.

75{
76 G4int trackIndex = hit->GetTrackIndex();
77 G4int scinNb = hit->GetScinNb();
78 G4double time = hit->GetTime();
80 {
82 m_trackIndex = trackIndex;
83 }
84 G4double edep = hit->GetEdep();
85 G4ThreeVector pos = hit->GetPos();
86 G4double posx = pos.x();
87 G4double posy = pos.y();
88 G4double pathL=abs(m_bucketPosR-sqrt(posx*posx+posy*posy));
89 G4double atten;
90 atten = m_tofCaliSvc->EAtten(scinNb);
91 m_ADC[0] += edep*exp(-pathL/atten);
92
93 if (time<m_t1st)
94 {
95 m_t1st = time;
96 m_r = sqrt(posx*posx+posy*posy);
97 m_TDC[0] = m_t1st;
98 }
99}
Double_t time
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:252
double abs(const EvtComplex &c)
Definition: EvtComplex.hh:212
G4double GetTime()
Definition: BesTofHit.hh:66
G4double GetEdep()
Definition: BesTofHit.hh:62
G4ThreeVector GetPos()
Definition: BesTofHit.hh:65
G4int GetScinNb()
Definition: BesTofHit.hh:61
G4int GetTrackIndex()
Definition: BesTofHit.hh:58
virtual const double EAtten(unsigned id)=0

Referenced by Digitize().

◆ TofPmtInit()

void BesTofDigitizerEcV1::TofPmtInit ( )

Definition at line 68 of file BesTofDigitizerEcV1.cc.

69{
70 Initialize();
71 m_t1st = 9999.;
72}

Referenced by Digitize().


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