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 
11 #include <vector>
12 #include <memory>
14 
19 
21 //#include "DataFormats/HcalRecHit/interface/HcalRecHitFwd.h"
23 
24 namespace reco {
25 
26  class CastorTower : public LeafCandidate {
27  public:
28 
32 
33  // default constructor. Set energy and position to zero
34 
35  CastorTower() : energy_(0.), position_(ROOT::Math::XYZPoint(0.,0.,0.)), emEnergy_(0.), hadEnergy_(0.), fem_(0.), depth_(0.), fhot_(0.) { }
36 
37  // constructor from values
38  CastorTower(const double energy, const ROOT::Math::XYZPoint& position, const double emEnergy, const double hadEnergy, const double fem,
39  const double depth, const double fhot, const CastorRecHitRefs& usedRecHits);
40 
42  virtual ~CastorTower();
43 
46 
48  double emEnergy() const { return emEnergy_; }
49 
51  double hadEnergy() const { return hadEnergy_; }
52 
54  double fem() const { return fem_; }
55 
57  double depth() const { return depth_; }
58 
60  double fhot() const { return fhot_; }
61 
64 
67 
70 
72  size_t rechitsSize() const { return usedRecHits_.size(); }
73 
75  void add( const CastorRecHitRef& rechit ) { usedRecHits_.push_back( rechit ); }
76 
78  bool operator >=(const CastorTower& rhs) const { return (energy_>=rhs.energy_); }
79 
81  bool operator > (const CastorTower& rhs) const { return (energy_> rhs.energy_); }
82 
84  bool operator <=(const CastorTower& rhs) const { return (energy_<=rhs.energy_); }
85 
87  bool operator < (const CastorTower& rhs) const { return (energy_< rhs.energy_); }
88 
90  double xPos() const { return position_.x(); }
91 
93  double yPos() const { return position_.y(); }
94 
96  double rho() const { return position_.rho(); }
97 
98  private:
99 
101  double energy_;
102 
105 
107  double emEnergy_;
108 
110  double hadEnergy_;
111 
113  double fem_;
114 
116  double depth_;
117 
119  double fhot_;
120 
123  };
124 
126  typedef std::vector<CastorTower> CastorTowerCollection;
127 
128  // persistent reference to CastorTower objects
130 
133 
136 
137 }
138 
139 #endif
double emEnergy() const
tower em energy
Definition: CastorTower.h:48
double emEnergy_
tower em energy
Definition: CastorTower.h:107
virtual ~CastorTower()
destructor
Definition: CastorTower.cc:21
double depth_
tower depth
Definition: CastorTower.h:116
double rho() const
rho of tower centroid
Definition: CastorTower.h:96
bool operator<=(const CastorTower &rhs) const
comparison &lt;= operator
Definition: CastorTower.h:84
double energy_
tower energy
Definition: CastorTower.h:101
virtual double energy() const final
energy
edm::Ref< CastorRecHitCollection > CastorRecHitRef
Definition: CastorTower.h:30
edm::Ref< CastorTowerCollection > CastorTowerRef
Definition: CastorTower.h:129
CastorRecHitRefs::iterator rechitsBegin() const
fist iterator over CastorRecHit constituents
Definition: CastorTower.h:66
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:255
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:250
CastorRecHitRefs usedRecHits_
references to CastorRecHit constituents
Definition: CastorTower.h:122
CastorTowerRefVector::iterator CastorTower_iterator
iterator over a vector of references to CastorTower objects all in the same collection ...
Definition: CastorTower.h:135
size_t rechitsSize() const
number of CastorRecHit constituents
Definition: CastorTower.h:72
double fem_
tower em/tot Ratio
Definition: CastorTower.h:113
double fem() const
tower em/tot ratio
Definition: CastorTower.h:54
void add(const CastorRecHitRef &rechit)
add reference to constituent CastorRecHit
Definition: CastorTower.h:75
double fhot_
tower hotcell/tot ratio
Definition: CastorTower.h:119
ROOT::Math::XYZPoint position_
tower centroid position
Definition: CastorTower.h:104
ROOT::Math::XYZPoint position() const
tower centroid position
Definition: CastorTower.h:45
CastorRecHitRefs getUsedRecHits() const
vector of used RecHits
Definition: CastorTower.h:63
edm::RefVector< CastorTowerCollection > CastorTowerRefVector
vector of references to CastorTower objects all in the same collection
Definition: CastorTower.h:132
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
bool operator>=(const CastorTower &rhs) const
comparison &gt;= operator
Definition: CastorTower.h:78
double fhot() const
tower hotcell/tot ratio
Definition: CastorTower.h:60
double depth() const
tower depth in z
Definition: CastorTower.h:57
double hadEnergy_
tower had energy
Definition: CastorTower.h:110
double hadEnergy() const
tower had energy
Definition: CastorTower.h:51
bool operator<(const CastorTower &rhs) const
comparison &lt;= operator
Definition: CastorTower.h:87
double yPos() const
y of tower centroid
Definition: CastorTower.h:93
double xPos() const
x of tower centroid
Definition: CastorTower.h:90
Transform3DPJ::Point XYZPoint
CastorRecHitRefs::iterator rechitsEnd() const
last iterator over CastorRecHit constituents
Definition: CastorTower.h:69
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:62
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
edm::SortedCollection< CastorRecHit > CastorRecHitCollection
Definition: CastorTower.h:29
bool operator>(const CastorTower &rhs) const
comparison &gt; operator
Definition: CastorTower.h:81
std::vector< CastorTower > CastorTowerCollection
collection of CastorTower objects
Definition: CastorTower.h:126
edm::RefVector< CastorRecHitCollection > CastorRecHitRefs
Definition: CastorTower.h:31