CMS 3D CMS Logo

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

Public Member Functions

bool accept (const pat::CompositeCandidate &cand, const reco::Vertex *pvtx) const override
 
 BPHFittedVertexSelect (float probMin, float cosMin=-1.0, float sigMin=-1.0)
 
- Public Member Functions inherited from BPHHistoSpecificDecay::CandidateSelect
virtual ~CandidateSelect ()
 

Private Attributes

float cMin
 
float pMin
 
float sMin
 

Detailed Description

Definition at line 311 of file BPHHistoSpecificDecay.cc.

Constructor & Destructor Documentation

BPHFittedVertexSelect::BPHFittedVertexSelect ( float  probMin,
float  cosMin = -1.0,
float  sigMin = -1.0 
)
inline

Definition at line 313 of file BPHHistoSpecificDecay.cc.

315  : pMin( probMin ),
316  cMin( cosMin ),
317  sMin( sigMin ) {
318  }

Member Function Documentation

bool BPHFittedVertexSelect::accept ( const pat::CompositeCandidate cand,
const reco::Vertex pvtx 
) const
inlineoverridevirtual

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 319 of file BPHHistoSpecificDecay.cc.

References reco::Vertex::chi2(), ChiSquaredProbability(), reco::Vertex::error(), BPHUserData::get(), ResonanceBuilder::mass, GlobalErrorBase< T, ErrorWeightType >::matrix(), reco::Vertex::ndof(), ALCARECOTkAlMinBias_cff::pMin, mathSSE::sqrt(), Measurement1D::value(), reco::Vertex::x(), and reco::Vertex::y().

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

320  {
321  const reco::Vertex* svtx = BPHUserData::get
322  <reco::Vertex>( cand, "fitVertex" );
323  if ( svtx == nullptr ) return false;
324  if ( pMin > 0 ) {
325  if ( ChiSquaredProbability( svtx->chi2(),
326  svtx->ndof() ) < pMin ) return false;
327  }
328  if ( ( cMin > 0 ) || ( sMin > 0 ) ) {
329  TVector3 disp( svtx->x() - pvtx->x(),
330  svtx->y() - pvtx->y(),
331  0 );
333  < Vector3DBase<float,GlobalTag> >( cand, "fitMomentum" );
334  if ( fmom == nullptr ) return false;
335  TVector3 cmom( fmom->x(), fmom->y(), 0 );
336  float cosAlpha = disp.Dot( cmom ) / ( disp.Perp() * cmom.Perp() );
337  if ( cosAlpha < cMin ) return false;
338  if ( sMin < 0 ) return true;
339  if ( !cand.hasUserFloat( "fitMass" ) ) return false;
340  float mass = cand.userFloat( "fitMass" );
341  AlgebraicVector3 vmom( fmom->x(), fmom->y(), 0 );
342  VertexDistanceXY vdistXY;
343  Measurement1D distXY = vdistXY.distance( *svtx, *pvtx );
344  double ctauPV = distXY.value() * cosAlpha * mass / cmom.Perp();
345  GlobalError sve = svtx->error();
346  GlobalError pve = pvtx->error();
347  AlgebraicSymMatrix33 vXYe = sve.matrix() + pve.matrix();
348  double ctauErrPV = sqrt( ROOT::Math::Similarity( vmom, vXYe ) ) * mass /
349  cmom.Perp2();
350  if ( ( ctauPV / ctauErrPV ) < sMin ) return false;
351  }
352  return true;
353  }
const AlgebraicSymMatrix33 matrix() const
double y() const
y coordinate
Definition: Vertex.h:113
static const T * get(const pat::CompositeCandidate &cand, const string &name)
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
T sqrt(T t)
Definition: SSEVec.h:18
ROOT::Math::SVector< double, 3 > AlgebraicVector3
double chi2() const
chi-squares
Definition: Vertex.h:98
float ChiSquaredProbability(double chiSquared, double nrDOF)
double ndof() const
Definition: Vertex.h:105
double x() const
x coordinate
Definition: Vertex.h:111
double value() const
Definition: Measurement1D.h:28
Error error() const
return SMatrix
Definition: Vertex.h:139

Member Data Documentation

float BPHFittedVertexSelect::cMin
private

Definition at line 357 of file BPHHistoSpecificDecay.cc.

float BPHFittedVertexSelect::pMin
private

Definition at line 356 of file BPHHistoSpecificDecay.cc.

float BPHFittedVertexSelect::sMin
private

Definition at line 358 of file BPHHistoSpecificDecay.cc.