33 #include "B4Analysis.hh"
38 #include "G4HCofThisEvent.hh"
65 event->GetHCofThisEvent()->GetHC(hcID));
67 if ( ! hitsCollection ) {
69 msg <<
"Cannot access hitsCollection ID " << hcID;
74 return hitsCollection;
85 <<
" Absorber: total energy: "
86 << std::setw(7) <<
G4BestUnit(absoEdep,
"Energy")
87 <<
" total track length: "
88 << std::setw(7) <<
G4BestUnit(absoTrackLength,
"Length")
90 <<
" Gap: total energy: "
91 << std::setw(7) <<
G4BestUnit(gapEdep,
"Energy")
92 <<
" total track length: "
93 << std::setw(7) <<
G4BestUnit(gapTrackLength,
"Length")
119 auto absoHit = (*absoHC)[absoHC->entries()-1];
120 auto gapHit = (*gapHC)[gapHC->entries()-1];
124 auto eventID =
event->GetEventID();
126 if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {
130 absoHit->GetEdep(), absoHit->GetTrackLength(),
131 gapHit->GetEdep(), gapHit->GetTrackLength());
141 analysisManager->FillH1(0, absoHit->GetEdep());
142 analysisManager->FillH1(1, gapHit->GetEdep());
143 analysisManager->FillH1(2, absoHit->GetTrackLength());
144 analysisManager->FillH1(3, gapHit->GetTrackLength());
147 analysisManager->FillNtupleDColumn(0, absoHit->GetEdep());
148 analysisManager->FillNtupleDColumn(1, gapHit->GetEdep());
149 analysisManager->FillNtupleDColumn(2, absoHit->GetTrackLength());
150 analysisManager->FillNtupleDColumn(3, gapHit->GetTrackLength());
151 analysisManager->AddNtupleRow();