CMS 3D CMS Logo

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

Public Member Functions

bool accept (const pat::CompositeCandidate &cand, const reco::Vertex *pvtx=0) const override
 
 BPHCompositeVertexSelect (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 241 of file BPHHistoSpecificDecay.cc.

Constructor & Destructor Documentation

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

Member Function Documentation

bool BPHCompositeVertexSelect::accept ( const pat::CompositeCandidate cand,
const reco::Vertex pvtx = 0 
) const
inlineoverridevirtual

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 245 of file BPHHistoSpecificDecay.cc.

References reco::Vertex::chi2(), ChiSquaredProbability(), reco::Vertex::error(), EgHLTOffHistBins_cfi::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().

245  {
246  const reco::Vertex* svtx = BPHUserData::get<reco::Vertex>(cand, "vertex");
247  if (svtx == nullptr)
248  return false;
249  if (pvtx == nullptr)
250  return false;
251  if (pMin > 0) {
252  if (ChiSquaredProbability(svtx->chi2(), svtx->ndof()) < pMin)
253  return false;
254  }
255  if ((cMin > 0) || (sMin > 0)) {
256  TVector3 disp(svtx->x() - pvtx->x(), svtx->y() - pvtx->y(), 0);
257  TVector3 cmom(cand.px(), cand.py(), 0);
258  float cosAlpha = disp.Dot(cmom) / (disp.Perp() * cmom.Perp());
259  if (cosAlpha < cMin)
260  return false;
261  if (sMin < 0)
262  return true;
263  float mass = cand.mass();
264  AlgebraicVector3 vmom(cand.px(), cand.py(), 0);
265  VertexDistanceXY vdistXY;
266  Measurement1D distXY = vdistXY.distance(*svtx, *pvtx);
267  double ctauPV = distXY.value() * cosAlpha * mass / cmom.Perp();
268  GlobalError sve = svtx->error();
269  GlobalError pve = pvtx->error();
270  AlgebraicSymMatrix33 vXYe = sve.matrix() + pve.matrix();
271  double ctauErrPV = sqrt(ROOT::Math::Similarity(vmom, vXYe)) * mass / cmom.Perp2();
272  if ((ctauPV / ctauErrPV) < sMin)
273  return false;
274  }
275  return true;
276  }
const AlgebraicSymMatrix33 matrix() const
double y() const
y coordinate
Definition: Vertex.h:117
T sqrt(T t)
Definition: SSEVec.h:19
double chi2() const
chi-squares
Definition: Vertex.h:102
float ChiSquaredProbability(double chiSquared, double nrDOF)
double ndof() const
Definition: Vertex.h:109
double x() const
x coordinate
Definition: Vertex.h:115
double value() const
Definition: Measurement1D.h:25
Error error() const
return SMatrix
Definition: Vertex.h:149
ROOT::Math::SVector< double, 3 > AlgebraicVector3
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33

Member Data Documentation

float BPHCompositeVertexSelect::cMin
private

Definition at line 280 of file BPHHistoSpecificDecay.cc.

float BPHCompositeVertexSelect::pMin
private

Definition at line 279 of file BPHHistoSpecificDecay.cc.

float BPHCompositeVertexSelect::sMin
private

Definition at line 281 of file BPHHistoSpecificDecay.cc.