LDMX Software
EcalCluster.cxx
2
3ClassImp(ldmx::EcalCluster);
4
5namespace ldmx {
6
8
9void EcalCluster::addHits(const std::vector<const EcalHit*>& hits_) {
10 std::vector<unsigned int> ids;
11 ids.reserve(hits_.size());
12 for (const auto& h : hits_) {
13 ids.push_back(h->getID());
14 }
15 setIDs(ids);
16}
17
18void EcalCluster::addFirstLayerHits(const std::vector<const EcalHit*>& hits_) {
19 first_layer_hit_ids_.clear();
20 first_layer_hit_ids_.reserve(hits_.size());
21 for (const auto& h : hits_) {
22 first_layer_hit_ids_.push_back(h->getID());
23 }
24}
25
26} // namespace ldmx
Class that stores cluster information from the ECal.
void clear()
Reset the CaloCluster object.
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
Stores cluster information from the ECal.
Definition EcalCluster.h:20
virtual ~EcalCluster()
Class destructor.
void addHits(const std::vector< const ldmx::EcalHit * > &hits)
Take in the hits that make up the cluster.