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

Stores cluster information from the HCal. More...

#include <HcalCluster.h>

Public Member Functions

 HcalCluster ()=default
 Class constructor.
 
virtual ~HcalCluster ()
 Class destructor.
 
void Clear ()
 Reset the HcalCluster object.
 
void addHits (const std::vector< const ldmx::HcalHit * > hitsVec)
 Take in the hits that make up the cluster.
 
void setTime (double x)
 
double getTime () const
 
bool operator< (const HcalCluster &rhs) const
 
- Public Member Functions inherited from ldmx::CaloCluster
 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
 

Private Member Functions

 ClassDef (HcalCluster, 1)
 

Private Attributes

double time_ {0}
 

Additional Inherited Members

- Protected Attributes inherited from ldmx::CaloCluster
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_
 

Detailed Description

Stores cluster information from the HCal.

Definition at line 21 of file HcalCluster.h.

Constructor & Destructor Documentation

◆ ~HcalCluster()

ldmx::HcalCluster::~HcalCluster ( )
virtual

Class destructor.

Definition at line 6 of file HcalCluster.cxx.

6{ Clear(); }
void Clear()
Reset the HcalCluster object.

References Clear().

Member Function Documentation

◆ addHits()

void ldmx::HcalCluster::addHits ( const std::vector< const ldmx::HcalHit * >  hitsVec)

Take in the hits that make up the cluster.

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

Definition at line 13 of file HcalCluster.cxx.

13 {
14 std::vector<unsigned int> vecIDs;
15 for (unsigned int iHit = 0; iHit < hitsVec.size(); iHit++) {
16 vecIDs.push_back(hitsVec[iHit]->getID());
17 }
18 setIDs(vecIDs);
19}
void setIDs(std::vector< unsigned int > &hitIDs)
Sets a sorted vector for the IDs of the hits that make up the cluster.
Definition CaloCluster.h:72

References ldmx::CaloCluster::setIDs().

Referenced by hcal::HcalClusterProducer::produce().

◆ Clear()

void ldmx::HcalCluster::Clear ( )

Reset the HcalCluster object.

Definition at line 8 of file HcalCluster.cxx.

8 {
10 time_ = 0;
11}
void Clear()
Reset the CaloCluster object.

References ldmx::CaloCluster::Clear().

Referenced by ~HcalCluster().

◆ getTime()

double ldmx::HcalCluster::getTime ( ) const
inline

Definition at line 47 of file HcalCluster.h.

47{ return time_; }

◆ operator<()

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

Definition at line 49 of file HcalCluster.h.

49 {
50 return this->getEnergy() < rhs.getEnergy();
51 }

◆ setTime()

void ldmx::HcalCluster::setTime ( double  x)
inline

Definition at line 45 of file HcalCluster.h.

45{ time_ = x; }

Member Data Documentation

◆ time_

double ldmx::HcalCluster::time_ {0}
private

Definition at line 54 of file HcalCluster.h.

54{0};

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