CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
BPHParticleChargeSelect Class Reference

#include <BPHParticleChargeSelect.h>

Inheritance diagram for BPHParticleChargeSelect:
BPHRecoSelect BPHMuonChargeSelect

Public Member Functions

virtual bool accept (const reco::Candidate &cand) const
 select particle More...
 
 BPHParticleChargeSelect (int c)
 
double getCharge () const
 get seelction charge More...
 
void setCharge (int c)
 set seelction charge More...
 
virtual ~BPHParticleChargeSelect ()
 
- Public Member Functions inherited from BPHRecoSelect
virtual bool accept (const reco::Candidate &cand, const BPHRecoBuilder *build) const
 
 BPHRecoSelect ()
 
virtual ~BPHRecoSelect ()
 

Private Member Functions

 BPHParticleChargeSelect (const BPHParticleChargeSelect &x)
 
BPHParticleChargeSelectoperator= (const BPHParticleChargeSelect &x)
 

Private Attributes

int charge
 

Additional Inherited Members

- Protected Member Functions inherited from BPHRecoSelect
const reco::Candidateget (const std::string &name, const BPHRecoBuilder *build) const
 

Detailed Description

Description: Class for particle selection by charge

Author
Paolo Ronchese INFN Padova

Definition at line 31 of file BPHParticleChargeSelect.h.

Constructor & Destructor Documentation

BPHParticleChargeSelect::BPHParticleChargeSelect ( int  c)
inline

Constructor

Definition at line 37 of file BPHParticleChargeSelect.h.

Referenced by getCharge().

37 : charge( c ? ( c > 0 ? 1 : -1 ) : 0 ) {}
virtual BPHParticleChargeSelect::~BPHParticleChargeSelect ( )
inlinevirtual

Destructor

Definition at line 41 of file BPHParticleChargeSelect.h.

References accept(), reco::Candidate::charge(), and charge.

41 {}
BPHParticleChargeSelect::BPHParticleChargeSelect ( const BPHParticleChargeSelect x)
private

Member Function Documentation

virtual bool BPHParticleChargeSelect::accept ( const reco::Candidate cand) const
inlinevirtual

select particle

Operations

Reimplemented from BPHRecoSelect.

Reimplemented in BPHMuonChargeSelect.

Definition at line 46 of file BPHParticleChargeSelect.h.

Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), esMonitoring.FDJsonServer::handle_accept(), BPHMuonChargeSelect::~BPHMuonChargeSelect(), and ~BPHParticleChargeSelect().

46  {
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  };
virtual int charge() const =0
electric charge
double BPHParticleChargeSelect::getCharge ( ) const
inline

get seelction charge

Definition at line 60 of file BPHParticleChargeSelect.h.

References BPHParticleChargeSelect(), charge, operator=(), and x.

BPHParticleChargeSelect& BPHParticleChargeSelect::operator= ( const BPHParticleChargeSelect x)
private

Referenced by getCharge().

void BPHParticleChargeSelect::setCharge ( int  c)
inline

set seelction charge

Definition at line 57 of file BPHParticleChargeSelect.h.

References charge.

57 { charge =( c ? ( c > 0 ? 1 : -1 ) : 0 ); return; }

Member Data Documentation

int BPHParticleChargeSelect::charge
private

Definition at line 68 of file BPHParticleChargeSelect.h.

Referenced by getCharge(), setCharge(), and ~BPHParticleChargeSelect().