CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/RecoEgamma/EgammaTools/interface/ggPFPhotons.h

Go to the documentation of this file.
00001 #ifndef ggPFPhotons_h
00002 #define ggPFPhotons_h
00003 #include "DataFormats/PatCandidates/interface/Photon.h"
00004 
00005 #include "DataFormats/VertexReco/interface/Vertex.h"
00006 #include "DataFormats/VertexReco/interface/VertexFwd.h"
00007 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00008 #include "RecoEgamma/EgammaTools/interface/ggPFClusters.h"
00009 #include "RecoEgamma/EgammaTools/interface/ggPFESClusters.h"
00010 #include "RecoEgamma/EgammaTools/interface/ggPFTracks.h"
00011 #include "RecoEcal/EgammaCoreTools/interface/Mustache.h"
00012 #include <memory>
00013 using namespace edm;
00014 using namespace std;
00015 using namespace reco;
00016 //PFPHOTON CLASS BY RISHI PATEL FOR HiggsToGammaGamma rpatel@cern.ch
00017 class ggPFPhotons  {
00018 
00019  public:
00020   
00021   explicit ggPFPhotons(
00022                        reco::Photon phot,
00023                        edm::Handle<reco::PhotonCollection>& pfPhotons,
00024                        edm::Handle<reco::GsfElectronCollection>& pfElectrons,
00025                        edm::Handle<PFCandidateCollection>& pfCandidates,
00026                        edm::Handle<EcalRecHitCollection>& EBReducedRecHits,
00027                        edm::Handle<EcalRecHitCollection>& EEReducedRecHits,
00028                        edm::Handle<EcalRecHitCollection>& ESRecHits,
00029                        const CaloSubdetectorGeometry* geomBar,
00030                        const CaloSubdetectorGeometry* geomEnd,
00031                        edm::Handle<BeamSpot>& beamSpotHandle
00032                        );
00033   //add Geometry for Cluster Shape Calculation??
00034   virtual ~ggPFPhotons();
00035   bool MatchPFReco(){ return matchPFReco_;}
00036   bool isConv(){ return isConv_;}
00037   bool hasSLConv(){return hasSLConv_;}
00038   bool isPFEle(){return isPFEle_;}
00039   bool EleVeto(){return EleVeto_;}
00040   float PFPS1(){return PFPreShower1_;}
00041   float PFPS2(){return PFPreShower2_;}
00042   float MustE(){return EinMustache_;}
00043   float MustEOut(){return MustacheEOut_;}
00044   float MustEtOut(){return MustacheEtOut_;}
00045   float PFLowE(){return PFLowClusE_;}
00046   double PFdEta(){return dEtaLowestC_;}
00047   double PFdPhi(){return dPhiLowestC_;}
00048   double PFClusRMSTot(){return PFClPhiRMS_;}
00049   double PFClusRMSMust(){return PFClPhiRMSMust_;}
00050   std::vector<reco::CaloCluster>PFClusters(){return PFClusters_;}
00051   std::vector<reco::CaloCluster>PFClustersSCFP(){return PFSCFootprintClusters_;}//Electron Veto:
00052   bool PFElectronVeto(edm::Handle<reco::ConversionCollection>& convH,
00053                       edm::Handle<reco::GsfElectronCollection>& gsfElectronsHandle);
00054   //for Vertex
00055   std::pair<float, float> SLPoint();
00056   //fill PFCLuster Variables
00057   void fillPFClusters();
00058   //Local Containment Correction
00059   double getPFPhoECorr( std::vector<reco::CaloCluster>PFClusters, const GBRForest *ReaderLCEB, const GBRForest *ReaderLCEE);
00060   std::pair<double, double>CalcRMS(vector<reco::CaloCluster> PFClust, reco::Photon PFPhoton);
00061   std::vector<reco::CaloCluster>recoPhotonClusterLink(          
00062                                                       reco::Photon phot, 
00063                                                       edm::Handle<PFCandidateCollection>& pfCandidates
00064                                                       );
00065   std::pair<double, double>SuperClusterSize(reco::Photon phot
00066                                               );
00067   static void recoPhotonClusterLink(
00068                                                              reco::SuperCluster sc, 
00069                                                              std::vector<reco::PFCandidatePtr>&insideMust, 
00070                                                              std::vector<reco::PFCandidatePtr>&outsideMust,
00071                                                              edm::Handle<PFCandidateCollection>& pfCandidates,
00072                                                              double etabound,
00073                                                              double phibound
00074                                                              );
00075   static std::pair<double, double>SuperClusterSize(reco::SuperCluster sc,
00076                                                    Handle<EcalRecHitCollection>&   EBReducedRecHits,
00077                                                    Handle<EcalRecHitCollection>&   EEReducedRecHits,
00078                                                    const CaloSubdetectorGeometry* geomBar,
00079                                                    const CaloSubdetectorGeometry* geomEnd
00080                                             );
00081   void PhotonPFCandMatch(  
00082                           reco::SuperCluster sc,                
00083                           std::vector<reco::PFCandidatePtr>&insideBox, 
00084                           edm::Handle<PFCandidateCollection>& pfCandidates,
00085                           vector<reco::CaloCluster> &PFClust,
00086                           std::vector<DetId>& MatchedRH
00087                           );
00088   //for filling PFCluster Variables
00089  private:
00090   reco::Photon matchedPhot_;
00091   Handle<reco::PhotonCollection> pfPhotons_;
00092   Handle<reco::GsfElectronCollection> pfElectrons_;
00093   Handle<EcalRecHitCollection>  EBReducedRecHits_;
00094   Handle<EcalRecHitCollection>  EEReducedRecHits_;
00095   Handle<EcalRecHitCollection> ESRecHits_;
00096   const CaloSubdetectorGeometry* geomBar_;
00097   const CaloSubdetectorGeometry* geomEnd_;
00098   Handle<BeamSpot> beamSpotHandle_;
00099   reco::Photon PFPhoton_;
00100   reco::GsfElectron PFElectron_;
00101   bool matchPFReco_;
00102   bool isPFEle_;
00103   bool EleVeto_;
00104   bool isConv_;
00105   bool hasSLConv_;
00106   std::vector<reco::CaloCluster>PFClusters_;
00107   std::vector<reco::CaloCluster>PFSCFootprintClusters_;
00108   float EinMustache_;
00109   float MustacheEOut_;
00110   float MustacheEtOut_;
00111   float PFPreShower1_;
00112   float PFPreShower2_;
00113   float PFLowClusE_;
00114   double dEtaLowestC_;
00115   double dPhiLowestC_;
00116   double PFClPhiRMS_;
00117   double PFClPhiRMSMust_;  
00118   double PFPhoLocallyCorrE_;
00119 };
00120 #endif