All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ParticleID.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \version $Id:
3 //
4 // \brief Definition of ParticleID analysis object
5 //
6 // \author brebel@fnal.gov, tjyang@fnal.gov
7 ////////////////////////////////////////////////////////////////////////
8 
10 
11 #include <ostream>
12 
13 namespace anab{
14 
15  //----------------------------------------------------------------------
17  {
18  }
19 
20  //----------------------------------------------------------------------
21  ParticleID::ParticleID(const std::vector<anab::sParticleIDAlgScores> &ParticleIDAlgScores,
22  const geo::PlaneID& planeID)
23  {
25  fPlaneID = planeID;
26  }
27 
28  //----------------------------------------------------------------------
29  // ostream operator.
30  //
31  std::ostream& operator<< (std::ostream & o, ParticleID const& a)
32  {
33  for (size_t i=0; i < a.fParticleIDAlgScores.size(); i++){
34  o << "\n ParticleIDAlg " << a.fParticleIDAlgScores.at(i).fAlgName
35  << "\n -- Variable type: " << a.fParticleIDAlgScores.at(i).fVariableType
36  << "\n -- Track direction: " << a.fParticleIDAlgScores.at(i).fTrackDir
37  << "\n -- Assuming PDG: " << a.fParticleIDAlgScores.at(i).fAssumedPdg
38  << "\n -- Number of degrees of freedom: " << a.fParticleIDAlgScores.at(i).fNdf
39  << "\n -- Value: " << a.fParticleIDAlgScores.at(i).fValue
40  << "\n -- Using planeMask: " << a.fParticleIDAlgScores.at(i).fPlaneMask;
41  }
42  o << "\n -- Plane id: " << a.fPlaneID;
43  o <<std::endl;
44 
45  return o;
46  }
47 
48 }
std::ostream & operator<<(std::ostream &o, Calorimetry const &a)
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
process_name gaushit a
const std::vector< anab::sParticleIDAlgScores > & ParticleIDAlgScores() const
Definition: ParticleID.h:65
std::vector< sParticleIDAlgScores > fParticleIDAlgScores
Vector of structs to hold outputs from generic PID algorithms.
Definition: ParticleID.h:46
geo::PlaneID fPlaneID
Plane id.
Definition: ParticleID.h:47