LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ParticleID.cxx
Go to the documentation of this file.
1 // \version $Id:
3 //
4 // \brief Definition of ParticleID analysis object
5 //
6 // \author brebel@fnal.gov, tjyang@fnal.gov
8 
10 
11 #include <ostream>
12 
13 namespace anab {
14 
15  //----------------------------------------------------------------------
17 
18  //----------------------------------------------------------------------
19  ParticleID::ParticleID(const std::vector<anab::sParticleIDAlgScores>& ParticleIDAlgScores,
20  const geo::PlaneID& planeID)
21  {
23  fPlaneID = planeID;
24  }
25 
26  //----------------------------------------------------------------------
27  // ostream operator.
28  //
29  std::ostream& operator<<(std::ostream& o, ParticleID const& a)
30  {
31  for (size_t i = 0; i < a.fParticleIDAlgScores.size(); i++) {
32  o << "\n ParticleIDAlg " << a.fParticleIDAlgScores.at(i).fAlgName
33  << "\n -- Variable type: " << a.fParticleIDAlgScores.at(i).fVariableType
34  << "\n -- Track direction: " << a.fParticleIDAlgScores.at(i).fTrackDir
35  << "\n -- Assuming PDG: " << a.fParticleIDAlgScores.at(i).fAssumedPdg
36  << "\n -- Number of degrees of freedom: " << a.fParticleIDAlgScores.at(i).fNdf
37  << "\n -- Value: " << a.fParticleIDAlgScores.at(i).fValue
38  << "\n -- Using planeMask: " << a.fParticleIDAlgScores.at(i).fPlaneMask;
39  }
40  o << "\n -- Plane id: " << a.fPlaneID;
41  o << std::endl;
42 
43  return o;
44  }
45 
46 }
friend std::ostream & operator<<(std::ostream &o, ParticleID const &a)
Definition: ParticleID.cxx:29
The data type to uniquely identify a Plane.
Definition: geo_types.h:463
const std::vector< anab::sParticleIDAlgScores > & ParticleIDAlgScores() const
Definition: ParticleID.h:69
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