CMS 3D CMS Logo

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_); }
35  float e5x5() const { return EcalClusterTools::e5x5(*seedCluster_, rechits_, topology_); }
36  float eMax() const { return EcalClusterTools::eMax(*seedCluster_, rechits_); }
37  float e2nd() const { return EcalClusterTools::e2nd(*seedCluster_, rechits_); }
38  float eTop() const { return EcalClusterTools::eTop(*seedCluster_, rechits_, topology_); }
39  float eBottom() const { return EcalClusterTools::eBottom(*seedCluster_, rechits_, topology_); }
40  float eLeft() const { return EcalClusterTools::eLeft(*seedCluster_, rechits_, topology_); }
41  float eRight() const { return EcalClusterTools::eRight(*seedCluster_, rechits_, topology_); }
42  float e2x5Max() const { return EcalClusterTools::e2x5Max(*seedCluster_, rechits_, topology_); }
43  float e2x5Top() const { return EcalClusterTools::e2x5Top(*seedCluster_, rechits_, topology_); }
44  float e2x5Bottom() const { return EcalClusterTools::e2x5Bottom(*seedCluster_, rechits_, topology_); }
45  float e2x5Left() const { return EcalClusterTools::e2x5Left(*seedCluster_, rechits_, topology_); }
46  float e2x5Right() const { return EcalClusterTools::e2x5Right(*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
SuperClusterHelper::nESClusters_
unsigned nESClusters_
Definition: SuperClusterHelper.h:121
reco::CaloCluster::phi
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:184
SuperClusterHelper::localCoordinatesComputed_
bool localCoordinatesComputed_
local coordinates
Definition: SuperClusterHelper.h:113
SuperClusterHelper::phi
float phi() const
Definition: SuperClusterHelper.h:26
SuperClusterHelper::sigmaIetaIeta
float sigmaIetaIeta() const
Definition: SuperClusterHelper.h:31
SuperClusterHelper::ietaSeed_
int ietaSeed_
Definition: SuperClusterHelper.h:114
SuperClusterHelper::nBasicClusters_
unsigned nBasicClusters_
Definition: SuperClusterHelper.h:120
mps_fire.i
i
Definition: mps_fire.py:428
SuperClusterHelper::e2x5Right
float e2x5Right() const
Definition: SuperClusterHelper.h:46
SuperClusterHelper::seedCluster_
const reco::CaloCluster * seedCluster_
Definition: SuperClusterHelper.h:101
SuperClusterHelper::spp
float spp()
Definition: SuperClusterHelper.cc:124
SuperClusterHelper::subClusterE3x3
float subClusterE3x3(unsigned i) const
Definition: SuperClusterHelper.cc:164
SuperClusterHelper::covComputed_
bool covComputed_
Definition: SuperClusterHelper.h:109
SuperClusterHelper::etaWidth
float etaWidth() const
Definition: SuperClusterHelper.h:27
reco::SuperCluster::clustersSize
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:98
SuperClusterHelper::theESClusters_
std::vector< const reco::CaloCluster * > theESClusters_
Definition: SuperClusterHelper.h:100
reco::SuperCluster
Definition: SuperCluster.h:18
BasicCluster.h
SuperClusterHelper::eRight
float eRight() const
Definition: SuperClusterHelper.h:41
SuperClusterHelper::hadronicOverEm
float hadronicOverEm() const
Definition: SuperClusterHelper.h:30
SuperClusterHelper::thetaTilt
float thetaTilt()
Definition: SuperClusterHelper.h:71
SuperClusterHelper::seedEnergy
float seedEnergy() const
Definition: SuperClusterHelper.h:54
SuperClusterHelper::computeLocalCovariances
void computeLocalCovariances()
Definition: SuperClusterHelper.cc:105
SuperClusterHelper::e2x5Max
float e2x5Max() const
Definition: SuperClusterHelper.h:42
SuperClusterHelper::esClusterPhi
float esClusterPhi(unsigned i) const
Definition: SuperClusterHelper.cc:176
SuperClusterHelper::geometry_
const CaloGeometry * geometry_
Definition: SuperClusterHelper.h:104
edm::SortedCollection< EcalRecHit >
SuperClusterHelper::~SuperClusterHelper
~SuperClusterHelper()
Definition: SuperClusterHelper.h:22
SuperClusterHelper::eESClusters_
float eESClusters_
Definition: SuperClusterHelper.h:123
SuperClusterHelper::sortClusters
static bool sortClusters(const reco::CaloCluster *c1, const reco::CaloCluster *c2)
Definition: SuperClusterHelper.h:129
SuperClusterHelper::nPreshowerClusters
float nPreshowerClusters() const
Definition: SuperClusterHelper.h:93
reco::GsfElectron::hadronicOverEm
float hadronicOverEm() const
Definition: GsfElectron.h:475
SuperClusterHelper::sep
float sep()
Definition: SuperClusterHelper.cc:129
SuperClusterHelper::iphiSeed
int iphiSeed()
Definition: SuperClusterHelper.h:59
SuperClusterHelper::subClusterEnergy
float subClusterEnergy(unsigned i) const
Definition: SuperClusterHelper.cc:148
CaloTopology
Definition: CaloTopology.h:19
SuperClusterHelper::theSuperCluster_
const reco::SuperCluster * theSuperCluster_
Definition: SuperClusterHelper.h:98
EcalRecHitCollections.h
SuperClusterHelper::eMax
float eMax() const
Definition: SuperClusterHelper.h:36
CaloGeometry
Definition: CaloGeometry.h:21
SuperClusterHelper::eESClusters
float eESClusters() const
Definition: SuperClusterHelper.h:94
reco::SuperCluster::phiWidth
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:66
SuperClusterHelper::phiCrySeed_
float phiCrySeed_
Definition: SuperClusterHelper.h:117
SuperClusterHelper::thetaTilt_
float thetaTilt_
Definition: SuperClusterHelper.h:118
reco::CaloCluster
Definition: CaloCluster.h:31
SuperClusterHelper::clustersSize
float clustersSize() const
Definition: SuperClusterHelper.h:29
SuperClusterHelper::e2x5Bottom
float e2x5Bottom() const
Definition: SuperClusterHelper.h:44
metsig::electron
Definition: SignAlgoResolutions.h:48
SuperClusterHelper::eSubClusters_
float eSubClusters_
Definition: SuperClusterHelper.h:122
HI_PhotonSkim_cff.rechits
rechits
Definition: HI_PhotonSkim_cff.py:76
SuperClusterHelper::SuperClusterHelper
SuperClusterHelper(const reco::GsfElectron *electron, const EcalRecHitCollection *rechits, const CaloTopology *, const CaloGeometry *)
Definition: SuperClusterHelper.cc:6
reco::GsfElectron
Definition: GsfElectron.h:34
SuperClusterHelper::e2nd
float e2nd() const
Definition: SuperClusterHelper.h:37
GsfElectron.h
SuperClusterHelper::rawEnergy
float rawEnergy() const
Definition: SuperClusterHelper.h:24
SuperClusterHelper::phiWidth
float phiWidth() const
Definition: SuperClusterHelper.h:28
SuperClusterHelper::esClusterEta
float esClusterEta(unsigned i) const
Definition: SuperClusterHelper.cc:172
SuperClusterHelper::e2x5Top
float e2x5Top() const
Definition: SuperClusterHelper.h:43
SuperClusterHelper::theElectron_
const reco::GsfElectron * theElectron_
Definition: SuperClusterHelper.h:97
SuperClusterHelper::rechits_
const EcalRecHitCollection * rechits_
Definition: SuperClusterHelper.h:102
SuperClusterHelper::eSubClusters
float eSubClusters() const
Definition: SuperClusterHelper.h:87
SuperClusterHelper::eta
float eta() const
Definition: SuperClusterHelper.h:25
reco::CaloCluster::eta
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:181
SuperClusterHelper::e2x5Left
float e2x5Left() const
Definition: SuperClusterHelper.h:45
cosmicPhotonAnalyzer_cfi.eMax
eMax
Definition: cosmicPhotonAnalyzer_cfi.py:10
EcalClusterTools.h
SuperClusterHelper::phiCrySeed
float phiCrySeed()
Definition: SuperClusterHelper.h:67
SuperClusterHelper::phiTilt
float phiTilt()
Definition: SuperClusterHelper.h:75
SuperClusterHelper::seedEta
float seedEta() const
Definition: SuperClusterHelper.h:52
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
SuperClusterHelper::preshowerEnergyOverRaw
float preshowerEnergyOverRaw() const
Definition: SuperClusterHelper.h:33
SuperClusterHelper::esClusterEnergy
float esClusterEnergy(unsigned i) const
Definition: SuperClusterHelper.cc:168
SuperClusterHelper::preshowerEnergy
float preshowerEnergy() const
Definition: SuperClusterHelper.h:32
SuperClusterHelper::spp_
float spp_
Definition: SuperClusterHelper.h:110
SuperClusterHelper::ietaSeed
int ietaSeed()
Definition: SuperClusterHelper.h:55
SuperClusterHelper::sep_
float sep_
Definition: SuperClusterHelper.h:111
SuperClusterHelper::theBasicClusters_
std::vector< const reco::CaloCluster * > theBasicClusters_
Definition: SuperClusterHelper.h:99
SuperClusterHelper
Definition: SuperClusterHelper.h:12
reco::GsfElectron::sigmaIetaIeta
float sigmaIetaIeta() const
Definition: GsfElectron.h:418
SuperClusterHelper::localCoordinates
void localCoordinates()
Definition: SuperClusterHelper.cc:134
CaloSubdetectorTopology.h
SuperClusterHelper::subClusterEmax
float subClusterEmax(unsigned i) const
Definition: SuperClusterHelper.cc:160
reco::SuperCluster::preshowerEnergy
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:61
SuperClusterHelper::subClusterPhi
float subClusterPhi(unsigned i) const
Definition: SuperClusterHelper.cc:156
reco::SuperCluster::rawEnergy
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:58
CaloGeometry.h
SuperClusterHelper::e5x5
float e5x5() const
Definition: SuperClusterHelper.h:35
reco::SuperCluster::etaWidth
double etaWidth() const
Definition: SuperCluster.h:67
SuperClusterHelper::barrel_
bool barrel_
Definition: SuperClusterHelper.h:105
SuperClusterHelper::topology_
const CaloTopology * topology_
Definition: SuperClusterHelper.h:103
SuperClusterHelper::eTop
float eTop() const
Definition: SuperClusterHelper.h:38
Electron.h
SuperClusterHelper::phiTilt_
float phiTilt_
Definition: SuperClusterHelper.h:119
SuperClusterHelper::iphiSeed_
int iphiSeed_
Definition: SuperClusterHelper.h:115
pat::Electron
Analysis-level electron class.
Definition: Electron.h:51
SuperClusterHelper::etaCrySeed
float etaCrySeed()
Definition: SuperClusterHelper.h:63
SuperClusterHelper::subClusterEta
float subClusterEta(unsigned i) const
Definition: SuperClusterHelper.cc:152
SuperClusterHelper::eBottom
float eBottom() const
Definition: SuperClusterHelper.h:39
SuperClusterHelper::r9
float r9() const
Definition: SuperClusterHelper.h:47
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
SuperClusterHelper::seedPhi
float seedPhi() const
Definition: SuperClusterHelper.h:53
SuperClusterHelper::eLeft
float eLeft() const
Definition: SuperClusterHelper.h:40
SuperClusterHelper::e3x3
float e3x3() const
Definition: SuperClusterHelper.h:34
SuperClusterHelper::etaCrySeed_
float etaCrySeed_
Definition: SuperClusterHelper.h:116