Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-17 02:46:00

0001 #ifndef PhotonMIPHaloTagger_H
0002 #define 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(){};
0016 
0017   virtual ~PhotonMIPHaloTagger(){};
0018 
0019   void setup(const edm::ParameterSet& conf, edm::ConsumesCollector&& iC);
0020 
0021   void MIPcalculate(const reco::Photon*,
0022                     const edm::Event&,
0023                     const edm::EventSetup& es,
0024                     reco::Photon::MIPVariables& mipId);
0025 
0026   //get the seed crystal index
0027   void GetSeedHighestE(const reco::Photon* photon,
0028                        const edm::Event& iEvent,
0029                        const edm::EventSetup& iSetup,
0030                        edm::Handle<EcalRecHitCollection> Brechit,
0031                        int& seedIEta,
0032                        int& seedIPhi,
0033                        double& seedE);
0034 
0035   //get the MIP  Fit Trail results
0036   std::vector<double> GetMipTrailFit(const reco::Photon* photon,
0037                                      const edm::Event& iEvent,
0038                                      const edm::EventSetup& iSetup,
0039                                      edm::Handle<EcalRecHitCollection> ecalhitsCollEB,
0040                                      double inputRangeY,
0041                                      double inputRangeX,
0042                                      double inputResWidth,
0043                                      double inputHaloDiscCut,
0044                                      int& NhitCone_,
0045                                      bool& ismipHalo_);
0046 
0047 protected:
0048   edm::EDGetToken EBecalCollection_;
0049   edm::EDGetToken EEecalCollection_;
0050 
0051   //used inside main methhod
0052   double inputRangeY;
0053   double inputRangeX;
0054   double inputResWidth;
0055   double inputHaloDiscCut;
0056 
0057   //Isolation parameters variables as input
0058   double yRangeFit_;
0059   double xRangeFit_;
0060   double residualWidthEnergy_;
0061   double haloDiscThreshold_;
0062 
0063   //Local Vector for results
0064   std::vector<double> mipFitResults_;
0065   int nhitCone_;
0066   bool ismipHalo_;
0067 };
0068 
0069 #endif  // PhotonMIPHaloTagger_H