Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:05:36

0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHParticleEtaSelect_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_BPHParticleEtaSelect_h
0003 /** \class BPHParticleEtaSelect
0004  *
0005  *  Descrietaion: 
0006  *     Class for particle selection by eta
0007  *
0008  *  \author Paolo Ronchese INFN Padova
0009  *
0010  */
0011 
0012 //----------------------
0013 // Base Class Headers --
0014 //----------------------
0015 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoSelect.h"
0016 
0017 //------------------------------------
0018 // Collaborating Class Declarations --
0019 //------------------------------------
0020 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
0021 
0022 //---------------
0023 // C++ Headers --
0024 //---------------
0025 
0026 //              ---------------------
0027 //              -- Class Interface --
0028 //              ---------------------
0029 
0030 class BPHParticleEtaSelect : public BPHRecoSelect {
0031 public:
0032   /** Constructor
0033    */
0034   BPHParticleEtaSelect(double eta) : etaMax(eta) {}
0035 
0036   // deleted copy constructor and assignment operator
0037   BPHParticleEtaSelect(const BPHParticleEtaSelect& x) = delete;
0038   BPHParticleEtaSelect& operator=(const BPHParticleEtaSelect& x) = delete;
0039 
0040   /** Destructor
0041    */
0042   ~BPHParticleEtaSelect() override = default;
0043 
0044   /** Operations
0045    */
0046   /// select particle
0047   bool accept(const reco::Candidate& cand) const override { return (fabs(cand.p4().eta()) <= etaMax); }
0048 
0049   /// set eta max
0050   void setEtaMax(double eta) {
0051     etaMax = eta;
0052     return;
0053   }
0054 
0055   /// get current eta max
0056   double getEtaMax() const { return etaMax; }
0057 
0058 private:
0059   double etaMax;
0060 };
0061 
0062 #endif