12#include "TofSim/BesTofDigitizerEcV1.hh"
13#include "G4DigiManager.hh"
14#include "Randomize.hh"
16#include "TofSim/BesTofDigi.hh"
17#include "TofSim/BesTofGeoParameter.hh"
18#include "TofSim/BesTofHit.hh"
29 G4cout <<
"BesTofDigitizerEcV1::Digitize" << G4endl;
31 G4DigiManager* digiManager = G4DigiManager::GetDMpointer();
32 G4int THCID = digiManager->GetHitsCollectionID(
"BesTofHitsCollection" );
36 G4int partId, scinNb, nHits;
42 for ( G4int j = 0; j < nHits; j++ )
79 G4ThreeVector pos = hit->
GetPos();
80 G4double posx = pos.x();
81 G4double posy = pos.y();
82 G4double pathL =
abs( m_bucketPosR - sqrt( posx * posx + posy * posy ) );
85 m_ADC[0] += edep *
exp( -pathL / atten );
90 m_r = sqrt( posx * posx + posy * posy );
103 for (
int i = 0; i < 8; i++ ) { pp[i] =
m_tofCaliSvc->ETof( scinNb )->getP( i ); }
105 m_TDC[0] += ( pp[0] + pp[1] * m_r ) / TMath::Sqrt(
m_ADC[0] ) + pp[2] /
m_ADC[0] +
106 pp[3] * m_r /
m_ADC[0] + pp[4] * m_r + pp[5] * m_r * m_r +
107 pp[6] * m_r * m_r * m_r + pp[7];
EvtComplex exp(const EvtComplex &c)
G4TDigiCollection< BesTofDigi > BesTofDigitsCollection
G4THitsCollection< BesTofHit > BesTofHitsCollection
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)
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)
void TofPmtAccum(BesTofHit *)
ITofCaliSvc * m_tofCaliSvc
BesTofHitsCollection * m_THC
BesTofDigitsCollection * m_besTofDigitsCollection
static BesTofGeoParameter * GetInstance()
vector< G4int > * GetHitIndexes()