Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoBTag
SecondaryVertex
interface
SimpleSecondaryVertexComputer.h
Go to the documentation of this file.
1
#ifndef RecoBTag_SecondaryVertex_SimpleSecondaryVertexComputer_h
2
#define RecoBTag_SecondaryVertex_SimpleSecondaryVertexComputer_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/SecondaryVertexTagInfo.h
"
11
12
#include "
RecoBTau/JetTagComputer/interface/JetTagComputer.h
"
13
14
#include "
RecoBTag/SecondaryVertex/interface/TrackKinematics.h
"
15
16
class
SimpleSecondaryVertexComputer
:
public
JetTagComputer
{
17
public
:
18
SimpleSecondaryVertexComputer
(
const
edm::ParameterSet
&
parameters
) :
19
use2d
(!parameters.getParameter<bool>(
"use3d"
)),
20
useSig
(parameters.getParameter<bool>(
"useSignificance"
)),
21
unBoost
(parameters.getParameter<bool>(
"unBoost"
)),
22
minTracks
(parameters.getParameter<unsigned int>(
"minTracks"
))
23
{
uses
(
"svTagInfos"
); }
24
25
float
discriminator
(
const
TagInfoHelper
&tagInfos)
const
26
{
27
const
reco::SecondaryVertexTagInfo
&
info
=
28
tagInfos.
get
<
reco::SecondaryVertexTagInfo
>();
29
unsigned
int
idx = 0;
30
while
(idx < info.
nVertices
()) {
31
if
(info.
nVertexTracks
(idx) >=
minTracks
)
32
break
;
33
idx++;
34
}
35
if
(idx >= info.
nVertices
())
36
return
-1.0;
37
38
double
gamma;
39
if
(
unBoost
) {
40
reco::TrackKinematics
kinematics(
41
info.
secondaryVertex
(idx));
42
gamma = kinematics.
vectorSum
().Gamma();
43
}
else
44
gamma = 1.0;
45
46
double
value
;
47
if
(
useSig
)
48
value = info.
flightDistance
(idx,
use2d
).
significance
();
49
else
50
value = info.
flightDistance
(idx,
use2d
).
value
();
51
52
value /= gamma;
53
54
if
(
useSig
)
55
value = (value > 0) ? +
std::log
(1 + value)
56
: -
std::log
(1 - value);
57
58
return
value
;
59
}
60
61
private
:
62
bool
use2d
;
63
bool
useSig
;
64
bool
unBoost
;
65
unsigned
int
minTracks
;
66
};
67
68
#endif // RecoBTag_SecondaryVertex_SimpleSecondaryVertexComputer_h
Parameters.parameters
dictionary parameters
Definition:
Parameters.py:2
SecondaryVertexTagInfo.h
JetTagComputer::TagInfoHelper::get
const T & get(unsigned int index=0) const
Definition:
JetTagComputer.h:39
reco::SecondaryVertexTagInfo::flightDistance
Measurement1D flightDistance(unsigned int index, bool in2d=false) const
Definition:
SecondaryVertexTagInfo.h:98
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
JetTagComputer::TagInfoHelper
Definition:
JetTagComputer.h:14
info
Definition:
MessageDispatcher.h:11
reco::SecondaryVertexTagInfo::secondaryVertex
const Vertex & secondaryVertex(unsigned int index) const
Definition:
SecondaryVertexTagInfo.h:72
reco::SecondaryVertexTagInfo
Definition:
SecondaryVertexTagInfo.h:19
SimpleSecondaryVertexComputer
Definition:
SimpleSecondaryVertexComputer.h:16
JetTagComputer::uses
void uses(unsigned int id, const std::string &label)
Definition:
JetTagComputer.cc:18
JetTagComputer.h
reco::TrackKinematics
Definition:
TrackKinematics.h:13
SimpleSecondaryVertexComputer::use2d
bool use2d
Definition:
SimpleSecondaryVertexComputer.h:62
SimpleSecondaryVertexComputer::unBoost
bool unBoost
Definition:
SimpleSecondaryVertexComputer.h:64
Vertex.h
JetTagComputer
Definition:
JetTagComputer.h:12
Measurement1D::significance
double significance() const
Definition:
Measurement1D.h:32
SimpleSecondaryVertexComputer::useSig
bool useSig
Definition:
SimpleSecondaryVertexComputer.h:63
funct::log
Log< T >::type log(const T &t)
Definition:
Log.h:22
TrackKinematics.h
SimpleSecondaryVertexComputer::minTracks
unsigned int minTracks
Definition:
SimpleSecondaryVertexComputer.h:65
Measurement1D::value
double value() const
Definition:
Measurement1D.h:28
reco::TrackKinematics::vectorSum
const math::XYZTLorentzVector & vectorSum() const
Definition:
TrackKinematics.h:30
reco::SecondaryVertexTagInfo::nVertices
unsigned int nVertices() const
Definition:
SecondaryVertexTagInfo.h:78
SimpleSecondaryVertexComputer::discriminator
float discriminator(const TagInfoHelper &tagInfos) const
Definition:
SimpleSecondaryVertexComputer.h:25
edm::ParameterSet
Definition:
ParameterSet.h:32
reco::SecondaryVertexTagInfo::nVertexTracks
unsigned int nVertexTracks() const
Definition:
SecondaryVertexTagInfo.cc:54
Track.h
SimpleSecondaryVertexComputer::SimpleSecondaryVertexComputer
SimpleSecondaryVertexComputer(const edm::ParameterSet ¶meters)
Definition:
SimpleSecondaryVertexComputer.h:18
Generated for CMSSW Reference Manual by
1.8.5