Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-12 01:51:25

0001 #ifndef BCToEFilterAlgo_h
0002 #define BCToEFilterAlgo_h
0003 
0004 /** \class BCToEFilterAlgo
0005  *
0006  *  BCToEFilterAlgo
0007  *  returns true for events that have an electron, above configurable eT threshold and within |eta|<2.5, that has an ancestor of a b or c quark
0008  *
0009  * \author J Lamb, UCSB
0010  *
0011  ************************************************************/
0012 
0013 // user include files
0014 #include "FWCore/Framework/interface/Frameworkfwd.h"
0015 #include "FWCore/Utilities/interface/EDGetToken.h"
0016 
0017 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0018 
0019 class BCToEFilterAlgo {
0020 public:
0021   BCToEFilterAlgo(const edm::ParameterSet&, edm::ConsumesCollector&& iC);
0022   ~BCToEFilterAlgo();
0023 
0024   bool filter(const edm::Event& iEvent) const;
0025 
0026   bool hasBCAncestors(const reco::GenParticle& gp) const;
0027 
0028 private:
0029   bool isBCHadron(const reco::GenParticle& gp) const;
0030   bool isBCMeson(const reco::GenParticle& gp) const;
0031   bool isBCBaryon(const reco::GenParticle& gp) const;
0032 
0033   //filter parameters:
0034   const float maxAbsEta_;
0035   const float eTThreshold_;
0036   const edm::EDGetTokenT<reco::GenParticleCollection> genParSource_;
0037 };
0038 #endif