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 
12 
14  public:
16  SuperClusterHelper(const pat::Electron * electron, const EcalRecHitCollection * rechits, const CaloTopology*, const CaloGeometry* );
18 
19  float rawEnergy() const {return theSuperCluster_->rawEnergy();}
20  float eta() const {return theSuperCluster_->eta();}
21  float phi() const {return theSuperCluster_->phi();}
22  float etaWidth() const {return theSuperCluster_->etaWidth();}
23  float phiWidth() const {return theSuperCluster_->phiWidth();}
24  float clustersSize() const {return theSuperCluster_->clustersSize();}
25  float hadronicOverEm() const {return theElectron_->hadronicOverEm();}
26  float sigmaIetaIeta() const {return theElectron_->sigmaIetaIeta();}
29  float e3x3() const { return EcalClusterTools::e3x3(*seedCluster_,rechits_,topology_); }
30  float e5x5() const { return EcalClusterTools::e5x5(*seedCluster_,rechits_,topology_); }
31  float eMax() const { return EcalClusterTools::eMax(*seedCluster_,rechits_); }
32  float e2nd() const { return EcalClusterTools::e2nd(*seedCluster_,rechits_); }
33  float eTop() const { return EcalClusterTools::eTop(*seedCluster_,rechits_,topology_); }
34  float eBottom() const { return EcalClusterTools::eBottom(*seedCluster_,rechits_,topology_); }
35  float eLeft() const { return EcalClusterTools::eLeft(*seedCluster_,rechits_,topology_); }
36  float eRight() const { return EcalClusterTools::eRight(*seedCluster_,rechits_,topology_); }
37  float e2x5Max() const { return EcalClusterTools::e2x5Max(*seedCluster_,rechits_,topology_); }
38  float e2x5Top() const { return EcalClusterTools::e2x5Top(*seedCluster_,rechits_,topology_); }
39  float e2x5Bottom()const { return EcalClusterTools::e2x5Bottom(*seedCluster_,rechits_,topology_); }
40  float e2x5Left() const { return EcalClusterTools::e2x5Left(*seedCluster_,rechits_,topology_); }
41  float e2x5Right() const { return EcalClusterTools::e2x5Right(*seedCluster_,rechits_,topology_); }
42  float r9() const { //std::cout << " E3x3 " << e3x3() << " raw " << theSuperCluster_->rawEnergy() << std::endl;
43  return e3x3()/theSuperCluster_->rawEnergy();}
44  float spp();
45  float sep();
46  float seedEta() const { return seedCluster_->eta(); }
47  float seedPhi() const { return seedCluster_->phi(); }
48  float seedEnergy()const { return seedCluster_->energy();}
49  int ietaSeed() { localCoordinates(); return ietaSeed_;}
50  int iphiSeed() { localCoordinates(); return iphiSeed_;}
51  float etaCrySeed() { localCoordinates(); return etaCrySeed_;}
52  float phiCrySeed() { localCoordinates(); return phiCrySeed_;}
53  float thetaTilt() { localCoordinates(); return thetaTilt_;}
54  float phiTilt() {localCoordinates(); return phiTilt_;}
55 
56  // i=1,2,3 (0 would be the seed)
57  float subClusterEnergy(unsigned i) const;
58  float subClusterEta(unsigned i) const;
59  float subClusterPhi(unsigned i) const;
60  float subClusterEmax(unsigned i) const;
61  float subClusterE3x3(unsigned i) const;
62  // does not include the seed energy
63  float eSubClusters() const {return eSubClusters_;}
64 
65  float esClusterEnergy(unsigned i) const;
66  float esClusterEta(unsigned i) const;
67  float esClusterPhi(unsigned i) const;
68 
69  float nPreshowerClusters() const { return nESClusters_;}
70  float eESClusters() const { return eESClusters_;}
71 
72  private:
75  std::vector<const reco::CaloCluster*> theBasicClusters_;
76  std::vector<const reco::CaloCluster*> theESClusters_;
81  bool barrel_;
82 
83 
87  std::vector<float> vCov_;
88  float spp_;
89  float sep_;
92  int ietaSeed_; // ix in the endcaps
93  int iphiSeed_; // iy in the endcaps
94  float etaCrySeed_;
95  float phiCrySeed_;
96  float thetaTilt_;
97  float phiTilt_;
98  unsigned nBasicClusters_;
99  unsigned nESClusters_;
102 
103  private:
105  void localCoordinates();
106 
107  static bool sortClusters(const reco::CaloCluster* c1, const reco::CaloCluster* c2)
108  {
109  return (c1->energy()>c2->energy());
110  }
111 };
112 
113 
114 #endif
static bool sortClusters(const reco::CaloCluster *c1, const reco::CaloCluster *c2)
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:55
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
float eBottom() const
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:168
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:440
float subClusterEnergy(unsigned i) const
float hadronicOverEm() const
Definition: GsfElectron.h:495
double etaWidth() const
Definition: SuperCluster.h:56
float eLeft() const
float preshowerEnergyOverRaw() const
const reco::CaloCluster * seedCluster_
double energy() const
cluster energy
Definition: CaloCluster.h:126
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
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:87
float seedEta() const
bool localCoordinatesComputed_
local coordinates
Analysis-level electron class.
Definition: Electron.h:52
float nPreshowerClusters() const
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
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:171
float e2x5Left() const