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 
19 
22 
23 namespace reco {
24 
25  class CastorTower : public LeafCandidate {
26  public:
27 
28  // default constructor. Set energy and position to zero
29 
30  CastorTower() : energy_(0.), position_(ROOT::Math::XYZPoint(0.,0.,0.)), emEnergy_(0.), hadEnergy_(0.), fem_(0.), depth_(0.), fhot_(0.) { }
31 
32  // constructor from values
33  CastorTower(const double energy, const ROOT::Math::XYZPoint& position, const double emEnergy, const double hadEnergy, const double fem,
34  const double depth, const double fhot, const CastorCellRefVector& usedCells);
35 
37  virtual ~CastorTower();
38 
40  double energy() const { return energy_; }
41 
44 
46  double emEnergy() const { return emEnergy_; }
47 
49  double hadEnergy() const { return hadEnergy_; }
50 
52  double fem() const { return fem_; }
53 
55  double depth() const { return depth_; }
56 
58  double fhot() const { return fhot_; }
59 
62 
65 
68 
70  size_t cellsSize() const { return usedCells_.size(); }
71 
73  void add( const CastorCellRef & cell ) { usedCells_.push_back( cell ); }
74 
76  bool operator >=(const CastorTower& rhs) const { return (energy_>=rhs.energy_); }
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  double eta() const { return position_.eta(); }
89 
91  double phi() const { return position_.phi(); }
92 
94  double x() const { return position_.x(); }
95 
97  double y() const { return position_.y(); }
98 
100  double rho() const { return position_.rho(); }
101 
102  private:
103 
105  double energy_;
106 
109 
111  double emEnergy_;
112 
114  double hadEnergy_;
115 
117  double fem_;
118 
120  double depth_;
121 
123  double fhot_;
124 
127  };
128 
130  typedef std::vector<CastorTower> CastorTowerCollection;
131 
132  // persistent reference to CastorTower objects
134 
137 
140 
141 }
142 
143 #endif
CastorCell_iterator cellsEnd() const
last iterator over CastorCell constituents
Definition: CastorTower.h:67
double emEnergy() const
tower em energy
Definition: CastorTower.h:46
double emEnergy_
tower em energy
Definition: CastorTower.h:111
double depth_
tower depth
Definition: CastorTower.h:120
virtual ~CastorTower()
destructor
Definition: CastorTower.cc:21
double rho() const
rho of tower centroid
Definition: CastorTower.h:100
bool operator<=(const CastorTower &rhs) const
comparison &lt;= operator
Definition: CastorTower.h:82
double energy_
tower energy
Definition: CastorTower.h:105
size_t cellsSize() const
number of CastorCell constituents
Definition: CastorTower.h:70
CastorCell_iterator cellsBegin() const
fist iterator over CastorCell constituents
Definition: CastorTower.h:64
edm::Ref< CastorTowerCollection > CastorTowerRef
Definition: CastorTower.h:133
CastorCellRefVector usedCells_
references to CastorCell constituents
Definition: CastorTower.h:126
double eta() const
pseudorapidity of tower centroid
Definition: CastorTower.h:88
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:242
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:237
double x() const
x of tower centroid
Definition: CastorTower.h:94
CastorTowerRefVector::iterator CastorTower_iterator
iterator over a vector of references to CastorTower objects all in the same collection ...
Definition: CastorTower.h:139
double fem_
tower em/tot Ratio
Definition: CastorTower.h:117
double fem() const
tower em/tot ratio
Definition: CastorTower.h:52
double fhot_
tower hotcell/tot ratio
Definition: CastorTower.h:123
CastorCellRefVector getUsedCells() const
vector of used Cells
Definition: CastorTower.h:61
ROOT::Math::XYZPoint position_
tower centroid position
Definition: CastorTower.h:108
double energy() const
tower energy
Definition: CastorTower.h:40
ROOT::Math::XYZPoint position() const
tower centroid position
Definition: CastorTower.h:43
edm::RefVector< CastorTowerCollection > CastorTowerRefVector
vector of references to CastorTower objects all in the same collection
Definition: CastorTower.h:136
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:76
double fhot() const
tower hotcell/tot ratio
Definition: CastorTower.h:58
double y() const
y of tower centroid
Definition: CastorTower.h:97
double depth() const
tower depth in z
Definition: CastorTower.h:55
double hadEnergy_
tower had energy
Definition: CastorTower.h:114
void add(const CastorCellRef &cell)
add reference to constituent CastorCell
Definition: CastorTower.h:73
double hadEnergy() const
tower had energy
Definition: CastorTower.h:49
bool operator<(const CastorTower &rhs) const
comparison &lt;= operator
Definition: CastorTower.h:85
Transform3DPJ::Point XYZPoint
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:61
size_type size() const
Size of the RefVector.
Definition: RefVector.h:85
bool operator>(const CastorTower &rhs) const
comparison &gt; operator
Definition: CastorTower.h:79
std::vector< CastorTower > CastorTowerCollection
collection of CastorTower objects
Definition: CastorTower.h:130
double phi() const
azimuthal angle of tower centroid
Definition: CastorTower.h:91