34 #include "G4HCofThisEvent.hh"
45 fMuonCollection(0), fPositionResolution(0.)
49 fPositionResolution = 5*
cm;
75 if(edep==0.)
return true;
78 int nHit = fMuonCollection->
entries();
80 for(
int i=0;i<nHit;i++)
82 aHit = (*fMuonCollection)[i];
85 +
sqr(pos.
y()-hitpos.
y())+
sqr(pos.
z()-hitpos.
z());
86 if(dist2<=
sqr(fPositionResolution))
94 fMuonCollection->
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
static constexpr double cm
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)
static const G4double pos