CMS 3D CMS Logo

SuperCluster.h
Go to the documentation of this file.
1 #ifndef EgammaReco_SuperCluster_h
2 #define EgammaReco_SuperCluster_h
3 
16 
17 namespace reco {
18  class SuperCluster : public CaloCluster {
19  public:
21 
24  : CaloCluster(0., Point(0., 0., 0.)),
26  rawEnergy_(-1.),
27  phiWidth_(0),
28  etaWidth_(0),
30  preshowerEnergy2_(0) {}
31 
33  SuperCluster(double energy, const Point& position);
34 
35  SuperCluster(double energy,
36  const Point& position,
37  const CaloClusterPtr& seed,
39  double Epreshower = 0.,
40  double phiWidth = 0.,
41  double etaWidth = 0.,
42  double Epreshower1 = 0.,
43  double Epreshower2 = 0.);
44 
45  // to be merged in the previous one? -- FIXME
46  SuperCluster(double energy,
47  const Point& position,
48  const CaloClusterPtr& seed,
51  double Epreshower = 0.,
52  double phiWidth = 0.,
53  double etaWidth = 0.,
54  double Epreshower1 = 0.,
55  double Epreshower2 = 0.);
56 
58  double rawEnergy() const { return rawEnergy_; }
59 
61  double preshowerEnergy() const { return preshowerEnergy_; }
62  double preshowerEnergyPlane1() const { return preshowerEnergy1_; }
63  double preshowerEnergyPlane2() const { return preshowerEnergy2_; }
64 
66  double phiWidth() const { return phiWidth_; }
67  double etaWidth() const { return etaWidth_; }
68 
69  //Assign new variables to supercluster
71  void setPreshowerEnergyPlane1(double preshowerEnergy1) { preshowerEnergy1_ = preshowerEnergy1; };
72  void setPreshowerEnergyPlane2(double preshowerEnergy2) { preshowerEnergy2_ = preshowerEnergy2; };
73  void setPhiWidth(double pw) { phiWidth_ = pw; }
74  void setEtaWidth(double ew) { etaWidth_ = ew; }
75 
77  const CaloClusterPtr& seed() const { return seed_; }
78 
80  const CaloClusterPtrVector& clusters() const { return clusters_; }
81 
84 
87 
90 
93 
96 
98  size_t clustersSize() const { return clusters_.size(); }
99 
101  size_t preshowerClustersSize() const { return preshowerClusters_.size(); }
102 
104  //std::vector<DetId> getHitsByDetId() const { return usedHits_; }
105 
107  void setSeed(const CaloClusterPtr& r) { seed_ = r; }
108 
109  //(re)-set clusters
113  }
114 
115  //(re)-set preshower clusters
117 
118  //clear hits and fractions vector (for slimming)
120 
122  void addCluster(const CaloClusterPtr& r) {
125  }
126 
129 
136  void setPreshowerPlanesStatus(const uint32_t& status) {
137  uint32_t flags = flags_ & flagsMask_;
138  flags_ = flags | (status << flagsOffset_);
139  }
140 
146  const int getPreshowerPlanesStatus() const { return (flags_ >> flagsOffset_); }
147 
148  private:
149  void computeRawEnergy();
150 
153 
156 
159 
161  //std::vector<DetId> usedHits_;
162 
164 
165  double rawEnergy_;
166 
167  double phiWidth_;
168  double etaWidth_;
169 
172  };
173 
174 } // namespace reco
175 #endif
reco::SuperCluster::Point
math::XYZPoint Point
Definition: SuperCluster.h:20
reco::SuperCluster::setPreshowerClusters
void setPreshowerClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:116
edm::PtrVectorBase::size
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:73
reco::SuperCluster::clusters
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:80
reco::SuperCluster::clustersSize
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:98
reco::SuperCluster
Definition: SuperCluster.h:18
mps_update.status
status
Definition: mps_update.py:69
reco::SuperCluster::setEtaWidth
void setEtaWidth(double ew)
Definition: SuperCluster.h:74
edm::PtrVector::begin
const_iterator begin() const
Definition: PtrVector.h:144
edm::PtrVectorItr
Definition: PtrVector.h:51
reco::SuperCluster::setPreshowerPlanesStatus
void setPreshowerPlanesStatus(const uint32_t &status)
Definition: SuperCluster.h:136
reco::SuperCluster::SuperCluster
SuperCluster()
default constructor
Definition: SuperCluster.h:23
reco::SuperCluster::preshowerClustersSize
size_t preshowerClustersSize() const
number of BasicCluster PreShower constituents
Definition: SuperCluster.h:101
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::SuperCluster::setPreshowerEnergy
void setPreshowerEnergy(double preshowerEnergy)
Definition: SuperCluster.h:70
reco::SuperCluster::computeRawEnergy
void computeRawEnergy()
Definition: SuperCluster.cc:82
reco::CaloCluster::hitsAndFractions_
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:234
reco::CaloCluster::flagsMask_
static const uint32_t flagsMask_
Definition: CaloCluster.h:247
reco::SuperCluster::addCluster
void addCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:122
reco::SuperCluster::setSeed
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:107
reco::SuperCluster::preshowerEnergyPlane2
double preshowerEnergyPlane2() const
Definition: SuperCluster.h:63
reco::SuperCluster::preshowerClustersBegin
CaloCluster_iterator preshowerClustersBegin() const
fist iterator over PreshowerCluster constituents
Definition: SuperCluster.h:92
reco::CaloCluster::flags
uint32_t flags() const
Definition: CaloCluster.h:193
reco::CaloCluster::flagsOffset_
static const uint32_t flagsOffset_
Definition: CaloCluster.h:248
reco::SuperCluster::phiWidth
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:66
edm::PtrVector< CaloCluster >
reco::CaloCluster
Definition: CaloCluster.h:31
reco::SuperCluster::clusters_
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:155
CaloClusterFwd.h
reco::SuperCluster::setPreshowerEnergyPlane1
void setPreshowerEnergyPlane1(double preshowerEnergy1)
Definition: SuperCluster.h:71
edm::PtrVector::push_back
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:149
reco::SuperCluster::preshowerEnergyPlane1
double preshowerEnergyPlane1() const
Definition: SuperCluster.h:62
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::SuperCluster::seed
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
reco::SuperCluster::setClusters
void setClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:110
reco::SuperCluster::etaWidth_
double etaWidth_
Definition: SuperCluster.h:168
reco::SuperCluster::rawEnergy_
double rawEnergy_
Definition: SuperCluster.h:165
reco::SuperCluster::preshowerEnergy_
double preshowerEnergy_
used hits by detId - retrieved from BC constituents – now inherited from CaloCluster
Definition: SuperCluster.h:163
reco::SuperCluster::clustersBegin
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:86
edm::PtrVector::end
const_iterator end() const
Definition: PtrVector.h:146
reco::SuperCluster::addPreshowerCluster
void addPreshowerCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:128
reco::CaloCluster::position
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
edm::Ptr< CaloCluster >
alignCSCRings.r
r
Definition: alignCSCRings.py:93
reco::SuperCluster::phiWidth_
double phiWidth_
Definition: SuperCluster.h:167
reco::SuperCluster::setPreshowerEnergyPlane2
void setPreshowerEnergyPlane2(double preshowerEnergy2)
Definition: SuperCluster.h:72
reco::SuperCluster::preshowerEnergy
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:61
DetId.h
reco::SuperCluster::rawEnergy
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:58
reco::SuperCluster::clearHitsAndFractions
void clearHitsAndFractions()
Definition: SuperCluster.h:119
reco::SuperCluster::preshowerClustersEnd
CaloCluster_iterator preshowerClustersEnd() const
last iterator over PreshowerCluster constituents
Definition: SuperCluster.h:95
Point3D.h
reco::SuperCluster::setPhiWidth
void setPhiWidth(double pw)
Definition: SuperCluster.h:73
reco::SuperCluster::etaWidth
double etaWidth() const
Definition: SuperCluster.h:67
reco::SuperCluster::preshowerClusters_
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:158
reco::SuperCluster::getPreshowerPlanesStatus
const int getPreshowerPlanesStatus() const
Definition: SuperCluster.h:146
reco::SuperCluster::preshowerEnergy2_
double preshowerEnergy2_
Definition: SuperCluster.h:171
reco::SuperCluster::preshowerClusters
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:83
reco::SuperCluster::clustersEnd
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:89
reco::CaloCluster::flags_
uint32_t flags_
Definition: CaloCluster.h:245
reco::SuperCluster::seed_
CaloClusterPtr seed_
reference to BasicCluster seed
Definition: SuperCluster.h:152
reco::SuperCluster::preshowerEnergy1_
double preshowerEnergy1_
Definition: SuperCluster.h:170
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
CaloCluster.h