273 if(fpTrackingManager->GetVerboseLevel() > 3)
275 G4int evtno =
pRunManager->GetCurrentEvent()->GetEventID();
276 std::cout <<
"Event " << evtno
277 <<
": NumiTrackingAction::AnalyzeIfNeutrino() Called." 282 G4ParticleDefinition * particleDefinition = aTrack->GetDefinition();
283 if ((particleDefinition == G4NeutrinoE::NeutrinoEDefinition())||
284 (particleDefinition == G4NeutrinoMu::NeutrinoMuDefinition()) ||
285 (particleDefinition == G4NeutrinoTau::NeutrinoTauDefinition()) ||
286 (particleDefinition == G4AntiNeutrinoE::AntiNeutrinoEDefinition()) ||
287 (particleDefinition == G4AntiNeutrinoMu::AntiNeutrinoMuDefinition()) ||
288 (particleDefinition == G4AntiNeutrinoTau::AntiNeutrinoTauDefinition()))
293 const G4Event*
event =
pRunManager->GetCurrentEvent();
294 G4TrajectoryContainer* trajectories =
event->GetTrajectoryContainer();
296 std::map<int,G4VTrajectory*> trajectoryMap;
297 for (std::size_t
i = 0;
i < trajectories->size(); ++
i) {
298 G4VTrajectory* traj = (*trajectories)[
i];
299 trajectoryMap[traj->GetTrackID()] = traj;
302 std::vector<G4VTrajectory*> nuHistory;
303 G4VTrajectory* neutrino = fpTrackingManager->GimmeTrajectory();
304 nuHistory.push_back(neutrino);
305 int parentId = aTrack->GetParentID();
306 while (parentId != 0) {
307 G4VTrajectory* parentTraj = trajectoryMap[parentId];
309 G4cerr <<
"Invalid trajectory object" << G4endl;
312 nuHistory.push_back(parentTraj);
314 if (!lbneTrajectory)
continue;
317 parentId = parentTraj->GetParentID();
void FillNeutrinoNtuple(const G4Track &track, const std::vector< G4VTrajectory * > &nuHistory)
LBNERunManager * pRunManager
static LBNEAnalysis * getInstance()
virtual G4String GetPreStepVolumeName(G4int i) const
virtual int GetPointEntries() const
QTextStream & endl(QTextStream &s)