Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-08 05:11:59

0001 #ifndef RecoEgamma_PhotonIdentification_PhotonMIPHaloTagger_H
0002 #define RecoEgamma_PhotonIdentification_PhotonMIPHaloTagger_H
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0008 #include "DataFormats/EgammaCandidates/interface/Photon.h"
0009 #include "FWCore/Framework/interface/ConsumesCollector.h"
0010 
0011 #include <vector>
0012 
0013 class PhotonMIPHaloTagger {
0014 public:
0015   PhotonMIPHaloTagger(const edm::ParameterSet& conf, edm::ConsumesCollector&& iC);
0016 
0017   reco::Photon::MIPVariables mipCalculate(const reco::Photon&, const edm::Event&, const edm::EventSetup& es) const;
0018 
0019 private:
0020   //get the seed crystal index
0021   void getSeedHighestE(const reco::Photon& photon,
0022                        const edm::Event& iEvent,
0023                        const edm::EventSetup& iSetup,
0024                        edm::Handle<EcalRecHitCollection> Brechit,
0025                        int& seedIEta,
0026                        int& seedIPhi,
0027                        double& seedE) const;
0028 
0029   //get the MIP  Fit Trail results
0030   reco::Photon::MIPVariables getMipTrailFit(const reco::Photon& photon,
0031                                             const edm::Event& iEvent,
0032                                             const edm::EventSetup& iSetup,
0033                                             edm::Handle<EcalRecHitCollection> ecalhitsCollEB,
0034                                             double inputRangeY,
0035                                             double inputRangeX,
0036                                             double inputResWidth,
0037                                             double inputHaloDiscCut) const;
0038 
0039   const edm::EDGetToken EBecalCollection_;
0040 
0041   //Isolation parameters variables as input
0042   const double yRangeFit_;
0043   const double xRangeFit_;
0044   const double residualWidthEnergy_;
0045   const double haloDiscThreshold_;
0046 };
0047 
0048 #endif  // PhotonMIPHaloTagger_H