CMS 3D CMS Logo

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
 

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 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 21 of file TemplatedSimpleSecondaryVertexComputer.h.

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

21  :
22  use2d(!parameters.getParameter<bool>("use3d")),
23  useSig(parameters.getParameter<bool>("useSignificance")),
24  unBoost(parameters.getParameter<bool>("unBoost")),
25  minTracks(parameters.getParameter<unsigned int>("minTracks")),
26  minVertices_(1)
27  {
28  uses("svTagInfos");
29  minVertices_ = parameters.existsAs<unsigned int>("minVertices") ? parameters.getParameter<unsigned int>("minVertices") : 1 ;
30  }
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:186
void uses(unsigned int id, const std::string &label)

Member Function Documentation

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

Reimplemented from JetTagComputer.

Definition at line 32 of file TemplatedSimpleSecondaryVertexComputer.h.

References reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX >::flightDistance(), CustomPhysics_cfi::gamma, JetTagComputer::TagInfoHelper::get(), training_settings::idx, info(), cmsBatch::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().

33  {
34  const TagInfo &info =
35  tagInfos.get<TagInfo>();
36  if(info.nVertices() < minVertices_) return -1;
37  unsigned int idx = 0;
38  while(idx < info.nVertices()) {
39  if (info.nVertexTracks(idx) >= minTracks)
40  break;
41  idx++;
42  }
43  if (idx >= info.nVertices())
44  return -1.0;
45 
46  double gamma;
47  if (unBoost) {
48  reco::TrackKinematics kinematics(
49  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)
64  : -std::log(1 - value);
65 
66  return value;
67  }
static const TGPicture * info(bool iBackgroundIsBlack)
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