40 #include "EventAction.hh"
42 #include "Analysis.hh"
43 #include "EventActionMessenger.hh"
57 fThresEdepForSSB=8.22*
eV;
59 fTotalEnergyDeposit=0;
70 delete fpEventMessenger;
79 fTotalEnergyDeposit=0.;
91 ComputeStrandBreaks(sb);
96 if ( fTotalEnergyDeposit>0. )
98 analysisManager->FillH1(1,fTotalEnergyDeposit);
102 analysisManager->FillH1(2,sb[0]);
106 analysisManager->FillH1(3,sb[1]);
112 void EventAction::ComputeStrandBreaks(
G4int* sb)
128 while ( !fEdepStrand1.empty() )
130 nucl1 = fEdepStrand1.begin()->first;
131 edep1 = fEdepStrand1.begin()->second;
132 fEdepStrand1.erase( fEdepStrand1.begin() );
136 if ( edep1 >= fThresEdepForSSB/
eV )
143 if ( !fEdepStrand2.empty() )
147 nucl2 = fEdepStrand2.begin()->first;
148 edep2 = fEdepStrand2.begin()->second;
149 if ( edep2 >= fThresEdepForSSB/
eV )
153 fEdepStrand2.erase( fEdepStrand2.begin() );
154 }
while ( ((nucl1-nucl2)>fThresDistForDSB) && (!fEdepStrand2.empty()) );
158 if ( nucl2-nucl1 > fThresDistForDSB )
160 fEdepStrand2[nucl2]=edep2;
161 if ( edep2 >= fThresEdepForSSB/
eV )
169 if ( std::abs(nucl2-nucl1) <= fThresDistForDSB )
171 if ( ( edep2 >= fThresEdepForSSB/
eV ) &&
172 ( edep1 >= fThresEdepForSSB/
eV ) )
184 while ( !fEdepStrand1.empty() )
186 nucl1 = fEdepStrand1.begin()->first;
187 edep1 = fEdepStrand1.begin()->second;
188 if ( edep1 >= fThresEdepForSSB/
eV )
192 fEdepStrand1.erase( fEdepStrand1.begin() );
195 while ( !fEdepStrand2.empty() )
197 nucl2 = fEdepStrand2.begin()->first;
198 edep2 = fEdepStrand2.begin()->second;
199 if ( edep2 >= fThresEdepForSSB/
eV )
203 fEdepStrand2.erase( fEdepStrand2.begin() );
void BeginOfEventAction(const G4Event *)
void EndOfEventAction(const G4Event *)
static constexpr double eV
G4CsvAnalysisManager G4AnalysisManager