CMS 3D CMS Logo

FWPFCandidate3DProxyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: ParticleFlow
4 // Class : FWCandidate3DProxyBuilder
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Colin Bernet
10 // Created: Fri May 28 15:58:19 CEST 2010
11 // Edited: sharris, Wed 9 Feb 2011, 17:34
12 //
13 
14 // System include files
15 #include "TEveTrack.h"
16 #include "TEveTrackPropagator.h"
18 
19 // User include files
25 
26 //-----------------------------------------------------------------------------
27 // FWPFCandidate3DProxyBuilder
28 //-----------------------------------------------------------------------------
29 
30 class FWPFCandidate3DProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::PFCandidate> {
31 public:
32  // ---------------- Constructor(s)/Destructor ----------------------
35 
37 
38 private:
39  FWPFCandidate3DProxyBuilder(const FWPFCandidate3DProxyBuilder&) = delete; // Stop default
40  const FWPFCandidate3DProxyBuilder& operator=(const FWPFCandidate3DProxyBuilder&) = delete; // Stop default
41 
42  // --------------------- Member Functions --------------------------
44  void build(const reco::PFCandidate& iData,
45  unsigned int iIndex,
46  TEveElement& oItemHolder,
47  const FWViewContext*) override;
48 };
49 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
50 
51 //______________________________________________________________________________
53 
54 //______________________________________________________________________________
56  unsigned int iIndex,
57  TEveElement& oItemHolder,
58  const FWViewContext*) {
59  TEveRecTrack t;
60  t.fBeta = 1.;
61  t.fP = TEveVector(iData.px(), iData.py(), iData.pz());
62  t.fV = TEveVector(iData.vertex().x(), iData.vertex().y(), iData.vertex().z());
63  t.fSign = iData.charge();
64  TEveTrack* trk = new TEveTrack(&t, context().getTrackPropagator());
65 
66  trk->MakeTrack();
67 
68  fireworks::setTrackTypePF(iData, trk);
69  setupAddElement(trk, &oItemHolder);
70 }
71 
72 //______________________________________________________________________________
75  "PF Candidates",
CmsShowMain.h
FWSimpleProxyBuilderTemplate.h
PFCandidate.h
FWViewType::kAllRPZBits
static const int kAllRPZBits
Definition: FWViewType.h:67
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition: FWProxyBuilderFactory.h:33
FWPFCandidate3DProxyBuilder
Definition: FWPFCandidate3DProxyBuilder.cc:30
REGISTER_PROXYBUILDER_METHODS
#define REGISTER_PROXYBUILDER_METHODS()
Definition: register_dataproxybuilder_macro.h:28
reco::PFCandidate::vertex
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:56
fireworks::setTrackTypePF
void setTrackTypePF(const reco::PFCandidate &pfCand, TAttLine *track)
Definition: setTrackTypePF.cc:16
FWViewType::kAll3DBits
static const int kAll3DBits
Definition: FWViewType.h:68
FWPFCandidate3DProxyBuilder::FWPFCandidate3DProxyBuilder
FWPFCandidate3DProxyBuilder()
Definition: FWPFCandidate3DProxyBuilder.cc:33
reco::LeafCandidate::py
double py() const final
y coordinate of momentum vector
Definition: LeafCandidate.h:142
setTrackTypePF.h
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
reco::LeafCandidate::charge
int charge() const final
electric charge
Definition: LeafCandidate.h:106
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWEventItem.h
FWViewContext
Definition: FWViewContext.h:32
FWProxyBuilderBase::context
const fireworks::Context & context() const
Definition: FWProxyBuilderBase.cc:412
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
FWSimpleProxyBuilderTemplate
Definition: FWSimpleProxyBuilderTemplate.h:30
FWEvePtr.h
FWPFCandidate3DProxyBuilder::operator=
const FWPFCandidate3DProxyBuilder & operator=(const FWPFCandidate3DProxyBuilder &)=delete
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
reco::LeafCandidate::px
double px() const final
x coordinate of momentum vector
Definition: LeafCandidate.h:140
reco::LeafCandidate::pz
double pz() const final
z coordinate of momentum vector
Definition: LeafCandidate.h:144
FWPFCandidate3DProxyBuilder::~FWPFCandidate3DProxyBuilder
~FWPFCandidate3DProxyBuilder() override
Definition: FWPFCandidate3DProxyBuilder.cc:52