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=0) const override
 
 BPHFittedBasicSelect (float massMin, float massMax, float ptMin=-1.0, float etaMax=-1.0, float rapidityMax=-1.0)
 
- Public Member Functions inherited from BPHHistoSpecificDecay::CandidateSelect
virtual ~CandidateSelect ()
 

Private Attributes

float eMax
 
float mMax
 
float mMin
 
float pMin
 
float rMax
 

Detailed Description

Definition at line 211 of file BPHHistoSpecificDecay.cc.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 223 of file BPHHistoSpecificDecay.cc.

References MillePedeFileConverter_cfg::e, photonPostprocessing_cfi::eMax, PV3DBase< T, PVType, FrameType >::eta(), BPHUserData::get(), pat::PATObject< ObjectType >::hasUserFloat(), cmsBatch::log, ResonanceBuilder::mass, ALCARECOTkAlMinBias_cff::pMin, alignCSCRings::r, conversionPostprocessing_cfi::rMax, mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::transverse(), pat::PATObject< ObjectType >::userFloat(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), and esMonitoring.FDJsonServer::handle_accept().

224  {
225  if ( !cand.hasUserFloat( "fitMass" ) ) return false;
226  float mass = cand.userFloat( "fitMass" );
227  if ( ( ( mMin > 0 ) && ( mMax < 0 ) ) ||
228  ( ( mMin < 0 ) && ( mMax > 0 ) ) ||
229  ( ( mMin > 0 ) && ( mMax > 0 ) && ( mMin < mMax ) ) ) {
230  if ( mass < mMin ) return false;
231  if ( ( mMax > 0 ) &&
232  ( mass > mMax ) ) return false;
233  }
235  < Vector3DBase<float,GlobalTag> >( cand, "fitMomentum" );
236  if ( fmom == nullptr ) return false;
237  if ( pMin > 0 ) {
238  if ( fmom->transverse() < pMin ) return false;
239  }
240  if ( eMax > 0 ) {
241  if ( fabs( fmom->eta() ) > eMax ) return false;
242  }
243  if ( rMax > 0 ) {
244  float x = fmom->x();
245  float y = fmom->y();
246  float z = fmom->z();
247  float e = sqrt( ( x * x ) + ( y * y ) + ( z * z ) + ( mass * mass ) );
248  float r = log( ( e + z ) / ( e - z ) ) / 2;
249  if ( fabs( r ) > rMax ) return false;
250  }
251  return true;
252  }
T y() const
Definition: PV3DBase.h:63
bool hasUserFloat(const std::string &key) const
Return true if there is a user-defined float with a given name.
Definition: PATObject.h:334
float userFloat(const std::string &key) const
Definition: PATObject.h:791
static const T * get(const pat::CompositeCandidate &cand, const string &name)
T transverse() const
Definition: PV3DBase.h:73
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
T eta() const
Definition: PV3DBase.h:76
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

float BPHFittedBasicSelect::eMax
private

Definition at line 258 of file BPHHistoSpecificDecay.cc.

float BPHFittedBasicSelect::mMax
private

Definition at line 256 of file BPHHistoSpecificDecay.cc.

float BPHFittedBasicSelect::mMin
private

Definition at line 255 of file BPHHistoSpecificDecay.cc.

float BPHFittedBasicSelect::pMin
private

Definition at line 257 of file BPHHistoSpecificDecay.cc.

float BPHFittedBasicSelect::rMax
private

Definition at line 259 of file BPHHistoSpecificDecay.cc.