29#include "G4HCofThisEvent.hh"
30#include "G4TouchableHistory.hh"
33#include "G4SDManager.hh"
38 collectionName.insert(
"hits");
43 G4int aNumRho, G4int aNumPhi)
45 , fCellNoZ(aNumLayers)
49 collectionName.insert(
"hits");
72 for(G4int iz = 0; iz <
fCellNoZ; iz++)
83 G4double edep = aStep->GetTotalEnergyDeposit();
97 if(hit->GetTime() == -1 ||
98 hit->GetTime() > aStep->GetTrack()->GetGlobalTime())
99 hit->SetTime(aStep->GetTrack()->GetGlobalTime());
103 if(hit->GetType() != 1)
126 if(hit->GetTime() == -1 ||
127 hit->GetTime() > aTrack->GetPrimaryTrack()->GetGlobalTime())
129 hit->SetTime(aTrack->GetPrimaryTrack()->GetGlobalTime());
144 G4int rhoNo = aTouchable->GetCopyNumber(0);
145 G4int phiNo = aTouchable->GetCopyNumber(1);
146 G4int zNo = aTouchable->GetCopyNumber(2);
153 "Par03SensitiveDetector::RetrieveAndSetupHit()",
"InvalidSetup",
155 "Size of hit collection in Par03SensitiveDetector is smaller than the "
156 "number of cells created in Par03DetectorConstruction!");
158 Par03Hit* hit = (*fHitsCollection)[hitID];
165 hit->
SetLogV(aTouchable->GetVolume(0)->GetLogicalVolume());
167 hit->
SetRot(transform.NetRotation());
169 hit->
SetPos(transform.NetTranslation());
G4THitsCollection< Par03Hit > Par03HitsCollection
G4double GetEnergy() const
Hit class to store energy deposited in the sensitive detector.
G4int GetRhoId() const
Get rho id of the cell in the readout segmentation.
void SetPhiId(G4int aPhi)
Set phi id of the cell in the readout segmentation.
void SetZid(G4int aZ)
Set Z id of the cell in the readout segmentation.
void SetRhoId(G4int aRho)
Set Rho id of the cell in the readout segmentation.
void SetRot(G4RotationMatrix aXYZ)
Set rotation.
void SetLogV(G4LogicalVolume *aLogVol)
void SetPos(G4ThreeVector aXYZ)
Set position.
G4int fCellNoPhi
Number of readout cells along azimuthal angle.
G4int fHitCollectionID
ID of collection of hits.
virtual ~Par03SensitiveDetector()
Par03Hit * RetrieveAndSetupHit(G4TouchableHistory *aTouchable)
Process energy deposit - common part for full and fast simulation It is invoked from ProcessHits() me...
Par03SensitiveDetector(G4String aName)
G4int fCellNoZ
Number of readout cells along z axis.
virtual void Initialize(G4HCofThisEvent *HCE) final
Create hit collection.
Par03HitsCollection * fHitsCollection
Collection of hits.
G4int fCellNoRho
Number of readout cells along radius of cylinder.
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *aROhist) final
Process energy deposit from the full simulation.