All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
single_photon::PandoraPFParticle Class Reference

#include <helper_PandoraPFParticles.h>

Public Member Functions

 PandoraPFParticle (art::Ptr< recob::PFParticle > input_PFParticle, std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > input_MetaData, std::vector< art::Ptr< recob::Vertex > > input_Vertex, std::vector< art::Ptr< recob::Cluster > > input_Clusters, std::vector< art::Ptr< recob::Shower > > input_Showers, std::vector< art::Ptr< recob::Track > > input_Tracks, art::FindManyP< recob::Hit > input_Hits)
 
void set_NuScore (const double input_score)
 
void set_IsNuSlice (const bool input_bool)
 
void set_HasPID (const bool input_bool)
 
void set_AncestorID (const int input_number)
 
void set_SliceID (const int input_number)
 
void set_ParticleID (const art::Ptr< anab::ParticleID > input_ParticleID)
 
void set_Calorimetries (const std::vector< art::Ptr< anab::Calorimetry >> input_Calorimetries)
 
const art::Ptr< anab::ParticleIDget_ParticleID () const
 
const std::vector< art::Ptr
< anab::Calorimetry > > 
get_Calorimetries () const
 
const double * get_Vertex_pos () const
 
const double get_NuScore () const
 
const double get_TrackScore () const
 
const bool get_IsNeutrino () const
 
const bool get_IsClearCosmic () const
 
const bool get_IsNuSlice () const
 
const bool get_HasPID () const
 
const int get_HasShower () const
 
const int get_HasTrack () const
 
const int get_PdgCode () const
 
const int get_PFParticleID () const
 
const int get_AncestorID () const
 
const int get_SliceID () const
 

Public Attributes

art::Ptr< recob::PFParticlepPFParticle
 
art::Ptr< recob::ShowerpShower
 
art::Ptr< recob::TrackpTrack
 
art::Ptr< recob::SlicepSlice
 
art::Ptr< recob::PFParticlepAncestor
 
art::Ptr< anab::ParticleIDpParticleID
 
art::Ptr< simb::MCTruth > pMCTruth
 
std::vector< art::Ptr
< larpandoraobj::PFParticleMetadata > > 
pMetaData
 
std::vector< art::Ptr
< recob::Vertex > > 
pVertex
 
std::vector< art::Ptr
< recob::Hit > > 
pSliceHits
 
std::vector< art::Ptr
< recob::Hit > > 
pPFPHits
 
std::vector< art::Ptr
< recob::Cluster > > 
pClusters
 
std::vector< art::Ptr
< anab::Calorimetry > > 
pCalorimetries
 
std::vector< art::Ptr
< recob::SpacePoint > > 
pSpacePoints
 
std::vector< art::Ptr
< simb::MCParticle > > 
pMCParticles
 

Private Attributes

double pVertex_pos [3] = {-9999,-9999,-9999}
 
double pNuScore = -999
 
double pTrackScore = -999
 
bool pIsNeutrino = false
 
bool pIsClearCosmic = false
 
bool pIsNuSlice = false
 
bool pHasPID = false
 
int pHasShower = 0
 
int pHasTrack = 0
 
int pPdgCode = -999
 
int pPFParticleID = -9
 
int pAncestorID = -9
 
int pSliceID = -9
 

Detailed Description

Definition at line 56 of file helper_PandoraPFParticles.h.

Constructor & Destructor Documentation

single_photon::PandoraPFParticle::PandoraPFParticle ( art::Ptr< recob::PFParticle input_PFParticle,
std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > >  input_MetaData,
std::vector< art::Ptr< recob::Vertex > >  input_Vertex,
std::vector< art::Ptr< recob::Cluster > >  input_Clusters,
std::vector< art::Ptr< recob::Shower > >  input_Showers,
std::vector< art::Ptr< recob::Track > >  input_Tracks,
art::FindManyP< recob::Hit input_Hits 
)

Definition at line 5 of file helper_PandoraPFParticles.cxx.

14  :
15  pPFParticle(input_PFParticle),
16  pMetaData(input_MetaData),
17  pVertex(input_Vertex),
18  pClusters(input_Clusters)
19  {
20  pPFParticleID = pPFParticle->Self();
21  pPdgCode = pPFParticle->PdgCode();
22 
23  //Get recob::Shower/Track
24  const unsigned int nShowers(input_Showers.size());
25  const unsigned int nTracks(input_Tracks.size());
26  if(nShowers+nTracks != 1) mf::LogDebug("SinglePhoton") << " No just one shower/track is associated to PFParticle " << pPFParticleID << "\n";
27 
28  pHasShower = nShowers;
29  pHasTrack = nTracks;
30  if(pHasShower == 1) pShower=input_Showers.front();
31  if(pHasTrack == 1) pTrack=input_Tracks.front();
32 
33 
34  //fill the vertex info.
35  if (!pVertex.empty()){
36  const art::Ptr<recob::Vertex> vertex = * (pVertex.begin());
37  vertex->XYZ(pVertex_pos);
38  }
39 
40  //fill pPFPHits from each clusters;
41  for(size_t index=0; index< pClusters.size(); ++index){
42  auto cluster = pClusters[index];
43  std::vector< art::Ptr<recob::Hit > > temp_hits = input_Hits.at(cluster.key());
44  pPFPHits.insert(pPFPHits.end(), temp_hits.begin(), temp_hits.end());
45  }
46 
47  //get ancestor for a 1st generation PFParticle
48  if(pPFParticle->IsPrimary()){
50  pAncestorID = -1;
51  }
52 
53  //fill in some booleans
54  for(auto &meta: pMetaData){
55  std::map<std::string, float> propertiesmap = meta->GetPropertiesMap();
56  if(propertiesmap.count("NuScore")==1) pNuScore = propertiesmap["NuScore"];
57  if(propertiesmap.count("TrackScore")==1) pTrackScore = propertiesmap["TrackScore"];
58  if(propertiesmap.count("IsNeutrino")==1) pIsNeutrino = true;
59  if(propertiesmap.count("IsClearCosmic")==1) pIsClearCosmic = true;
60  }
61 
62  }
process_name vertex
Definition: cheaterreco.fcl:51
std::vector< art::Ptr< recob::Cluster > > pClusters
process_name cluster
Definition: cheaterreco.fcl:51
art::Ptr< recob::PFParticle > pPFParticle
std::vector< art::Ptr< recob::Hit > > pPFPHits
art::Ptr< recob::PFParticle > pAncestor
std::vector< art::Ptr< recob::Vertex > > pVertex
std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > pMetaData

Member Function Documentation

const int single_photon::PandoraPFParticle::get_AncestorID ( ) const
inline
const std::vector< art::Ptr< anab::Calorimetry > > single_photon::PandoraPFParticle::get_Calorimetries ( ) const
inline

Definition at line 142 of file helper_PandoraPFParticles.h.

142 { return pCalorimetries; }
std::vector< art::Ptr< anab::Calorimetry > > pCalorimetries
const bool single_photon::PandoraPFParticle::get_HasPID ( ) const
inline

Definition at line 152 of file helper_PandoraPFParticles.h.

const int single_photon::PandoraPFParticle::get_HasShower ( ) const
inline

Definition at line 154 of file helper_PandoraPFParticles.h.

const int single_photon::PandoraPFParticle::get_HasTrack ( ) const
inline

Definition at line 155 of file helper_PandoraPFParticles.h.

const bool single_photon::PandoraPFParticle::get_IsClearCosmic ( ) const
inline
const bool single_photon::PandoraPFParticle::get_IsNeutrino ( ) const
inline

Definition at line 149 of file helper_PandoraPFParticles.h.

const bool single_photon::PandoraPFParticle::get_IsNuSlice ( ) const
inline

Definition at line 151 of file helper_PandoraPFParticles.h.

const double single_photon::PandoraPFParticle::get_NuScore ( ) const
inline

Definition at line 146 of file helper_PandoraPFParticles.h.

const art::Ptr< anab::ParticleID > single_photon::PandoraPFParticle::get_ParticleID ( ) const
inline

Definition at line 141 of file helper_PandoraPFParticles.h.

141 { return pParticleID; }
art::Ptr< anab::ParticleID > pParticleID
const int single_photon::PandoraPFParticle::get_PdgCode ( ) const
inline

Definition at line 156 of file helper_PandoraPFParticles.h.

const int single_photon::PandoraPFParticle::get_PFParticleID ( ) const
inline
const int single_photon::PandoraPFParticle::get_SliceID ( ) const
inline

Definition at line 159 of file helper_PandoraPFParticles.h.

const double single_photon::PandoraPFParticle::get_TrackScore ( ) const
inline

Definition at line 147 of file helper_PandoraPFParticles.h.

const double * single_photon::PandoraPFParticle::get_Vertex_pos ( ) const
inline

Definition at line 144 of file helper_PandoraPFParticles.h.

void single_photon::PandoraPFParticle::set_AncestorID ( const int  input_number)
inline

Definition at line 112 of file helper_PandoraPFParticles.h.

void single_photon::PandoraPFParticle::set_Calorimetries ( const std::vector< art::Ptr< anab::Calorimetry >>  input_Calorimetries)
inline

Definition at line 116 of file helper_PandoraPFParticles.h.

116 {pCalorimetries = input_Calorimetries; }
std::vector< art::Ptr< anab::Calorimetry > > pCalorimetries
void single_photon::PandoraPFParticle::set_HasPID ( const bool  input_bool)
inline

Definition at line 110 of file helper_PandoraPFParticles.h.

void single_photon::PandoraPFParticle::set_IsNuSlice ( const bool  input_bool)
inline

Definition at line 109 of file helper_PandoraPFParticles.h.

void single_photon::PandoraPFParticle::set_NuScore ( const double  input_score)
inline

Definition at line 108 of file helper_PandoraPFParticles.h.

108 { pNuScore = input_score; }
void single_photon::PandoraPFParticle::set_ParticleID ( const art::Ptr< anab::ParticleID input_ParticleID)
inline

Definition at line 115 of file helper_PandoraPFParticles.h.

115 {pParticleID = input_ParticleID; }
art::Ptr< anab::ParticleID > pParticleID
void single_photon::PandoraPFParticle::set_SliceID ( const int  input_number)
inline

Definition at line 113 of file helper_PandoraPFParticles.h.

Member Data Documentation

art::Ptr< recob::PFParticle > single_photon::PandoraPFParticle::pAncestor

Definition at line 92 of file helper_PandoraPFParticles.h.

int single_photon::PandoraPFParticle::pAncestorID = -9
private

Definition at line 73 of file helper_PandoraPFParticles.h.

std::vector<art::Ptr<anab::Calorimetry> > single_photon::PandoraPFParticle::pCalorimetries

Definition at line 102 of file helper_PandoraPFParticles.h.

std::vector< art::Ptr< recob::Cluster > > single_photon::PandoraPFParticle::pClusters

Definition at line 101 of file helper_PandoraPFParticles.h.

bool single_photon::PandoraPFParticle::pHasPID = false
private

Definition at line 67 of file helper_PandoraPFParticles.h.

int single_photon::PandoraPFParticle::pHasShower = 0
private

Definition at line 69 of file helper_PandoraPFParticles.h.

int single_photon::PandoraPFParticle::pHasTrack = 0
private

Definition at line 70 of file helper_PandoraPFParticles.h.

bool single_photon::PandoraPFParticle::pIsClearCosmic = false
private

Definition at line 65 of file helper_PandoraPFParticles.h.

bool single_photon::PandoraPFParticle::pIsNeutrino = false
private

Definition at line 64 of file helper_PandoraPFParticles.h.

bool single_photon::PandoraPFParticle::pIsNuSlice = false
private

Definition at line 66 of file helper_PandoraPFParticles.h.

std::vector< art::Ptr< simb::MCParticle > > single_photon::PandoraPFParticle::pMCParticles

Definition at line 104 of file helper_PandoraPFParticles.h.

art::Ptr< simb::MCTruth > single_photon::PandoraPFParticle::pMCTruth

Definition at line 95 of file helper_PandoraPFParticles.h.

std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > single_photon::PandoraPFParticle::pMetaData

Definition at line 97 of file helper_PandoraPFParticles.h.

double single_photon::PandoraPFParticle::pNuScore = -999
private

Definition at line 61 of file helper_PandoraPFParticles.h.

art::Ptr<anab::ParticleID> single_photon::PandoraPFParticle::pParticleID

Definition at line 94 of file helper_PandoraPFParticles.h.

int single_photon::PandoraPFParticle::pPdgCode = -999
private

Definition at line 71 of file helper_PandoraPFParticles.h.

art::Ptr< recob::PFParticle > single_photon::PandoraPFParticle::pPFParticle

Definition at line 88 of file helper_PandoraPFParticles.h.

int single_photon::PandoraPFParticle::pPFParticleID = -9
private

Definition at line 72 of file helper_PandoraPFParticles.h.

std::vector< art::Ptr< recob::Hit > > single_photon::PandoraPFParticle::pPFPHits

Definition at line 100 of file helper_PandoraPFParticles.h.

art::Ptr< recob::Shower> single_photon::PandoraPFParticle::pShower

Definition at line 89 of file helper_PandoraPFParticles.h.

art::Ptr< recob::Slice > single_photon::PandoraPFParticle::pSlice

Definition at line 91 of file helper_PandoraPFParticles.h.

std::vector< art::Ptr< recob::Hit > > single_photon::PandoraPFParticle::pSliceHits

Definition at line 99 of file helper_PandoraPFParticles.h.

int single_photon::PandoraPFParticle::pSliceID = -9
private

Definition at line 74 of file helper_PandoraPFParticles.h.

std::vector< art::Ptr< recob::SpacePoint > > single_photon::PandoraPFParticle::pSpacePoints

Definition at line 103 of file helper_PandoraPFParticles.h.

art::Ptr< recob::Track > single_photon::PandoraPFParticle::pTrack

Definition at line 90 of file helper_PandoraPFParticles.h.

double single_photon::PandoraPFParticle::pTrackScore = -999
private

Definition at line 62 of file helper_PandoraPFParticles.h.

std::vector< art::Ptr< recob::Vertex > > single_photon::PandoraPFParticle::pVertex

Definition at line 98 of file helper_PandoraPFParticles.h.

double single_photon::PandoraPFParticle::pVertex_pos[3] = {-9999,-9999,-9999}
private

Definition at line 59 of file helper_PandoraPFParticles.h.


The documentation for this class was generated from the following files: