Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
#ifndef HeavyFlavorAnalysis_SpecificDecay_BPHMuonChargeSelect_h
#define HeavyFlavorAnalysis_SpecificDecay_BPHMuonChargeSelect_h
/** \class BPHMuonChargeSelect
 *
 *  Description: 
 *     Class for muon selection by charge
 *
 *  \author Paolo Ronchese INFN Padova
 *
 */

//----------------------
// Base Class Headers --
//----------------------
#include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleChargeSelect.h"

//------------------------------------
// Collaborating Class Declarations --
//------------------------------------
#include "DataFormats/PatCandidates/interface/Muon.h"

//---------------
// C++ Headers --
//---------------

//              ---------------------
//              -- Class Interface --
//              ---------------------

class BPHMuonChargeSelect : public BPHParticleChargeSelect {
public:
  /** Constructor
   */
  BPHMuonChargeSelect(int c) : BPHParticleChargeSelect(c) {}

  // deleted copy constructor and assignment operator
  BPHMuonChargeSelect(const BPHMuonChargeSelect& x) = delete;
  BPHMuonChargeSelect& operator=(const BPHMuonChargeSelect& x) = delete;

  /** Destructor
   */
  ~BPHMuonChargeSelect() override = default;

  /** Operations
   */
  /// select muon
  bool accept(const reco::Candidate& cand) const override {
    if (dynamic_cast<const pat::Muon*>(&cand) == nullptr)
      return false;
    return BPHParticleChargeSelect::accept(cand);
  };
};

#endif