15#include "G4DigiManager.hh"
17#include "Randomize.hh"
24 m_scinLength = tofPara->
GetBr1L();
33 G4cout<<
"BesTofDigitizerBrV1::Digitize"<<G4endl;
35 G4DigiManager* digiManager = G4DigiManager::GetDMpointer();
36 G4int THCID = digiManager->GetHitsCollectionID(
"BesTofHitsCollection");
40 G4int partId, scinNb, nHits;
46 for (G4int j=0;j<nHits;j++)
86 G4ThreeVector pos = hit->
GetPos();
87 G4double posx = pos.x();
88 G4double posy = pos.y();
89 G4double posz = pos.z();
94 pathL[0]=m_scinLength/2-posz;
95 pathL[1]=posz+m_scinLength/2;
96 for (G4int j=0;j<2;j++)
99 m_ADC[j] += edep*
exp(-pathL[j]/atten);
111 G4cout<<
"m_t1st:"<<m_t1st<<
" m_z:"<<m_z<<G4endl;
122 for (
int i=0;i<10;i++)
129 for (
int i=0;i<2;i++)
132 for (
int j=0;j<10;j++)
139 m_TDC[i] += (pp[0]+pp[1]*m_z)/TMath::Sqrt(
m_ADC[i])+
143 pp[5]/(84.2*84.2+m_z*m_z)+
G4TDigiCollection< BesTofDigi > BesTofDigitsCollection
G4THitsCollection< BesTofHit > BesTofHitsCollection
EvtComplex exp(const EvtComplex &c)
double getP2(int idx) const
double getP1(int idx) const
void SetPartId(G4int partId)
void SetForwADC(G4double ADC)
void SetTrackIndex(G4int index)
void SetBackADC(G4double ADC)
void SetForwTDC(G4double TDC)
void SetScinNb(G4int scinNb)
void SetBackTDC(G4double TDC)
void TofPmtAccum(BesTofHit *)
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)
ITofCaliSvc * m_tofCaliSvc
BesTofDigitsCollection * m_besTofDigitsCollection
BesTofHitsCollection * m_THC
static BesTofGeoParameter * GetInstance()
virtual BTofCal * BTof(unsigned id) const =0
virtual const double BAtten(unsigned id)=0
vector< G4int > * GetHitIndexes()