Fireworks
ParticleFlow
plugins
FWPFPatJetLegoProxyBuilder.cc
Go to the documentation of this file.
1
#include "
FWPFPatJetLegoProxyBuilder.h
"
2
#include "
Fireworks/Candidates/interface/FWLegoCandidate.h
"
3
4
//______________________________________________________________________________
5
template
<
class
T>
6
FWPFPatJetLegoProxyBuilder<T>::FWPFPatJetLegoProxyBuilder
() {}
7
template
<
class
T>
8
FWPFPatJetLegoProxyBuilder<T>::~FWPFPatJetLegoProxyBuilder
() {}
9
10
//______________________________________________________________________________
11
template
<
class
T>
12
void
FWPFPatJetLegoProxyBuilder<T>::build
(
const
T
& iData,
13
unsigned
int
iIndex,
14
TEveElement& oItemHolder,
15
const
FWViewContext
* vc) {
16
std::vector<reco::PFCandidatePtr> consts = iData.getPFConstituents();
17
18
typedef
std::vector<reco::PFCandidatePtr>::const_iterator IC;
19
20
for
(IC ic = consts.begin(); ic != consts.end(); ++ic) {
21
const
reco::PFCandidatePtr
pfCandPtr = *ic;
22
23
FWLegoCandidate
* candidate =
new
FWLegoCandidate
(vc,
24
FWProxyBuilderBase::context
(),
25
pfCandPtr->energy(),
26
pfCandPtr->et(),
27
pfCandPtr->pt(),
28
pfCandPtr->eta(),
29
pfCandPtr->phi());
30
candidate->SetMarkerColor(
FWProxyBuilderBase::item
()->defaultDisplayProperties().color());
31
fireworks::setTrackTypePF
((*pfCandPtr), candidate);
32
FWProxyBuilderBase::setupAddElement
(candidate, &oItemHolder);
33
34
FWProxyBuilderBase::context
().
voteMaxEtAndEnergy
(pfCandPtr->et(), pfCandPtr->energy());
35
}
36
}
37
38
//______________________________________________________________________________
39
template
<
class
T>
40
void
FWPFPatJetLegoProxyBuilder<T>::scaleProduct
(TEveElementList*
parent
,
41
FWViewType::EType
type
,
42
const
FWViewContext
* vc) {
43
// loop items in product
44
for
(TEveElement::List_i
i
=
parent
->BeginChildren();
i
!=
parent
->EndChildren(); ++
i
) {
45
if
((*i)->HasChildren()) {
46
// loop elements for the reco::PFJet item
47
for
(TEveElement::List_i
j
= (*i)->BeginChildren();
j
!= (*i)->EndChildren(); ++
j
) {
48
FWLegoCandidate
*
cand
= dynamic_cast<FWLegoCandidate*>(*
j
);
49
cand
->updateScale(vc,
FWProxyBuilderBase::context
());
50
}
51
}
52
}
53
}
54
55
//______________________________________________________________________________
56
template
<
class
T>
57
void
FWPFPatJetLegoProxyBuilder<T>::localModelChanges
(
const
FWModelId
& iId,
58
TEveElement*
parent
,
59
FWViewType::EType
viewType,
60
const
FWViewContext
* vc) {
61
// line set marker is not same color as line, have to fix it here
62
if
((
parent
)->HasChildren()) {
63
for
(TEveElement::List_i
j
=
parent
->BeginChildren();
j
!=
parent
->EndChildren(); ++
j
) {
64
FWLegoCandidate
*
cand
= dynamic_cast<FWLegoCandidate*>(*
j
);
65
cand
->SetMarkerColor(
FWProxyBuilderBase::item
()->modelInfo(iId.
index
()).displayProperties().color());
66
cand
->ElementChanged();
67
}
68
}
69
}
70
71
//____________________________PAT_______________________________________________
72
class
FWPatJetLegoProxyBuilder
:
public
FWPFPatJetLegoProxyBuilder
<pat::Jet> {
73
public
:
74
FWPatJetLegoProxyBuilder
() {}
75
~FWPatJetLegoProxyBuilder
()
override
{}
76
77
REGISTER_PROXYBUILDER_METHODS
();
78
};
79
80
//____________________________PF________________________________________________
81
class
FWPFJetLegoProxyBuilder
:
public
FWPFPatJetLegoProxyBuilder
<reco::PFJet> {
82
public
:
83
FWPFJetLegoProxyBuilder
() {}
84
~FWPFJetLegoProxyBuilder
()
override
{}
85
86
REGISTER_PROXYBUILDER_METHODS
();
87
};
88
89
//______________________________________________________________________________
90
template
class
FWPFPatJetLegoProxyBuilder<reco::PFJet>
;
91
template
class
FWPFPatJetLegoProxyBuilder<pat::Jet>
;
92
93
//______________________________________________________________________________
94
REGISTER_FWPROXYBUILDER
(
FWPFJetLegoProxyBuilder
,
95
reco::PFJet
,
96
"PF Jet"
,
97
FWViewType::kLegoPFECALBit
|
FWViewType::kLegoBit
);
98
REGISTER_FWPROXYBUILDER
(
FWPatJetLegoProxyBuilder
,
99
pat::Jet
,
100
"PF PatJet"
,
101
FWViewType::kLegoPFECALBit
|
FWViewType::kLegoBit
);
mps_fire.i
i
Definition:
mps_fire.py:428
FWViewType::kLegoBit
Definition:
FWViewType.h:55
FWViewType::EType
EType
Definition:
FWViewType.h:31
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition:
FWProxyBuilderFactory.h:33
FWPatJetLegoProxyBuilder
Definition:
FWPFPatJetLegoProxyBuilder.cc:72
FWModelId
Definition:
FWModelId.h:28
FWViewType::kLegoPFECALBit
Definition:
FWViewType.h:57
REGISTER_PROXYBUILDER_METHODS
#define REGISTER_PROXYBUILDER_METHODS()
Definition:
register_dataproxybuilder_macro.h:28
FWPFPatJetLegoProxyBuilder::scaleProduct
void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
Definition:
FWPFPatJetLegoProxyBuilder.cc:40
FWPFJetLegoProxyBuilder
Definition:
FWPFPatJetLegoProxyBuilder.cc:81
fireworks::setTrackTypePF
void setTrackTypePF(const reco::PFCandidate &pfCand, TAttLine *track)
Definition:
setTrackTypePF.cc:16
FWLegoCandidate
Definition:
FWLegoCandidate.h:28
FWPFPatJetLegoProxyBuilder::localModelChanges
void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) override
Definition:
FWPFPatJetLegoProxyBuilder.cc:57
FWPFPatJetLegoProxyBuilder::~FWPFPatJetLegoProxyBuilder
~FWPFPatJetLegoProxyBuilder() override
Definition:
FWPFPatJetLegoProxyBuilder.cc:8
pat::Jet
Analysis-level calorimeter jet class.
Definition:
Jet.h:77
fireworks::Context::voteMaxEtAndEnergy
void voteMaxEtAndEnergy(float Et, float energy) const
Definition:
Context.cc:162
FWPatJetLegoProxyBuilder::FWPatJetLegoProxyBuilder
FWPatJetLegoProxyBuilder()
Definition:
FWPFPatJetLegoProxyBuilder.cc:74
FWModelId::index
int index() const
Definition:
FWModelId.h:41
type
type
Definition:
SiPixelVCal_PayloadInspector.cc:37
cand
Definition:
decayParser.h:32
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition:
FWProxyBuilderBase.cc:350
FWPFJetLegoProxyBuilder::FWPFJetLegoProxyBuilder
FWPFJetLegoProxyBuilder()
Definition:
FWPFPatJetLegoProxyBuilder.cc:83
FWProxyBuilderBase::build
void build()
Definition:
FWProxyBuilderBase.cc:110
FWViewContext
Definition:
FWViewContext.h:32
edm::Ptr< PFCandidate >
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition:
FWProxyBuilderBase.h:64
FWPatJetLegoProxyBuilder::~FWPatJetLegoProxyBuilder
~FWPatJetLegoProxyBuilder() override
Definition:
FWPFPatJetLegoProxyBuilder.cc:75
T
long double T
Definition:
Basic3DVectorLD.h:48
FWPFPatJetLegoProxyBuilder::FWPFPatJetLegoProxyBuilder
FWPFPatJetLegoProxyBuilder()
Definition:
FWPFPatJetLegoProxyBuilder.cc:6
reco::PFJet
Jets made from PFObjects.
Definition:
PFJet.h:20
FWLegoCandidate.h
FWPFPatJetLegoProxyBuilder.h
FWProxyBuilderBase::context
const fireworks::Context & context() const
Definition:
FWProxyBuilderBase.cc:412
FWPFPatJetLegoProxyBuilder
Definition:
FWPFPatJetLegoProxyBuilder.h:27
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
class-composition.parent
parent
Definition:
class-composition.py:88
FWPFJetLegoProxyBuilder::~FWPFJetLegoProxyBuilder
~FWPFJetLegoProxyBuilder() override
Definition:
FWPFPatJetLegoProxyBuilder.cc:84
Generated for CMSSW Reference Manual by
1.8.16