Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
minVertices_
(1)
24
{
25
uses
(
"svTagInfos"
);
26
minVertices_
= parameters.
existsAs
<
unsigned
int
>(
"minVertices"
) ? parameters.
getParameter
<
unsigned
int
>(
"minVertices"
) : 1 ;
27
}
28
29
float
discriminator
(
const
TagInfoHelper
&tagInfos)
const
30
{
31
const
reco::SecondaryVertexTagInfo
&
info
=
32
tagInfos.
get
<
reco::SecondaryVertexTagInfo
>();
33
if
(info.
nVertices
() <
minVertices_
)
return
-1;
34
unsigned
int
idx
= 0;
35
while
(idx < info.
nVertices
()) {
36
if
(info.
nVertexTracks
(idx) >=
minTracks
)
37
break
;
38
idx++;
39
}
40
if
(idx >= info.
nVertices
())
41
return
-1.0;
42
43
double
gamma;
44
if
(
unBoost
) {
45
reco::TrackKinematics
kinematics(
46
info.
secondaryVertex
(idx));
47
gamma = kinematics.
vectorSum
().Gamma();
48
}
else
49
gamma = 1.0;
50
51
double
value
;
52
if
(
useSig
)
53
value = info.
flightDistance
(idx,
use2d
).
significance
();
54
else
55
value = info.
flightDistance
(idx,
use2d
).
value
();
56
57
value /= gamma;
58
59
if
(
useSig
)
60
value = (value > 0) ? +
std::log
(1 + value)
61
: -
std::log
(1 - value);
62
63
return
value
;
64
}
65
66
private
:
67
bool
use2d
;
68
bool
useSig
;
69
bool
unBoost
;
70
unsigned
int
minTracks
;
71
unsigned
int
minVertices_
;
72
};
73
74
#endif // RecoBTag_SecondaryVertex_SimpleSecondaryVertexComputer_h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Parameters.parameters
dictionary parameters
Definition:
Parameters.py:2
SecondaryVertexTagInfo.h
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:41
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:184
reco::SecondaryVertexTagInfo::flightDistance
Measurement1D flightDistance(unsigned int index, bool in2d=false) const
Definition:
SecondaryVertexTagInfo.h:98
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
fff_deleter.log
tuple log
Definition:
fff_deleter.py:13
JetTagComputer::TagInfoHelper
Definition:
JetTagComputer.h:16
SimpleSecondaryVertexComputer::minVertices_
unsigned int minVertices_
Definition:
SimpleSecondaryVertexComputer.h:71
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:67
SimpleSecondaryVertexComputer::unBoost
bool unBoost
Definition:
SimpleSecondaryVertexComputer.h:69
Vertex.h
JetTagComputer
Definition:
JetTagComputer.h:14
Measurement1D::significance
double significance() const
Definition:
Measurement1D.h:32
SimpleSecondaryVertexComputer::useSig
bool useSig
Definition:
SimpleSecondaryVertexComputer.h:68
TrackKinematics.h
SimpleSecondaryVertexComputer::minTracks
unsigned int minTracks
Definition:
SimpleSecondaryVertexComputer.h:70
customizeTrackingMonitorSeedNumber.idx
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
Definition:
customizeTrackingMonitorSeedNumber.py:15
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:29
edm::ParameterSet
Definition:
ParameterSet.h:35
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