LDMX Software
EcalCluster.h
Go to the documentation of this file.
1
7#ifndef EVENT_ECALCLUSTER_H_
8#define EVENT_ECALCLUSTER_H_
9
10// ldmx-sw
11#include "Ecal/Event/EcalHit.h"
13
14namespace ldmx {
15
21 public:
25 EcalCluster() = default;
26
30 virtual ~EcalCluster();
31
37 void addHits(const std::vector<const ldmx::EcalHit*>& hits);
38
39 void addFirstLayerHits(const std::vector<const ldmx::EcalHit*>& hits);
40
41 bool operator<(const EcalCluster& rhs) const {
42 return this->getEnergy() < rhs.getEnergy();
43 }
44
45 void setFirstLayerCentroidXYZ(double x, double y, double z) {
46 first_layer_centroid_x_ = x;
47 first_layer_centroid_y_ = y;
48 first_layer_centroid_z_ = z;
49 }
50
51 double getFirstLayerCentroidX() const { return first_layer_centroid_x_; }
52 double getFirstLayerCentroidY() const { return first_layer_centroid_y_; }
53 double getFirstLayerCentroidZ() const { return first_layer_centroid_z_; }
54
55 std::vector<unsigned int> getFirstLayerHitIDs() const {
56 return first_layer_hit_ids_;
57 }
58
59 private:
60 std::vector<unsigned int> first_layer_hit_ids_;
61
62 double first_layer_centroid_x_{0};
63 double first_layer_centroid_y_{0};
64 double first_layer_centroid_z_{0};
65
66 ClassDef(EcalCluster, 1);
67};
68} // namespace ldmx
69
70#endif
Class that stores calorimeter cluster information.
Stores cluster information from the ECal.
Definition CaloCluster.h:26
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.
EcalCluster()=default
Class constructor.