Go to the documentation of this file.00001 #include "FWPFPatJet3DProxyBuilder.h"
00002
00003
00004 template<class T> FWPFPatJet3DProxyBuilder<T>::FWPFPatJet3DProxyBuilder(){}
00005 template<class T> FWPFPatJet3DProxyBuilder<T>::~FWPFPatJet3DProxyBuilder(){}
00006
00007
00008 template<class T> void
00009 FWPFPatJet3DProxyBuilder<T>::build(const T& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext*)
00010 {
00011 std::vector<reco::PFCandidatePtr> consts = iData.getPFConstituents();
00012
00013 typedef std::vector<reco::PFCandidatePtr>::const_iterator IC;
00014
00015 for( IC ic = consts.begin();
00016 ic != consts.end(); ic++ )
00017 {
00018 const reco::PFCandidatePtr pfCandPtr = *ic;
00019
00020 TEveRecTrack t;
00021 t.fBeta = 1;
00022 t.fP = TEveVector( pfCandPtr->px(), pfCandPtr->py(), pfCandPtr->pz() );
00023 t.fV = TEveVector( pfCandPtr->vertex().x(), pfCandPtr->vertex().y(), pfCandPtr->vertex().z() );
00024 t.fSign = pfCandPtr->charge();
00025 TEveTrack* trk = new TEveTrack(&t, FWProxyBuilderBase::context().getTrackPropagator());
00026 trk->MakeTrack();
00027 trk->SetLineWidth(3);
00028
00029 fireworks::setTrackTypePF( *pfCandPtr, trk );
00030
00031 FWProxyBuilderBase::setupAddElement( trk, &oItemHolder );
00032 }
00033
00034 }
00035
00036
00037
00038
00039
00040 class FWPFJet3DProxyBuilder : public FWPFPatJet3DProxyBuilder<reco::PFJet> {
00041 public:
00042 FWPFJet3DProxyBuilder(){}
00043 virtual ~FWPFJet3DProxyBuilder(){}
00044
00045 REGISTER_PROXYBUILDER_METHODS();
00046 };
00047
00048
00049 class FWPatJet3DProxyBuilder : public FWPFPatJet3DProxyBuilder<pat::Jet> {
00050 public:
00051 FWPatJet3DProxyBuilder(){}
00052 virtual ~FWPatJet3DProxyBuilder(){}
00053
00054 REGISTER_PROXYBUILDER_METHODS();
00055 };
00056
00057
00058 template class FWPFPatJet3DProxyBuilder<reco::PFJet>;
00059 template class FWPFPatJet3DProxyBuilder<pat::Jet>;
00060
00061
00062 REGISTER_FWPROXYBUILDER(FWPFJet3DProxyBuilder, reco::PFJet, "PF Jet", FWViewType::kAll3DBits | FWViewType::kAllRPZBits );
00063 REGISTER_FWPROXYBUILDER(FWPatJet3DProxyBuilder, pat::Jet, "PF PatJet", FWViewType::kAll3DBits | FWViewType::kAllRPZBits );