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
 
 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 263 of file BPHHistoSpecificDecay.cc.

Constructor & Destructor Documentation

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

Definition at line 265 of file BPHHistoSpecificDecay.cc.

267  : pMin( probMin ),
268  cMin( cosMin ),
269  sMin( sigMin ) {
270  }

Member Function Documentation

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

Implements BPHHistoSpecificDecay::CandidateSelect.

Definition at line 271 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().

272  {
273  const reco::Vertex* svtx = BPHUserData::get
274  <reco::Vertex>( cand, "vertex" );
275  if ( svtx == 0 ) return false;
276  if ( pvtx == 0 ) return false;
277  if ( pMin > 0 ) {
278  if ( ChiSquaredProbability( svtx->chi2(),
279  svtx->ndof() ) < pMin ) return false;
280  }
281  if ( ( cMin > 0 ) || ( sMin > 0 ) ) {
282  TVector3 disp( svtx->x() - pvtx->x(),
283  svtx->y() - pvtx->y(),
284  0 );
285  TVector3 cmom( cand.px(), cand.py(), 0 );
286  float cosAlpha = disp.Dot( cmom ) / ( disp.Perp() * cmom.Perp() );
287  if ( cosAlpha < cMin ) return false;
288  if ( sMin < 0 ) return true;
289  float mass = cand.mass();
290  AlgebraicVector3 vmom( cand.px(), cand.py(), 0 );
291  VertexDistanceXY vdistXY;
292  Measurement1D distXY = vdistXY.distance( *svtx, *pvtx );
293  double ctauPV = distXY.value() * cosAlpha * mass / cmom.Perp();
294  GlobalError sve = svtx->error();
295  GlobalError pve = pvtx->error();
296  AlgebraicSymMatrix33 vXYe = sve.matrix() + pve.matrix();
297  double ctauErrPV = sqrt( ROOT::Math::Similarity( vmom, vXYe ) ) * mass /
298  cmom.Perp2();
299  if ( ( ctauPV / ctauErrPV ) < sMin ) return false;
300  }
301  return true;
302  }
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 BPHCompositeVertexSelect::cMin
private

Definition at line 306 of file BPHHistoSpecificDecay.cc.

float BPHCompositeVertexSelect::pMin
private

Definition at line 305 of file BPHHistoSpecificDecay.cc.

float BPHCompositeVertexSelect::sMin
private

Definition at line 307 of file BPHHistoSpecificDecay.cc.