32 #include "G4HCofThisEvent.hh" 87 if ( step->GetTrack()->GetDefinition()->GetPDGCharge() != 0. ) {
88 stepLength = step->GetStepLength();
91 if ( edep==0. && stepLength == 0. )
return false;
100 B4cCalorHit* hit = (*fHitsCollection)[layerNumber];
103 msg <<
"Cannot access hit " << layerNumber;
113 hit->
Add(edep, stepLength);
114 hitTotal->
Add(edep, stepLength);
127 <<
"-------->Hits Collection: in this event they are " << nofHits
128 <<
" hits in the tracker chambers: " <<
G4endl;
G4String SensitiveDetectorName
G4int GetCollectionID(G4String colName)
std::ostringstream G4ExceptionDescription
void Add(G4double de, G4double dl)
G4THitsCollection< B4cCalorHit > B4cCalorHitsCollection
B4cCalorHitsCollection * fHitsCollection
Definition of the B4cCalorimeterSD class.
B4cCalorimeterSD(const G4String &name, const G4String &hitsCollectionName, G4int nofCells)
G4GLOB_DLL std::ostream G4cout
void insert(G4String str)
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *history)
G4int GetReplicaNumber(G4int depth=0) const
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4SDManager * GetSDMpointer()
virtual ~B4cCalorimeterSD()
G4CollectionNameVector collectionName
virtual void Initialize(G4HCofThisEvent *hitCollection)
virtual void EndOfEvent(G4HCofThisEvent *hitCollection)