CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
BPHDaughterSelect Class Reference
Inheritance diagram for BPHDaughterSelect:
BPHHistoSpecificDecay::CandidateSelect

Public Member Functions

bool accept (const pat::CompositeCandidate &cand, const reco::Vertex *pv=0) const
 
 BPHDaughterSelect (float ptMinLoose, float ptMinTight, float etaMaxLoose, float etaMaxTight, const BPHSoftMuonSelect *softMuonselector=0)
 
- Public Member Functions inherited from BPHHistoSpecificDecay::CandidateSelect
virtual ~CandidateSelect ()
 

Private Attributes

float eLMax
 
float eTMax
 
float pLMin
 
float pTMin
 
const BPHSoftMuonSelectsms
 

Detailed Description

Definition at line 125 of file BPHHistoSpecificDecay.cc.

Constructor & Destructor Documentation

BPHDaughterSelect::BPHDaughterSelect ( float  ptMinLoose,
float  ptMinTight,
float  etaMaxLoose,
float  etaMaxTight,
const BPHSoftMuonSelect softMuonselector = 0 
)
inline

Definition at line 127 of file BPHHistoSpecificDecay.cc.

132  : pLMin( ptMinLoose ),
133  pTMin( ptMinTight ),
134  eLMax( etaMaxLoose ),
135  eTMax( etaMaxTight ),
136  sms( softMuonselector ) {
137  }
const BPHSoftMuonSelect * sms

Member Function Documentation

bool BPHDaughterSelect::accept ( const pat::CompositeCandidate cand,
const reco::Vertex pv = 0 
) const
inlinevirtual

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 138 of file BPHHistoSpecificDecay.cc.

References reco::CompositeCandidate::daughter(), reco::Candidate::eta(), BPHUserData::getByRef(), reco::Candidate::pt(), hiDetachedQuadStep_cff::pt1, and particleFlowSimParticle_cfi::pTMin.

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

139  {
140  const reco::Candidate* dptr0 = cand.daughter( 0 );
141  const reco::Candidate* dptr1 = cand.daughter( 1 );
142  if ( dptr0 == 0 ) return false;
143  if ( dptr1 == 0 ) return false;
144  float pt0 = dptr0->pt();
145  float pt1 = dptr1->pt();
146  if ( ( pt0 < pLMin ) || ( pt1 < pLMin ) ) return false;
147  if ( ( pt0 < pTMin ) && ( pt1 < pTMin ) ) return false;
148  float eta0 = fabs( dptr0->eta() );
149  float eta1 = fabs( dptr1->eta() );
150  if ( ( eLMax > 0 ) &&
151  ( ( eta0 > eLMax ) || ( eta1 > eLMax ) ) ) return false;
152  if ( ( eTMax > 0 ) &&
153  ( ( eta0 > eTMax ) && ( eta1 > eTMax ) ) ) return false;
154  if ( sms != 0 ) {
155  const reco::Vertex* pvtx = BPHUserData::getByRef
156  <reco::Vertex>( cand, "primaryVertex" );
157  if ( pvtx == 0 ) return false;
158  if ( !sms->accept( *dptr0, pvtx ) ) return false;
159  if ( !sms->accept( *dptr1, pvtx ) ) return false;
160  }
161  return true;
162  }
static const T * getByRef(const pat::CompositeCandidate &cand, const string &name)
bool accept(const reco::Candidate &cand, const reco::Vertex *pv) const
virtual double eta() const =0
momentum pseudorapidity
virtual double pt() const =0
transverse momentum
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const BPHSoftMuonSelect * sms

Member Data Documentation

float BPHDaughterSelect::eLMax
private

Definition at line 166 of file BPHHistoSpecificDecay.cc.

float BPHDaughterSelect::eTMax
private

Definition at line 167 of file BPHHistoSpecificDecay.cc.

float BPHDaughterSelect::pLMin
private

Definition at line 164 of file BPHHistoSpecificDecay.cc.

float BPHDaughterSelect::pTMin
private

Definition at line 165 of file BPHHistoSpecificDecay.cc.

const BPHSoftMuonSelect* BPHDaughterSelect::sms
private

Definition at line 168 of file BPHHistoSpecificDecay.cc.