babymaker  e95a6a9342d4604277fe7cc6149b6b5b24447d89
photon_tools.hh
Go to the documentation of this file.
1 // photon_tools: Functions related to RA2/b photons
2 // Copied from RA2/b's TreeMaker
3 // https://github.com/TreeMaker/TreeMaker/blob/74848c2a9fd16acaaf8d711842c6e2dc1d5bd56b/Utils/src/PhotonIDisoProducer.cc
4 
5 #ifndef H_PHOTON_TOOLS
6 #define H_PHOTON_TOOLS
7 
8 // System include files
9 #include <vector>
10 
11 // FW physics include files
12 #include "DataFormats/PatCandidates/interface/Photon.h"
13 #include "DataFormats/PatCandidates/interface/Electron.h"
14 #include "DataFormats/PatCandidates/interface/Conversion.h"
15 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
16 
18 public:
19 
21  const float PhotonPtCut = 100.0;
22 
23  std::vector<double> etaHigh;
24  std::vector<double> etaLow;
25  std::vector< std::vector<double> > effA;
27 
28  bool idPhoton(const pat::Photon &photon, edm::Handle<std::vector<pat::Electron> > &electrons,
29  edm::Handle<reco::ConversionCollection> &conversions,
30  edm::Handle<reco::BeamSpot> &beamspot, double rho);
31  bool electronMatch(const reco::SuperClusterRef &sc, const edm::Handle<std::vector<pat::Electron> > &electrons,
32  const edm::Handle<reco::ConversionCollection> &conversions, const math::XYZPoint &beamspot,
33  double lxyMin=2.0, double probMin=1e-6, unsigned int nHitsBeforeVtxMax=0) ;
34  double rhoCorrectedIso(isoType isoType_, double isoVal, double eta, double rho);
35  void addEffA(double etaLow_,double etaHigh_,double effA_pfCh_,double effA_pfNu_,double effA_pfGa_);
36 
37  photon_tools();
38  ~photon_tools();
39 };
40 
41 
42 
43 #endif
std::vector< double > etaLow
Definition: photon_tools.hh:24
bool idPhoton(const pat::Photon &photon, edm::Handle< std::vector< pat::Electron > > &electrons, edm::Handle< reco::ConversionCollection > &conversions, edm::Handle< reco::BeamSpot > &beamspot, double rho)
Definition: photon_tools.cc:21
std::vector< std::vector< double > > effA
Definition: photon_tools.hh:25
double rhoCorrectedIso(isoType isoType_, double isoVal, double eta, double rho)
Definition: photon_tools.cc:76
bool electronMatch(const reco::SuperClusterRef &sc, const edm::Handle< std::vector< pat::Electron > > &electrons, const edm::Handle< reco::ConversionCollection > &conversions, const math::XYZPoint &beamspot, double lxyMin=2.0, double probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
Definition: photon_tools.cc:55
std::vector< double > etaHigh
Definition: photon_tools.hh:23
void addEffA(double etaLow_, double etaHigh_, double effA_pfCh_, double effA_pfNu_, double effA_pfGa_)
Definition: photon_tools.cc:90
const float PhotonPtCut
Definition: photon_tools.hh:21