31 #include "B4Analysis.hh"
36 #include "G4HCofThisEvent.hh"
48 fAbsoTrackLengthHCID(-1),
49 fGapTrackLengthHCID(-1)
65 event->GetHCofThisEvent()->GetHC(hcID));
67 if ( ! hitsCollection ) {
69 msg <<
"Cannot access hitsCollection ID " << hcID;
74 return hitsCollection;
82 for (
auto it : *hitsMap->
GetMap() ) {
84 sumValue += *(
it.second);
98 <<
" Absorber: total energy: "
99 << std::setw(7) <<
G4BestUnit(absoEdep,
"Energy")
100 <<
" total track length: "
101 << std::setw(7) <<
G4BestUnit(absoTrackLength,
"Length")
103 <<
" Gap: total energy: "
104 << std::setw(7) <<
G4BestUnit(gapEdep,
"Energy")
105 <<
" total track length: "
106 << std::setw(7) <<
G4BestUnit(gapTrackLength,
"Length")
146 analysisManager->FillH1(0, absoEdep);
147 analysisManager->FillH1(1, gapEdep);
148 analysisManager->FillH1(2, absoTrackLength);
149 analysisManager->FillH1(3, gapTrackLength);
153 analysisManager->FillNtupleDColumn(0, absoEdep);
154 analysisManager->FillNtupleDColumn(1, gapEdep);
155 analysisManager->FillNtupleDColumn(2, absoTrackLength);
156 analysisManager->FillNtupleDColumn(3, gapTrackLength);
157 analysisManager->AddNtupleRow();
161 auto eventID =
event->GetEventID();
163 if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {