35 #include "EventAction.hh"
38 #include "HistoManager.hh"
49 fEdep1(0.), fEdep2(0.), fWeight1(0.), fWeight2(0.),
62 fEdep1 = fEdep2 = fWeight1 = fWeight2 = 0.;
72 if (fTime0 < 0.) fTime0 = time;
76 if (std::fabs(time - fTime0) > TimeWindow)
return;
78 if (iVol == 1) { fEdep1 += edep; fWeight1 += edep*weight;}
79 if (iVol == 2) { fEdep2 += edep; fWeight2 += edep*weight;}
89 G4double Wtot = (fWeight1 + fWeight2)/Etot;
95 analysisManager->FillH1(0, fEdep1, fWeight1);
102 analysisManager->FillH1(1, fEdep2, fWeight2);
107 analysisManager->FillH1(2, Etot, Wtot);
114 G4bool coincidence = ((fEdep1 >= Threshold1) && (fEdep2 >= Threshold2));
115 G4bool anti_coincidence1 = ((fEdep1 >= Threshold1) && (fEdep2 < Threshold2));
116 G4bool anti_coincidence2 = ((fEdep1 < Threshold1) && (fEdep2 >= Threshold2));
118 if (coincidence) analysisManager->FillH1(3, fEdep2, fWeight2);
119 if (anti_coincidence1) analysisManager->FillH1(4, fEdep1, fWeight1);
120 if (anti_coincidence2) analysisManager->FillH1(5, fEdep2, fWeight2);
124 Run* run =
static_cast<Run*
>(
void AddEdep(G4double Edep)
void BeginOfEventAction(const G4Event *)
void EndOfEventAction(const G4Event *)
void AddEdep(G4double val)
static G4RunManager * GetRunManager()
static constexpr double microsecond
static constexpr double keV
G4CsvAnalysisManager G4AnalysisManager
G4Run * GetNonConstCurrentRun() const