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=default
 
- 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 267 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 ( )
overridedefault

Member Function Documentation

◆ accept()

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

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 272 of file BPHHistoSpecificDecay.cc.

References MillePedeFileConverter_cfg::e, cosmicPhotonAnalyzer_cfi::eMax, PV3DBase< T, VectorTag, FrameTag >::eta(), CrabHelper::log, EgHLTOffHistBins_cfi::mass, ALCARECOTkAlMinBias_cff::pMin, 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().

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

Member Data Documentation

◆ eMax

float BPHFittedBasicSelect::eMax
private

Definition at line 309 of file BPHHistoSpecificDecay.cc.

◆ mMax

float BPHFittedBasicSelect::mMax
private

Definition at line 307 of file BPHHistoSpecificDecay.cc.

◆ mMin

float BPHFittedBasicSelect::mMin
private

Definition at line 306 of file BPHHistoSpecificDecay.cc.

◆ pMin

float BPHFittedBasicSelect::pMin
private

Definition at line 308 of file BPHHistoSpecificDecay.cc.

◆ yMax

float BPHFittedBasicSelect::yMax
private

Definition at line 310 of file BPHHistoSpecificDecay.cc.