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 
18 namespace reco {
19  class SuperCluster : public CaloCluster {
20  public:
22 
25 
27  SuperCluster( double energy, const Point& position );
28 
29  SuperCluster( double energy, const Point& position,
30  const CaloClusterPtr & seed,
32  double Epreshower=0.,
33  double phiWidth=0., double etaWidth=0.,
34  double Epreshower1=0., double Epreshower2=0.);
35 
36  // to be merged in the previous one? -- FIXME
37  SuperCluster( double energy, const Point& position,
38  const CaloClusterPtr & seed,
39  const CaloClusterPtrVector& clusters,
41  double Epreshower=0.,
42  double phiWidth=0., double etaWidth=0.,
43  double Epreshower1=0., double Epreshower2=0.);
44 
45 
47  double rawEnergy() const { return rawEnergy_; }
48 
50  double preshowerEnergy() const { return preshowerEnergy_; }
51  double preshowerEnergyPlane1() const {return preshowerEnergy1_; }
52  double preshowerEnergyPlane2() const {return preshowerEnergy2_; }
53 
55  double phiWidth() const { return phiWidth_; }
56  double etaWidth() const { return etaWidth_; }
57 
58  //Assign new variables to supercluster
60  void setPreshowerEnergyPlane1( double preshowerEnergy1 ) { preshowerEnergy1_ = preshowerEnergy1; };
61  void setPreshowerEnergyPlane2( double preshowerEnergy2 ) { preshowerEnergy2_ = preshowerEnergy2; };
62  void setPhiWidth( double pw ) { phiWidth_ = pw; }
63  void setEtaWidth( double ew ) { etaWidth_ = ew; }
64 
66  const CaloClusterPtr & seed() const { return seed_; }
67 
69  const CaloClusterPtrVector& clusters() const { return clusters_; }
70 
73 
76 
79 
82 
85 
87  size_t clustersSize() const { return clusters_.size(); }
88 
90  size_t preshowerClustersSize() const { return preshowerClusters_.size(); }
91 
93  //std::vector<DetId> getHitsByDetId() const { return usedHits_; }
94 
96  void setSeed( const CaloClusterPtr & r ) { seed_ = r; }
97 
98  //(re)-set clusters
99  void setClusters(const CaloClusterPtrVector &clusters) {
102  }
103 
104  //(re)-set preshower clusters
106 
107  //clear hits and fractions vector (for slimming)
109 
111  void addCluster( const CaloClusterPtr & r ) {
112  clusters_.push_back( r );
114  }
115 
118 
125  void setPreshowerPlanesStatus(const uint32_t& status){
126  uint32_t flags = flags_ & flagsMask_;
127  flags_= flags | (status << flagsOffset_);
128  }
129 
135  const int getPreshowerPlanesStatus() const {
136  return (flags_>>flagsOffset_);
137  }
138 
139  private:
140 
141  void computeRawEnergy();
142 
145 
148 
151 
153  //std::vector<DetId> usedHits_;
154 
156 
157  double rawEnergy_;
158 
159  double phiWidth_;
160  double etaWidth_;
161 
164  };
165 
166 }
167 #endif
void setPreshowerClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:105
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:129
CaloCluster_iterator preshowerClustersBegin() const
fist iterator over PreshowerCluster constituents
Definition: SuperCluster.h:81
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:147
static const uint32_t flagsOffset_
Definition: CaloCluster.h:235
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:74
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:55
void setPreshowerEnergyPlane2(double preshowerEnergy2)
Definition: SuperCluster.h:61
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:140
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:150
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:221
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:96
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:69
void setPhiWidth(double pw)
Definition: SuperCluster.h:62
void setClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:99
const_iterator begin() const
Definition: PtrVector.h:129
double preshowerEnergy_
used hits by detId - retrieved from BC constituents – now inherited from CaloCluster ...
Definition: SuperCluster.h:155
CaloClusterPtr seed_
reference to BasicCluster seed
Definition: SuperCluster.h:144
void setEtaWidth(double ew)
Definition: SuperCluster.h:63
double etaWidth() const
Definition: SuperCluster.h:56
double preshowerEnergyPlane1() const
Definition: SuperCluster.h:51
uint32_t flags() const
Definition: CaloCluster.h:178
const_iterator end() const
Definition: PtrVector.h:134
double energy() const
cluster energy
Definition: CaloCluster.h:124
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:72
void setPreshowerPlanesStatus(const uint32_t &status)
Definition: SuperCluster.h:125
void clearHitsAndFractions()
Definition: SuperCluster.h:108
SuperCluster()
default constructor
Definition: SuperCluster.h:24
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:47
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:87
void addPreshowerCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:117
void addCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:111
math::XYZPoint Point
Definition: SuperCluster.h:21
fixed size matrix
static const uint32_t flagsMask_
Definition: CaloCluster.h:234
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:75
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:50
void setPreshowerEnergyPlane1(double preshowerEnergy1)
Definition: SuperCluster.h:60
const int getPreshowerPlanesStatus() const
Definition: SuperCluster.h:135
CaloCluster_iterator preshowerClustersEnd() const
last iterator over PreshowerCluster constituents
Definition: SuperCluster.h:84
double preshowerEnergyPlane2() const
Definition: SuperCluster.h:52
void setPreshowerEnergy(double preshowerEnergy)
Definition: SuperCluster.h:59
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:78
size_t preshowerClustersSize() const
number of BasicCluster PreShower constituents
Definition: SuperCluster.h:90