CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CastorTower.h
Go to the documentation of this file.
1 #ifndef CastorReco_CastorTower_h
2 #define CastorReco_CastorTower_h
3 
12 #include <vector>
13 #include <memory>
15 
20 
22 //#include "DataFormats/HcalRecHit/interface/HcalRecHitFwd.h"
24 
25 namespace reco {
26 
27  class CastorTower : public LeafCandidate {
28  public:
29 
33 
34  // default constructor. Set energy and position to zero
35 
36  CastorTower() : energy_(0.), position_(ROOT::Math::XYZPoint(0.,0.,0.)), emEnergy_(0.), hadEnergy_(0.), fem_(0.), depth_(0.), fhot_(0.) { }
37 
38  // constructor from values
39  CastorTower(const double energy, const ROOT::Math::XYZPoint& position, const double emEnergy, const double hadEnergy, const double fem,
40  const double depth, const double fhot, const CastorRecHitRefs& usedRecHits);
41 
43  virtual ~CastorTower();
44 
47 
49  double emEnergy() const { return emEnergy_; }
50 
52  double hadEnergy() const { return hadEnergy_; }
53 
55  double fem() const { return fem_; }
56 
58  double depth() const { return depth_; }
59 
61  double fhot() const { return fhot_; }
62 
65 
68 
71 
73  size_t rechitsSize() const { return usedRecHits_.size(); }
74 
76  void add( const CastorRecHitRef& rechit ) { usedRecHits_.push_back( rechit ); }
77 
79  bool operator >=(const CastorTower& rhs) const { return (energy_>=rhs.energy_); }
80 
82  bool operator > (const CastorTower& rhs) const { return (energy_> rhs.energy_); }
83 
85  bool operator <=(const CastorTower& rhs) const { return (energy_<=rhs.energy_); }
86 
88  bool operator < (const CastorTower& rhs) const { return (energy_< rhs.energy_); }
89 
91  double xPos() const { return position_.x(); }
92 
94  double yPos() const { return position_.y(); }
95 
97  double rho() const { return position_.rho(); }
98 
99  private:
100 
102  double energy_;
103 
106 
108  double emEnergy_;
109 
111  double hadEnergy_;
112 
114  double fem_;
115 
117  double depth_;
118 
120  double fhot_;
121 
124  };
125 
127  typedef std::vector<CastorTower> CastorTowerCollection;
128 
129  // persistent reference to CastorTower objects
131 
134 
137 
138 }
139 
140 #endif
double emEnergy() const
tower em energy
Definition: CastorTower.h:49
virtual double energy() const GCC11_FINAL
energy
double emEnergy_
tower em energy
Definition: CastorTower.h:108
virtual ~CastorTower()
destructor
Definition: CastorTower.cc:21
double depth_
tower depth
Definition: CastorTower.h:117
double rho() const
rho of tower centroid
Definition: CastorTower.h:97
bool operator<=(const CastorTower &rhs) const
comparison &lt;= operator
Definition: CastorTower.h:85
double energy_
tower energy
Definition: CastorTower.h:102
edm::Ref< CastorRecHitCollection > CastorRecHitRef
Definition: CastorTower.h:31
edm::Ref< CastorTowerCollection > CastorTowerRef
Definition: CastorTower.h:130
CastorRecHitRefs::iterator rechitsBegin() const
fist iterator over CastorRecHit constituents
Definition: CastorTower.h:67
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:249
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:244
CastorRecHitRefs usedRecHits_
references to CastorRecHit constituents
Definition: CastorTower.h:123
CastorTowerRefVector::iterator CastorTower_iterator
iterator over a vector of references to CastorTower objects all in the same collection ...
Definition: CastorTower.h:136
size_t rechitsSize() const
number of CastorRecHit constituents
Definition: CastorTower.h:73
double fem_
tower em/tot Ratio
Definition: CastorTower.h:114
double fem() const
tower em/tot ratio
Definition: CastorTower.h:55
void add(const CastorRecHitRef &rechit)
add reference to constituent CastorRecHit
Definition: CastorTower.h:76
double fhot_
tower hotcell/tot ratio
Definition: CastorTower.h:120
ROOT::Math::XYZPoint position_
tower centroid position
Definition: CastorTower.h:105
ROOT::Math::XYZPoint position() const
tower centroid position
Definition: CastorTower.h:46
CastorRecHitRefs getUsedRecHits() const
vector of used RecHits
Definition: CastorTower.h:64
edm::RefVector< CastorTowerCollection > CastorTowerRefVector
vector of references to CastorTower objects all in the same collection
Definition: CastorTower.h:133
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
bool operator>=(const CastorTower &rhs) const
comparison &gt;= operator
Definition: CastorTower.h:79
double fhot() const
tower hotcell/tot ratio
Definition: CastorTower.h:61
double depth() const
tower depth in z
Definition: CastorTower.h:58
double hadEnergy_
tower had energy
Definition: CastorTower.h:111
double hadEnergy() const
tower had energy
Definition: CastorTower.h:52
bool operator<(const CastorTower &rhs) const
comparison &lt;= operator
Definition: CastorTower.h:88
double yPos() const
y of tower centroid
Definition: CastorTower.h:94
double xPos() const
x of tower centroid
Definition: CastorTower.h:91
Transform3DPJ::Point XYZPoint
CastorRecHitRefs::iterator rechitsEnd() const
last iterator over CastorRecHit constituents
Definition: CastorTower.h:70
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:64
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
edm::SortedCollection< CastorRecHit > CastorRecHitCollection
Definition: CastorTower.h:30
bool operator>(const CastorTower &rhs) const
comparison &gt; operator
Definition: CastorTower.h:82
std::vector< CastorTower > CastorTowerCollection
collection of CastorTower objects
Definition: CastorTower.h:127
edm::RefVector< CastorRecHitCollection > CastorRecHitRefs
Definition: CastorTower.h:32