53 fNevent(0),fDtime(0.0),fCalorimeterCollectionId(-1)
71 G4cout<<
" ------ Start ExGflashEventAction ----- "<<
G4endl;
82 G4cout <<
"******************************************";
90 G4cout <<
"******************************************"<<
G4endl;
107 G4cout<<
" " << n_hit<<
" hits are stored in ExGflashHitsCollection "<<
G4endl;
117 for (
int i=0;i<100;i++) energyincrystal[i]=0.;
121 for (
int i=0;i<n_hit;i++)
126 totE += (*THC)[i]->GetEdep()/
GeV;
127 G4int num=(*THC)[i]->GetCrystalNum();
129 energyincrystal[num]+=(*THC)[i]->GetEdep()/
GeV;
148 for (
int i=0;i<100;i++)
151 if (max <energyincrystal[i])
153 max=energyincrystal[i];
161 energyincrystal[index]+energyincrystal[index+1]+energyincrystal[index-1]+
162 energyincrystal[index-10]+energyincrystal[index-9]+energyincrystal[index-11]+
163 energyincrystal[index+10]+energyincrystal[index+11]+energyincrystal[index+9];
167 energyincrystal[index]+energyincrystal[index+1]+energyincrystal[index-1]+
168 energyincrystal[index+2]+energyincrystal[index-2]+
169 energyincrystal[index-10]+energyincrystal[index-9]+energyincrystal[index-11]+
170 energyincrystal[index-8]+energyincrystal[index-12]+
171 energyincrystal[index+10]+energyincrystal[index+11]+energyincrystal[index+9]+
172 energyincrystal[index+12]+energyincrystal[index+8];
174 G4cout <<
" e1 " << energyincrystal[index]
175 <<
" e3x3 " << e3x3<<
" GeV e5x5 " <<e5x5 <<
G4endl;
178 G4cout <<
" Total energy deposited in the calorimeter: " << totE <<
" (GeV)" <<
G4endl;
180 G4int n_trajectories = 0;
181 if(trajectoryContainer){ n_trajectories = trajectoryContainer->
entries(); }
182 G4cout <<
" " << n_trajectories <<
" trajectories stored in this event." <<
G4endl;
G4ThreeVector GetMomentum() const
G4double GetSystemElapsed() const
G4VHitsCollection * GetHC(G4int i)
G4ThreeVector GetPosition() const
G4int GetCollectionID(G4String colName)
CLHEP::Hep3Vector G4ThreeVector
G4TrajectoryContainer * GetTrajectoryContainer() const
G4PrimaryParticle * GetPrimary(G4int i=0) const
virtual void EndOfEventAction(const G4Event *)
G4GLOB_DLL std::ostream G4cout
G4double GetUserElapsed() const
G4int fCalorimeterCollectionId
G4PrimaryVertex * GetPrimaryVertex(G4int i=0) const
Definition of the ExGflashEventAction class.
Definition of the ExGflashHit class.
G4double GetRealElapsed() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static G4SDManager * GetSDMpointer()
static constexpr double GeV
virtual void BeginOfEventAction(const G4Event *)
G4HCofThisEvent * GetHCofThisEvent() const