LDMX Software
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
ldmx::CaloCluster Class Reference

Stores cluster information from the ECal. More...

#include <CaloCluster.h>

Public Member Functions

 CaloCluster ()
 Class constructor.
 
virtual ~CaloCluster ()
 Class destructor.
 
void Print () const
 Print a description of this object.
 
void Clear ()
 Reset the CaloCluster object.
 
void addHits (const std::vector< const ldmx::CalorimeterHit * > hitsVec)
 Take in the hits that make up the cluster.
 
void setEnergy (double energy)
 Sets total energy for the cluster.
 
void setNHits (int nHits)
 Sets total number of hits in the cluster.
 
void setIDs (std::vector< unsigned int > &hitIDs)
 Sets a sorted vector for the IDs of the hits that make up the cluster.
 
void setHitValsX (std::vector< float > &x)
 
void setHitValsY (std::vector< float > &x)
 
void setHitValsZ (std::vector< float > &x)
 
void setHitValsE (std::vector< float > &x)
 
void setCentroidXYZ (double x, double y, double z)
 Sets the three coordinates of the cluster centroid.
 
void setRMSXYZ (double x, double y, double z)
 
void setDXDZ (double x)
 
void setDYDZ (double x)
 
void setEDXDZ (double x)
 
void setEDYDZ (double x)
 
double getEnergy () const
 
int getNHits () const
 
double getCentroidX () const
 
double getCentroidY () const
 
double getCentroidZ () const
 
double getRMSX () const
 
double getRMSY () const
 
double getRMSZ () const
 
double getDXDZ () const
 
double getDYDZ () const
 
double getEDXDZ () const
 
double getEDYDZ () const
 
const std::vector< unsigned int > & getHitIDs () const
 
const std::vector< float > & getHitX () const
 
const std::vector< float > & getHitY () const
 
const std::vector< float > & getHitZ () const
 
const std::vector< float > & getHitE () const
 
bool operator< (const CaloCluster &rhs) const
 

Protected Attributes

std::vector< unsigned int > hitIDs_
 
double energy_ {0}
 
int nHits_ {0}
 
double centroidX_ {0}
 
double centroidY_ {0}
 
double centroidZ_ {0}
 
double rmsX_ {0}
 
double rmsY_ {0}
 
double rmsZ_ {0}
 
double DXDZ_ {0}
 
double DYDZ_ {0}
 
double errDXDZ_ {0}
 
double errDYDZ_ {0}
 
std::vector< float > hitX_
 
std::vector< float > hitY_
 
std::vector< float > hitZ_
 
std::vector< float > hitE_
 

Private Member Functions

 ClassDef (CaloCluster, 1)
 

Detailed Description

Stores cluster information from the ECal.

Definition at line 26 of file CaloCluster.h.

Member Function Documentation

◆ addHits()

void ldmx::CaloCluster::addHits ( const std::vector< const ldmx::CalorimeterHit * >  hitsVec)

Take in the hits that make up the cluster.

Parameters
hitThe digi hit's entry number in the events digi collection.

◆ getCentroidX()

double ldmx::CaloCluster::getCentroidX ( ) const
inline

Definition at line 112 of file CaloCluster.h.

112{ return centroidX_; }

◆ getCentroidY()

double ldmx::CaloCluster::getCentroidY ( ) const
inline

Definition at line 113 of file CaloCluster.h.

113{ return centroidY_; }

◆ getCentroidZ()

double ldmx::CaloCluster::getCentroidZ ( ) const
inline

Definition at line 114 of file CaloCluster.h.

114{ return centroidZ_; }

◆ getDXDZ()

double ldmx::CaloCluster::getDXDZ ( ) const
inline

Definition at line 119 of file CaloCluster.h.

119{ return DXDZ_; }

◆ getDYDZ()

double ldmx::CaloCluster::getDYDZ ( ) const
inline

Definition at line 121 of file CaloCluster.h.

121{ return DYDZ_; }

◆ getEDXDZ()

double ldmx::CaloCluster::getEDXDZ ( ) const
inline

Definition at line 123 of file CaloCluster.h.

123{ return errDXDZ_; }

◆ getEDYDZ()

double ldmx::CaloCluster::getEDYDZ ( ) const
inline

Definition at line 125 of file CaloCluster.h.

125{ return errDYDZ_; }

◆ getEnergy()

double ldmx::CaloCluster::getEnergy ( ) const
inline

Definition at line 106 of file CaloCluster.h.

106{ return energy_; }

◆ getHitE()

const std::vector< float > & ldmx::CaloCluster::getHitE ( ) const
inline

Definition at line 134 of file CaloCluster.h.

134{ return hitE_; }

◆ getHitIDs()

const std::vector< unsigned int > & ldmx::CaloCluster::getHitIDs ( ) const
inline

Definition at line 128 of file CaloCluster.h.

128{ return hitIDs_; }

◆ getHitX()

const std::vector< float > & ldmx::CaloCluster::getHitX ( ) const
inline

Definition at line 131 of file CaloCluster.h.

131{ return hitX_; }

◆ getHitY()

const std::vector< float > & ldmx::CaloCluster::getHitY ( ) const
inline

Definition at line 132 of file CaloCluster.h.

132{ return hitY_; }

◆ getHitZ()

const std::vector< float > & ldmx::CaloCluster::getHitZ ( ) const
inline

Definition at line 133 of file CaloCluster.h.

133{ return hitZ_; }

◆ getNHits()

int ldmx::CaloCluster::getNHits ( ) const
inline

Definition at line 109 of file CaloCluster.h.

109{ return nHits_; }

◆ getRMSX()

double ldmx::CaloCluster::getRMSX ( ) const
inline

Definition at line 115 of file CaloCluster.h.

115{ return rmsX_; }

◆ getRMSY()

double ldmx::CaloCluster::getRMSY ( ) const
inline

Definition at line 116 of file CaloCluster.h.

116{ return rmsY_; }

◆ getRMSZ()

double ldmx::CaloCluster::getRMSZ ( ) const
inline

Definition at line 117 of file CaloCluster.h.

117{ return rmsZ_; }

◆ operator<()

bool ldmx::CaloCluster::operator< ( const CaloCluster rhs) const
inline

Definition at line 136 of file CaloCluster.h.

136 {
137 return this->getEnergy() < rhs.getEnergy();
138 }

◆ setCentroidXYZ()

void ldmx::CaloCluster::setCentroidXYZ ( double  x,
double  y,
double  z 
)
inline

Sets the three coordinates of the cluster centroid.

Parameters
xThe x coordinate.
yThe y coordinate.
zThe z coordinate.

Definition at line 85 of file CaloCluster.h.

85 {
86 centroidX_ = x;
87 centroidY_ = y;
88 centroidZ_ = z;
89 }

Referenced by ecal::EcalClusterProducer::produce(), and hcal::HcalClusterProducer::produce().

◆ setDXDZ()

void ldmx::CaloCluster::setDXDZ ( double  x)
inline

Definition at line 95 of file CaloCluster.h.

95{ DXDZ_ = x; }

◆ setDYDZ()

void ldmx::CaloCluster::setDYDZ ( double  x)
inline

Definition at line 97 of file CaloCluster.h.

97{ DYDZ_ = x; }

◆ setEDXDZ()

void ldmx::CaloCluster::setEDXDZ ( double  x)
inline

Definition at line 99 of file CaloCluster.h.

99{ errDXDZ_ = x; }

◆ setEDYDZ()

void ldmx::CaloCluster::setEDYDZ ( double  x)
inline

Definition at line 101 of file CaloCluster.h.

101{ errDYDZ_ = x; }

◆ setEnergy()

void ldmx::CaloCluster::setEnergy ( double  energy)
inline

Sets total energy for the cluster.

Parameters
energyThe total energy of the cluster.

Definition at line 59 of file CaloCluster.h.

59{ energy_ = energy; }

Referenced by ecal::EcalClusterProducer::produce(), and hcal::HcalClusterProducer::produce().

◆ setHitValsE()

void ldmx::CaloCluster::setHitValsE ( std::vector< float > &  x)
inline

Definition at line 77 of file CaloCluster.h.

77{ hitE_ = x; }

◆ setHitValsX()

void ldmx::CaloCluster::setHitValsX ( std::vector< float > &  x)
inline

Definition at line 74 of file CaloCluster.h.

74{ hitX_ = x; }

◆ setHitValsY()

void ldmx::CaloCluster::setHitValsY ( std::vector< float > &  x)
inline

Definition at line 75 of file CaloCluster.h.

75{ hitY_ = x; }

◆ setHitValsZ()

void ldmx::CaloCluster::setHitValsZ ( std::vector< float > &  x)
inline

Definition at line 76 of file CaloCluster.h.

76{ hitZ_ = x; }

◆ setIDs()

void ldmx::CaloCluster::setIDs ( std::vector< unsigned int > &  hitIDs)
inline

Sets a sorted vector for the IDs of the hits that make up the cluster.

Parameters
IDsSorted vector of hit IDs.

Definition at line 72 of file CaloCluster.h.

72{ hitIDs_ = hitIDs; }

Referenced by ldmx::HcalCluster::addHits().

◆ setNHits()

void ldmx::CaloCluster::setNHits ( int  nHits)
inline

Sets total number of hits in the cluster.

Parameters
nHitsThe total number of hits.

Definition at line 65 of file CaloCluster.h.

65{ nHits_ = nHits; }

Referenced by ecal::EcalClusterProducer::produce(), and hcal::HcalClusterProducer::produce().

◆ setRMSXYZ()

void ldmx::CaloCluster::setRMSXYZ ( double  x,
double  y,
double  z 
)
inline

Definition at line 90 of file CaloCluster.h.

90 {
91 rmsX_ = x;
92 rmsY_ = y;
93 rmsZ_ = z;
94 }

Member Data Documentation

◆ centroidX_

double ldmx::CaloCluster::centroidX_ {0}
protected

Definition at line 144 of file CaloCluster.h.

144{0};

◆ centroidY_

double ldmx::CaloCluster::centroidY_ {0}
protected

Definition at line 145 of file CaloCluster.h.

145{0};

◆ centroidZ_

double ldmx::CaloCluster::centroidZ_ {0}
protected

Definition at line 146 of file CaloCluster.h.

146{0};

◆ DXDZ_

double ldmx::CaloCluster::DXDZ_ {0}
protected

Definition at line 150 of file CaloCluster.h.

150{0};

◆ DYDZ_

double ldmx::CaloCluster::DYDZ_ {0}
protected

Definition at line 151 of file CaloCluster.h.

151{0};

◆ energy_

double ldmx::CaloCluster::energy_ {0}
protected

Definition at line 142 of file CaloCluster.h.

142{0};

◆ errDXDZ_

double ldmx::CaloCluster::errDXDZ_ {0}
protected

Definition at line 152 of file CaloCluster.h.

152{0};

◆ errDYDZ_

double ldmx::CaloCluster::errDYDZ_ {0}
protected

Definition at line 153 of file CaloCluster.h.

153{0};

◆ hitE_

std::vector<float> ldmx::CaloCluster::hitE_
protected

Definition at line 157 of file CaloCluster.h.

◆ hitIDs_

std::vector<unsigned int> ldmx::CaloCluster::hitIDs_
protected

Definition at line 141 of file CaloCluster.h.

◆ hitX_

std::vector<float> ldmx::CaloCluster::hitX_
protected

Definition at line 154 of file CaloCluster.h.

◆ hitY_

std::vector<float> ldmx::CaloCluster::hitY_
protected

Definition at line 155 of file CaloCluster.h.

◆ hitZ_

std::vector<float> ldmx::CaloCluster::hitZ_
protected

Definition at line 156 of file CaloCluster.h.

◆ nHits_

int ldmx::CaloCluster::nHits_ {0}
protected

Definition at line 143 of file CaloCluster.h.

143{0};

◆ rmsX_

double ldmx::CaloCluster::rmsX_ {0}
protected

Definition at line 147 of file CaloCluster.h.

147{0};

◆ rmsY_

double ldmx::CaloCluster::rmsY_ {0}
protected

Definition at line 148 of file CaloCluster.h.

148{0};

◆ rmsZ_

double ldmx::CaloCluster::rmsZ_ {0}
protected

Definition at line 149 of file CaloCluster.h.

149{0};

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