LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
CheatingNeutrinoCreationAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_CHEATING_NEUTRINO_CREATION_ALGORITHM_H
9 #define LAR_CHEATING_NEUTRINO_CREATION_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
15 #include <unordered_map>
16 
17 namespace lar_content
18 {
19 
23 class CheatingNeutrinoCreationAlgorithm : public pandora::Algorithm
24 {
25 public:
30 
31 private:
32  pandora::StatusCode Run();
33 
39  void GetMCNeutrinoVector(pandora::MCParticleVector &mcNeutrinoVector) const;
40 
47  void CreateAndSaveNeutrinoPfo(const pandora::MCParticle *const pMCNeutrino, const pandora::ParticleFlowObject *&pNeutrinoPfo) const;
48 
55  void AddNeutrinoVertex(const pandora::MCParticle *const pMCNeutrino, const pandora::ParticleFlowObject *const pNeutrinoPfo) const;
56 
57  typedef std::unordered_map<const pandora::MCParticle*, const pandora::ParticleFlowObject*> MCParticleToPfoMap;
58 
64  void GetMCParticleToDaughterPfoMap(MCParticleToPfoMap &mcParticleToPfoMap) const;
65 
73  void CreatePfoHierarchy(const pandora::MCParticle *const pParentMCParticle, const pandora::ParticleFlowObject *const pParentPfo,
74  const MCParticleToPfoMap &mcParticleToPfoMap) const;
75 
76  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
77 
79 
80  std::string m_mcParticleListName;
81  std::string m_neutrinoPfoListName;
82 
83  std::string m_vertexListName;
84  pandora::StringVector m_daughterPfoListNames;
85 
87 };
88 
89 } // namespace lar_content
90 
91 #endif // #ifndef LAR_CHEATING_NEUTRINO_CREATION_ALGORITHM_H
std::string m_neutrinoPfoListName
The name of the neutrino pfo list.
float m_vertexTolerance
Tolerance, 3d displacement, allowed between reco neutrino vertex and mc neutrino endpoint.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
std::unordered_map< const pandora::MCParticle *, const pandora::ParticleFlowObject * > MCParticleToPfoMap
std::string m_mcParticleListName
The name of the three d mc particle list name.
void CreatePfoHierarchy(const pandora::MCParticle *const pParentMCParticle, const pandora::ParticleFlowObject *const pParentPfo, const MCParticleToPfoMap &mcParticleToPfoMap) const
Use information from mc particles and the mc particle to pfo map to fully-reconstruct the daughter pf...
Header file for the lar monte carlo particle helper helper class.
CheatingNeutrinoCreationAlgorithm::Algorithm class.
pandora::StringVector m_daughterPfoListNames
The list of daughter pfo list names.
void GetMCParticleToDaughterPfoMap(MCParticleToPfoMap &mcParticleToPfoMap) const
Extract candidate daughter pfos from external lists and populate a map from main mc particle (or prim...
std::string m_vertexListName
The name of the neutrino vertex list.
bool m_collapseToPrimaryMCParticles
Whether to collapse mc particle hierarchies to primary particles.
void GetMCNeutrinoVector(pandora::MCParticleVector &mcNeutrinoVector) const
Get the mc neutrino vector.
void AddNeutrinoVertex(const pandora::MCParticle *const pMCNeutrino, const pandora::ParticleFlowObject *const pNeutrinoPfo) const
Extract reconstructed vertex from external list, check its position agrees with mc neutrino...
void CreateAndSaveNeutrinoPfo(const pandora::MCParticle *const pMCNeutrino, const pandora::ParticleFlowObject *&pNeutrinoPfo) const
Create and save a neutrino pfo with properties dictated by the mc neutrino.