CMS 3D CMS Logo

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

Public Member Functions

bool accept (const pat::CompositeCandidate &cand, const reco::Vertex *pv=nullptr) const override
 
 BPHFittedBasicSelect (float massMin, float massMax, float ptMin=-1.0, float etaMax=-1.0, float rapidityMax=-1.0)
 
 ~BPHFittedBasicSelect () override
 
- Public Member Functions inherited from BPHHistoSpecificDecay::CandidateSelect
virtual ~CandidateSelect ()=default
 

Private Attributes

float eMax
 
float mMax
 
float mMin
 
float pMin
 
float yMax
 

Detailed Description

Definition at line 260 of file BPHHistoSpecificDecay.cc.

Constructor & Destructor Documentation

◆ BPHFittedBasicSelect()

BPHFittedBasicSelect::BPHFittedBasicSelect ( float  massMin,
float  massMax,
float  ptMin = -1.0,
float  etaMax = -1.0,
float  rapidityMax = -1.0 
)
inline

◆ ~BPHFittedBasicSelect()

BPHFittedBasicSelect::~BPHFittedBasicSelect ( )
inlineoverride

Definition at line 264 of file BPHHistoSpecificDecay.cc.

264 {}

Member Function Documentation

◆ accept()

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

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 265 of file BPHHistoSpecificDecay.cc.

References MillePedeFileConverter_cfg::e, cosmicPhotonAnalyzer_cfi::eMax, PV3DBase< T, VectorTag, FrameTag >::eta(), dqm-mbProfile::log, EgHLTOffHistBins_cfi::mass, ALCARECOTkAlMinBias_cff::pMin, alignCSCRings::r, mathSSE::sqrt(), PV3DBase< T, VectorTag, FrameTag >::transverse(), x, PV3DBase< T, VectorTag, FrameTag >::x(), PV3DBase< T, VectorTag, FrameTag >::y(), multiplicitycorr_cfi::yMax, and PV3DBase< T, VectorTag, FrameTag >::z().

Referenced by esMonitoring.FDJsonServer::handle_accept().

265  {
266  if (!cand.hasUserFloat("fitMass"))
267  return false;
268  float mass = cand.userFloat("fitMass");
269  if (((mMin > 0) && (mMax < 0)) || ((mMin < 0) && (mMax > 0)) || ((mMin > 0) && (mMax > 0) && (mMin < mMax))) {
270  if (mass < mMin)
271  return false;
272  if ((mMax > 0) && (mass > mMax))
273  return false;
274  }
275  const Vector3DBase<float, GlobalTag>* fmom = BPHUserData::get<Vector3DBase<float, GlobalTag>>(cand, "fitMomentum");
276  if (fmom == nullptr)
277  return false;
278  if (pMin > 0) {
279  if (fmom->transverse() < pMin)
280  return false;
281  }
282  if (eMax > 0) {
283  if (fabs(fmom->eta()) > eMax)
284  return false;
285  }
286  if (yMax > 0) {
287  float x = fmom->x();
288  float y = fmom->y();
289  float z = fmom->z();
290  float e = sqrt((x * x) + (y * y) + (z * z) + (mass * mass));
291  float r = log((e + z) / (e - z)) / 2;
292  if (fabs(r) > yMax)
293  return false;
294  }
295  return true;
296  }
T sqrt(T t)
Definition: SSEVec.h:19

Member Data Documentation

◆ eMax

float BPHFittedBasicSelect::eMax
private

Definition at line 302 of file BPHHistoSpecificDecay.cc.

◆ mMax

float BPHFittedBasicSelect::mMax
private

Definition at line 300 of file BPHHistoSpecificDecay.cc.

◆ mMin

float BPHFittedBasicSelect::mMin
private

Definition at line 299 of file BPHHistoSpecificDecay.cc.

◆ pMin

float BPHFittedBasicSelect::pMin
private

Definition at line 301 of file BPHHistoSpecificDecay.cc.

◆ yMax

float BPHFittedBasicSelect::yMax
private

Definition at line 303 of file BPHHistoSpecificDecay.cc.