LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ParticleID.h
Go to the documentation of this file.
1 // \version
3 //
4 // \brief Definition of data product to hold ParticleID information
5 //
6 // \author brebel@fnal.gov, tjyang@fnal.gov
7 //
9 #ifndef ANAB_PARTICLEID_H
10 #define ANAB_PARTICLEID_H
11 
14 #include <bitset>
15 #include <iomanip>
16 #include <iosfwd>
17 #include <iostream>
18 #include <vector>
19 
20 namespace anab {
21 
23  std::string
27  kTrackDir
29  int
30  fNdf;
31  int
33  float fValue;
34  std::bitset<8>
36 
38  {
39  fAlgName = "AlgNameNotSet";
42  fAssumedPdg = 0;
43  fNdf = -9999;
44  fValue = -9999.;
45  // fPlaneMask will use default constructor: sets all values to 0
46  }
47  };
48 
49  class ParticleID {
50  private:
51  std::vector<sParticleIDAlgScores>
54 
55  public:
56  ParticleID();
57  ParticleID(const std::vector<anab::sParticleIDAlgScores>& ParticleIDAlgScores,
58  const geo::PlaneID& planeID);
59 
60  friend std::ostream& operator<<(std::ostream& o, ParticleID const& a);
61 
62  const std::vector<anab::sParticleIDAlgScores>& ParticleIDAlgScores() const;
63 
64  const geo::PlaneID& PlaneID() const;
65  };
66 
67 }
68 
69 inline const std::vector<anab::sParticleIDAlgScores>& anab::ParticleID::ParticleIDAlgScores() const
70 {
71  return fParticleIDAlgScores;
72 }
73 
75 {
76  return fPlaneID;
77 }
78 
79 #endif //ANAB_PARTICLEID_H
std::ostream & operator<<(std::ostream &o, Calorimetry const &a)
const geo::PlaneID & PlaneID() const
Definition: ParticleID.h:74
The data type to uniquely identify a Plane.
Definition: geo_types.h:463
float fValue
Result of Particle ID algorithm/test.
Definition: ParticleID.h:33
std::bitset< 8 > fPlaneMask
Bitset for PlaneID used by algorithm, allowing for multiple planes and up to 8 total planes...
Definition: ParticleID.h:35
IDparameter< geo::PlaneID > PlaneID
Member type of validated geo::PlaneID parameter.
std::string fAlgName
< determined particle ID
Definition: ParticleID.h:24
int fNdf
Number of degrees of freedom used by algorithm, if applicable. Set to -9999 by default.
Definition: ParticleID.h:30
kTrackDir fTrackDir
Track direction enum: defined in ParticleID_VariableTypeEnums.h. Set to kNoDirection by default...
Definition: ParticleID.h:28
kVariableType fVariableType
Variable type enum: defined in ParticleID_VariableTypeEnums.h. Set to kNotSet by default.
Definition: ParticleID.h:26
const std::vector< anab::sParticleIDAlgScores > & ParticleIDAlgScores() const
Definition: ParticleID.h:69
Definition of data types for geometry description.
std::vector< sParticleIDAlgScores > fParticleIDAlgScores
Vector of structs to hold outputs from generic PID algorithms.
Definition: ParticleID.h:52
geo::PlaneID fPlaneID
Plane id.
Definition: ParticleID.h:53
int fAssumedPdg
PDG of particle hypothesis assumed by algorithm, if applicable. Set to 0 by default.
Definition: ParticleID.h:32