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 ()
 

Private Attributes

float eMax
 
float mMax
 
float mMin
 
float pMin
 
float yMax
 

Detailed Description

Definition at line 270 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

Definition at line 272 of file BPHHistoSpecificDecay.cc.

273  : mMin(massMin), mMax(massMax), pMin(ptMin), eMax(etaMax), yMax(rapidityMax) {}

◆ ~BPHFittedBasicSelect()

BPHFittedBasicSelect::~BPHFittedBasicSelect ( )
inlineoverride

Definition at line 274 of file BPHHistoSpecificDecay.cc.

274 {}

Member Function Documentation

◆ accept()

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

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 275 of file BPHHistoSpecificDecay.cc.

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

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(), 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().

Member Data Documentation

◆ eMax

float BPHFittedBasicSelect::eMax
private

Definition at line 312 of file BPHHistoSpecificDecay.cc.

◆ mMax

float BPHFittedBasicSelect::mMax
private

Definition at line 310 of file BPHHistoSpecificDecay.cc.

◆ mMin

float BPHFittedBasicSelect::mMin
private

Definition at line 309 of file BPHHistoSpecificDecay.cc.

◆ pMin

float BPHFittedBasicSelect::pMin
private

Definition at line 311 of file BPHHistoSpecificDecay.cc.

◆ yMax

float BPHFittedBasicSelect::yMax
private

Definition at line 313 of file BPHHistoSpecificDecay.cc.

Vector3DBase
Definition: Vector3DBase.h:8
BPHFittedBasicSelect::mMin
float mMin
Definition: BPHHistoSpecificDecay.cc:309
DDAxes::y
PV3DBase< T, VectorTag, FrameTag >::x
T x() const
Definition: PV3DBase.h:59
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:155
ZMuMuCategoriesSequences_cff.massMin
massMin
Definition: ZMuMuCategoriesSequences_cff.py:136
DDAxes::x
PV3DBase< T, VectorTag, FrameTag >::z
T z() const
Definition: PV3DBase.h:61
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
BPHFittedBasicSelect::eMax
float eMax
Definition: BPHHistoSpecificDecay.cc:312
BPHFittedBasicSelect::yMax
float yMax
Definition: BPHHistoSpecificDecay.cc:313
PV3DBase< T, VectorTag, FrameTag >::eta
T eta() const
Definition: PV3DBase.h:73
cand
Definition: decayParser.h:32
PV3DBase< T, VectorTag, FrameTag >::y
T y() const
Definition: PV3DBase.h:60
ZMuMuCategoriesSequences_cff.massMax
massMax
Definition: ZMuMuCategoriesSequences_cff.py:137
alignCSCRings.r
r
Definition: alignCSCRings.py:93
BPHFittedBasicSelect::mMax
float mMax
Definition: BPHHistoSpecificDecay.cc:310
BPHFittedBasicSelect::pMin
float pMin
Definition: BPHHistoSpecificDecay.cc:311
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
ALCARECOTkAlBeamHalo_cff.etaMax
etaMax
Definition: ALCARECOTkAlBeamHalo_cff.py:33
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
PV3DBase< T, VectorTag, FrameTag >::transverse
T transverse() const
Definition: PV3DBase.h:70
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37