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
 
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 (const std::string &label)
 
void uses (unsigned int id, 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

◆ TagInfo

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

Definition at line 21 of file TemplatedSimpleSecondaryVertexComputer.h.

◆ Tokens

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

Definition at line 19 of file TemplatedSimpleSecondaryVertexComputer.h.

Constructor & Destructor Documentation

◆ TemplatedSimpleSecondaryVertexComputer()

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

Definition at line 23 of file TemplatedSimpleSecondaryVertexComputer.h.

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  }

References TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minVertices_, and JetTagComputer::uses().

Member Function Documentation

◆ discriminator()

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.

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  }

References CustomPhysics_cfi::gamma, heavyIonCSV_trainingSettings::idx, info(), Pyquen_Zmumu_2760GeV_dimuonAcc_cfi::kinematics, dqm-mbProfile::log, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minTracks, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minVertices_, HLT_FULL_cff::tagInfos, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::unBoost, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::use2d, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::useSig, and relativeConstraints::value.

Member Data Documentation

◆ minTracks

template<class IPTI , class VTX >
unsigned int TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minTracks
private

◆ minVertices_

template<class IPTI , class VTX >
unsigned int TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::minVertices_
private

◆ unBoost

template<class IPTI , class VTX >
bool TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::unBoost
private

◆ use2d

template<class IPTI , class VTX >
bool TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::use2d
private

◆ useSig

template<class IPTI , class VTX >
bool TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::useSig
private
TemplatedSimpleSecondaryVertexComputer::use2d
bool use2d
Definition: TemplatedSimpleSecondaryVertexComputer.h:69
reco::TrackKinematics
Definition: TrackKinematics.h:16
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:29
HLT_FULL_cff.tagInfos
tagInfos
Definition: HLT_FULL_cff.py:53063
TemplatedSimpleSecondaryVertexComputer::unBoost
bool unBoost
Definition: TemplatedSimpleSecondaryVertexComputer.h:71
CustomPhysics_cfi.gamma
gamma
Definition: CustomPhysics_cfi.py:17
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
TemplatedSimpleSecondaryVertexComputer::TagInfo
reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX > TagInfo
Definition: TemplatedSimpleSecondaryVertexComputer.h:21
TemplatedSimpleSecondaryVertexComputer::minVertices_
unsigned int minVertices_
Definition: TemplatedSimpleSecondaryVertexComputer.h:73
TemplatedSimpleSecondaryVertexComputer::useSig
bool useSig
Definition: TemplatedSimpleSecondaryVertexComputer.h:70
value
Definition: value.py:1
TemplatedSimpleSecondaryVertexComputer::minTracks
unsigned int minTracks
Definition: TemplatedSimpleSecondaryVertexComputer.h:72
JetTagComputer::uses
void uses(unsigned int id, const std::string &label)
Definition: JetTagComputer.cc:17
relativeConstraints.value
value
Definition: relativeConstraints.py:53
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
Pyquen_Zmumu_2760GeV_dimuonAcc_cfi.kinematics
kinematics
Definition: Pyquen_Zmumu_2760GeV_dimuonAcc_cfi.py:19