CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CastorCluster.h
Go to the documentation of this file.
1 #ifndef CastorReco_CastorCluster_h
2 #define CastorReco_CastorCluster_h
3 
12 #include <vector>
13 #include <memory>
15 
19 
21 
22 namespace reco {
23 
24  class CastorCluster {
25  public:
26 
28  CastorCluster() : energy_(0.), position_(ROOT::Math::XYZPoint(0.,0.,0.)), emEnergy_(0.), hadEnergy_(0.), fem_(0.), width_(0.),
29  depth_(0.), fhot_(0.), sigmaz_(0.) { }
30 
32  CastorCluster(const double energy, const ROOT::Math::XYZPoint& position, const double emEnergy, const double hadEnergy, const double fem,
33  const double width, const double depth, const double fhot, const double sigmaz, const CastorTowerRefVector& usedTowers);
34 
35 
37  virtual ~CastorCluster();
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 width() const { return width_; }
56 
58  double depth() const { return depth_; }
59 
61  double fhot() const { return fhot_; }
62 
64  double sigmaz() const { return sigmaz_; }
65 
68 
71 
74 
76  size_t towersSize() const { return usedTowers_.size(); }
77 
79  void add( const CastorTowerRef & tower ) { usedTowers_.push_back( tower ); }
80 
82  bool operator >=(const CastorCluster& rhs) const { return (energy_>=rhs.energy_); }
83 
85  bool operator > (const CastorCluster& rhs) const { return (energy_> rhs.energy_); }
86 
88  bool operator <=(const CastorCluster& rhs) const { return (energy_<=rhs.energy_); }
89 
91  bool operator < (const CastorCluster& 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 width_;
127 
129  double depth_;
130 
132  double fhot_;
133 
135  double sigmaz_;
136 
139  };
140 
142  typedef std::vector<CastorCluster> CastorClusterCollection;
143 
144  // persistent reference to CastorCluster objects
146 
149 
152 }
153 
154 #endif
double depth() const
cluster depth in z
Definition: CastorCluster.h:58
virtual ~CastorCluster()
destructor
double emEnergy() const
cluster em energy
Definition: CastorCluster.h:46
void add(const CastorTowerRef &tower)
add reference to constituent CastorTower
Definition: CastorCluster.h:79
CastorTowerRefVector usedTowers_
references to CastorTower constituents
double width_
cluster width
double y() const
y of cluster centroid
edm::RefVector< CastorClusterCollection > CastorClusterRefVector
vector of references to CastorCluster objects all in the same collection
CastorCluster()
default constructor. Sets energy and position to zero
Definition: CastorCluster.h:28
double phi() const
azimuthal angle of cluster centroid
Definition: CastorCluster.h:97
std::vector< CastorCluster > CastorClusterCollection
collection of CastorCluster objects
double sigmaz() const
cluster sigma z
Definition: CastorCluster.h:64
double sigmaz_
cluster sigma z
CastorTower_iterator towersEnd() const
last iterator over CastorTower constituents
Definition: CastorCluster.h:73
double fhot() const
cluster hotcell/tot ratio
Definition: CastorCluster.h:61
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:255
CastorTower_iterator towersBegin() const
fist iterator over CastorTower constituents
Definition: CastorCluster.h:70
double energy_
cluster energy
double width() const
cluster width in phi
Definition: CastorCluster.h:55
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:250
bool operator<=(const CastorCluster &rhs) const
comparison &lt;= operator
Definition: CastorCluster.h:88
double eta() const
pseudorapidity of cluster centroid
Definition: CastorCluster.h:94
edm::Ref< CastorClusterCollection > CastorClusterRef
CastorClusterRefVector::iterator CastorCluster_iterator
iterator over a vector of references to CastorCluster objects all in the same collection ...
double depth_
cluster depth
double fem_
cluster em/tot Ratio
ROOT::Math::XYZPoint position_
cluster centroid position
double fem() const
cluster em/tot ratio
Definition: CastorCluster.h:52
double emEnergy_
cluster em energy
double energy() const
cluster energy
Definition: CastorCluster.h:40
size_t towersSize() const
number of CastorTower constituents
Definition: CastorCluster.h:76
bool operator>(const CastorCluster &rhs) const
comparison &gt; operator
Definition: CastorCluster.h:85
ROOT::Math::XYZPoint position() const
cluster centroid position
Definition: CastorCluster.h:43
CastorTowerRefVector getUsedTowers() const
vector of used Towers
Definition: CastorCluster.h:67
double x() const
x of cluster centroid
bool operator<(const CastorCluster &rhs) const
comparison &lt;= operator
Definition: CastorCluster.h:91
double hadEnergy_
cluster had energy
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
double rho() const
rho of cluster centroid
double hadEnergy() const
cluster had energy
Definition: CastorCluster.h:49
Transform3DPJ::Point XYZPoint
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
double fhot_
cluster hotcell/tot ratio
bool operator>=(const CastorCluster &rhs) const
comparison &gt;= operator
Definition: CastorCluster.h:82