Go to the documentation of this file.00001
00002
00003
00004
00005
00014
00015
00016
00017
00018
00019
00020 #include "TEveTrack.h"
00021
00022 #include "Fireworks/Core/interface/FWEventItem.h"
00023 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
00024 #include "Fireworks/Candidates/interface/CandidateUtils.h"
00025
00026 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00027 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
00028
00029 class FWGenParticleProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::GenParticle> {
00030
00031 public:
00032 FWGenParticleProxyBuilder() {}
00033 virtual ~FWGenParticleProxyBuilder() {}
00034
00035
00036 REGISTER_PROXYBUILDER_METHODS();
00037
00038 private:
00039 FWGenParticleProxyBuilder(const FWGenParticleProxyBuilder&);
00040
00041 const FWGenParticleProxyBuilder& operator=(const FWGenParticleProxyBuilder&);
00042
00043 void build(const reco::GenParticle& iData, unsigned int iIndex,TEveElement& oItemHolder, const FWViewContext*);
00044
00045 };
00046
00047
00048
00049
00050 void
00051 FWGenParticleProxyBuilder::build(const reco::GenParticle& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext*)
00052 {
00053 TEveTrack* trk = fireworks::prepareCandidate( iData, context().getTrackPropagator() );
00054 trk->MakeTrack();
00055 setupAddElement(trk, &oItemHolder);
00056 }
00057
00058 REGISTER_FWPROXYBUILDER(FWGenParticleProxyBuilder, reco::GenParticle, "GenParticles", FWViewType::kAll3DBits | FWViewType::kAllRPZBits);
00059