CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SimpleSecondaryVertexComputer Class Reference

#include <SimpleSecondaryVertexComputer.h>

Inheritance diagram for SimpleSecondaryVertexComputer:
JetTagComputer

Public Member Functions

float discriminator (const TagInfoHelper &tagInfos) const
 
 SimpleSecondaryVertexComputer (const edm::ParameterSet &parameters)
 
- Public Member Functions inherited from JetTagComputer
const std::vector< std::string > & getInputLabels () const
 
 JetTagComputer ()
 
 JetTagComputer (const edm::ParameterSet &configuration)
 
float operator() (const reco::BaseTagInfo &info) const
 
float operator() (const TagInfoHelper &helper) const
 
virtual void setEventSetup (const edm::EventSetup &) const
 
virtual ~JetTagComputer ()
 

Private Attributes

unsigned int minTracks
 
unsigned int minVertices_
 
bool unBoost
 
bool use2d
 
bool useSig
 

Additional Inherited Members

- Protected Member Functions inherited from JetTagComputer
virtual float discriminator (const reco::BaseTagInfo &) const
 
void uses (unsigned int id, const std::string &label)
 
void uses (const std::string &label)
 

Detailed Description

Definition at line 16 of file SimpleSecondaryVertexComputer.h.

Constructor & Destructor Documentation

SimpleSecondaryVertexComputer::SimpleSecondaryVertexComputer ( const edm::ParameterSet parameters)
inline

Definition at line 18 of file SimpleSecondaryVertexComputer.h.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), minVertices_, and JetTagComputer::uses().

18  :
19  use2d(!parameters.getParameter<bool>("use3d")),
20  useSig(parameters.getParameter<bool>("useSignificance")),
21  unBoost(parameters.getParameter<bool>("unBoost")),
22  minTracks(parameters.getParameter<unsigned int>("minTracks")),
23  minVertices_(1)
24  {
25  uses("svTagInfos");
26  minVertices_ = parameters.existsAs<unsigned int>("minVertices") ? parameters.getParameter<unsigned int>("minVertices") : 1 ;
27  }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:187
void uses(unsigned int id, const std::string &label)

Member Function Documentation

float SimpleSecondaryVertexComputer::discriminator ( const TagInfoHelper tagInfos) const
inlinevirtual

Reimplemented from JetTagComputer.

Definition at line 29 of file SimpleSecondaryVertexComputer.h.

References reco::SecondaryVertexTagInfo::flightDistance(), JetTagComputer::TagInfoHelper::get(), info, create_public_lumi_plots::log, minTracks, minVertices_, reco::SecondaryVertexTagInfo::nVertexTracks(), reco::SecondaryVertexTagInfo::nVertices(), reco::SecondaryVertexTagInfo::secondaryVertex(), Measurement1D::significance(), unBoost, use2d, useSig, Measurement1D::value(), relativeConstraints::value, and reco::TrackKinematics::vectorSum().

30  {
32  tagInfos.get<reco::SecondaryVertexTagInfo>();
33  if(info.nVertices() < minVertices_) return -1;
34  unsigned int idx = 0;
35  while(idx < info.nVertices()) {
36  if (info.nVertexTracks(idx) >= minTracks)
37  break;
38  idx++;
39  }
40  if (idx >= info.nVertices())
41  return -1.0;
42 
43  double gamma;
44  if (unBoost) {
45  reco::TrackKinematics kinematics(
46  info.secondaryVertex(idx));
47  gamma = kinematics.vectorSum().Gamma();
48  } else
49  gamma = 1.0;
50 
51  double value;
52  if (useSig)
53  value = info.flightDistance(idx, use2d).significance();
54  else
55  value = info.flightDistance(idx, use2d).value();
56 
57  value /= gamma;
58 
59  if (useSig)
60  value = (value > 0) ? +std::log(1 + value)
61  : -std::log(1 - value);
62 
63  return value;
64  }
Measurement1D flightDistance(unsigned int index, bool in2d=false) const
const Vertex & secondaryVertex(unsigned int index) const
double significance() const
Definition: Measurement1D.h:32
double value() const
Definition: Measurement1D.h:28
const math::XYZTLorentzVector & vectorSum() const

Member Data Documentation

unsigned int SimpleSecondaryVertexComputer::minTracks
private

Definition at line 70 of file SimpleSecondaryVertexComputer.h.

Referenced by discriminator().

unsigned int SimpleSecondaryVertexComputer::minVertices_
private

Definition at line 71 of file SimpleSecondaryVertexComputer.h.

Referenced by discriminator(), and SimpleSecondaryVertexComputer().

bool SimpleSecondaryVertexComputer::unBoost
private

Definition at line 69 of file SimpleSecondaryVertexComputer.h.

Referenced by discriminator().

bool SimpleSecondaryVertexComputer::use2d
private

Definition at line 67 of file SimpleSecondaryVertexComputer.h.

Referenced by discriminator().

bool SimpleSecondaryVertexComputer::useSig
private

Definition at line 68 of file SimpleSecondaryVertexComputer.h.

Referenced by discriminator().