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 
46  double energy() const { return energy_; }
47 
50 
52  double emEnergy() const { return emEnergy_; }
53 
55  double hadEnergy() const { return hadEnergy_; }
56 
58  double fem() const { return fem_; }
59 
61  double depth() const { return depth_; }
62 
64  double fhot() const { return fhot_; }
65 
68 
71 
74 
76  size_t rechitsSize() const { return usedRecHits_.size(); }
77 
79  void add( const CastorRecHitRef& rechit ) { usedRecHits_.push_back( rechit ); }
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  bool operator < (const CastorTower& rhs) const { return (energy_< rhs.energy_); }
92 
94  double eta() const { return position_.eta(); }
95 
97  double phi() const { return position_.phi(); }
98 
100  double x() const { return position_.x(); }
101 
103  double y() const { return position_.y(); }
104 
106  double rho() const { return position_.rho(); }
107 
108  private:
109 
111  double energy_;
112 
115 
117  double emEnergy_;
118 
120  double hadEnergy_;
121 
123  double fem_;
124 
126  double depth_;
127 
129  double fhot_;
130 
133  };
134 
136  typedef std::vector<CastorTower> CastorTowerCollection;
137 
138  // persistent reference to CastorTower objects
140 
143 
146 
147 }
148 
149 #endif
double emEnergy() const
tower em energy
Definition: CastorTower.h:52
double emEnergy_
tower em energy
Definition: CastorTower.h:117
virtual ~CastorTower()
destructor
Definition: CastorTower.cc:21
double depth_
tower depth
Definition: CastorTower.h:126
double rho() const
rho of tower centroid
Definition: CastorTower.h:106
bool operator<=(const CastorTower &rhs) const
comparison &lt;= operator
Definition: CastorTower.h:88
double energy_
tower energy
Definition: CastorTower.h:111
edm::Ref< CastorRecHitCollection > CastorRecHitRef
Definition: CastorTower.h:31
edm::Ref< CastorTowerCollection > CastorTowerRef
Definition: CastorTower.h:139
CastorRecHitRefs::iterator rechitsBegin() const
fist iterator over CastorRecHit constituents
Definition: CastorTower.h:70
double eta() const
pseudorapidity of tower centroid
Definition: CastorTower.h:94
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
double x() const
x of tower centroid
Definition: CastorTower.h:100
CastorRecHitRefs usedRecHits_
references to CastorRecHit constituents
Definition: CastorTower.h:132
CastorTowerRefVector::iterator CastorTower_iterator
iterator over a vector of references to CastorTower objects all in the same collection ...
Definition: CastorTower.h:145
size_t rechitsSize() const
number of CastorRecHit constituents
Definition: CastorTower.h:76
double fem_
tower em/tot Ratio
Definition: CastorTower.h:123
double fem() const
tower em/tot ratio
Definition: CastorTower.h:58
void add(const CastorRecHitRef &rechit)
add reference to constituent CastorRecHit
Definition: CastorTower.h:79
double fhot_
tower hotcell/tot ratio
Definition: CastorTower.h:129
ROOT::Math::XYZPoint position_
tower centroid position
Definition: CastorTower.h:114
double energy() const
tower energy
Definition: CastorTower.h:46
ROOT::Math::XYZPoint position() const
tower centroid position
Definition: CastorTower.h:49
CastorRecHitRefs getUsedRecHits() const
vector of used RecHits
Definition: CastorTower.h:67
edm::RefVector< CastorTowerCollection > CastorTowerRefVector
vector of references to CastorTower objects all in the same collection
Definition: CastorTower.h:142
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:82
double fhot() const
tower hotcell/tot ratio
Definition: CastorTower.h:64
double y() const
y of tower centroid
Definition: CastorTower.h:103
double depth() const
tower depth in z
Definition: CastorTower.h:61
double hadEnergy_
tower had energy
Definition: CastorTower.h:120
double hadEnergy() const
tower had energy
Definition: CastorTower.h:55
bool operator<(const CastorTower &rhs) const
comparison &lt;= operator
Definition: CastorTower.h:91
Transform3DPJ::Point XYZPoint
CastorRecHitRefs::iterator rechitsEnd() const
last iterator over CastorRecHit constituents
Definition: CastorTower.h:73
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:85
std::vector< CastorTower > CastorTowerCollection
collection of CastorTower objects
Definition: CastorTower.h:136
edm::RefVector< CastorRecHitCollection > CastorRecHitRefs
Definition: CastorTower.h:32
double phi() const
azimuthal angle of tower centroid
Definition: CastorTower.h:97