CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
12 
13 
15  public:
17  SuperClusterHelper(const pat::Electron * electron, const EcalRecHitCollection * rechits, const CaloTopology*, const CaloGeometry* );
19 
20  float rawEnergy() const {return theSuperCluster_->rawEnergy();}
21  float eta() const {return theSuperCluster_->eta();}
22  float phi() const {return theSuperCluster_->phi();}
23  float etaWidth() const {return theSuperCluster_->etaWidth();}
24  float phiWidth() const {return theSuperCluster_->phiWidth();}
25  float clustersSize() const {return theSuperCluster_->clustersSize();}
26  float hadronicOverEm() const {return theElectron_->hadronicOverEm();}
27  float sigmaIetaIeta() const {return theElectron_->sigmaIetaIeta();}
32  float eMax() const { return EcalClusterTools::eMax(*seedCluster_,rechits_); }
33  float e2nd() const { return EcalClusterTools::e2nd(*seedCluster_,rechits_); }
43  float r9() const { //std::cout << " E3x3 " << e3x3() << " raw " << theSuperCluster_->rawEnergy() << std::endl;
44  return e3x3()/theSuperCluster_->rawEnergy();}
45  float spp();
46  float sep();
47  float seedEta() const { return seedCluster_->eta(); }
48  float seedPhi() const { return seedCluster_->phi(); }
49  float seedEnergy()const { return seedCluster_->energy();}
50  int ietaSeed() { localCoordinates(); return ietaSeed_;}
51  int iphiSeed() { localCoordinates(); return iphiSeed_;}
52  float etaCrySeed() { localCoordinates(); return etaCrySeed_;}
53  float phiCrySeed() { localCoordinates(); return phiCrySeed_;}
54  float thetaTilt() { localCoordinates(); return thetaTilt_;}
55  float phiTilt() {localCoordinates(); return phiTilt_;}
56 
57  // i=1,2,3 (0 would be the seed)
58  float subClusterEnergy(unsigned i) const;
59  float subClusterEta(unsigned i) const;
60  float subClusterPhi(unsigned i) const;
61  float subClusterEmax(unsigned i) const;
62  float subClusterE3x3(unsigned i) const;
63  // does not include the seed energy
64  float eSubClusters() const {return eSubClusters_;}
65 
66  float esClusterEnergy(unsigned i) const;
67  float esClusterEta(unsigned i) const;
68  float esClusterPhi(unsigned i) const;
69 
70  float nPreshowerClusters() const { return nESClusters_;}
71  float eESClusters() const { return eESClusters_;}
72 
73  private:
76  std::vector<const reco::CaloCluster*> theBasicClusters_;
77  std::vector<const reco::CaloCluster*> theESClusters_;
83  bool barrel_;
84 
85 
89  std::vector<float> vCov_;
90  float spp_;
91  float sep_;
94  int ietaSeed_; // ix in the endcaps
95  int iphiSeed_; // iy in the endcaps
96  float etaCrySeed_;
97  float phiCrySeed_;
98  float thetaTilt_;
99  float phiTilt_;
100  unsigned nBasicClusters_;
101  unsigned nESClusters_;
104 
105  private:
107  void localCoordinates();
108 
109  static bool sortClusters(const reco::CaloCluster* c1, const reco::CaloCluster* c2)
110  {
111  return (c1->energy()>c2->energy());
112  }
113 };
114 
115 
116 #endif
static bool sortClusters(const reco::CaloCluster *c1, const reco::CaloCluster *c2)
static float eBottom(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
int i
Definition: DBlmapReader.cc:9
std::vector< float > vCov_
std::vector< const reco::CaloCluster * > theESClusters_
float eESClusters() const
float e2x5Max() const
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:53
std::vector< const reco::CaloCluster * > theBasicClusters_
float esClusterEnergy(unsigned i) const
float sigmaIetaIeta() const
float subClusterE3x3(unsigned i) const
float eSubClusters() const
float e2x5Right() const
static float e2nd(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
float eBottom() const
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:160
SuperClusterHelper(const reco::GsfElectron *electron, const EcalRecHitCollection *rechits, const CaloTopology *, const CaloGeometry *)
const CaloTopology * topology_
float e2x5Bottom() const
float esClusterEta(unsigned i) const
float etaWidth() const
float rawEnergy() const
float sigmaIetaIeta() const
Definition: GsfElectron.h:382
float subClusterEnergy(unsigned i) const
float hadronicOverEm() const
Definition: GsfElectron.h:403
double etaWidth() const
Definition: SuperCluster.h:54
static float e2x5Left(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
float eLeft() const
float preshowerEnergyOverRaw() const
const reco::CaloCluster * seedCluster_
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
double energy() const
cluster energy
Definition: CaloCluster.h:120
float eRight() const
float e2x5Top() const
const reco::SuperCluster * theSuperCluster_
float preshowerEnergy() const
float hadronicOverEm() const
float phiWidth() const
const EcalRecHitCollection * rechits_
float subClusterEmax(unsigned i) const
const CaloGeometry * geometry_
float esClusterPhi(unsigned i) const
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:47
float subClusterPhi(unsigned i) const
static float eRight(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float eTop(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:77
static float eMax(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
float seedEta() const
bool localCoordinatesComputed_
local coordinates
Analysis-level electron class.
Definition: Electron.h:52
static float e2x5Bottom(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
float nPreshowerClusters() const
static float e2x5Max(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e5x5(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
const reco::GsfElectron * theElectron_
float seedPhi() const
float clustersSize() const
float subClusterEta(unsigned i) const
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:50
float seedEnergy() const
static float eLeft(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:163
EcalClusterLocal local_
static float e2x5Right(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
float e2x5Left() const
static float e2x5Top(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)