34 #include "G4HCofThisEvent.hh"
46 positionResolution = 5*
cm;
65 if(edep==0.)
return true;
68 int nHit = muonCollection->
entries();
70 for(
int i=0;i<nHit;i++)
72 aHit = (*muonCollection)[i];
75 +
sqr(pos.
y()-hitpos.
y())+
sqr(pos.
z()-hitpos.
z());
76 if(dist2<=
sqr(positionResolution))
84 muonCollection->
insert( aHit );
G4String SensitiveDetectorName
Definition of the RE05MuonHit class.
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)
virtual G4int GetCollectionID(G4int i)
G4StepPoint * GetPreStepPoint() const
void insert(G4String str)
const G4ThreeVector & GetPosition() const
void SetEdep(G4double de)
Definition of the RE05MuonSD class.
G4double GetTotalEnergyDeposit() const
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
void AddEdep(G4double de)
G4THitsCollection< RE05MuonHit > RE05MuonHitsCollection
RE05MuonSD(G4String name)
virtual void Initialize(G4HCofThisEvent *HCE)
G4CollectionNameVector collectionName
virtual void EndOfEvent(G4HCofThisEvent *HCE)
void SetPos(G4ThreeVector xyz)