159{
160
161 ISvcLocator* svcLocator = Gaudi::svcLocator();
163 StatusCode sc = svcLocator->service("G4Svc", tmpSvc);
164 G4Svc* m_G4Svc =
dynamic_cast<G4Svc *
>(tmpSvc);
167
168
169 G4int THCID = -1;
170 THCID = m_DigiMan->GetHitsCollectionID("BesTofHitsCollection");
171 if (THCID>=0)
172 {
174 G4int nHits = tofDC->entries();
175
176 if (nHits>0)
177 {
179 for (int i=0;i<nHits;i++)
180 {
181 tofHit=(*tofDC)[i];
193
194 G4ThreeVector gTemp = tofHit->
GetPos();
195 TVector3 tTemp(gTemp.x(), gTemp.y(), gTemp.z());
197
199 tTemp = TVector3(gTemp.x(), gTemp.y(), gTemp.z());
201
203 tTemp = TVector3(gTemp.x(), gTemp.y(), gTemp.z());
205
206
208 }
209 }
210 }
211
212}
G4THitsCollection< BesTofHit > BesTofHitsCollection
G4ThreeVector GetPDirection()
G4ThreeVector GetMomentum()
void addMcHitTof(TMcHitTof *hit)
Add a McHitTof into the TOF Data collection.
void setBeamTime(Double_t time)
void SetStepL(Double_t stepL)
void SetTime(Double_t time)
void SetTrackIndex(Int_t trackIndex)
void SetG4Index(Int_t index)
void SetPos(TVector3 pos)
void SetMomentum(TVector3 momentum)
void SetDeltaT(Double_t deltaT)
void SetEdep(Double_t edep)
void SetPartId(Int_t partId)
void SetPDirection(TVector3 pDirection)
void SetCharge(Int_t charge)
void SetTrackL(Double_t length)
void SetScinNb(Int_t scinNb)