Public Member Functions | Private Attributes | List of all members
garana::CaloCluster Class Reference

#include <CaloCluster.h>

Public Member Functions

 CaloCluster ()
 
 CaloCluster (const TLorentzVector &pos, const int &region, const float &energy, const float &energyErr, const float &timeDiff, const float *shape, const float &theta, const float &phi, const std::vector< TVector3 > &eigenVecs, const std::vector< std::pair< int, float >> &edeps)
 
const TLorentzVector * Position () const
 
int const & Region () const
 
float const & Energy () const
 
float const & EnergyError () const
 
float const & TimeDifference () const
 
const float * Shape () const
 
float const & Theta () const
 
float const & Phi () const
 
const vector< TVector3 > * EigenVecs () const
 
size_t NIdes () const
 
const std::pair< int, float > * GetTrackIdEdep (const size_t &iide) const
 
float TotalTrueEnergy () const
 
float const & MaxDeposit () const
 
int const & TrackIdMaxDep () const
 

Private Attributes

TLorentzVector fPosition
 4-position of the cluster [cm,ns] More...
 
int fRegion
 what ECal region is it in, barrel or endcap; could add more. e.g, forward vs. backward barrel More...
 
float fEnergy
 energy of the ECal cluster [GeV] More...
 
float fEnergyError
 uncertainty of the cluster energy [GeV] More...
 
float fTimeDiffFirstLast
 time difference between the first and last layer of the cluster [ns] More...
 
float fShape [6]
 cluster shape parameters (Ellipsoid r1, r2, r3, vol, width) More...
 
float fTheta
 intrasic direction of the cluster theta More...
 
float fPhi
 intrasic direction of the cluster phi More...
 
vector< TVector3 > fEigenVecs
 Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalised to 1. More...
 
vector< std::pair< int, float > > fTrueEnergy
 true energy (second) [GeV] deposited by MCParticle with trackID (first) More...
 

Detailed Description

Definition at line 21 of file CaloCluster.h.

Constructor & Destructor Documentation

CaloCluster::CaloCluster ( )

Definition at line 12 of file CaloCluster.cxx.

12  :
13  fRegion(INT_MAX),
14  fEnergy(FLT_MAX),
15  fEnergyError(FLT_MAX),
16  fTimeDiffFirstLast(FLT_MAX),
17  fTheta(FLT_MAX),
18  fPhi(FLT_MAX)
19 {
20 
21  for(size_t i=0; i<6; i++) {
22  if(i<3){
23  fPosition.SetXYZT(FLT_MAX,FLT_MAX,FLT_MAX,FLT_MAX);
24  TVector3 v;
25  fEigenVecs.push_back(v);
26  }
27  fShape[i] = FLT_MAX;
28  }
29 }
float fEnergyError
uncertainty of the cluster energy [GeV]
Definition: CaloCluster.h:55
TLorentzVector fPosition
4-position of the cluster [cm,ns]
Definition: CaloCluster.h:52
float fEnergy
energy of the ECal cluster [GeV]
Definition: CaloCluster.h:54
float fShape[6]
cluster shape parameters (Ellipsoid r1, r2, r3, vol, width)
Definition: CaloCluster.h:57
int fRegion
what ECal region is it in, barrel or endcap; could add more. e.g, forward vs. backward barrel ...
Definition: CaloCluster.h:53
float fTimeDiffFirstLast
time difference between the first and last layer of the cluster [ns]
Definition: CaloCluster.h:56
float fTheta
intrasic direction of the cluster theta
Definition: CaloCluster.h:58
float fPhi
intrasic direction of the cluster phi
Definition: CaloCluster.h:59
vector< TVector3 > fEigenVecs
Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalise...
Definition: CaloCluster.h:60
CaloCluster::CaloCluster ( const TLorentzVector &  pos,
const int &  region,
const float &  energy,
const float &  energyErr,
const float &  timeDiff,
const float *  shape,
const float &  theta,
const float &  phi,
const std::vector< TVector3 > &  eigenVecs,
const std::vector< std::pair< int, float >> &  edeps 
)

Definition at line 31 of file CaloCluster.cxx.

33  :
34  fRegion(region),
35  fEnergy(energy),
36  fEnergyError(energyErr),
37  fTimeDiffFirstLast(timeDiff),
38  fTheta(theta),
39  fPhi(phi),
40  fEigenVecs(eigenVecs),
41  fTrueEnergy(edeps)
42 {
43  fPosition = pos;
44 
45  for(size_t i=0; i<6; i++)
46  fShape[i] = shape[i];
47 
48 }
float fEnergyError
uncertainty of the cluster energy [GeV]
Definition: CaloCluster.h:55
TLorentzVector fPosition
4-position of the cluster [cm,ns]
Definition: CaloCluster.h:52
float fEnergy
energy of the ECal cluster [GeV]
Definition: CaloCluster.h:54
float fShape[6]
cluster shape parameters (Ellipsoid r1, r2, r3, vol, width)
Definition: CaloCluster.h:57
vector< std::pair< int, float > > fTrueEnergy
true energy (second) [GeV] deposited by MCParticle with trackID (first)
Definition: CaloCluster.h:61
int fRegion
what ECal region is it in, barrel or endcap; could add more. e.g, forward vs. backward barrel ...
Definition: CaloCluster.h:53
float fTimeDiffFirstLast
time difference between the first and last layer of the cluster [ns]
Definition: CaloCluster.h:56
float fTheta
intrasic direction of the cluster theta
Definition: CaloCluster.h:58
float fPhi
intrasic direction of the cluster phi
Definition: CaloCluster.h:59
vector< TVector3 > fEigenVecs
Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalise...
Definition: CaloCluster.h:60

Member Function Documentation

const std::vector< TVector3 > * CaloCluster::EigenVecs ( ) const

Definition at line 82 of file CaloCluster.cxx.

82  {
83  return &fEigenVecs;
84  }
vector< TVector3 > fEigenVecs
Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalise...
Definition: CaloCluster.h:60
float const & CaloCluster::Energy ( ) const

Definition at line 58 of file CaloCluster.cxx.

58  {
59  return fEnergy;
60  }
float fEnergy
energy of the ECal cluster [GeV]
Definition: CaloCluster.h:54
float const & CaloCluster::EnergyError ( ) const

Definition at line 62 of file CaloCluster.cxx.

62  {
63  return fEnergyError;
64  }
float fEnergyError
uncertainty of the cluster energy [GeV]
Definition: CaloCluster.h:55
const std::pair< int, float > * CaloCluster::GetTrackIdEdep ( const size_t &  iide) const

Definition at line 90 of file CaloCluster.cxx.

90  {
91  return &fTrueEnergy.at(iide);
92  }
vector< std::pair< int, float > > fTrueEnergy
true energy (second) [GeV] deposited by MCParticle with trackID (first)
Definition: CaloCluster.h:61
float const & CaloCluster::MaxDeposit ( ) const

Definition at line 115 of file CaloCluster.cxx.

115  {
116  float maxdep = 0.;
117  int imaxdep = 0;
118  for(size_t idep=0; idep<NIdes(); idep++ ) {
119  auto const& trkdep = GetTrackIdEdep(idep);
120  if( trkdep->second > maxdep ) {
121  imaxdep = idep;
122  maxdep = trkdep->second;
123  }
124  }
125 
126  return (GetTrackIdEdep(imaxdep))->second;
127  }
size_t NIdes() const
Definition: CaloCluster.cxx:86
const std::pair< int, float > * GetTrackIdEdep(const size_t &iide) const
Definition: CaloCluster.cxx:90
size_t CaloCluster::NIdes ( ) const

Definition at line 86 of file CaloCluster.cxx.

86  {
87  return fTrueEnergy.size();
88  }
vector< std::pair< int, float > > fTrueEnergy
true energy (second) [GeV] deposited by MCParticle with trackID (first)
Definition: CaloCluster.h:61
float const & CaloCluster::Phi ( ) const

Definition at line 78 of file CaloCluster.cxx.

78  {
79  return fPhi;
80  }
float fPhi
intrasic direction of the cluster phi
Definition: CaloCluster.h:59
const TLorentzVector * CaloCluster::Position ( ) const

Definition at line 50 of file CaloCluster.cxx.

50  {
51  return &fPosition;
52  }
TLorentzVector fPosition
4-position of the cluster [cm,ns]
Definition: CaloCluster.h:52
int const & CaloCluster::Region ( ) const

Definition at line 54 of file CaloCluster.cxx.

54  {
55  return fRegion;
56 }
int fRegion
what ECal region is it in, barrel or endcap; could add more. e.g, forward vs. backward barrel ...
Definition: CaloCluster.h:53
const float * CaloCluster::Shape ( ) const

Definition at line 70 of file CaloCluster.cxx.

70  {
71  return fShape;
72  }
float fShape[6]
cluster shape parameters (Ellipsoid r1, r2, r3, vol, width)
Definition: CaloCluster.h:57
float const & CaloCluster::Theta ( ) const

Definition at line 74 of file CaloCluster.cxx.

74  {
75  return fTheta;
76  }
float fTheta
intrasic direction of the cluster theta
Definition: CaloCluster.h:58
float const & CaloCluster::TimeDifference ( ) const

Definition at line 66 of file CaloCluster.cxx.

66  {
67  return fTimeDiffFirstLast;
68  }
float fTimeDiffFirstLast
time difference between the first and last layer of the cluster [ns]
Definition: CaloCluster.h:56
float CaloCluster::TotalTrueEnergy ( ) const

Definition at line 94 of file CaloCluster.cxx.

94  {
95  float edep = 0.;
96  for(auto const& trkdep : fTrueEnergy)
97  edep += trkdep.second;
98  return edep;
99  }
vector< std::pair< int, float > > fTrueEnergy
true energy (second) [GeV] deposited by MCParticle with trackID (first)
Definition: CaloCluster.h:61
int const & CaloCluster::TrackIdMaxDep ( ) const

Definition at line 101 of file CaloCluster.cxx.

101  {
102  float maxdep = 0.;
103  int imaxdep = 0;
104  for(size_t idep=0; idep<NIdes(); idep++ ) {
105  auto const& trkdep = GetTrackIdEdep(idep);
106  if( trkdep->second > maxdep ) {
107  imaxdep = idep;
108  maxdep = trkdep->second;
109  }
110  }
111 
112  return (GetTrackIdEdep(imaxdep))->first;
113  }
size_t NIdes() const
Definition: CaloCluster.cxx:86
const std::pair< int, float > * GetTrackIdEdep(const size_t &iide) const
Definition: CaloCluster.cxx:90

Member Data Documentation

vector<TVector3> garana::CaloCluster::fEigenVecs
private

Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalised to 1.

Definition at line 60 of file CaloCluster.h.

float garana::CaloCluster::fEnergy
private

energy of the ECal cluster [GeV]

Definition at line 54 of file CaloCluster.h.

float garana::CaloCluster::fEnergyError
private

uncertainty of the cluster energy [GeV]

Definition at line 55 of file CaloCluster.h.

float garana::CaloCluster::fPhi
private

intrasic direction of the cluster phi

Definition at line 59 of file CaloCluster.h.

TLorentzVector garana::CaloCluster::fPosition
private

4-position of the cluster [cm,ns]

Definition at line 52 of file CaloCluster.h.

int garana::CaloCluster::fRegion
private

what ECal region is it in, barrel or endcap; could add more. e.g, forward vs. backward barrel

Definition at line 53 of file CaloCluster.h.

float garana::CaloCluster::fShape[6]
private

cluster shape parameters (Ellipsoid r1, r2, r3, vol, width)

Definition at line 57 of file CaloCluster.h.

float garana::CaloCluster::fTheta
private

intrasic direction of the cluster theta

Definition at line 58 of file CaloCluster.h.

float garana::CaloCluster::fTimeDiffFirstLast
private

time difference between the first and last layer of the cluster [ns]

Definition at line 56 of file CaloCluster.h.

vector<std::pair<int,float> > garana::CaloCluster::fTrueEnergy
private

true energy (second) [GeV] deposited by MCParticle with trackID (first)

Definition at line 61 of file CaloCluster.h.


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