LArSoft  v08_00_00
Liquid Argon Software toolkit - http://larsoft.org/
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 25 of file Calorimetry.h.

Constructor & Destructor Documentation

anab::Calorimetry::Calorimetry ( )

Definition at line 15 of file Calorimetry.cxx.

References fDeadWireResR, fdEdx, fdQdx, fResidualRange, fTpIndices, fTrkPitch, and fXYZ.

16  : fKineticEnergy(0.)
17  , fRange(0.)
18  {
19  fdEdx.clear();
20  fdQdx.clear();
21  fResidualRange.clear();
22  fDeadWireResR.clear();
23  fTrkPitch.clear();
24  fXYZ.clear();
25  fTpIndices.clear();
26  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:34
std::vector< size_t > fTpIndices
indices of original trajectory points on track
Definition: Calorimetry.h:38
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:31
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:30
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:32
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:36
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:33
float fRange
total range of track
Definition: Calorimetry.h:35
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:37
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 30 of file Calorimetry.cxx.

References fDeadWireResR, fdEdx, fdQdx, fKineticEnergy, fPlaneID, fRange, fResidualRange, fTrkPitch, fXYZ, KineticEnergy(), and Range().

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

References fDeadWireResR, fdEdx, fdQdx, fKineticEnergy, fPlaneID, fRange, fResidualRange, fTrkPitch, fXYZ, KineticEnergy(), and Range().

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

114  : Calorimetry(KineticEnergy, dEdx, dQdx, resRange, deadwire, Range, TrkPitch, XYZ, std::vector<size_t>(),planeID) { }
const float & KineticEnergy() const
Definition: Calorimetry.h:108
const float & Range() const
Definition: Calorimetry.h:109
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 116 of file Calorimetry.cxx.

References dEdx(), dQdx(), fDeadWireResR, fdEdx, fdQdx, fKineticEnergy, fPlaneID, fRange, fResidualRange, fTpIndices, fTrkPitch, fXYZ, KineticEnergy(), Range(), TpIndices(), and XYZ().

126  {
127 
128  if( dEdx.size() != resRange.size() ||
129  dEdx.size() != dQdx.size() ||
130  dEdx.size() != TrkPitch.size() ||
131  dEdx.size() != XYZ.size() ||
132  (TpIndices.size()>0 && dEdx.size() != TpIndices.size()) )
133  throw cet::exception("anab::Calorimetry") << "Input vectors "
134  << "have different sizes, this is a problem.\n";
135  fPlaneID = planeID;
137  fRange = Range;
138  fTrkPitch = TrkPitch;
139  fdEdx = dEdx;
140  fdQdx = dQdx;
141  fResidualRange = resRange;
142  fXYZ = XYZ;
144  fDeadWireResR = deadwire;
145  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:34
std::vector< size_t > fTpIndices
indices of original trajectory points on track
Definition: Calorimetry.h:38
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:31
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:30
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:32
const std::vector< Point_t > & XYZ() const
Definition: Calorimetry.h:117
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:36
const std::vector< float > & dQdx() const
Definition: Calorimetry.h:105
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:33
const std::vector< float > & dEdx() const
Definition: Calorimetry.h:104
const std::vector< size_t > & TpIndices() const
Definition: Calorimetry.h:118
float fRange
total range of track
Definition: Calorimetry.h:35
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:37
const float & KineticEnergy() const
Definition: Calorimetry.h:108
geo::PlaneID fPlaneID
Definition: Calorimetry.h:41
const float & Range() const
Definition: Calorimetry.h:109
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 107 of file Calorimetry.h.

References fDeadWireResR.

Referenced by pid::Chi2PIDAlg::DoParticleID().

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

Definition at line 104 of file Calorimetry.h.

References fdEdx.

Referenced by Calorimetry(), evd::AnalysisBaseDrawer::CalorInteractive(), pid::Chi2PIDAlg::DoParticleID(), and pid::PIDAAlg::RunPIDAAlg().

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

Definition at line 105 of file Calorimetry.h.

References fdQdx.

Referenced by Calorimetry().

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

Definition at line 108 of file Calorimetry.h.

References fKineticEnergy.

Referenced by Calorimetry(), pid::PIDAAlg::FillPIDAProperties(), and evd::HitSelector::SaveSeedLines().

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

Definition at line 119 of file Calorimetry.h.

References fPlaneID.

Referenced by pid::Chi2PIDAlg::DoParticleID(), and pid::PIDAAlg::FillPIDAProperties().

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

Definition at line 109 of file Calorimetry.h.

References fRange.

Referenced by Calorimetry(), and pid::PIDAAlg::FillPIDAProperties().

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

Definition at line 106 of file Calorimetry.h.

References fResidualRange.

Referenced by evd::AnalysisBaseDrawer::CalorInteractive(), pid::Chi2PIDAlg::DoParticleID(), and pid::PIDAAlg::RunPIDAAlg().

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

Definition at line 118 of file Calorimetry.h.

References fTpIndices.

Referenced by Calorimetry().

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

Definition at line 111 of file Calorimetry.h.

References fTrkPitch.

Referenced by pid::Chi2PIDAlg::DoParticleID().

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

Definition at line 110 of file Calorimetry.h.

References fTrkPitch.

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

Definition at line 117 of file Calorimetry.h.

References fXYZ.

Referenced by Calorimetry().

117 { 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:37

Friends And Related Function Documentation

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

Definition at line 150 of file Calorimetry.cxx.

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

Member Data Documentation

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

dead wire residual range, collection plane

Definition at line 34 of file Calorimetry.h.

Referenced by Calorimetry(), and DeadWireResRC().

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

dE/dx, should be same size as fResidualRange

Definition at line 31 of file Calorimetry.h.

Referenced by Calorimetry(), dEdx(), and anab::operator<<().

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

dQ/dx

Definition at line 32 of file Calorimetry.h.

Referenced by Calorimetry(), dQdx(), and anab::operator<<().

float anab::Calorimetry::fKineticEnergy

determined kinetic energy

Definition at line 30 of file Calorimetry.h.

Referenced by Calorimetry(), KineticEnergy(), and anab::operator<<().

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

Definition at line 41 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), and PlaneID().

float anab::Calorimetry::fRange

total range of track

Definition at line 35 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), and Range().

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

range from end of track

Definition at line 33 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), and ResidualRange().

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

indices of original trajectory points on track

Definition at line 38 of file Calorimetry.h.

Referenced by Calorimetry(), and TpIndices().

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

track pitch on collection plane

Definition at line 36 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), TrkPitchC(), and TrkPitchVec().

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 37 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), and XYZ().


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