Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
anab::Calorimetry Class Reference

#include <Calorimetry.h>

Public Member Functions

 Calorimetry ()
 
 Calorimetry (float KinematicEnergy, std::vector< float > const &dEdx, std::vector< float > const &dQdx, std::vector< float > const &resRange, std::vector< float > const &deadwire, float Range, float TrkPitch, geo::PlaneID planeID)
 
 Calorimetry (float KineticEnergy, std::vector< float > const &dEdx, std::vector< float > const &dQdx, std::vector< float > const &resRange, std::vector< float > const &deadwire, float Range, std::vector< float > const &TrkPitch, geo::PlaneID planeID)
 
 Calorimetry (float KineticEnergy, std::vector< float > const &dEdx, std::vector< float > const &dQdx, std::vector< float > const &resRange, std::vector< float > const &deadwire, float Range, std::vector< float > const &TrkPitch, std::vector< Point_t > const &XYZ, geo::PlaneID planeID)
 
 Calorimetry (float KineticEnergy, std::vector< float > const &dEdx, std::vector< float > const &dQdx, std::vector< float > const &resRange, std::vector< float > const &deadwire, float Range, std::vector< float > const &TrkPitch, std::vector< Point_t > const &XYZ, std::vector< size_t > const &TpIndices, geo::PlaneID planeID)
 
const std::vector< float > & dEdx () const
 
const std::vector< float > & dQdx () const
 
const std::vector< float > & ResidualRange () const
 
const std::vector< float > & DeadWireResRC () const
 
const float & KineticEnergy () const
 
const float & Range () const
 
float TrkPitchC () const
 
const std::vector< float > & TrkPitchVec () const
 
const std::vector< Point_t > & XYZ () const
 
const std::vector< size_t > & TpIndices () const
 
const geo::PlaneIDPlaneID () const
 

Public Attributes

float fKineticEnergy
 determined kinetic energy More...
 
std::vector< float > fdEdx
 dE/dx, should be same size as fResidualRange More...
 
std::vector< float > fdQdx
 dQ/dx More...
 
std::vector< float > fResidualRange
 range from end of track More...
 
std::vector< float > fDeadWireResR
 dead wire residual range, collection plane More...
 
float fRange
 total range of track More...
 
std::vector< float > fTrkPitch
 track pitch on collection plane More...
 
std::vector< Point_tfXYZ
 coordinates of space points; for a discussion on the object type for coordinates see recob::tracking::Coord_t. More...
 
std::vector< size_t > fTpIndices
 indices of original trajectory points on track More...
 

Private Attributes

geo::PlaneID fPlaneID
 

Friends

std::ostream & operator<< (std::ostream &o, Calorimetry const &a)
 

Detailed Description

Definition at line 22 of file Calorimetry.h.

Constructor & Destructor Documentation

anab::Calorimetry::Calorimetry ( )

Definition at line 17 of file Calorimetry.cxx.

18  : fKineticEnergy(0.)
19  , fRange(0.)
20  {
21  fdEdx.clear();
22  fdQdx.clear();
23  fResidualRange.clear();
24  fDeadWireResR.clear();
25  fTrkPitch.clear();
26  fXYZ.clear();
27  fTpIndices.clear();
28  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:31
std::vector< size_t > fTpIndices
indices of original trajectory points on track
Definition: Calorimetry.h:35
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:28
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:27
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:29
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:33
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:30
float fRange
total range of track
Definition: Calorimetry.h:32
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34
anab::Calorimetry::Calorimetry ( float  KinematicEnergy,
std::vector< float > const &  dEdx,
std::vector< float > const &  dQdx,
std::vector< float > const &  resRange,
std::vector< float > const &  deadwire,
float  Range,
float  TrkPitch,
geo::PlaneID  planeID 
)

Definition at line 32 of file Calorimetry.cxx.

40  {
41 
43  fRange = Range;
44  for(size_t i=0; i!=dQdx.size(); ++i){
45  fTrkPitch.push_back(TrkPitch);
46  fXYZ.push_back({-999.,-999.,-999.});
47  }
48  if(dEdx.size() != resRange.size())
49  throw cet::exception("anab::Calorimetry") << "dE/dx and residual range vectors "
50  << "have different sizes, this is a problem.\n";
51  fdEdx.resize(dEdx.size());
52  fdQdx.resize(dQdx.size());
53  fResidualRange.resize(resRange.size());
54  for(size_t i = 0; i < dEdx.size(); ++i){
55  fdEdx[i] = dEdx[i];
56  fdQdx[i] = dQdx[i];
57  fResidualRange[i] = resRange[i];
58  }
59 
60  fDeadWireResR.resize(deadwire.size());
61  for(size_t i = 0; i<deadwire.size(); ++i){
62  fDeadWireResR[i] = deadwire[i];
63  }
64 
65  fPlaneID = planeID;
66  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:31
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:28
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:27
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:29
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:33
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:30
float fRange
total range of track
Definition: Calorimetry.h:32
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34
const float & KineticEnergy() const
Definition: Calorimetry.h:105
geo::PlaneID fPlaneID
Definition: Calorimetry.h:38
const float & Range() const
Definition: Calorimetry.h:106
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
anab::Calorimetry::Calorimetry ( float  KineticEnergy,
std::vector< float > const &  dEdx,
std::vector< float > const &  dQdx,
std::vector< float > const &  resRange,
std::vector< float > const &  deadwire,
float  Range,
std::vector< float > const &  TrkPitch,
geo::PlaneID  planeID 
)

Definition at line 70 of file Calorimetry.cxx.

78  {
79 
80  fPlaneID = planeID;
82  fRange = Range;
83  fTrkPitch = TrkPitch;
84  if(dEdx.size() != resRange.size())
85  throw cet::exception("anab::Calorimetry") << "dE/dx and residual range vectors "
86  << "have different sizes, this is a problem.\n";
87  for(size_t i=0; i!=dQdx.size(); ++i){
88  fXYZ.push_back({-999.,-999.,-999.});
89  }
90  fdEdx.resize(dEdx.size());
91  fdQdx.resize(dQdx.size());
92  fResidualRange.resize(resRange.size());
93  for(size_t i = 0; i < dEdx.size(); ++i){
94  fdEdx[i] = dEdx[i];
95  fdQdx[i] = dQdx[i];
96  fResidualRange[i] = resRange[i];
97  }
98 
99  fDeadWireResR.resize(deadwire.size());
100  for(size_t i = 0; i<deadwire.size(); ++i){
101  fDeadWireResR[i] = deadwire[i];
102  }
103 
104  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:31
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:28
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:27
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:29
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:33
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:30
float fRange
total range of track
Definition: Calorimetry.h:32
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34
const float & KineticEnergy() const
Definition: Calorimetry.h:105
geo::PlaneID fPlaneID
Definition: Calorimetry.h:38
const float & Range() const
Definition: Calorimetry.h:106
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
anab::Calorimetry::Calorimetry ( float  KineticEnergy,
std::vector< float > const &  dEdx,
std::vector< float > const &  dQdx,
std::vector< float > const &  resRange,
std::vector< float > const &  deadwire,
float  Range,
std::vector< float > const &  TrkPitch,
std::vector< Point_t > const &  XYZ,
geo::PlaneID  planeID 
)

Definition at line 107 of file Calorimetry.cxx.

116  : Calorimetry(KineticEnergy, dEdx, dQdx, resRange, deadwire, Range, TrkPitch, XYZ, std::vector<size_t>(),planeID) { }
const float & KineticEnergy() const
Definition: Calorimetry.h:105
anab::Calorimetry::Calorimetry ( float  KineticEnergy,
std::vector< float > const &  dEdx,
std::vector< float > const &  dQdx,
std::vector< float > const &  resRange,
std::vector< float > const &  deadwire,
float  Range,
std::vector< float > const &  TrkPitch,
std::vector< Point_t > const &  XYZ,
std::vector< size_t > const &  TpIndices,
geo::PlaneID  planeID 
)

Definition at line 118 of file Calorimetry.cxx.

128  {
129 
130  if( dEdx.size() != resRange.size() ||
131  dEdx.size() != dQdx.size() ||
132  dEdx.size() != TrkPitch.size() ||
133  dEdx.size() != XYZ.size() ||
134  (TpIndices.size()>0 && dEdx.size() != TpIndices.size()) )
135  throw cet::exception("anab::Calorimetry") << "Input vectors "
136  << "have different sizes, this is a problem.\n";
137  fPlaneID = planeID;
139  fRange = Range;
140  fTrkPitch = TrkPitch;
141  fdEdx = dEdx;
142  fdQdx = dQdx;
143  fResidualRange = resRange;
144  fXYZ = XYZ;
146  fDeadWireResR = deadwire;
147  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:31
std::vector< size_t > fTpIndices
indices of original trajectory points on track
Definition: Calorimetry.h:35
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:28
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:27
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:29
const std::vector< Point_t > & XYZ() const
Definition: Calorimetry.h:114
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:33
const std::vector< float > & dQdx() const
Definition: Calorimetry.h:102
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:30
const std::vector< float > & dEdx() const
Definition: Calorimetry.h:101
const std::vector< size_t > & TpIndices() const
Definition: Calorimetry.h:115
float fRange
total range of track
Definition: Calorimetry.h:32
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34
const float & KineticEnergy() const
Definition: Calorimetry.h:105
geo::PlaneID fPlaneID
Definition: Calorimetry.h:38
const float & Range() const
Definition: Calorimetry.h:106
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Function Documentation

const std::vector< float > & anab::Calorimetry::DeadWireResRC ( ) const
inline

Definition at line 104 of file Calorimetry.h.

104 { return fDeadWireResR; }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:31
const std::vector< float > & anab::Calorimetry::dEdx ( ) const
inline

Definition at line 101 of file Calorimetry.h.

101 { return fdEdx; }
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:28
const std::vector< float > & anab::Calorimetry::dQdx ( ) const
inline

Definition at line 102 of file Calorimetry.h.

102 { return fdQdx; }
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:29
const float & anab::Calorimetry::KineticEnergy ( ) const
inline

Definition at line 105 of file Calorimetry.h.

105 { return fKineticEnergy; }
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:27
const geo::PlaneID & anab::Calorimetry::PlaneID ( ) const
inline

Definition at line 116 of file Calorimetry.h.

116 { return fPlaneID; }
geo::PlaneID fPlaneID
Definition: Calorimetry.h:38
const float & anab::Calorimetry::Range ( ) const
inline

Definition at line 106 of file Calorimetry.h.

106 { return fRange; }
float fRange
total range of track
Definition: Calorimetry.h:32
const std::vector< float > & anab::Calorimetry::ResidualRange ( ) const
inline

Definition at line 103 of file Calorimetry.h.

103 { return fResidualRange; }
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:30
const std::vector< size_t > & anab::Calorimetry::TpIndices ( ) const
inline

Definition at line 115 of file Calorimetry.h.

115 { return fTpIndices;}
std::vector< size_t > fTpIndices
indices of original trajectory points on track
Definition: Calorimetry.h:35
float anab::Calorimetry::TrkPitchC ( ) const
inline

Definition at line 108 of file Calorimetry.h.

109 {
110  if (fTrkPitch.size())
111  return fTrkPitch[0];
112  else return 0;
113 }
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:33
const std::vector< float > & anab::Calorimetry::TrkPitchVec ( ) const
inline

Definition at line 107 of file Calorimetry.h.

107 { return fTrkPitch; }
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:33
const std::vector< anab::Point_t > & anab::Calorimetry::XYZ ( ) const
inline

Definition at line 114 of file Calorimetry.h.

114 { return fXYZ; }
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
Calorimetry const &  a 
)
friend

Definition at line 152 of file Calorimetry.cxx.

153  {
154  o << "Kinetic Energy: " << a.fKineticEnergy
155  << "\n Range: " << a.fRange << std::endl;
156 
157  for(size_t n = 0; n < a.fdEdx.size(); ++n)
158  o << "dE/dx=" << a.fdEdx[n]
159  << " Residual range=" << a.fResidualRange[n]
160  << " dQ/dx=" << a.fdQdx[n]
161  << " (x,y,z)=(" << a.fXYZ[n].X() << "," << a.fXYZ[n].Y() << "," << a.fXYZ[n].Z() << ")"
162  << " pitch=" << a.fTrkPitch[n]
163  << " planeID=(" << a.fPlaneID.Cryostat << "," << a.fPlaneID.TPC << "," << a.fPlaneID.Plane << ")"
164  << std::endl;
165 
166  return o;
167  }
std::void_t< T > n
const double a
QTextStream & endl(QTextStream &s)

Member Data Documentation

std::vector<float> anab::Calorimetry::fDeadWireResR

dead wire residual range, collection plane

Definition at line 31 of file Calorimetry.h.

std::vector<float> anab::Calorimetry::fdEdx

dE/dx, should be same size as fResidualRange

Definition at line 28 of file Calorimetry.h.

std::vector<float> anab::Calorimetry::fdQdx

dQ/dx

Definition at line 29 of file Calorimetry.h.

float anab::Calorimetry::fKineticEnergy

determined kinetic energy

Definition at line 27 of file Calorimetry.h.

geo::PlaneID anab::Calorimetry::fPlaneID
private

Definition at line 38 of file Calorimetry.h.

float anab::Calorimetry::fRange

total range of track

Definition at line 32 of file Calorimetry.h.

std::vector<float> anab::Calorimetry::fResidualRange

range from end of track

Definition at line 30 of file Calorimetry.h.

std::vector<size_t> anab::Calorimetry::fTpIndices

indices of original trajectory points on track

Definition at line 35 of file Calorimetry.h.

std::vector<float> anab::Calorimetry::fTrkPitch

track pitch on collection plane

Definition at line 33 of file Calorimetry.h.

std::vector<Point_t> anab::Calorimetry::fXYZ

coordinates of space points; for a discussion on the object type for coordinates see recob::tracking::Coord_t.

Definition at line 34 of file Calorimetry.h.


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