Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:45

0001 #ifndef AcceptJet_H
0002 #define AcceptJet_H
0003 
0004 #include "DataFormats/JetReco/interface/Jet.h"
0005 #include "DataFormats/BTauReco/interface/SoftLeptonTagInfo.h"
0006 #include "DataFormats/Common/interface/Handle.h"
0007 
0008 /** \class AcceptJet
0009  *
0010  *  Decide if jet and associated parton satisfy desired kinematic cuts.
0011  *
0012  */
0013 
0014 class AcceptJet {
0015 public:
0016   AcceptJet(const double& etaMin_,
0017             const double& etaMax_,
0018             const double& ptMin_,
0019             const double& ptMax_,
0020             const double& pMin_,
0021             const double& pMax_,
0022             const double& ratioMin_,
0023             const double& ratioMax_,
0024             const bool& doJetID_);
0025   /// Returns true if jet and associated parton satisfy kinematic cuts.
0026   bool operator()(const reco::Jet& jet,
0027                   const int& jetFlavour,
0028                   const edm::Handle<reco::SoftLeptonTagInfoCollection>& infos,
0029                   const double jec) const;
0030 
0031   /// Set cut parameters
0032   void setEtaMin(double d) { etaMin = d; }
0033   void setEtaMax(double d) { etaMax = d; }
0034   //   void setPPartonMin        ( double d ) { pPartonMin        = d ; }
0035   //   void setPPartonMax        ( double d ) { pPartonMax        = d ; }
0036   void setPtRecJetMin(double d) { ptRecJetMin = d; }
0037   void setPtRecJetMax(double d) { ptRecJetMax = d; }
0038   void setPRecJetMin(double d) { pRecJetMin = d; }
0039   void setPRecJetMax(double d) { pRecJetMax = d; }
0040   void setRatioMin(double d) { ratioMin = d; }
0041   void setRatioMax(double d) { ratioMax = d; }
0042   void setDoJetID(bool b) { doJetID = b; }
0043 
0044   //   void setPtPartonMin       ( double d ) { ptPartonMin       = d ; }
0045   //   void setPtPartonMax       ( double d ) { ptPartonMax       = d ; }
0046 
0047 protected:
0048   /// Finds the ratio of the momentum of any leptons in the jet to jet energy
0049   double ratio(const reco::Jet& jet, const edm::Handle<reco::SoftLeptonTagInfoCollection>& infos) const;
0050 
0051   // eta range
0052   double etaMin;  // these are meant as |eta| !!
0053   double etaMax;
0054 
0055   // parton p
0056   //   double pPartonMin ;
0057   //   double pPartonMax ;
0058 
0059   // parton pt
0060   //   double ptPartonMin ;
0061   //   double ptPartonMax ;
0062 
0063   // rec. jet
0064   double ptRecJetMin;
0065   double ptRecJetMax;
0066   //
0067   double pRecJetMin;
0068   double pRecJetMax;
0069 
0070   double ratioMin;
0071   double ratioMax;
0072 
0073   //Apply loose Jet ID in case of PF jets
0074   bool doJetID;
0075 };
0076 
0077 #endif