LDMX Software
TrigScintCluster.cxx
1#include "TrigScint/Event/TrigScintCluster.h"
2
4
5 namespace ldmx {
7
8 void TrigScintCluster::Print(Option_t * option) const {
9 std::cout << "TrigScintCluster { "
10 << "Energy: " << energy_ << ", "
11 << "Number of hits: " << nHits_ << ", "
12 << "Seed channel " << seed_ << ", Channel centroid: " << centroid_
13 << " }" << std::endl;
14 std::cout << " -- Constituent hit channel ids: { ";
15 for (const auto &idx : getHitIDs()) std::cout << idx << " ";
16 std::cout << "}" << std::endl;
17 }
18
19 void TrigScintCluster::Clear(Option_t *) {
20 hitIDs_.clear();
21
22 centroidX_ = 0;
23 centroidY_ = 0;
24 centroidZ_ = 0;
25 setEnergy(0);
26 setNHits(0);
27 setCentroid(0);
28 setSeed(-1);
29 }
30} // namespace ldmx
Stores cluster information from the trigger scintillator pads.
virtual ~TrigScintCluster()
Class destructor.
void setNHits(int nHits)
The number of hits forming the cluster.
void setEnergy(double energy)
Set the cluster energy.
void Print(Option_t *option="") const
Print a description of this object.
void setCentroid(double centroid)
const std::vector< unsigned int > & getHitIDs() const
Get vector of channel IDs of hits forming the cluster.
void Clear(Option_t *option="")
Reset the TrigScintCluster object.