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,
49  const CaloClusterPtrVector& clusters,
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
110  void setClusters(const CaloClusterPtrVector& clusters) {
113  }
114 
115  //(re)-set preshower clusters
117 
118  //clear hits and fractions vector (for slimming)
120 
122  void addCluster(const CaloClusterPtr& r) {
123  clusters_.push_back(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
void setPreshowerClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:116
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:153
CaloCluster_iterator preshowerClustersBegin() const
fist iterator over PreshowerCluster constituents
Definition: SuperCluster.h:92
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:155
static const uint32_t flagsOffset_
Definition: CaloCluster.h:247
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:73
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:66
void setPreshowerEnergyPlane2(double preshowerEnergy2)
Definition: SuperCluster.h:72
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:149
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:158
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:107
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:80
void setPhiWidth(double pw)
Definition: SuperCluster.h:73
void setClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:110
const_iterator begin() const
Definition: PtrVector.h:144
double preshowerEnergy_
used hits by detId - retrieved from BC constituents – now inherited from CaloCluster ...
Definition: SuperCluster.h:163
CaloClusterPtr seed_
reference to BasicCluster seed
Definition: SuperCluster.h:152
void setEtaWidth(double ew)
Definition: SuperCluster.h:74
double etaWidth() const
Definition: SuperCluster.h:67
double preshowerEnergyPlane1() const
Definition: SuperCluster.h:62
uint32_t flags() const
Definition: CaloCluster.h:192
const_iterator end() const
Definition: PtrVector.h:146
double energy() const
cluster energy
Definition: CaloCluster.h:148
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:83
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:233
void setPreshowerPlanesStatus(const uint32_t &status)
Definition: SuperCluster.h:136
void clearHitsAndFractions()
Definition: SuperCluster.h:119
SuperCluster()
default constructor
Definition: SuperCluster.h:23
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:58
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:98
void addPreshowerCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:128
void addCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:122
math::XYZPoint Point
Definition: SuperCluster.h:20
fixed size matrix
static const uint32_t flagsMask_
Definition: CaloCluster.h:246
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:86
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:61
void setPreshowerEnergyPlane1(double preshowerEnergy1)
Definition: SuperCluster.h:71
const int getPreshowerPlanesStatus() const
Definition: SuperCluster.h:146
CaloCluster_iterator preshowerClustersEnd() const
last iterator over PreshowerCluster constituents
Definition: SuperCluster.h:95
double preshowerEnergyPlane2() const
Definition: SuperCluster.h:63
void setPreshowerEnergy(double preshowerEnergy)
Definition: SuperCluster.h:70
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:89
size_t preshowerClustersSize() const
number of BasicCluster PreShower constituents
Definition: SuperCluster.h:101