CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
SuperClusterHelper.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatAlgos_interface_SuperClusterHelper_h
2 #define PhysicsTools_PatAlgos_interface_SuperClusterHelper_h
3 
11 
13 public:
16  const CaloTopology*,
17  const CaloGeometry*);
20  const CaloTopology*,
21  const CaloGeometry*);
23 
24  float rawEnergy() const { return theSuperCluster_->rawEnergy(); }
25  float eta() const { return theSuperCluster_->eta(); }
26  float phi() const { return theSuperCluster_->phi(); }
27  float etaWidth() const { return theSuperCluster_->etaWidth(); }
28  float phiWidth() const { return theSuperCluster_->phiWidth(); }
29  float clustersSize() const { return theSuperCluster_->clustersSize(); }
30  float hadronicOverEm() const { return theElectron_->hadronicOverEm(); }
31  float sigmaIetaIeta() const { return theElectron_->sigmaIetaIeta(); }
32  float preshowerEnergy() const { return theSuperCluster_->preshowerEnergy(); }
34  float e3x3() const { return EcalClusterTools::e3x3(*seedCluster_, rechits_, topology_); }
36  float eMax() const { return EcalClusterTools::eMax(*seedCluster_, rechits_); }
37  float e2nd() const { return EcalClusterTools::e2nd(*seedCluster_, rechits_); }
42  float e2x5Max() const { return EcalClusterTools::e2x5Max(*seedCluster_, rechits_, topology_); }
47  float r9() const { //std::cout << " E3x3 " << e3x3() << " raw " << theSuperCluster_->rawEnergy() << std::endl;
48  return e3x3() / theSuperCluster_->rawEnergy();
49  }
50  float spp();
51  float sep();
52  float seedEta() const { return seedCluster_->eta(); }
53  float seedPhi() const { return seedCluster_->phi(); }
54  float seedEnergy() const { return seedCluster_->energy(); }
55  int ietaSeed() {
57  return ietaSeed_;
58  }
59  int iphiSeed() {
61  return iphiSeed_;
62  }
63  float etaCrySeed() {
65  return etaCrySeed_;
66  }
67  float phiCrySeed() {
69  return phiCrySeed_;
70  }
71  float thetaTilt() {
73  return thetaTilt_;
74  }
75  float phiTilt() {
77  return phiTilt_;
78  }
79 
80  // i=1,2,3 (0 would be the seed)
81  float subClusterEnergy(unsigned i) const;
82  float subClusterEta(unsigned i) const;
83  float subClusterPhi(unsigned i) const;
84  float subClusterEmax(unsigned i) const;
85  float subClusterE3x3(unsigned i) const;
86  // does not include the seed energy
87  float eSubClusters() const { return eSubClusters_; }
88 
89  float esClusterEnergy(unsigned i) const;
90  float esClusterEta(unsigned i) const;
91  float esClusterPhi(unsigned i) const;
92 
93  float nPreshowerClusters() const { return nESClusters_; }
94  float eESClusters() const { return eESClusters_; }
95 
96 private:
99  std::vector<const reco::CaloCluster*> theBasicClusters_;
100  std::vector<const reco::CaloCluster*> theESClusters_;
105  bool barrel_;
106 
110  float spp_;
111  float sep_;
114  int ietaSeed_; // ix in the endcaps
115  int iphiSeed_; // iy in the endcaps
116  float etaCrySeed_;
117  float phiCrySeed_;
118  float thetaTilt_;
119  float phiTilt_;
120  unsigned nBasicClusters_;
121  unsigned nESClusters_;
124 
125 private:
127  void localCoordinates();
128 
129  static bool sortClusters(const reco::CaloCluster* c1, const reco::CaloCluster* c2) {
130  return (c1->energy() > c2->energy());
131  }
132 };
133 
134 #endif
static bool sortClusters(const reco::CaloCluster *c1, const reco::CaloCluster *c2)
float subClusterPhi(unsigned i) const
std::vector< const reco::CaloCluster * > theESClusters_
float subClusterEnergy(unsigned i) const
float preshowerEnergy() const
std::vector< const reco::CaloCluster * > theBasicClusters_
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:60
float sigmaIetaIeta() const
Definition: GsfElectron.h:419
float e2x5Left() const
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:183
float sigmaIetaIeta() const
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:68
SuperClusterHelper(const reco::GsfElectron *electron, const EcalRecHitCollection *rechits, const CaloTopology *, const CaloGeometry *)
const CaloTopology * topology_
float seedEnergy() const
float hadronicOverEm() const
float esClusterPhi(unsigned i) const
float nPreshowerClusters() const
float esClusterEnergy(unsigned i) const
const reco::CaloCluster * seedCluster_
float preshowerEnergyOverRaw() const
float etaWidth() const
const reco::SuperCluster * theSuperCluster_
const EcalRecHitCollection * rechits_
float esClusterEta(unsigned i) const
double energy() const
cluster energy
Definition: CaloCluster.h:148
const CaloGeometry * geometry_
double etaWidth() const
Definition: SuperCluster.h:69
float clustersSize() const
float eSubClusters() const
float rawEnergy() const
bool localCoordinatesComputed_
local coordinates
Analysis-level electron class.
Definition: Electron.h:51
float phiWidth() const
float eESClusters() const
float subClusterE3x3(unsigned i) const
float e2x5Right() const
const reco::GsfElectron * theElectron_
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:180
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:100
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:63
float hadronicOverEm() const
Definition: GsfElectron.h:500
float subClusterEmax(unsigned i) const
float subClusterEta(unsigned i) const
float e2x5Bottom() const