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=default
 
- Public Member Functions inherited from BPHHistoSpecificDecay::CandidateSelect
virtual ~CandidateSelect ()=default
 

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 179 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 181 of file BPHHistoSpecificDecay.cc.

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

◆ ~BPHDaughterSelect()

BPHDaughterSelect::~BPHDaughterSelect ( )
overridedefault

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 188 of file BPHHistoSpecificDecay.cc.

References accept().

Referenced by esMonitoring.FDJsonServer::handle_accept().

188  {
189  return accept(cand, pLMin, pTMin, eLMax, eTMax, pv, sms);
190  }
const BPHSoftMuonSelect * sms
bool accept(const pat::CompositeCandidate &cand, const reco::Vertex *pv=nullptr) const override

◆ 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 191 of file BPHHistoSpecificDecay.cc.

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

Referenced by esMonitoring.FDJsonServer::handle_accept().

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

Member Data Documentation

◆ eLMax

float BPHDaughterSelect::eLMax
private

Definition at line 231 of file BPHHistoSpecificDecay.cc.

◆ eTMax

float BPHDaughterSelect::eTMax
private

Definition at line 232 of file BPHHistoSpecificDecay.cc.

◆ pLMin

float BPHDaughterSelect::pLMin
private

Definition at line 229 of file BPHHistoSpecificDecay.cc.

◆ pTMin

float BPHDaughterSelect::pTMin
private

Definition at line 230 of file BPHHistoSpecificDecay.cc.

◆ sms

const BPHSoftMuonSelect* BPHDaughterSelect::sms
private

Definition at line 233 of file BPHHistoSpecificDecay.cc.