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  double Epreshower1=0., double Epreshower2=0.);
37 
38  // to be merged in the previous one? -- FIXME
39  SuperCluster( double energy, const Point& position,
40  const CaloClusterPtr & seed,
41  const CaloClusterPtrVector& clusters,
42  const CaloClusterPtrVector& preshowerClusters,
43  double Epreshower=0.,
44  double phiWidth=0., double etaWidth=0.,
45  double Epreshower1=0., double Epreshower2=0.);
46 
47 
49  double rawEnergy() const { return rawEnergy_; }
50 
52  double preshowerEnergy() const { return preshowerEnergy_; }
53  double preshowerEnergyPlane1() const {return preshowerEnergy1_; }
54  double preshowerEnergyPlane2() const {return preshowerEnergy2_; }
55 
57  double phiWidth() const { return phiWidth_; }
58  double etaWidth() const { return etaWidth_; }
59 
60  //Assign new variables to supercluster
62  void setPreshowerEnergyPlane1( double preshowerEnergy1 ) { preshowerEnergy1_ = preshowerEnergy1; };
63  void setPreshowerEnergyPlane2( double preshowerEnergy2 ) { preshowerEnergy2_ = preshowerEnergy2; };
64  void setPhiWidth( double pw ) { phiWidth_ = pw; }
65  void setEtaWidth( double ew ) { etaWidth_ = ew; }
66 
68  const CaloClusterPtr & seed() const { return seed_; }
69 
72 
75 
78 
81 
83  size_t clustersSize() const { return clusters_.size(); }
84 
86  //std::vector<DetId> getHitsByDetId() const { return usedHits_; }
87 
89  void setSeed( const CaloClusterPtr & r ) { seed_ = r; }
90 
92  void addCluster( const CaloClusterPtr & r ) {
93  clusters_.push_back( r );
95  }
96 
99 
106  void setPreshowerPlanesStatus(const uint32_t& status){
107  uint32_t flags = flags_ & flagsMask_;
108  flags_= flags | (status << flagsOffset_);
109  }
110 
116  const int getPreshowerPlanesStatus() const {
117  return (flags_>>flagsOffset_);
118  }
119 
120  private:
121 
122  void computeRawEnergy();
123 
126 
129 
132 
134  //std::vector<DetId> usedHits_;
135 
137 
138  double rawEnergy_;
139 
140  double phiWidth_;
141  double etaWidth_;
142 
145  };
146 
147 }
148 #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:77
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:128
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:57
void setPreshowerEnergyPlane2(double preshowerEnergy2)
Definition: SuperCluster.h:63
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:137
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:131
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:89
void setPhiWidth(double pw)
Definition: SuperCluster.h:64
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:136
CaloClusterPtr seed_
reference to BasicCluster seed
Definition: SuperCluster.h:125
void setEtaWidth(double ew)
Definition: SuperCluster.h:65
double etaWidth() const
Definition: SuperCluster.h:58
double preshowerEnergyPlane1() const
Definition: SuperCluster.h:53
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:106
SuperCluster()
default constructor
Definition: SuperCluster.h:26
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:49
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:83
void addPreshowerCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:98
void addCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:92
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:71
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:68
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:52
tuple status
Definition: ntuplemaker.py:245
void setPreshowerEnergyPlane1(double preshowerEnergy1)
Definition: SuperCluster.h:62
const int getPreshowerPlanesStatus() const
Definition: SuperCluster.h:116
CaloCluster_iterator preshowerClustersEnd() const
last iterator over PreshowerCluster constituents
Definition: SuperCluster.h:80
double preshowerEnergyPlane2() const
Definition: SuperCluster.h:54
void setPreshowerEnergy(double preshowerEnergy)
Definition: SuperCluster.h:61
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:74