Fireworks
ParticleFlow
plugins
FWPFTrackRPZProxyBuilder.cc
Go to the documentation of this file.
1
#include "
FWPFTrackRPZProxyBuilder.h
"
2
3
//______________________________________________________________________________
4
void
FWPFTrackRPZProxyBuilder::build
(
const
reco::Track
&iData,
5
unsigned
int
iIndex,
6
TEveElement &oItemHolder,
7
const
FWViewContext
*vc) {
8
FWPFTrackUtils
*
utils
=
new
FWPFTrackUtils
();
9
TEveTrack *trk =
utils
->setupTrack(iData);
10
TEvePointSet *ps =
utils
->getCollisionMarkers(trk);
11
TEvePointSet *rzps =
new
TEvePointSet();
12
setupAddElement
(trk, &oItemHolder);
13
14
Float_t *trackPoints = trk->GetP();
15
unsigned
int
last
= (trk->GetN() - 1) * 3;
16
float
y
= trackPoints[
last
+ 1];
17
float
z
= trackPoints[
last
+ 2];
18
19
// Reposition any points that have been translated in RhoZ
20
for
(
signed
int
i
= 0;
i
< ps->GetN(); ++
i
) {
21
// WORKS BUT DOESN'T HANDLE ALL SCENARIOS.....
22
Float_t
a
,
b
,
c
;
23
ps->GetPoint(
i
,
a
,
b
,
c
);
24
25
if
(y < 0 && b > 0)
26
b
*= -1;
27
else
if
(
y
> 0 &&
b
< 0)
28
b
*= -1;
29
30
if
(z < 0 && c > 0)
31
c
*= -1;
32
else
if
(
z
> 0 &&
c
< 0)
33
c
*= -1;
34
35
rzps->SetNextPoint(
a
,
b
,
c
);
36
}
37
38
if
(rzps->GetN() != 0)
39
setupAddElement
(rzps, &oItemHolder);
40
else
41
delete
rzps;
42
43
delete
ps;
44
delete
utils
;
45
}
46
47
//______________________________________________________________________________
48
REGISTER_FWPROXYBUILDER
(
FWPFTrackRPZProxyBuilder
,
49
reco::Track
,
50
"PF Tracks"
,
51
FWViewType::kRhoPhiPFBit
|
FWViewType::kRhoZBit
);
FWViewType::kRhoPhiPFBit
Definition:
FWViewType.h:53
DDAxes::y
mps_fire.i
i
Definition:
mps_fire.py:355
FWPFTrackRPZProxyBuilder
Definition:
FWPFTrackRPZProxyBuilder.h:25
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition:
FWProxyBuilderFactory.h:33
dqmdumpme.last
last
Definition:
dqmdumpme.py:56
DDAxes::z
reco::Track
Definition:
Track.h:27
FWPFTrackRPZProxyBuilder.h
b
double b
Definition:
hdecay.h:118
a
double a
Definition:
hdecay.h:119
FWViewType::kRhoZBit
Definition:
FWViewType.h:52
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition:
FWProxyBuilderBase.cc:350
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
FWProxyBuilderBase::build
void build()
Definition:
FWProxyBuilderBase.cc:110
FWViewContext
Definition:
FWViewContext.h:32
utils
Definition:
utils.py:1
FWPFTrackUtils
Definition:
FWPFTrackUtils.h:68
Generated for CMSSW Reference Manual by
1.8.16