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 ()=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 172 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 174 of file BPHHistoSpecificDecay.cc.

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

◆ ~BPHDaughterSelect()

BPHDaughterSelect::~BPHDaughterSelect ( )
inlineoverride

Definition at line 180 of file BPHHistoSpecificDecay.cc.

180 {}

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

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

Referenced by esMonitoring.FDJsonServer::handle_accept().

181  {
182  return accept(cand, pLMin, pTMin, eLMax, eTMax, pv, sms);
183  }
def pv(vc)
Definition: MetAnalyzer.py:7
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 184 of file BPHHistoSpecificDecay.cc.

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

Referenced by esMonitoring.FDJsonServer::handle_accept().

190  {
191  const reco::Candidate* dptr0 = cand.daughter(0);
192  const reco::Candidate* dptr1 = cand.daughter(1);
193  if (dptr0 == nullptr)
194  return false;
195  if (dptr1 == nullptr)
196  return false;
197  float pt0 = dptr0->pt();
198  float pt1 = dptr1->pt();
199  if ((pt0 < ptMinLoose) || (pt1 < ptMinLoose))
200  return false;
201  if ((pt0 < ptMinTight) && (pt1 < ptMinTight))
202  return false;
203  float eta0 = fabs(dptr0->eta());
204  float eta1 = fabs(dptr1->eta());
205  if ((etaMaxLoose > 0) && ((eta0 > etaMaxLoose) || (eta1 > etaMaxLoose)))
206  return false;
207  if ((etaMaxTight > 0) && ((eta0 > etaMaxTight) && (eta1 > etaMaxTight)))
208  return false;
209  if (softMuonselector != nullptr) {
210  const reco::Vertex* pvtx = BPHUserData::getByRef<reco::Vertex>(cand, "primaryVertex");
211  if (pvtx == nullptr)
212  return false;
213  if (!softMuonselector->accept(*dptr0, pvtx))
214  return false;
215  if (!softMuonselector->accept(*dptr1, pvtx))
216  return false;
217  }
218  return true;
219  }
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 224 of file BPHHistoSpecificDecay.cc.

◆ eTMax

float BPHDaughterSelect::eTMax
private

Definition at line 225 of file BPHHistoSpecificDecay.cc.

◆ pLMin

float BPHDaughterSelect::pLMin
private

Definition at line 222 of file BPHHistoSpecificDecay.cc.

◆ pTMin

float BPHDaughterSelect::pTMin
private

Definition at line 223 of file BPHHistoSpecificDecay.cc.

◆ sms

const BPHSoftMuonSelect* BPHDaughterSelect::sms
private

Definition at line 226 of file BPHHistoSpecificDecay.cc.