CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
TemplatedSimpleSecondaryVertexComputer< IPTI, VTX > Class Template Reference

#include <TemplatedSimpleSecondaryVertexComputer.h>

Inheritance diagram for TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >:
JetTagComputer

Public Types

typedef
reco::TemplatedSecondaryVertexTagInfo
< IPTI, VTX > 
TagInfo
 
using Tokens = void
 

Public Member Functions

float discriminator (const TagInfoHelper &tagInfos) const override
 
 TemplatedSimpleSecondaryVertexComputer (const edm::ParameterSet &parameters)
 
- Public Member Functions inherited from JetTagComputer
const std::vector< std::string > & getInputLabels () const
 
virtual void initialize (const JetTagComputerRecord &)
 
 JetTagComputer ()
 
 JetTagComputer (const edm::ParameterSet &configuration)
 
float operator() (const reco::BaseTagInfo &info) const
 
float operator() (const TagInfoHelper &helper) const
 
void setupDone ()
 
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

template<class IPTI, class VTX>
class TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >

Definition at line 17 of file TemplatedSimpleSecondaryVertexComputer.h.

Member Typedef Documentation

template<class IPTI , class VTX >
typedef reco::TemplatedSecondaryVertexTagInfo<IPTI, VTX> TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::TagInfo

Definition at line 21 of file TemplatedSimpleSecondaryVertexComputer.h.

template<class IPTI , class VTX >
using TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::Tokens = void

Definition at line 19 of file TemplatedSimpleSecondaryVertexComputer.h.

Constructor & Destructor Documentation

template<class IPTI , class VTX >
TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::TemplatedSimpleSecondaryVertexComputer ( const edm::ParameterSet parameters)
inline

Definition at line 23 of file TemplatedSimpleSecondaryVertexComputer.h.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minVertices_, and JetTagComputer::uses().

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

Member Function Documentation

template<class IPTI , class VTX >
float TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::discriminator ( const TagInfoHelper tagInfos) const
inlineoverridevirtual

Reimplemented from JetTagComputer.

Definition at line 34 of file TemplatedSimpleSecondaryVertexComputer.h.

References reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX >::flightDistance(), JetTagComputer::TagInfoHelper::get(), info(), log, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minTracks, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minVertices_, reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX >::nVertexTracks(), reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX >::nVertices(), reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX >::secondaryVertex(), Measurement1D::significance(), TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::unBoost, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::use2d, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::useSig, Measurement1D::value(), relativeConstraints::value, and reco::TrackKinematics::vectorSum().

34  {
35  const TagInfo &info = tagInfos.get<TagInfo>();
36  if (info.nVertices() < minVertices_)
37  return -1;
38  unsigned int idx = 0;
39  while (idx < info.nVertices()) {
40  if (info.nVertexTracks(idx) >= minTracks)
41  break;
42  idx++;
43  }
44  if (idx >= info.nVertices())
45  return -1.0;
46 
47  double gamma;
48  if (unBoost) {
49  reco::TrackKinematics kinematics(info.secondaryVertex(idx));
50  gamma = kinematics.vectorSum().Gamma();
51  } else
52  gamma = 1.0;
53 
54  double value;
55  if (useSig)
56  value = info.flightDistance(idx, use2d).significance();
57  else
58  value = info.flightDistance(idx, use2d).value();
59 
60  value /= gamma;
61 
62  if (useSig)
63  value = (value > 0) ? +std::log(1 + value) : -std::log(1 - value);
64 
65  return value;
66  }
static const TGPicture * info(bool iBackgroundIsBlack)
static std::vector< std::string > checklist log
reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX > TagInfo
const math::XYZTLorentzVector & vectorSum() const

Member Data Documentation

template<class IPTI , class VTX >
unsigned int TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minTracks
private
template<class IPTI , class VTX >
unsigned int TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minVertices_
private
template<class IPTI , class VTX >
bool TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::unBoost
private
template<class IPTI , class VTX >
bool TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::use2d
private
template<class IPTI , class VTX >
bool TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::useSig
private