CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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=nullptr) const override
 
 BPHDaughterSelect (float ptMinLoose, float ptMinTight, float etaMaxLoose, float etaMaxTight, const BPHSoftMuonSelect *softMuonselector=nullptr)
 
 ~BPHDaughterSelect () override
 
- Public Member Functions inherited from BPHHistoSpecificDecay::CandidateSelect
virtual ~CandidateSelect ()
 

Static Public Member Functions

static bool accept (const pat::CompositeCandidate &cand, float ptMinLoose, float ptMinTight, float etaMaxLoose, float etaMaxTight, const reco::Vertex *pv=nullptr, const BPHSoftMuonSelect *softMuonselector=nullptr)
 

Private Attributes

float eLMax
 
float eTMax
 
float pLMin
 
float pTMin
 
const BPHSoftMuonSelectsms
 

Detailed Description

Definition at line 182 of file BPHHistoSpecificDecay.cc.

Constructor & Destructor Documentation

◆ BPHDaughterSelect()

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

Definition at line 184 of file BPHHistoSpecificDecay.cc.

189  : pLMin(ptMinLoose), pTMin(ptMinTight), eLMax(etaMaxLoose), eTMax(etaMaxTight), sms(softMuonselector) {}

◆ ~BPHDaughterSelect()

BPHDaughterSelect::~BPHDaughterSelect ( )
inlineoverride

Definition at line 190 of file BPHHistoSpecificDecay.cc.

190 {}

Member Function Documentation

◆ accept() [1/2]

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

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 191 of file BPHHistoSpecificDecay.cc.

191  {
192  return accept(cand, pLMin, pTMin, eLMax, eTMax, pv, sms);
193  }

References accept(), and MetAnalyzer::pv().

Referenced by esMonitoring.FDJsonServer::handle_accept().

◆ accept() [2/2]

static bool BPHDaughterSelect::accept ( const pat::CompositeCandidate cand,
float  ptMinLoose,
float  ptMinTight,
float  etaMaxLoose,
float  etaMaxTight,
const reco::Vertex pv = nullptr,
const BPHSoftMuonSelect softMuonselector = nullptr 
)
inlinestatic

Definition at line 194 of file BPHHistoSpecificDecay.cc.

200  {
201  const reco::Candidate* dptr0 = cand.daughter(0);
202  const reco::Candidate* dptr1 = cand.daughter(1);
203  if (dptr0 == nullptr)
204  return false;
205  if (dptr1 == nullptr)
206  return false;
207  float pt0 = dptr0->pt();
208  float pt1 = dptr1->pt();
209  if ((pt0 < ptMinLoose) || (pt1 < ptMinLoose))
210  return false;
211  if ((pt0 < ptMinTight) && (pt1 < ptMinTight))
212  return false;
213  float eta0 = fabs(dptr0->eta());
214  float eta1 = fabs(dptr1->eta());
215  if ((etaMaxLoose > 0) && ((eta0 > etaMaxLoose) || (eta1 > etaMaxLoose)))
216  return false;
217  if ((etaMaxTight > 0) && ((eta0 > etaMaxTight) && (eta1 > etaMaxTight)))
218  return false;
219  if (softMuonselector != nullptr) {
220  const reco::Vertex* pvtx = BPHUserData::getByRef<reco::Vertex>(cand, "primaryVertex");
221  if (pvtx == nullptr)
222  return false;
223  if (!softMuonselector->accept(*dptr0, pvtx))
224  return false;
225  if (!softMuonselector->accept(*dptr1, pvtx))
226  return false;
227  }
228  return true;
229  }

References reco::Candidate::eta(), HLT_FULL_cff::eta1, reco::Candidate::pt(), and HLT_FULL_cff::pt1.

Referenced by esMonitoring.FDJsonServer::handle_accept().

Member Data Documentation

◆ eLMax

float BPHDaughterSelect::eLMax
private

Definition at line 234 of file BPHHistoSpecificDecay.cc.

◆ eTMax

float BPHDaughterSelect::eTMax
private

Definition at line 235 of file BPHHistoSpecificDecay.cc.

◆ pLMin

float BPHDaughterSelect::pLMin
private

Definition at line 232 of file BPHHistoSpecificDecay.cc.

◆ pTMin

float BPHDaughterSelect::pTMin
private

Definition at line 233 of file BPHHistoSpecificDecay.cc.

◆ sms

const BPHSoftMuonSelect* BPHDaughterSelect::sms
private

Definition at line 236 of file BPHHistoSpecificDecay.cc.

BPHDaughterSelect::eTMax
float eTMax
Definition: BPHHistoSpecificDecay.cc:235
reco::Candidate::eta
virtual double eta() const =0
momentum pseudorapidity
reco::Candidate::pt
virtual double pt() const =0
transverse momentum
BPHDaughterSelect::pLMin
float pLMin
Definition: BPHHistoSpecificDecay.cc:232
HLT_FULL_cff.pt1
pt1
Definition: HLT_FULL_cff.py:9893
HLT_FULL_cff.eta1
eta1
Definition: HLT_FULL_cff.py:9550
BPHDaughterSelect::eLMax
float eLMax
Definition: BPHHistoSpecificDecay.cc:234
cand
Definition: decayParser.h:32
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
BPHDaughterSelect::pTMin
float pTMin
Definition: BPHHistoSpecificDecay.cc:233
reco::Candidate
Definition: Candidate.h:27
BPHSoftMuonSelect::accept
bool accept(const reco::Candidate &cand, const reco::Vertex *pv) const
Definition: BPHHistoSpecificDecay.cc:150
BPHDaughterSelect::sms
const BPHSoftMuonSelect * sms
Definition: BPHHistoSpecificDecay.cc:236
reco::Vertex
Definition: Vertex.h:35
BPHDaughterSelect::accept
bool accept(const pat::CompositeCandidate &cand, const reco::Vertex *pv=nullptr) const override
Definition: BPHHistoSpecificDecay.cc:191