CMS 3D CMS Logo

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/HcalRecHitDefs.h"
23 
24 namespace reco {
25 
26  class CastorTower : public LeafCandidate {
27  public:
31 
32  // default constructor. Set energy and position to zero
33 
35  : energy_(0.),
36  position_(ROOT::Math::XYZPoint(0., 0., 0.)),
37  emEnergy_(0.),
38  hadEnergy_(0.),
39  fem_(0.),
40  depth_(0.),
41  fhot_(0.) {}
42 
43  // constructor from values
44  CastorTower(const double energy,
46  const double emEnergy,
47  const double hadEnergy,
48  const double fem,
49  const double depth,
50  const double fhot,
51  const CastorRecHitRefs& usedRecHits);
52 
54  ~CastorTower() override;
55 
58 
60  double emEnergy() const { return emEnergy_; }
61 
63  double hadEnergy() const { return hadEnergy_; }
64 
66  double fem() const { return fem_; }
67 
69  double depth() const { return depth_; }
70 
72  double fhot() const { return fhot_; }
73 
76 
79 
82 
84  size_t rechitsSize() const { return usedRecHits_.size(); }
85 
87  void add(const CastorRecHitRef& rechit) { usedRecHits_.push_back(rechit); }
88 
90  bool operator>=(const CastorTower& rhs) const { return (energy_ >= rhs.energy_); }
91 
93  bool operator>(const CastorTower& rhs) const { return (energy_ > rhs.energy_); }
94 
96  bool operator<=(const CastorTower& rhs) const { return (energy_ <= rhs.energy_); }
97 
99  bool operator<(const CastorTower& rhs) const { return (energy_ < rhs.energy_); }
100 
102  double xPos() const { return position_.x(); }
103 
105  double yPos() const { return position_.y(); }
106 
108  double rho() const { return position_.rho(); }
109 
110  private:
112  double energy_;
113 
116 
118  double emEnergy_;
119 
121  double hadEnergy_;
122 
124  double fem_;
125 
127  double depth_;
128 
130  double fhot_;
131 
134  };
135 
137  typedef std::vector<CastorTower> CastorTowerCollection;
138 
139  // persistent reference to CastorTower objects
141 
144 
147 
148 } // namespace reco
149 
150 #endif
RefProd.h
reco::CastorTower::emEnergy
double emEnergy() const
tower em energy
Definition: CastorTower.h:60
reco::CastorTower::operator>=
bool operator>=(const CastorTower &rhs) const
comparison >= operator
Definition: CastorTower.h:90
ROOT::Math::XYZPoint
Transform3DPJ::Point XYZPoint
Definition: Transform3DPJ.cc:33
reco::CastorTower::fhot_
double fhot_
tower hotcell/tot ratio
Definition: CastorTower.h:130
reco::CastorTower::hadEnergy
double hadEnergy() const
tower had energy
Definition: CastorTower.h:63
reco::CastorTower::depth
double depth() const
tower depth in z
Definition: CastorTower.h:69
edm::RefVector::begin
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223
edm::SortedCollection
Definition: SortedCollection.h:49
reco::CastorTowerRef
edm::Ref< CastorTowerCollection > CastorTowerRef
Definition: CastorTower.h:140
edm::RefVector< CastorRecHitCollection >
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
reco::CastorTower::hadEnergy_
double hadEnergy_
tower had energy
Definition: CastorTower.h:121
reco::CastorTower::usedRecHits_
CastorRecHitRefs usedRecHits_
references to CastorRecHit constituents
Definition: CastorTower.h:133
reco::CastorTower::add
void add(const CastorRecHitRef &rechit)
add reference to constituent CastorRecHit
Definition: CastorTower.h:87
reco::CastorTower::operator<
bool operator<(const CastorTower &rhs) const
comparison <= operator
Definition: CastorTower.h:99
reco::CastorTower::~CastorTower
~CastorTower() override
destructor
Definition: CastorTower.cc:27
edm::Ref
Definition: AssociativeIterator.h:58
reco::CastorTower::emEnergy_
double emEnergy_
tower em energy
Definition: CastorTower.h:118
reco::CastorTower_iterator
CastorTowerRefVector::iterator CastorTower_iterator
iterator over a vector of references to CastorTower objects all in the same collection
Definition: CastorTower.h:146
edm::RefVector::end
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:228
reco::CastorTower::rechitsSize
size_t rechitsSize() const
number of CastorRecHit constituents
Definition: CastorTower.h:84
reco::CastorTower::rho
double rho() const
rho of tower centroid
Definition: CastorTower.h:108
reco::CastorTower::xPos
double xPos() const
x of tower centroid
Definition: CastorTower.h:102
reco::CastorTower::operator<=
bool operator<=(const CastorTower &rhs) const
comparison <= operator
Definition: CastorTower.h:96
reco::CastorTower::fem
double fem() const
tower em/tot ratio
Definition: CastorTower.h:66
LeafCandidate.h
reco::CastorTower::rechitsEnd
CastorRecHitRefs::iterator rechitsEnd() const
last iterator over CastorRecHit constituents
Definition: CastorTower.h:81
reco::CastorTower::yPos
double yPos() const
y of tower centroid
Definition: CastorTower.h:105
reco::CastorTower::fhot
double fhot() const
tower hotcell/tot ratio
Definition: CastorTower.h:72
reco::CastorTower::CastorRecHitRef
edm::Ref< CastorRecHitCollection > CastorRecHitRef
Definition: CastorTower.h:29
reco::CastorTower::fem_
double fem_
tower em/tot Ratio
Definition: CastorTower.h:124
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::CastorTower::depth_
double depth_
tower depth
Definition: CastorTower.h:127
reco::CastorTower::position
ROOT::Math::XYZPoint position() const
tower centroid position
Definition: CastorTower.h:57
RefVector.h
reco::CastorTower::energy_
double energy_
tower energy
Definition: CastorTower.h:112
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
reco::CastorTower::position_
ROOT::Math::XYZPoint position_
tower centroid position
Definition: CastorTower.h:115
reco::CastorTower::rechitsBegin
CastorRecHitRefs::iterator rechitsBegin() const
fist iterator over CastorRecHit constituents
Definition: CastorTower.h:78
Ref.h
reco::CastorTower::CastorRecHitCollection
edm::SortedCollection< CastorRecHit > CastorRecHitCollection
Definition: CastorTower.h:28
reco::CastorTower::CastorRecHitRefs
edm::RefVector< CastorRecHitCollection > CastorRecHitRefs
Definition: CastorTower.h:30
SortedCollection.h
edm::RefVectorIterator
Definition: EDProductfwd.h:33
Point3D.h
reco::CastorTower
Definition: CastorTower.h:26
reco::LeafCandidate::energy
double energy() const final
energy
Definition: LeafCandidate.h:125
reco::CastorTower::getUsedRecHits
CastorRecHitRefs getUsedRecHits() const
vector of used RecHits
Definition: CastorTower.h:75
reco::LeafCandidate
Definition: LeafCandidate.h:16
CastorRecHit.h
reco::CastorTower::CastorTower
CastorTower()
Definition: CastorTower.h:34
reco::CastorTowerRefVector
edm::RefVector< CastorTowerCollection > CastorTowerRefVector
vector of references to CastorTower objects all in the same collection
Definition: CastorTower.h:143
edm::RefVector::size
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
reco::CastorTower::operator>
bool operator>(const CastorTower &rhs) const
comparison > operator
Definition: CastorTower.h:93
reco::CastorTowerCollection
std::vector< CastorTower > CastorTowerCollection
collection of CastorTower objects
Definition: CastorTower.h:137
ROOT
Definition: Transform3DPJ.h:35