Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:35

0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHMuonChargeSelect_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_BPHMuonChargeSelect_h
0003 /** \class BPHMuonChargeSelect
0004  *
0005  *  Description: 
0006  *     Class for muon selection by charge
0007  *
0008  *  \author Paolo Ronchese INFN Padova
0009  *
0010  */
0011 
0012 //----------------------
0013 // Base Class Headers --
0014 //----------------------
0015 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleChargeSelect.h"
0016 
0017 //------------------------------------
0018 // Collaborating Class Declarations --
0019 //------------------------------------
0020 #include "DataFormats/PatCandidates/interface/Muon.h"
0021 
0022 //---------------
0023 // C++ Headers --
0024 //---------------
0025 
0026 //              ---------------------
0027 //              -- Class Interface --
0028 //              ---------------------
0029 
0030 class BPHMuonChargeSelect : public BPHParticleChargeSelect {
0031 public:
0032   /** Constructor
0033    */
0034   BPHMuonChargeSelect(int c) : BPHParticleChargeSelect(c) {}
0035 
0036   // deleted copy constructor and assignment operator
0037   BPHMuonChargeSelect(const BPHMuonChargeSelect& x) = delete;
0038   BPHMuonChargeSelect& operator=(const BPHMuonChargeSelect& x) = delete;
0039 
0040   /** Destructor
0041    */
0042   ~BPHMuonChargeSelect() override = default;
0043 
0044   /** Operations
0045    */
0046   /// select muon
0047   bool accept(const reco::Candidate& cand) const override {
0048     if (dynamic_cast<const pat::Muon*>(&cand) == nullptr)
0049       return false;
0050     return BPHParticleChargeSelect::accept(cand);
0051   };
0052 };
0053 
0054 #endif