Fireworks
Calo
src
makeEveJetCone.cc
Go to the documentation of this file.
1
#include "TEveJetCone.h"
2
#include "
DataFormats/JetReco/interface/Jet.h
"
3
#include "
Fireworks/Core/interface/Context.h
"
4
5
namespace
fireworks
{
6
TEveJetCone*
makeEveJetCone
(
const
reco::Jet
& iData,
const
fireworks::Context
& context) {
7
TEveJetCone*
jet
=
new
TEveJetCone();
8
jet
->SetApex(TEveVector(iData.
vertex
().x(), iData.
vertex
().y(), iData.
vertex
().z()));
9
10
reco::Jet::Constituents
c
= iData.
getJetConstituents
();
11
bool
haveData =
true
;
12
for
(reco::Jet::Constituents::const_iterator
itr
=
c
.begin();
itr
!=
c
.end(); ++
itr
) {
13
if
(!
itr
->isAvailable()) {
14
haveData =
false
;
15
break
;
16
}
17
}
18
19
double
eta_size = 0.2;
20
double
phi_size = 0.2;
21
if
(haveData) {
22
eta_size =
sqrt
(iData.
etaetaMoment
());
23
phi_size =
sqrt
(iData.
phiphiMoment
());
24
}
25
26
static
const
float
offr = 5;
27
static
const
float
offz = offr /
tan
(context.
caloTransAngle
());
28
if
(iData.
eta
() < context.
caloMaxEta
())
29
jet
->SetCylinder(context.
caloR1
(
false
) - offr, context.
caloZ1
(
false
) - offz);
30
else
31
jet
->SetCylinder(context.
caloR2
(
false
) - offr, context.
caloZ2
(
false
) - offz);
32
33
jet
->AddEllipticCone(iData.
eta
(), iData.
phi
(), eta_size, phi_size);
34
jet
->SetPickable(kTRUE);
35
return
jet
;
36
}
37
}
// namespace fireworks
reco::Jet
Base class for all types of Jets.
Definition:
Jet.h:20
fireworks::Context
Definition:
Context.h:41
reco::Jet::Constituents
std::vector< Constituent > Constituents
Definition:
Jet.h:23
Jet.h
reco::Jet::phiphiMoment
float phiphiMoment() const
phi-phi second moment, ET weighted
fireworks::Context::caloZ2
static float caloZ2(bool offset=true)
Definition:
Context.cc:185
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
reco::Jet::getJetConstituents
virtual Constituents getJetConstituents() const
list of constituents
fireworks::Context::caloMaxEta
static double caloMaxEta()
Definition:
Context.cc:191
fireworks::Context::caloR2
static float caloR2(bool offset=true)
Definition:
Context.cc:182
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition:
LeafCandidate.h:152
fireworks::makeEveJetCone
TEveJetCone * makeEveJetCone(const reco::Jet &iData, const fireworks::Context &context)
Definition:
makeEveJetCone.cc:6
funct::tan
Tan< T >::type tan(const T &t)
Definition:
Tan.h:22
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
itr
std::vector< std::pair< float, float > >::iterator itr
Definition:
HGCDigitizer.cc:28
fireworks::Context::caloTransAngle
static float caloTransAngle()
Definition:
Context.cc:189
reco::LeafCandidate::vertex
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition:
LeafCandidate.h:165
fireworks::Context::caloZ1
static float caloZ1(bool offset=true)
Definition:
Context.cc:183
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition:
LeafCandidate.h:148
metsig::jet
Definition:
SignAlgoResolutions.h:47
reco::Jet::etaetaMoment
float etaetaMoment() const
eta-eta second moment, ET weighted
fireworks
Definition:
FWTauProxyBuilderBase.h:35
fireworks::Context::caloR1
static float caloR1(bool offset=true)
Definition:
Context.cc:180
Context.h
Generated for CMSSW Reference Manual by
1.8.16