File indexing completed on 2024-04-06 12:11:49
0001
0002
0003
0004
0005
0006
0007
0008 #include "TEveScalableStraightLineSet.h"
0009 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
0010 #include "Fireworks/Candidates/interface/CandidateUtils.h"
0011 #include "DataFormats/MuonReco/interface/Muon.h"
0012
0013 class FWMuonGlimpseProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::Muon> {
0014 public:
0015 FWMuonGlimpseProxyBuilder(void) {}
0016 ~FWMuonGlimpseProxyBuilder(void) override {}
0017
0018 REGISTER_PROXYBUILDER_METHODS();
0019
0020
0021 FWMuonGlimpseProxyBuilder(const FWMuonGlimpseProxyBuilder&) = delete;
0022
0023 const FWMuonGlimpseProxyBuilder& operator=(const FWMuonGlimpseProxyBuilder&) = delete;
0024
0025 private:
0026 using FWSimpleProxyBuilderTemplate<reco::Muon>::build;
0027 void build(const reco::Muon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext*) override;
0028 };
0029
0030 void FWMuonGlimpseProxyBuilder::build(const reco::Muon& iData,
0031 unsigned int iIndex,
0032 TEveElement& oItemHolder,
0033 const FWViewContext*) {
0034 TEveScalableStraightLineSet* marker = new TEveScalableStraightLineSet("", "");
0035 marker->SetLineWidth(2);
0036 fireworks::addStraightLineSegment(marker, &iData, 1.0);
0037 setupAddElement(marker, &oItemHolder);
0038
0039
0040 }
0041
0042 REGISTER_FWPROXYBUILDER(FWMuonGlimpseProxyBuilder, reco::Muon, "Muons", FWViewType::kGlimpseBit);