test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoBTag
SecondaryVertex
interface
TemplatedSimpleSecondaryVertexComputer.h
Go to the documentation of this file.
1
#ifndef RecoBTag_SecondaryVertex_TemplatedSimpleSecondaryVertexComputer_h
2
#define RecoBTag_SecondaryVertex_TemplatedSimpleSecondaryVertexComputer_h
3
4
#include <cmath>
5
6
#include "Math/GenVector/VectorUtil.h"
7
8
#include "
DataFormats/TrackReco/interface/Track.h
"
9
#include "
DataFormats/VertexReco/interface/Vertex.h
"
10
#include "
DataFormats/BTauReco/interface/TemplatedSecondaryVertexTagInfo.h
"
11
12
#include "
RecoBTau/JetTagComputer/interface/JetTagComputer.h
"
13
14
#include "
RecoBTag/SecondaryVertex/interface/TrackKinematics.h
"
15
16
template
<
class
IPTI,
class
VTX>
17
class
TemplatedSimpleSecondaryVertexComputer
:
public
JetTagComputer
{
18
public
:
19
typedef
reco::TemplatedSecondaryVertexTagInfo<IPTI,VTX>
TagInfo
;
20
21
TemplatedSimpleSecondaryVertexComputer
(
const
edm::ParameterSet
&
parameters
) :
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
}
31
32
float
discriminator
(
const
TagInfoHelper
&
tagInfos
)
const
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
}
68
69
private
:
70
bool
use2d
;
71
bool
useSig
;
72
bool
unBoost
;
73
unsigned
int
minTracks
;
74
unsigned
int
minVertices_
;
75
};
76
77
#endif // RecoBTag_SecondaryVertex_TemplatedSimpleSecondaryVertexComputer_h
TemplatedSimpleSecondaryVertexComputer::TemplatedSimpleSecondaryVertexComputer
TemplatedSimpleSecondaryVertexComputer(const edm::ParameterSet ¶meters)
Definition:
TemplatedSimpleSecondaryVertexComputer.h:21
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HLT_25ns10e33_v2_cff.tagInfos
tuple tagInfos
Definition:
HLT_25ns10e33_v2_cff.py:9761
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition:
FWCollectionSummaryWidget.cc:170
JetTagComputer::TagInfoHelper::get
const T & get(unsigned int index=0) const
Definition:
JetTagComputer.h:49
TemplatedSecondaryVertexTagInfo.h
edm::ParameterSet::existsAs
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition:
ParameterSet.h:186
TemplatedSimpleSecondaryVertexComputer::discriminator
float discriminator(const TagInfoHelper &tagInfos) const
Definition:
TemplatedSimpleSecondaryVertexComputer.h:32
reco::TemplatedSecondaryVertexTagInfo::secondaryVertex
const VTX & secondaryVertex(unsigned int index) const
Definition:
TemplatedSecondaryVertexTagInfo.h:126
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
reco::TemplatedSecondaryVertexTagInfo
Definition:
TemplatedSecondaryVertexTagInfo.h:54
JetTagComputer::TagInfoHelper
Definition:
JetTagComputer.h:16
TemplatedSimpleSecondaryVertexComputer::unBoost
bool unBoost
Definition:
TemplatedSimpleSecondaryVertexComputer.h:72
TemplatedSimpleSecondaryVertexComputer::use2d
bool use2d
Definition:
TemplatedSimpleSecondaryVertexComputer.h:70
TemplatedSimpleSecondaryVertexComputer::useSig
bool useSig
Definition:
TemplatedSimpleSecondaryVertexComputer.h:71
TemplatedSimpleSecondaryVertexComputer::minVertices_
unsigned int minVertices_
Definition:
TemplatedSimpleSecondaryVertexComputer.h:74
dqm-mbProfile.log
tuple log
Definition:
dqm-mbProfile.py:17
JetTagComputer::uses
void uses(unsigned int id, const std::string &label)
Definition:
JetTagComputer.cc:18
JetTagComputer.h
reco::TrackKinematics
Definition:
TrackKinematics.h:16
HLT_25ns10e33_v2_cff.parameters
tuple parameters
Definition:
HLT_25ns10e33_v2_cff.py:3864
TemplatedSimpleSecondaryVertexComputer::minTracks
unsigned int minTracks
Definition:
TemplatedSimpleSecondaryVertexComputer.h:73
TemplatedSimpleSecondaryVertexComputer::TagInfo
reco::TemplatedSecondaryVertexTagInfo< IPTI, VTX > TagInfo
Definition:
TemplatedSimpleSecondaryVertexComputer.h:19
Vertex.h
JetTagComputer
Definition:
JetTagComputer.h:14
reco::TemplatedSecondaryVertexTagInfo::nVertices
unsigned int nVertices() const
Definition:
TemplatedSecondaryVertexTagInfo.h:132
Measurement1D::significance
double significance() const
Definition:
Measurement1D.h:32
TrackKinematics.h
Measurement1D::value
double value() const
Definition:
Measurement1D.h:28
reco::TrackKinematics::vectorSum
const math::XYZTLorentzVector & vectorSum() const
Definition:
TrackKinematics.h:44
reco::TemplatedSecondaryVertexTagInfo::flightDistance
Measurement1D flightDistance(unsigned int index, int dim=0) const
Definition:
TemplatedSecondaryVertexTagInfo.h:152
TemplatedSimpleSecondaryVertexComputer
Definition:
TemplatedSimpleSecondaryVertexComputer.h:17
edm::ParameterSet
Definition:
ParameterSet.h:36
reco::TemplatedSecondaryVertexTagInfo::nVertexTracks
unsigned int nVertexTracks() const
Definition:
TemplatedSecondaryVertexTagInfo.h:185
Track.h
Generated for CMSSW Reference Manual by
1.8.5