Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-14 02:38:03

0001 #ifndef L1Trigger_Phase2L1Taus_L1HPSPFTauQualityCut_h
0002 #define L1Trigger_Phase2L1Taus_L1HPSPFTauQualityCut_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"         // edm::ParameterSet
0005 #include "DataFormats/L1TParticleFlow/interface/PFCandidate.h"  // l1t::PFCandidate
0006 #include <string>                                               // std::string
0007 #include <vector>                                               // std::vector
0008 
0009 class L1HPSPFTauQualityCut {
0010 public:
0011   /// constructor
0012   L1HPSPFTauQualityCut(const edm::ParameterSet& cfg);
0013 
0014   /// destructor
0015   ~L1HPSPFTauQualityCut() = default;
0016 
0017   /// returns true (false) if PFCandidate passes (fails) quality cuts
0018   bool operator()(const l1t::PFCandidate& pfCand, float_t primaryVertexZ) const;
0019 
0020   /// accessor functions
0021   l1t::PFCandidate::ParticleType pfCandType() const;
0022   enum { kDisabled, kEnabledPrimary, kEnabledPileup };
0023   int dzCut() const;
0024   float_t minPt() const;
0025   float_t maxDz() const;
0026 
0027 private:
0028   l1t::PFCandidate::ParticleType pfCandType_;
0029 
0030   int dzCut_;  // flag to invert dz cut in order to compute charged isolation from pileup for delta-beta corrections
0031 
0032   float_t minPt_;
0033   float_t maxDz_;
0034 
0035   bool debug_;
0036 };
0037 
0038 std::vector<L1HPSPFTauQualityCut> readL1PFTauQualityCuts(const edm::ParameterSet& cfg,
0039                                                          const std::string& dzCut,
0040                                                          bool debug = false);
0041 
0042 bool isSelected(const std::vector<L1HPSPFTauQualityCut>& qualityCuts,
0043                 const l1t::PFCandidate& pfCand,
0044                 float_t primaryVertexZ);
0045 
0046 #endif