LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
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 21 of file Shower.cxx.

22  {
23  }
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 26 of file Shower.cxx.

38  : fID(id)
39  , fDCosStart(dcosVtx)
40  , fSigmaDCosStart(dcosVtxErr)
41  , fXYZstart(xyz)
42  , fSigmaXYZstart(xyzErr)
43  , fTotalEnergy(std::move(TotalEnergy))
44  , fSigmaTotalEnergy(std::move(TotalEnergyErr))
45  , fdEdx(std::move(dEdx))
46  , fSigmadEdx(std::move(dEdxErr))
47  , fBestPlane(bestplane)
48  , fLength(length)
49  , fOpenAngle(openAngle)
50  {
51 
52  }
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
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

const std::vector< double > & recob::Shower::dEdx ( ) const
inline

Definition at line 203 of file Shower.h.

References fdEdx.

Referenced by ems::MultiEMShowers::analyze(), evd::RecoBaseDrawer::DrawShower3D(), recob::operator<<(), DUNE::NeutrinoShowerEff::processEff(), and set_open_angle().

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.

References fSigmadEdx.

Referenced by set_open_angle().

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

Definition at line 190 of file Shower.h.

References fSigmaDCosStart.

Referenced by set_open_angle().

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

Definition at line 196 of file Shower.h.

References fSigmaTotalEnergy.

Referenced by set_open_angle().

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.

References fLength.

Referenced by evd::RecoBaseDrawer::DrawShower3D(), and set_open_angle().

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.

References fOpenAngle.

Referenced by evd::RecoBaseDrawer::DrawShower3D(), and set_open_angle().

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

Definition at line 201 of file Shower.h.

References fLength.

Referenced by lar_pandora::PFParticleAnalysis::analyze(), evd::RecoBaseDrawer::DrawShower3D(), DUNE::NeutrinoShowerEff::processEff(), and set_open_angle().

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.

References fTotalMIPEnergy.

Referenced by DUNE::NeutrinoShowerEff::processEff(), and set_open_angle().

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.

References fSigmaTotalMIPEnergy.

Referenced by set_open_angle().

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.

References fOpenAngle.

Referenced by lar_pandora::PFParticleAnalysis::analyze(), evd::RecoBaseDrawer::DrawShower3D(), and set_open_angle().

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.

Referenced by cluster::TrajCluster::produce(), and showerreco::ShowerRecoAlg::RecoOneShower().

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.

Referenced by cluster::TrajCluster::produce().

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.

References dir.

Referenced by shwf::ShowerCheater::produce(), cluster::TrajCluster::produce(), shwf::ShowerReco::produce(), and showerreco::ShowerRecoAlg::RecoOneShower().

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

Definition at line 136 of file Shower.h.

Referenced by shwf::ShowerCheater::produce(), cluster::TrajCluster::produce(), and shwf::ShowerReco::produce().

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.

Referenced by shwf::ShowerCheater::produce(), cluster::TrajCluster::produce(), and shower::EMShower::produce().

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.

Referenced by cluster::TrajCluster::produce(), and showerreco::ShowerRecoAlg::RecoOneShower().

141 { fLength = l; }
double fLength
Shower length [cm].
Definition: Shower.h:50
void recob::Shower::set_open_angle ( const double &  a)
inline
void recob::Shower::set_start_point ( const TVector3 &  xyz)
inline

Definition at line 137 of file Shower.h.

Referenced by cluster::TrajCluster::produce(), and showerreco::ShowerRecoAlg::RecoOneShower().

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.

Referenced by cluster::TrajCluster::produce().

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.

Referenced by cluster::TrajCluster::produce(), and showerreco::ShowerRecoAlg::RecoOneShower().

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.

Referenced by cluster::TrajCluster::produce(), ems::MergeEMShower3D::produce(), and showerreco::ShowerRecoAlg::RecoOneShower().

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.

Referenced by cluster::TrajCluster::produce(), and ems::MergeEMShower3D::produce().

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.

Referenced by cluster::TrajCluster::produce(), and showerreco::ShowerRecoAlg::RecoOneShower().

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.

Referenced by cluster::TrajCluster::produce().

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

Definition at line 193 of file Shower.h.

References fSigmaXYZstart.

Referenced by set_open_angle().

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 67 of file Shower.cxx.

Referenced by set_open_angle().

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

Definition at line 55 of file Shower.cxx.

Referenced by set_open_angle().

56  {
57  o << std::setiosflags(std::ios::fixed) << std::setprecision(3);
58  o << " Shower ID " << std::setw(4) << std::right << a.ID();
59  o << " Energy " << std::setw(4) << std::right << a.Energy()[a.best_plane()];
60  o << " dEdx " << std::setw(4) << std::right << a.dEdx()[a.best_plane()];
61  return o;
62  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112

Member Data Documentation

int recob::Shower::fBestPlane
private

Definition at line 39 of file Shower.h.

Referenced by best_plane().

TVector3 recob::Shower::fDCosStart
private

direction cosines at start of shower

Definition at line 28 of file Shower.h.

Referenced by Direction().

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

Calculated dE/dx per each plane.

Definition at line 34 of file Shower.h.

Referenced by dEdx().

int recob::Shower::fID
private

Default constructor.

Definition at line 27 of file Shower.h.

Referenced by ID().

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.

Referenced by has_length(), and Length().

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.

Referenced by has_open_angle(), and OpenAngle().

TVector3 recob::Shower::fSigmaDCosStart
private

uncertainty on initial direction cosines

Definition at line 29 of file Shower.h.

Referenced by DirectionErr().

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

Calculated dE/dx per each plane.

Definition at line 35 of file Shower.h.

Referenced by dEdxErr().

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

Calculated Energy per each plane.

Definition at line 33 of file Shower.h.

Referenced by EnergyErr().

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

Calculated Energy per each plane.

Definition at line 38 of file Shower.h.

Referenced by MIPEnergyErr().

TVector3 recob::Shower::fSigmaXYZstart
private

uncertainty on initial direction cosines

Definition at line 31 of file Shower.h.

Referenced by ShowerStartErr().

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

Calculated Energy per each plane.

Definition at line 32 of file Shower.h.

Referenced by Energy().

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

Calculated Energy per each plane.

Definition at line 37 of file Shower.h.

Referenced by MIPEnergy().

TVector3 recob::Shower::fXYZstart
private

direction cosines at start of shower

Definition at line 30 of file Shower.h.

Referenced by ShowerStart().

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.

Referenced by set_open_angle().

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.

Referenced by set_open_angle().


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