Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:39

0001 #ifndef EMEnrichingFilterAlgo_h
0002 #define EMEnrichingFilterAlgo_h
0003 
0004 /** \class EMEnrichingFilter
0005  *
0006  *  EMEnrichingFilter 
0007  *
0008  * \author J Lamb, UCSB
0009  *
0010  ************************************************************/
0011 
0012 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0013 #include "FWCore/Framework/interface/Frameworkfwd.h"
0014 #include "FWCore/Utilities/interface/EDGetToken.h"
0015 #include "FWCore/Utilities/interface/ESGetToken.h"
0016 #include "MagneticField/Engine/interface/MagneticField.h"
0017 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0018 
0019 #include <vector>
0020 
0021 class EMEnrichingFilterAlgo {
0022 public:
0023   EMEnrichingFilterAlgo(const edm::ParameterSet &, edm::ConsumesCollector &&);
0024 
0025   bool filter(const edm::Event &iEvent, const edm::EventSetup &iSetup) const;
0026 
0027 private:
0028   bool filterPhotonElectronSeed(float clusterthreshold,
0029                                 float isoConeSize,
0030                                 float hOverEMax,
0031                                 float tkIsoMax,
0032                                 float caloIsoMax,
0033                                 bool requiretrackmatch,
0034                                 const std::vector<reco::GenParticle> &genPars,
0035                                 const std::vector<reco::GenParticle> &genParsCurved) const;
0036 
0037   std::vector<reco::GenParticle> applyBFieldCurv(const std::vector<reco::GenParticle> &genPars,
0038                                                  const edm::EventSetup &iSetup) const;
0039   bool filterIsoGenPar(float etmin,
0040                        float conesize,
0041                        const reco::GenParticleCollection &gph,
0042                        const reco::GenParticleCollection &gphCurved) const;
0043   float deltaRxyAtEE(const reco::GenParticle &gp1, const reco::GenParticle &gp2) const;
0044 
0045 private:
0046   //constants
0047   const float FILTER_TKISOCUT_;
0048   const float FILTER_CALOISOCUT_;
0049   const float FILTER_ETA_MIN_;
0050   const float FILTER_ETA_MAX_;
0051   const float ECALBARRELMAXETA_;
0052   const float ECALBARRELRADIUS_;
0053   const float ECALENDCAPZ_;
0054 
0055   //parameters of the filter
0056   const float isoGenParETMin_;
0057   const float isoGenParConeSize_;
0058   const float clusterThreshold_;
0059   const float isoConeSize_;
0060   const float hOverEMax_;
0061   const float tkIsoMax_;
0062   const float caloIsoMax_;
0063   const bool requireTrackMatch_;
0064 
0065   const edm::EDGetTokenT<reco::GenParticleCollection> genParSourceToken_;
0066   const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> magneticFieldToken_;
0067 };
0068 #endif