16 #include "G4MultiFunctionalDetector.hh"
17 #include "G4VPrimitiveScorer.hh"
18 #include "G4PrimaryVertex.hh"
19 #include "G4PrimaryParticle.hh"
36 G4HCofThisEvent* pHCE = anEvent->GetHCofThisEvent();
38 auto analysisManager = G4AnalysisManager::Instance();
42 if(itr.second->pplotter!=
nullptr)
continue;
44 auto cID = itr.second->collID;
45 auto hID = itr.second->histID;
46 auto hTyp = itr.second->histType;
53 auto score = (G4THitsMap<G4double>*)(pHCE->GetHC(cID));
55 for(
auto hItr : *score)
57 if(itr.second->idx==-1 || itr.second->idx==hItr.first)
58 { val += *(hItr.second); }
60 analysisManager->FillH1(hID,val);
64 auto pv = anEvent->GetPrimaryVertex();
67 auto pp = pv->GetPrimary();
70 auto primE = pp->GetKineticEnergy();
71 G4double weight = 1.0;
72 if(itr.second->biasf) weight = pp->GetWeight();
73 analysisManager->FillH1(hID,primE,weight);
84 auto score = (G4THitsMap<G4double>*)(pHCE->GetHC(cID));
85 for(
auto hItr : *score)
86 { analysisManager->FillP1(hID,G4double(hItr.first),*(hItr.second)); }
94 for(
auto ntitr : ntmap)
96 auto colID = ntitr.first;
97 auto cID = ntitr.second->collID;
102 auto score = (G4THitsMap<G4double>*)(pHCE->GetHC(cID));
103 for(
auto hItr : *score)
105 if(ntitr.second->idx==-1 || ntitr.second->idx==hItr.first)
106 { val += *(hItr.second); }
111 auto pv = anEvent->GetPrimaryVertex();
112 auto pp = pv->GetPrimary();
113 val = pp->GetKineticEnergy();
115 analysisManager->FillNtupleDColumn(colID,val*(ntitr.second->fuct));
117 analysisManager->AddNtupleRow();