CMS 3D CMS Logo

CastorTower.h
Go to the documentation of this file.
1 #ifndef CastorReco_CastorTower_h
2 #define CastorReco_CastorTower_h
3 
11 #include <vector>
12 #include <memory>
14 
19 
21 //#include "DataFormats/HcalRecHit/interface/HcalRecHitDefs.h"
23 
24 namespace reco {
25 
26  class CastorTower : public LeafCandidate {
27  public:
31 
32  // default constructor. Set energy and position to zero
33 
35  : energy_(0.),
36  position_(ROOT::Math::XYZPoint(0., 0., 0.)),
37  emEnergy_(0.),
38  hadEnergy_(0.),
39  fem_(0.),
40  depth_(0.),
41  fhot_(0.) {}
42 
43  // constructor from values
44  CastorTower(const double energy,
46  const double emEnergy,
47  const double hadEnergy,
48  const double fem,
49  const double depth,
50  const double fhot,
51  const CastorRecHitRefs& usedRecHits);
52 
54  ~CastorTower() override;
55 
58 
60  double emEnergy() const { return emEnergy_; }
61 
63  double hadEnergy() const { return hadEnergy_; }
64 
66  double fem() const { return fem_; }
67 
69  double depth() const { return depth_; }
70 
72  double fhot() const { return fhot_; }
73 
76 
79 
82 
84  size_t rechitsSize() const { return usedRecHits_.size(); }
85 
87  void add(const CastorRecHitRef& rechit) { usedRecHits_.push_back(rechit); }
88 
90  bool operator>=(const CastorTower& rhs) const { return (energy_ >= rhs.energy_); }
91 
93  bool operator>(const CastorTower& rhs) const { return (energy_ > rhs.energy_); }
94 
96  bool operator<=(const CastorTower& rhs) const { return (energy_ <= rhs.energy_); }
97 
99  bool operator<(const CastorTower& rhs) const { return (energy_ < rhs.energy_); }
100 
102  double xPos() const { return position_.x(); }
103 
105  double yPos() const { return position_.y(); }
106 
108  double rho() const { return position_.rho(); }
109 
110  private:
112  double energy_;
113 
116 
118  double emEnergy_;
119 
121  double hadEnergy_;
122 
124  double fem_;
125 
127  double depth_;
128 
130  double fhot_;
131 
134  };
135 
137  typedef std::vector<CastorTower> CastorTowerCollection;
138 
139  // persistent reference to CastorTower objects
141 
144 
147 
148 } // namespace reco
149 
150 #endif
double emEnergy_
tower em energy
Definition: CastorTower.h:118
double depth_
tower depth
Definition: CastorTower.h:127
double energy_
tower energy
Definition: CastorTower.h:112
CastorRecHitRefs::iterator rechitsBegin() const
fist iterator over CastorRecHit constituents
Definition: CastorTower.h:78
double rho() const
rho of tower centroid
Definition: CastorTower.h:108
double depth() const
tower depth in z
Definition: CastorTower.h:69
edm::Ref< CastorRecHitCollection > CastorRecHitRef
Definition: CastorTower.h:29
edm::Ref< CastorTowerCollection > CastorTowerRef
Definition: CastorTower.h:140
CastorRecHitRefs usedRecHits_
references to CastorRecHit constituents
Definition: CastorTower.h:133
CastorTowerRefVector::iterator CastorTower_iterator
iterator over a vector of references to CastorTower objects all in the same collection ...
Definition: CastorTower.h:146
ROOT::Math::XYZPoint position() const
tower centroid position
Definition: CastorTower.h:57
double emEnergy() const
tower em energy
Definition: CastorTower.h:60
double hadEnergy() const
tower had energy
Definition: CastorTower.h:63
double xPos() const
x of tower centroid
Definition: CastorTower.h:102
bool operator<=(const CastorTower &rhs) const
comparison <= operator
Definition: CastorTower.h:96
double fem_
tower em/tot Ratio
Definition: CastorTower.h:124
CastorRecHitRefs getUsedRecHits() const
vector of used RecHits
Definition: CastorTower.h:75
void add(const CastorRecHitRef &rechit)
add reference to constituent CastorRecHit
Definition: CastorTower.h:87
double yPos() const
y of tower centroid
Definition: CastorTower.h:105
double fhot_
tower hotcell/tot ratio
Definition: CastorTower.h:130
ROOT::Math::XYZPoint position_
tower centroid position
Definition: CastorTower.h:115
bool operator<(const CastorTower &rhs) const
comparison <= operator
Definition: CastorTower.h:99
double fhot() const
tower hotcell/tot ratio
Definition: CastorTower.h:72
bool operator>(const CastorTower &rhs) const
comparison > operator
Definition: CastorTower.h:93
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
double fem() const
tower em/tot ratio
Definition: CastorTower.h:66
edm::RefVector< CastorTowerCollection > CastorTowerRefVector
vector of references to CastorTower objects all in the same collection
Definition: CastorTower.h:143
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
~CastorTower() override
destructor
Definition: CastorTower.cc:27
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:228
bool operator>=(const CastorTower &rhs) const
comparison >= operator
Definition: CastorTower.h:90
double hadEnergy_
tower had energy
Definition: CastorTower.h:121
fixed size matrix
CastorRecHitRefs::iterator rechitsEnd() const
last iterator over CastorRecHit constituents
Definition: CastorTower.h:81
Transform3DPJ::Point XYZPoint
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
size_t rechitsSize() const
number of CastorRecHit constituents
Definition: CastorTower.h:84
edm::SortedCollection< CastorRecHit > CastorRecHitCollection
Definition: CastorTower.h:28
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223
std::vector< CastorTower > CastorTowerCollection
collection of CastorTower objects
Definition: CastorTower.h:137
edm::RefVector< CastorRecHitCollection > CastorRecHitRefs
Definition: CastorTower.h:30
double energy() const final
energy