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 override
 
 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 119 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 121 of file BPHHistoSpecificDecay.cc.

126  : pLMin(ptMinLoose), pTMin(ptMinTight), eLMax(etaMaxLoose), eTMax(etaMaxTight), sms(softMuonselector) {}
const BPHSoftMuonSelect * sms

Member Function Documentation

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

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 127 of file BPHHistoSpecificDecay.cc.

References reco::CompositeCandidate::daughter(), reco::Candidate::eta(), HLT_2018_cff::eta1, reco::Candidate::pt(), HLT_2018_cff::pt1, and tauHadronDecayFilter_cfi::pTMin.

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

127  {
128  const reco::Candidate* dptr0 = cand.daughter(0);
129  const reco::Candidate* dptr1 = cand.daughter(1);
130  if (dptr0 == nullptr)
131  return false;
132  if (dptr1 == nullptr)
133  return false;
134  float pt0 = dptr0->pt();
135  float pt1 = dptr1->pt();
136  if ((pt0 < pLMin) || (pt1 < pLMin))
137  return false;
138  if ((pt0 < pTMin) && (pt1 < pTMin))
139  return false;
140  float eta0 = fabs(dptr0->eta());
141  float eta1 = fabs(dptr1->eta());
142  if ((eLMax > 0) && ((eta0 > eLMax) || (eta1 > eLMax)))
143  return false;
144  if ((eTMax > 0) && ((eta0 > eTMax) && (eta1 > eTMax)))
145  return false;
146  if (sms != nullptr) {
147  const reco::Vertex* pvtx = BPHUserData::getByRef<reco::Vertex>(cand, "primaryVertex");
148  if (pvtx == nullptr)
149  return false;
150  if (!sms->accept(*dptr0, pvtx))
151  return false;
152  if (!sms->accept(*dptr1, pvtx))
153  return false;
154  }
155  return true;
156  }
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
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
const BPHSoftMuonSelect * sms

Member Data Documentation

float BPHDaughterSelect::eLMax
private

Definition at line 161 of file BPHHistoSpecificDecay.cc.

float BPHDaughterSelect::eTMax
private

Definition at line 162 of file BPHHistoSpecificDecay.cc.

float BPHDaughterSelect::pLMin
private

Definition at line 159 of file BPHHistoSpecificDecay.cc.

float BPHDaughterSelect::pTMin
private

Definition at line 160 of file BPHHistoSpecificDecay.cc.

const BPHSoftMuonSelect* BPHDaughterSelect::sms
private

Definition at line 163 of file BPHHistoSpecificDecay.cc.