Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef PhotonGenFilter_h
0002 #define PhotonGenFilter_h
0003 
0004 #include <memory>
0005 #include <iostream>
0006 
0007 #include "FWCore/Framework/interface/Frameworkfwd.h"
0008 #include "FWCore/Framework/interface/global/EDFilter.h"
0009 
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/MakerMacros.h"
0012 
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0015 
0016 namespace edm {
0017   class HepMCProduct;
0018 }
0019 
0020 class PhotonGenFilter : public edm::global::EDFilter<> {
0021 public:
0022   explicit PhotonGenFilter(const edm::ParameterSet&);
0023   ~PhotonGenFilter() override;
0024 
0025   bool filter(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
0026   bool hasAncestor(HepMC::GenParticle* particle,
0027                    std::function<bool(int)> check,
0028                    bool isWorBFromDecayCheck = false,
0029                    bool isWorBPromptCheck = false) const;
0030   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0031 
0032 private:
0033   // Private member variables and functions
0034 
0035   const edm::EDGetTokenT<edm::HepMCProduct> token_;
0036   double ptMin;
0037   double etaMin;
0038   double etaMax;
0039   double drMin;
0040   double ptThreshold;
0041 };
0042 
0043 #endif