9 #include "cetlib_except/exception.h"
33 std::vector<float>
const&
dEdx,
34 std::vector<float>
const& dQdx,
35 std::vector<float>
const& resRange,
36 std::vector<float>
const& deadwire,
44 for(
size_t i=0; i!=dQdx.size(); ++i){
46 fXYZ.push_back({-999.,-999.,-999.});
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());
54 for(
size_t i = 0; i < dEdx.size(); ++i){
61 for(
size_t i = 0; i<deadwire.size(); ++i){
71 std::vector<float>
const&
dEdx,
72 std::vector<float>
const& dQdx,
73 std::vector<float>
const& resRange,
74 std::vector<float>
const& deadwire,
76 std::vector<float>
const& 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.});
90 fdEdx.resize(dEdx.size());
91 fdQdx.resize(dQdx.size());
93 for(
size_t i = 0; i < dEdx.size(); ++i){
100 for(
size_t i = 0; i<deadwire.size(); ++i){
108 std::vector<float>
const&
dEdx,
109 std::vector<float>
const& dQdx,
110 std::vector<float>
const& resRange,
111 std::vector<float>
const& deadwire,
113 std::vector<float>
const& TrkPitch,
114 std::vector<anab::Point_t>
const& XYZ,
116 :
Calorimetry(KineticEnergy, dEdx, dQdx, resRange, deadwire, Range, TrkPitch, XYZ,
std::
vector<size_t>(),planeID) { }
119 std::vector<float>
const&
dEdx,
120 std::vector<float>
const& dQdx,
121 std::vector<float>
const& resRange,
122 std::vector<float>
const& deadwire,
124 std::vector<float>
const& TrkPitch,
125 std::vector<anab::Point_t>
const& XYZ,
126 std::vector<size_t>
const& TpIndices,
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";
155 <<
"\n Range: " << a.
fRange << std::endl;
157 for(
size_t n = 0;
n < a.
fdEdx.size(); ++
n)
158 o <<
"dE/dx=" << a.
fdEdx[
n]
160 <<
" dQ/dx=" << a.
fdQdx[
n]
161 <<
" (x,y,z)=(" << a.
fXYZ[
n].X() <<
"," << a.
fXYZ[
n].Y() <<
"," << a.
fXYZ[
n].Z() <<
")"
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
std::ostream & operator<<(std::ostream &o, Calorimetry const &a)
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
std::vector< size_t > fTpIndices
indices of original trajectory points on track
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
float fKineticEnergy
determined kinetic energy
The data type to uniquely identify a Plane.
std::vector< float > fdQdx
dQ/dx
const std::vector< Point_t > & XYZ() const
CryostatID_t Cryostat
Index of cryostat.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< float > fTrkPitch
track pitch on collection plane
const std::vector< float > & dQdx() const
PlaneID_t Plane
Index of the plane within its TPC.
std::vector< float > fResidualRange
range from end of track
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
const std::vector< float > & dEdx() const
const std::vector< size_t > & TpIndices() const
float fRange
total range of track
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
const float & KineticEnergy() const
TPCID_t TPC
Index of the TPC within its cryostat.
const float & Range() const