Public Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
recob::Shower Class Reference

#include <Shower.h>

Public Member Functions

 Shower ()
 
 Shower (TVector3 const &dcosVtx, TVector3 const &dcosVtxErr, TVector3 const &xyz, TVector3 const &xyzErr, std::vector< double > TotalEnergy, std::vector< double > TotalEnergyErr, std::vector< double > dEdx, std::vector< double > dEdxErr, int bestplane, int id, double length, double openAngle)
 
 Shower (TVector3 const &dcosVtx, TVector3 const &dcosVtxErr, TVector3 const &xyz, TVector3 const &xyzErr, std::vector< double > TotalEnergy, std::vector< double > TotalEnergyErr, std::vector< double > dEdx, std::vector< double > dEdxErr, int bestplane, int id=util::kBogusI)
 
void set_id (const int id)
 
void set_total_energy (const std::vector< double > &q)
 
void set_total_energy_err (const std::vector< double > &q)
 
void set_total_MIPenergy (const std::vector< double > &q)
 
void set_total_MIPenergy_err (const std::vector< double > &q)
 
void set_total_best_plane (const int q)
 
void set_direction (const TVector3 &dir)
 
void set_direction_err (const TVector3 &dir_e)
 
void set_start_point (const TVector3 &xyz)
 
void set_start_point_err (const TVector3 &xyz_e)
 
void set_dedx (const std::vector< double > &q)
 
void set_dedx_err (const std::vector< double > &q)
 
void set_length (const double &l)
 
void set_open_angle (const double &a)
 
int ID () const
 
const TVector3 & Direction () const
 
const TVector3 & DirectionErr () const
 
const TVector3 & ShowerStart () const
 
const TVector3 & ShowerStartErr () const
 
const std::vector< double > & Energy () const
 
const std::vector< double > & EnergyErr () const
 
const std::vector< double > & MIPEnergy () const
 
const std::vector< double > & MIPEnergyErr () const
 
int best_plane () const
 
double Length () const
 
double OpenAngle () const
 
const std::vector< double > & dEdx () const
 
const std::vector< double > & dEdxErr () const
 
bool has_open_angle () const
 Returns whether the shower has a valid opening angle. More...
 
bool has_length () const
 Returns whether the shower has a valid length. More...
 

Private Attributes

int fID
 Default constructor. More...
 
TVector3 fDCosStart
 direction cosines at start of shower More...
 
TVector3 fSigmaDCosStart
 uncertainty on initial direction cosines More...
 
TVector3 fXYZstart
 direction cosines at start of shower More...
 
TVector3 fSigmaXYZstart
 uncertainty on initial direction cosines More...
 
std::vector< double > fTotalEnergy
 Calculated Energy per each plane. More...
 
std::vector< double > fSigmaTotalEnergy
 Calculated Energy per each plane. More...
 
std::vector< double > fdEdx
 Calculated dE/dx per each plane. More...
 
std::vector< double > fSigmadEdx
 Calculated dE/dx per each plane. More...
 
std::vector< double > fTotalMIPEnergy
 Calculated Energy per each plane. More...
 
std::vector< double > fSigmaTotalMIPEnergy
 Calculated Energy per each plane. More...
 
int fBestPlane
 
double fLength
 Shower length [cm]. More...
 
double fOpenAngle
 Opening angle [rad]. More...
 

Static Private Attributes

static constexpr double InvalidLength = std::numeric_limits<double>::lowest()
 The magic constant indicating the invalidity of the shower length variable. More...
 
static constexpr double InvalidOpeningAngle = std::numeric_limits<double>::lowest()
 The magic constant indicating the invalidity of the opening angle variable. More...
 

Friends

std::ostream & operator<< (std::ostream &stream, Shower const &a)
 
bool operator< (const Shower &a, const Shower &b)
 

Detailed Description

Definition at line 19 of file Shower.h.

Constructor & Destructor Documentation

recob::Shower::Shower ( )

Definition at line 20 of file Shower.cxx.

21  {
22  }
recob::Shower::Shower ( TVector3 const &  dcosVtx,
TVector3 const &  dcosVtxErr,
TVector3 const &  xyz,
TVector3 const &  xyzErr,
std::vector< double >  TotalEnergy,
std::vector< double >  TotalEnergyErr,
std::vector< double >  dEdx,
std::vector< double >  dEdxErr,
int  bestplane,
int  id,
double  length,
double  openAngle 
)

Definition at line 25 of file Shower.cxx.

37  : fID(id)
38  , fDCosStart(dcosVtx)
39  , fSigmaDCosStart(dcosVtxErr)
40  , fXYZstart(xyz)
41  , fSigmaXYZstart(xyzErr)
42  , fTotalEnergy(std::move(TotalEnergy))
43  , fSigmaTotalEnergy(std::move(TotalEnergyErr))
44  , fdEdx(std::move(dEdx))
45  , fSigmadEdx(std::move(dEdxErr))
46  , fBestPlane(bestplane)
47  , fLength(length)
48  , fOpenAngle(openAngle)
49  {
50 
51  }
std::vector< double > fTotalEnergy
Calculated Energy per each plane.
Definition: Shower.h:32
std::vector< double > fSigmadEdx
Calculated dE/dx per each plane.
Definition: Shower.h:35
TVector3 fSigmaXYZstart
uncertainty on initial direction cosines
Definition: Shower.h:31
def move(depos, offset)
Definition: depos.py:107
TVector3 fDCosStart
direction cosines at start of shower
Definition: Shower.h:28
int fID
Default constructor.
Definition: Shower.h:27
TVector3 fSigmaDCosStart
uncertainty on initial direction cosines
Definition: Shower.h:29
std::vector< double > fdEdx
Calculated dE/dx per each plane.
Definition: Shower.h:34
double fOpenAngle
Opening angle [rad].
Definition: Shower.h:64
double fLength
Shower length [cm].
Definition: Shower.h:50
int fBestPlane
Definition: Shower.h:39
TVector3 fXYZstart
direction cosines at start of shower
Definition: Shower.h:30
std::vector< double > fSigmaTotalEnergy
Calculated Energy per each plane.
Definition: Shower.h:33
recob::Shower::Shower ( TVector3 const &  dcosVtx,
TVector3 const &  dcosVtxErr,
TVector3 const &  xyz,
TVector3 const &  xyzErr,
std::vector< double >  TotalEnergy,
std::vector< double >  TotalEnergyErr,
std::vector< double >  dEdx,
std::vector< double >  dEdxErr,
int  bestplane,
int  id = util::kBogusI 
)
inline

Legacy constructor (with no length and no opening angle).

Deprecated:
Use the complete constructor instead!

Definition at line 107 of file Shower.h.

117  :
118  Shower(
119  dcosVtx, dcosVtxErr, xyz, xyzErr, TotalEnergy, TotalEnergyErr, dEdx, dEdxErr,
120  bestplane, id,
122  )
123  {}
static constexpr double InvalidLength
The magic constant indicating the invalidity of the shower length variable.
Definition: Shower.h:76
static constexpr double InvalidOpeningAngle
The magic constant indicating the invalidity of the opening angle variable.
Definition: Shower.h:88

Member Function Documentation

int recob::Shower::best_plane ( ) const
inline

Definition at line 200 of file Shower.h.

200 { return fBestPlane; }
int fBestPlane
Definition: Shower.h:39
const std::vector< double > & recob::Shower::dEdx ( ) const
inline

Definition at line 203 of file Shower.h.

203 { return fdEdx; }
std::vector< double > fdEdx
Calculated dE/dx per each plane.
Definition: Shower.h:34
const std::vector< double > & recob::Shower::dEdxErr ( ) const
inline

Definition at line 204 of file Shower.h.

204 { return fSigmadEdx; }
std::vector< double > fSigmadEdx
Calculated dE/dx per each plane.
Definition: Shower.h:35
const TVector3 & recob::Shower::Direction ( ) const
inline

Definition at line 189 of file Shower.h.

189 { return fDCosStart; }
TVector3 fDCosStart
direction cosines at start of shower
Definition: Shower.h:28
const TVector3 & recob::Shower::DirectionErr ( ) const
inline

Definition at line 190 of file Shower.h.

190 { return fSigmaDCosStart; }
TVector3 fSigmaDCosStart
uncertainty on initial direction cosines
Definition: Shower.h:29
const std::vector< double > & recob::Shower::Energy ( void  ) const
inline

Definition at line 195 of file Shower.h.

195 { return fTotalEnergy; }
std::vector< double > fTotalEnergy
Calculated Energy per each plane.
Definition: Shower.h:32
const std::vector< double > & recob::Shower::EnergyErr ( ) const
inline

Definition at line 196 of file Shower.h.

196 { return fSigmaTotalEnergy; }
std::vector< double > fSigmaTotalEnergy
Calculated Energy per each plane.
Definition: Shower.h:33
bool recob::Shower::has_length ( ) const
inline

Returns whether the shower has a valid length.

Definition at line 211 of file Shower.h.

211 { return fLength >= 0.0; }
double fLength
Shower length [cm].
Definition: Shower.h:50
bool recob::Shower::has_open_angle ( ) const
inline

Returns whether the shower has a valid opening angle.

Definition at line 210 of file Shower.h.

210 { return fOpenAngle >= 0.0; }
double fOpenAngle
Opening angle [rad].
Definition: Shower.h:64
int recob::Shower::ID ( ) const
inline

Definition at line 187 of file Shower.h.

187 { return fID; }
int fID
Default constructor.
Definition: Shower.h:27
double recob::Shower::Length ( ) const
inline

Definition at line 201 of file Shower.h.

201 { return fLength; }
double fLength
Shower length [cm].
Definition: Shower.h:50
const std::vector< double > & recob::Shower::MIPEnergy ( ) const
inline

Definition at line 198 of file Shower.h.

198 { return fTotalMIPEnergy; }
std::vector< double > fTotalMIPEnergy
Calculated Energy per each plane.
Definition: Shower.h:37
const std::vector< double > & recob::Shower::MIPEnergyErr ( ) const
inline

Definition at line 199 of file Shower.h.

199 { return fSigmaTotalMIPEnergy; }
std::vector< double > fSigmaTotalMIPEnergy
Calculated Energy per each plane.
Definition: Shower.h:38
double recob::Shower::OpenAngle ( ) const
inline

Definition at line 202 of file Shower.h.

202 { return fOpenAngle; }
double fOpenAngle
Opening angle [rad].
Definition: Shower.h:64
void recob::Shower::set_dedx ( const std::vector< double > &  q)
inline

Definition at line 139 of file Shower.h.

139 { fdEdx = q; }
std::vector< double > fdEdx
Calculated dE/dx per each plane.
Definition: Shower.h:34
void recob::Shower::set_dedx_err ( const std::vector< double > &  q)
inline

Definition at line 140 of file Shower.h.

140 { fSigmadEdx = q; }
std::vector< double > fSigmadEdx
Calculated dE/dx per each plane.
Definition: Shower.h:35
void recob::Shower::set_direction ( const TVector3 &  dir)
inline

Definition at line 135 of file Shower.h.

135 { fDCosStart = dir; }
string dir
TVector3 fDCosStart
direction cosines at start of shower
Definition: Shower.h:28
void recob::Shower::set_direction_err ( const TVector3 &  dir_e)
inline

Definition at line 136 of file Shower.h.

136 { fSigmaDCosStart = dir_e; }
TVector3 fSigmaDCosStart
uncertainty on initial direction cosines
Definition: Shower.h:29
void recob::Shower::set_id ( const int  id)
inline

Definition at line 128 of file Shower.h.

128 { fID = id; }
int fID
Default constructor.
Definition: Shower.h:27
void recob::Shower::set_length ( const double &  l)
inline

Definition at line 141 of file Shower.h.

141 { fLength = l; }
static QStrList * l
Definition: config.cpp:1044
double fLength
Shower length [cm].
Definition: Shower.h:50
void recob::Shower::set_open_angle ( const double &  a)
inline

Definition at line 142 of file Shower.h.

142 { fOpenAngle = a; }
const double a
double fOpenAngle
Opening angle [rad].
Definition: Shower.h:64
void recob::Shower::set_start_point ( const TVector3 &  xyz)
inline

Definition at line 137 of file Shower.h.

137 { fXYZstart = xyz; }
TVector3 fXYZstart
direction cosines at start of shower
Definition: Shower.h:30
void recob::Shower::set_start_point_err ( const TVector3 &  xyz_e)
inline

Definition at line 138 of file Shower.h.

138 { fSigmaXYZstart = xyz_e; }
TVector3 fSigmaXYZstart
uncertainty on initial direction cosines
Definition: Shower.h:31
void recob::Shower::set_total_best_plane ( const int  q)
inline

Definition at line 133 of file Shower.h.

133 { fBestPlane = q; }
int fBestPlane
Definition: Shower.h:39
void recob::Shower::set_total_energy ( const std::vector< double > &  q)
inline

Definition at line 129 of file Shower.h.

129 { fTotalEnergy = q; }
std::vector< double > fTotalEnergy
Calculated Energy per each plane.
Definition: Shower.h:32
void recob::Shower::set_total_energy_err ( const std::vector< double > &  q)
inline

Definition at line 130 of file Shower.h.

130 { fSigmaTotalEnergy = q; }
std::vector< double > fSigmaTotalEnergy
Calculated Energy per each plane.
Definition: Shower.h:33
void recob::Shower::set_total_MIPenergy ( const std::vector< double > &  q)
inline

Definition at line 131 of file Shower.h.

131 { fTotalMIPEnergy = q; }
std::vector< double > fTotalMIPEnergy
Calculated Energy per each plane.
Definition: Shower.h:37
void recob::Shower::set_total_MIPenergy_err ( const std::vector< double > &  q)
inline

Definition at line 132 of file Shower.h.

132 { fSigmaTotalMIPEnergy = q; }
std::vector< double > fSigmaTotalMIPEnergy
Calculated Energy per each plane.
Definition: Shower.h:38
const TVector3 & recob::Shower::ShowerStart ( ) const
inline

Definition at line 192 of file Shower.h.

192 { return fXYZstart; }
TVector3 fXYZstart
direction cosines at start of shower
Definition: Shower.h:30
const TVector3 & recob::Shower::ShowerStartErr ( ) const
inline

Definition at line 193 of file Shower.h.

193 { return fSigmaXYZstart; }
TVector3 fSigmaXYZstart
uncertainty on initial direction cosines
Definition: Shower.h:31

Friends And Related Function Documentation

bool operator< ( const Shower a,
const Shower b 
)
friend

Definition at line 66 of file Shower.cxx.

67  {
68  if(a.ID() != b. ID())
69  return a.ID() < b.ID();
70 
71  return false; //They are equal
72  }
const double a
static bool * b
Definition: config.cpp:1043
int ID() const
Definition: Shower.h:187
std::ostream& operator<< ( std::ostream &  stream,
Shower const &  a 
)
friend

Definition at line 54 of file Shower.cxx.

55  {
56  o << std::setiosflags(std::ios::fixed) << std::setprecision(3);
57  o << " Shower ID " << std::setw(4) << std::right << a.ID();
58  o << " Energy " << std::setw(4) << std::right << a.Energy()[a.best_plane()];
59  o << " dEdx " << std::setw(4) << std::right << a.dEdx()[a.best_plane()];
60  return o;
61  }
Q_EXPORT QTSManip setprecision(int p)
Definition: qtextstream.h:343
const double a
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331

Member Data Documentation

int recob::Shower::fBestPlane
private

Definition at line 39 of file Shower.h.

TVector3 recob::Shower::fDCosStart
private

direction cosines at start of shower

Definition at line 28 of file Shower.h.

std::vector< double > recob::Shower::fdEdx
private

Calculated dE/dx per each plane.

Definition at line 34 of file Shower.h.

int recob::Shower::fID
private

Default constructor.

Definition at line 27 of file Shower.h.

double recob::Shower::fLength
private

Shower length [cm].

The length of a shower, and should be greater than 0. The characteristic depends on shower reconstruction algorithms. For example, in PCAShowerParticleBuildingAlgorithm (larpandora), it is defined as the three standard deviations of the spacepoint distribution along the principal axis.

Definition at line 50 of file Shower.h.

double recob::Shower::fOpenAngle
private

Opening angle [rad].

The angle is defined in the $ [ 0, \pi/2 ] $ range. It is defined as the angle of the shower cone. The characteristic depends on shower reconstruction algorithms. For example, in PCAShowerParticleBuildingAlgorithm (larpandora), it is defined as the ratio of the standard deviation of the spacepoint distribution along the principal axis to that along the secondary axis.

Definition at line 64 of file Shower.h.

TVector3 recob::Shower::fSigmaDCosStart
private

uncertainty on initial direction cosines

Definition at line 29 of file Shower.h.

std::vector< double > recob::Shower::fSigmadEdx
private

Calculated dE/dx per each plane.

Definition at line 35 of file Shower.h.

std::vector< double > recob::Shower::fSigmaTotalEnergy
private

Calculated Energy per each plane.

Definition at line 33 of file Shower.h.

std::vector< double > recob::Shower::fSigmaTotalMIPEnergy
private

Calculated Energy per each plane.

Definition at line 38 of file Shower.h.

TVector3 recob::Shower::fSigmaXYZstart
private

uncertainty on initial direction cosines

Definition at line 31 of file Shower.h.

std::vector< double > recob::Shower::fTotalEnergy
private

Calculated Energy per each plane.

Definition at line 32 of file Shower.h.

std::vector< double > recob::Shower::fTotalMIPEnergy
private

Calculated Energy per each plane.

Definition at line 37 of file Shower.h.

TVector3 recob::Shower::fXYZstart
private

direction cosines at start of shower

Definition at line 30 of file Shower.h.

constexpr double recob::Shower::InvalidLength = std::numeric_limits<double>::lowest()
staticprivate

The magic constant indicating the invalidity of the shower length variable.

This internal constant represents invalid shower length. It is how the function has_length() determines the validity of fLength.

Definition at line 76 of file Shower.h.

constexpr double recob::Shower::InvalidOpeningAngle = std::numeric_limits<double>::lowest()
staticprivate

The magic constant indicating the invalidity of the opening angle variable.

This internal constant represents invalid opening angle. It is how the function has_open_angle() determines the validity of fOpenAngle.

Definition at line 88 of file Shower.h.


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