64 NbOfCALChannels = NbOfCALBars*NbOfCALLayers;
66 ChitXID =
new G4int[NbOfCALChannels];
67 ChitYID =
new G4int[NbOfCALChannels];
85 for (
G4int i=0;i<NbOfCALChannels;i++)
98 if ((edep/
keV == 0.))
return false;
111 G4int PlaneNumber = 0;
118 NChannel = PlaneNumber * NbOfCALBars + CALBarNumber;
120 if (PlaneName ==
"CALLayerX" )
126 if (ChitXID[NChannel]==-1)
135 CalorimeterCollection->
insert(CalorimeterHit) -1;
139 (*CalorimeterCollection)
140 [ChitXID[NChannel]]->AddEnergy(edep);
144 if (PlaneName ==
"CALLayerY")
148 if (ChitYID[NChannel]==-1)
158 CalorimeterCollection->
insert(CalorimeterHit)-1;
162 (*CalorimeterCollection)
163 [ChitYID[NChannel]]->AddEnergy(edep);
174 static G4int HCID = -1;
182 for (
G4int i=0;i<NbOfCALChannels;i++)
G4String SensitiveDetectorName
void Initialize(G4HCofThisEvent *)
~GammaRayTelCalorimeterSD()
void AddEnergy(G4double de)
G4int GetCollectionID(G4String colName)
void SetCALPlaneNumber(G4int i)
G4VPhysicalVolume * GetVolume(G4int depth=0) const
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
G4bool ProcessHits(G4Step *astep, G4TouchableHistory *ROHist)
const G4VTouchable * GetTouchable() const
void SetCALBarNumber(G4int i)
G4int GetNbOfCALBars() const
GammaRayTelCalorimeterSD(G4String)
void EndOfEvent(G4HCofThisEvent *)
G4StepPoint * GetPreStepPoint() const
void SetPos(G4ThreeVector xyz)
void insert(G4String str)
const G4String & GetName() const
const G4ThreeVector & GetPosition() const
G4double GetTotalEnergyDeposit() const
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4THitsCollection< GammaRayTelCalorimeterHit > GammaRayTelCalorimeterHitsCollection
static G4RunManager * GetRunManager()
static G4SDManager * GetSDMpointer()
virtual G4int GetCopyNo() const =0
G4CollectionNameVector collectionName
G4int GetNbOfCALLayers() const
static constexpr double keV