50 fNevent(0),fDtime(0.0),fCalorimeterCollectionId(-1)
56 if ( fNevent > 0 )
G4cout <<
"Internal Real Elapsed Time /event is: "<< fDtime /fNevent<<
G4endl;
63 G4cout<<
" ------ Start ExGflashEventAction ----- "<<
G4endl;
65 G4cout<<
" Start generating event Nr "<<fNevent<<G4endl<<
G4endl;
72 G4cout <<
"******************************************";
80 G4cout <<
"******************************************"<<
G4endl;
82 G4cout<<
" ------ ExGflashEventAction::End of event nr. "<<fNevent<<
" -----"<<
G4endl;
86 fCalorimeterCollectionId=SDman->
GetCollectionID(colNam=
"ExGflashCollection");
87 if (fCalorimeterCollectionId<0)
return;
97 G4cout<<
" " << n_hit<<
" hits are stored in ExGflashHitsCollection "<<
G4endl;
107 for (
int i=0;i<100;i++) energyincrystal[i]=0.;
111 for (
int i=0;i<n_hit;i++)
116 totE += (*THC)[i]->GetEdep()/
GeV;
117 G4int num=(*THC)[i]->GetCrystalNum();
119 energyincrystal[num]+=(*THC)[i]->GetEdep()/
GeV;
138 for (
int i=0;i<100;i++)
141 if (max <energyincrystal[i])
143 max=energyincrystal[i];
151 energyincrystal[
index]+energyincrystal[index+1]+energyincrystal[index-1]+
152 energyincrystal[index-10]+energyincrystal[index-9]+energyincrystal[index-11]+
153 energyincrystal[index+10]+energyincrystal[index+11]+energyincrystal[index+9];
157 energyincrystal[
index]+energyincrystal[index+1]+energyincrystal[index-1]+
158 energyincrystal[index+2]+energyincrystal[index-2]+
159 energyincrystal[index-10]+energyincrystal[index-9]+energyincrystal[index-11]+
160 energyincrystal[index-8]+energyincrystal[index-12]+
161 energyincrystal[index+10]+energyincrystal[index+11]+energyincrystal[index+9]+
162 energyincrystal[index+12]+energyincrystal[index+8];
165 <<
" e3x3 " << e3x3<<
" GeV e5x5 " <<e5x5 <<
G4endl;
168 G4cout <<
" Total energy deposited in the calorimeter: " << totE <<
" (GeV)" <<
G4endl;
170 G4int n_trajectories = 0;
171 if(trajectoryContainer){ n_trajectories = trajectoryContainer->
entries(); }
172 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)
G4TrajectoryContainer * GetTrajectoryContainer() const
G4PrimaryParticle * GetPrimary(G4int i=0) const
void EndOfEventAction(const G4Event *)
G4GLOB_DLL std::ostream G4cout
G4double GetUserElapsed() const
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()
void BeginOfEventAction(const G4Event *)
Hep3Vector cross(const Hep3Vector &) const
G4HCofThisEvent * GetHCofThisEvent() const