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 (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

◆ 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.

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

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.

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_2022v15_cff::tagInfos, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::unBoost, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::use2d, TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::useSig, and relativeConstraints::value.

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)
reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX > TagInfo
Definition: value.py:1

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