Fireworks
Candidates
plugins
FWCandidatePtrProxyBuilder.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: CandidatePtrs
4
// Class : FWCandidatePtrProxyBuilder
5
//
6
// Implementation:
7
// <Notes on implementation>
8
//
9
// Original Author: Chris Jones
10
// Created: Fri Dec 5 09:56:09 EST 2008
11
//
12
13
#include "TEveTrack.h"
14
15
// user include files
16
#include "
Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h
"
17
#include "
Fireworks/Core/interface/Context.h
"
18
19
#include "
Fireworks/Candidates/interface/CandidateUtils.h
"
20
21
#include "
DataFormats/Candidate/interface/Candidate.h
"
22
23
class
FWCandidatePtrProxyBuilder
:
public
FWSimpleProxyBuilderTemplate
<reco::CandidatePtr> {
24
public
:
25
FWCandidatePtrProxyBuilder
() {}
26
~FWCandidatePtrProxyBuilder
()
override
{}
27
28
REGISTER_PROXYBUILDER_METHODS
();
29
30
private
:
31
FWCandidatePtrProxyBuilder
(
const
FWCandidatePtrProxyBuilder
&) =
delete
;
// stop default
32
const
FWCandidatePtrProxyBuilder
&
operator=
(
const
FWCandidatePtrProxyBuilder
&) =
delete
;
// stop default
33
34
using
FWSimpleProxyBuilderTemplate<reco::CandidatePtr>::build
;
35
void
build
(
const
reco::CandidatePtr
& iData,
36
unsigned
int
iIndex,
37
TEveElement& oItemHolder,
38
const
FWViewContext
*)
override
;
39
};
40
41
void
FWCandidatePtrProxyBuilder::build
(
const
reco::CandidatePtr
& iData,
42
unsigned
int
iIndex,
43
TEveElement& oItemHolder,
44
const
FWViewContext
*) {
45
TEveTrack* trk =
fireworks::prepareCandidate
(*iData,
context
().getTrackPropagator());
46
47
trk->MakeTrack();
48
setupAddElement
(trk, &oItemHolder);
49
{
50
TEveRecTrack
t
;
51
t
.fBeta = 1.;
52
t
.fV = TEveVector(iData->vx(), iData->vy(), iData->vz());
53
t
.fP = TEveVector(-iData->p4().px(), -iData->p4().py(), -iData->p4().pz());
54
t
.fSign = iData->charge();
55
TEveTrack* trk2 =
new
TEveTrack(&
t
,
context
().getTrackPropagator());
56
trk2->SetLineStyle(7);
57
trk2->MakeTrack();
58
setupAddElement
(trk2, &oItemHolder);
59
}
60
}
61
62
//
63
// static member functions
64
//
65
REGISTER_FWPROXYBUILDER
(
FWCandidatePtrProxyBuilder
,
66
reco::CandidatePtr
,
67
"CandidatePtrs"
,
68
FWViewType::kAll3DBits
|
FWViewType::kAllRPZBits
);
FWSimpleProxyBuilderTemplate.h
FWViewType::kAllRPZBits
static const int kAllRPZBits
Definition:
FWViewType.h:67
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition:
FWProxyBuilderFactory.h:33
REGISTER_PROXYBUILDER_METHODS
#define REGISTER_PROXYBUILDER_METHODS()
Definition:
register_dataproxybuilder_macro.h:27
FWCandidatePtrProxyBuilder::~FWCandidatePtrProxyBuilder
~FWCandidatePtrProxyBuilder() override
Definition:
FWCandidatePtrProxyBuilder.cc:26
FWViewType::kAll3DBits
static const int kAll3DBits
Definition:
FWViewType.h:68
FWCandidatePtrProxyBuilder::operator=
const FWCandidatePtrProxyBuilder & operator=(const FWCandidatePtrProxyBuilder &)=delete
FWCandidatePtrProxyBuilder
Definition:
FWCandidatePtrProxyBuilder.cc:23
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition:
FWProxyBuilderBase.cc:350
FWProxyBuilderBase::build
void build()
Definition:
FWProxyBuilderBase.cc:110
FWViewContext
Definition:
FWViewContext.h:32
edm::Ptr< Candidate >
CandidateUtils.h
fireworks::prepareCandidate
TEveTrack * prepareCandidate(const reco::Candidate &track, TEveTrackPropagator *propagator)
Definition:
CandidateUtils.cc:9
FWProxyBuilderBase::context
const fireworks::Context & context() const
Definition:
FWProxyBuilderBase.cc:412
FWSimpleProxyBuilderTemplate
Definition:
FWSimpleProxyBuilderTemplate.h:30
Candidate.h
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
FWCandidatePtrProxyBuilder::FWCandidatePtrProxyBuilder
FWCandidatePtrProxyBuilder()
Definition:
FWCandidatePtrProxyBuilder.cc:25
Context.h
Generated for CMSSW Reference Manual by
1.8.16