CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SuperCluster.h
Go to the documentation of this file.
1 #ifndef EgammaReco_SuperCluster_h
2 #define EgammaReco_SuperCluster_h
3 
17 
18 
19 namespace reco {
20  class SuperCluster : public CaloCluster {
21  public:
22 
24 
27 
29  SuperCluster( double energy, const Point& position );
30 
31  SuperCluster( double energy, const Point& position,
32  const CaloClusterPtr & seed,
33  const CaloClusterPtrVector& clusters,
34  double Epreshower=0.,
35  double phiWidth=0., double etaWidth=0. );
36 
37  // to be merged in the previous one? -- FIXME
38  SuperCluster( double energy, const Point& position,
39  const CaloClusterPtr & seed,
40  const CaloClusterPtrVector& clusters,
41  const CaloClusterPtrVector& preshowerClusters,
42  double Epreshower=0.,
43  double phiWidth=0., double etaWidth=0. );
44 
45 
47  double rawEnergy() const { return rawEnergy_; }
48 
50  double preshowerEnergy() const { return preshowerEnergy_; }
51 
53  double phiWidth() const { return phiWidth_; }
54  double etaWidth() const { return etaWidth_; }
55 
56  //Assign new variables to supercluster
58  void setPhiWidth( double pw ) { phiWidth_ = pw; }
59  void setEtaWidth( double ew ) { etaWidth_ = ew; }
60 
62  const CaloClusterPtr & seed() const { return seed_; }
63 
66 
69 
72 
75 
77  size_t clustersSize() const { return clusters_.size(); }
78 
80  //std::vector<DetId> getHitsByDetId() const { return usedHits_; }
81 
83  void setSeed( const CaloClusterPtr & r ) { seed_ = r; }
84 
86  void addCluster( const CaloClusterPtr & r ) {
87  clusters_.push_back( r );
89  }
90 
93 
100  void setPreshowerPlanesStatus(const uint32_t& status){
101  uint32_t flags = flags_ & flagsMask_;
102  flags_= flags | (status << flagsOffset_);
103  }
104 
110  const int getPreshowerPlanesStatus() const {
111  return (flags_>>flagsOffset_);
112  }
113 
114  private:
115 
116  void computeRawEnergy();
117 
120 
123 
126 
128  //std::vector<DetId> usedHits_;
129 
131 
132  double rawEnergy_;
133 
134  double phiWidth_;
135  double etaWidth_;
136 
137  };
138 
139 }
140 #endif
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
CaloCluster_iterator preshowerClustersBegin() const
fist iterator over PreshowerCluster constituents
Definition: SuperCluster.h:71
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:122
static const uint32_t flagsOffset_
Definition: CaloCluster.h:227
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:53
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:137
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:125
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:83
void setPhiWidth(double pw)
Definition: SuperCluster.h:58
const_iterator begin() const
Definition: PtrVector.h:126
double preshowerEnergy_
used hits by detId - retrieved from BC constituents – now inherited from CaloCluster ...
Definition: SuperCluster.h:130
CaloClusterPtr seed_
reference to BasicCluster seed
Definition: SuperCluster.h:119
void setEtaWidth(double ew)
Definition: SuperCluster.h:59
double etaWidth() const
Definition: SuperCluster.h:54
math::XYZPoint Point
uint32_t flags() const
Definition: CaloCluster.h:172
const_iterator end() const
Definition: PtrVector.h:131
double energy() const
cluster energy
Definition: CaloCluster.h:120
void setPreshowerPlanesStatus(const uint32_t &status)
Definition: SuperCluster.h:100
SuperCluster()
default constructor
Definition: SuperCluster.h:26
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:13
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:77
void addPreshowerCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:92
void addCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:86
math::XYZPoint Point
Definition: SuperCluster.h:23
static const uint32_t flagsMask_
Definition: CaloCluster.h:226
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:65
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:62
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:50
tuple status
Definition: ntuplemaker.py:245
const int getPreshowerPlanesStatus() const
Definition: SuperCluster.h:110
CaloCluster_iterator preshowerClustersEnd() const
last iterator over PreshowerCluster constituents
Definition: SuperCluster.h:74
void setPreshowerEnergy(double preshowerEnergy)
Definition: SuperCluster.h:57
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:68