Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:00

0001 #ifndef DQMOFFLINE_LUMI_ELECTRONIDENTIFIER_H
0002 #define DQMOFFLINE_LUMI_ELECTRONIDENTIFIER_H
0003 
0004 #include "FWCore/Framework/interface/MakerMacros.h"   // definitions for declaring plug-in modules
0005 #include "FWCore/Framework/interface/Frameworkfwd.h"  // declaration of EDM types
0006 #include "FWCore/Framework/interface/EDAnalyzer.h"    // EDAnalyzer class
0007 #include "FWCore/Framework/interface/ConsumesCollector.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"  // Parameters
0009 #include "FWCore/Utilities/interface/InputTag.h"
0010 
0011 #include <string>  // string class
0012 #include <TMath.h>
0013 #include <cassert>
0014 
0015 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
0016 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
0017 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
0018 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0019 #include "DataFormats/EgammaCandidates/interface/ConversionFwd.h"
0020 #include "DataFormats/EgammaCandidates/interface/Conversion.h"
0021 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0022 
0023 #include "PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h"
0024 
0025 #include "CommonTools/Egamma/interface/EffectiveAreas.h"
0026 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0027 
0028 enum EleIDCutNames {
0029   SIGMAIETA,
0030   DETAINSEED,
0031   DPHIIN,
0032   HOVERE,
0033   ISO,
0034   ONEOVERE,
0035   MISSINGHITS,
0036   CONVERSION,
0037 };
0038 enum EleIDWorkingPoints { VETO, MEDIUM, LOOSE, TIGHT };
0039 enum EleIDEtaBins { BARREL, ENDCAP };
0040 class ElectronIdentifier {
0041 public:
0042   ElectronIdentifier(const edm::ParameterSet& c);
0043   float dEtaInSeed(const reco::GsfElectronPtr& ele);
0044   bool passID(const reco::GsfElectronPtr& ele,
0045               edm::Handle<reco::BeamSpot> beamspot,
0046               edm::Handle<reco::ConversionCollection> conversions);
0047   float isolation(const reco::GsfElectronPtr& ele);
0048 
0049   void setID(std::string ID);
0050   void setRho(double rho);
0051 
0052 private:
0053   double rho_;
0054   int ID_;
0055   std::array<std::array<std::array<double, 2>, 4>, 8> cuts_;
0056   // Effective area constants
0057   EffectiveAreas _effectiveAreas;
0058 };
0059 
0060 #endif