CMS 3D CMS Logo

BPHParticleEtaSelect.h
Go to the documentation of this file.
1 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHParticleEtaSelect_h
2 #define HeavyFlavorAnalysis_SpecificDecay_BPHParticleEtaSelect_h
3 
12 //----------------------
13 // Base Class Headers --
14 //----------------------
16 
17 //------------------------------------
18 // Collaborating Class Declarations --
19 //------------------------------------
21 
22 //---------------
23 // C++ Headers --
24 //---------------
25 
26 
27 // ---------------------
28 // -- Class Interface --
29 // ---------------------
30 
32 
33  public:
34 
37  BPHParticleEtaSelect( double eta ): etaMax( eta ) {}
38 
41  ~BPHParticleEtaSelect() override {}
42 
45  bool accept( const reco::Candidate& cand ) const override {
47  return ( fabs( cand.p4().eta() ) < etaMax );
48  }
49 
51  void setEtaMax( double eta ) { etaMax = eta; return; }
52 
54  double getEtaMax() const { return etaMax; }
55 
56  private:
57 
58  // private copy and assigment constructors
59  BPHParticleEtaSelect ( const BPHParticleEtaSelect& x ) = delete;
61 
62  double etaMax;
63 
64 };
65 
66 
67 #endif
68 
BPHParticleEtaSelect & operator=(const BPHParticleEtaSelect &x)=delete
bool accept(const reco::Candidate &cand) const override
select particle
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
void setEtaMax(double eta)
set eta max
double getEtaMax() const
get current eta max