Main Page
Namespaces
Classes
Package Documentation
HeavyFlavorAnalysis
SpecificDecay
interface
BPHParticleChargeSelect.h
Go to the documentation of this file.
1
#ifndef HeavyFlavorAnalysis_SpecificDecay_BPHParticleChargeSelect_h
2
#define HeavyFlavorAnalysis_SpecificDecay_BPHParticleChargeSelect_h
3
12
//----------------------
13
// Base Class Headers --
14
//----------------------
15
#include "
HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoSelect.h
"
16
17
//------------------------------------
18
// Collaborating Class Declarations --
19
//------------------------------------
20
#include "
DataFormats/RecoCandidate/interface/RecoCandidate.h
"
21
22
//---------------
23
// C++ Headers --
24
//---------------
25
26
27
// ---------------------
28
// -- Class Interface --
29
// ---------------------
30
31
class
BPHParticleChargeSelect
:
public
BPHRecoSelect
{
32
33
public
:
34
37
BPHParticleChargeSelect
(
int
c
):
charge
( c ? ( c > 0 ? 1 : -1 ) : 0 ) {}
38
41
virtual
~BPHParticleChargeSelect
() {}
42
45
virtual
bool
accept
(
const
reco::Candidate
&
cand
)
const
{
47
switch
(
charge
) {
48
default
:
49
case
0:
return
( cand.
charge
() != 0 );
50
case
1:
return
( cand.
charge
() > 0 );
51
case
-1:
return
( cand.
charge
() < 0 );
52
}
53
return
true
;
54
};
55
57
void
setCharge
(
int
c
) {
charge
=( c ? ( c > 0 ? 1 : -1 ) : 0 );
return
; }
58
60
double
getCharge
()
const
{
return
charge
; }
61
62
private
:
63
64
// private copy and assigment constructors
65
BPHParticleChargeSelect
(
const
BPHParticleChargeSelect
&
x
);
66
BPHParticleChargeSelect
&
operator=
(
const
BPHParticleChargeSelect
& x );
67
68
int
charge
;
69
70
};
71
72
73
#endif
74
BPHParticleChargeSelect::charge
int charge
Definition:
BPHParticleChargeSelect.h:68
BPHParticleChargeSelect
Definition:
BPHParticleChargeSelect.h:31
EnergyCorrector.c
c
Definition:
EnergyCorrector.py:44
reco::Candidate
Definition:
Candidate.h:28
BPHRecoSelect
Definition:
BPHRecoSelect.h:35
BPHParticleChargeSelect::operator=
BPHParticleChargeSelect & operator=(const BPHParticleChargeSelect &x)
BPHParticleChargeSelect::accept
virtual bool accept(const reco::Candidate &cand) const
select particle
Definition:
BPHParticleChargeSelect.h:46
BPHParticleChargeSelect::getCharge
double getCharge() const
get seelction charge
Definition:
BPHParticleChargeSelect.h:60
BPHRecoSelect.h
BPHParticleChargeSelect::~BPHParticleChargeSelect
virtual ~BPHParticleChargeSelect()
Definition:
BPHParticleChargeSelect.h:41
BPHParticleChargeSelect::setCharge
void setCharge(int c)
set seelction charge
Definition:
BPHParticleChargeSelect.h:57
reco::Candidate::charge
virtual int charge() const =0
electric charge
cand
Definition:
decayParser.h:34
DDAxes::x
RecoCandidate.h
BPHParticleChargeSelect::BPHParticleChargeSelect
BPHParticleChargeSelect(int c)
Definition:
BPHParticleChargeSelect.h:37
Generated for CMSSW Reference Manual by
1.8.11