Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "TEveStraightLineSet.h"
00010
00011 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
00012
00013 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00014
00015 class FWPhotonLegoProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::Photon>
00016 {
00017 public:
00018 FWPhotonLegoProxyBuilder() {}
00019 virtual ~FWPhotonLegoProxyBuilder() {}
00020
00021 REGISTER_PROXYBUILDER_METHODS();
00022
00023 private:
00024 FWPhotonLegoProxyBuilder(const FWPhotonLegoProxyBuilder&);
00025 const FWPhotonLegoProxyBuilder& operator=(const FWPhotonLegoProxyBuilder&);
00026
00027 virtual void build(const reco::Photon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext*);
00028 };
00029
00030 void FWPhotonLegoProxyBuilder::build(const reco::Photon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext*)
00031 {
00032 TEveStraightLineSet *marker = new TEveStraightLineSet("marker");
00033 setupAddElement(marker, &oItemHolder);
00034
00035 const double delta = 0.1;
00036 marker->AddLine(iData.eta()-delta, iData.phi()-delta, 0.1,
00037 iData.eta()+delta, iData.phi()+delta, 0.1);
00038 marker->AddLine(iData.eta()-delta, iData.phi()+delta, 0.1,
00039 iData.eta()+delta, iData.phi()-delta, 0.1);
00040 }
00041
00042 REGISTER_FWPROXYBUILDER(FWPhotonLegoProxyBuilder, reco::Photon, "Photons", FWViewType::kAllLegoBits);
00043
00044
00045