CMS 3D CMS Logo

Public Member Functions | Private Member Functions

FWPFPatJet3DProxyBuilder< T > Class Template Reference

#include <FWPFPatJet3DProxyBuilder.h>

Inheritance diagram for FWPFPatJet3DProxyBuilder< T >:
FWSimpleProxyBuilderTemplate< T > FWSimpleProxyBuilder FWProxyBuilderBase

List of all members.

Public Member Functions

 FWPFPatJet3DProxyBuilder ()
virtual ~FWPFPatJet3DProxyBuilder ()

Private Member Functions

void build (const T &, unsigned int, TEveElement &, const FWViewContext *)
 FWPFPatJet3DProxyBuilder (const FWPFPatJet3DProxyBuilder &)
const FWPFPatJet3DProxyBuilderoperator= (const FWPFPatJet3DProxyBuilder &)

Detailed Description

template<class T>
class FWPFPatJet3DProxyBuilder< T >

Definition at line 33 of file FWPFPatJet3DProxyBuilder.h.


Constructor & Destructor Documentation

template<class T >
FWPFPatJet3DProxyBuilder< T >::FWPFPatJet3DProxyBuilder ( )

Definition at line 4 of file FWPFPatJet3DProxyBuilder.cc.

{}
template<class T >
FWPFPatJet3DProxyBuilder< T >::~FWPFPatJet3DProxyBuilder ( ) [virtual]

Definition at line 5 of file FWPFPatJet3DProxyBuilder.cc.

{}
template<class T>
FWPFPatJet3DProxyBuilder< T >::FWPFPatJet3DProxyBuilder ( const FWPFPatJet3DProxyBuilder< T > &  ) [private]

Member Function Documentation

template<class T>
void FWPFPatJet3DProxyBuilder< T >::build ( const T &  iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
) [private, virtual]

iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement

Reimplemented from FWSimpleProxyBuilderTemplate< T >.

Definition at line 9 of file FWPFPatJet3DProxyBuilder.cc.

References FWProxyBuilderBase::context(), fireworks::setTrackTypePF(), FWProxyBuilderBase::setupAddElement(), and matplotRender::t.

{
   std::vector<reco::PFCandidatePtr> consts = iData.getPFConstituents();

   typedef std::vector<reco::PFCandidatePtr>::const_iterator IC;

   for( IC ic = consts.begin();   // If consts has no constituents then the loop simply won't execute
        ic != consts.end(); ic++ )   // and so no segmentation fault should occur
   {
      const reco::PFCandidatePtr pfCandPtr = *ic;

      TEveRecTrack t;
      t.fBeta = 1;
      t.fP = TEveVector( pfCandPtr->px(), pfCandPtr->py(), pfCandPtr->pz() );
      t.fV = TEveVector( pfCandPtr->vertex().x(), pfCandPtr->vertex().y(), pfCandPtr->vertex().z() );
      t.fSign = pfCandPtr->charge();
      TEveTrack* trk = new TEveTrack(&t, FWProxyBuilderBase::context().getTrackPropagator());
      trk->MakeTrack();
      trk->SetLineWidth(3);

      fireworks::setTrackTypePF( *pfCandPtr, trk );

      FWProxyBuilderBase::setupAddElement( trk, &oItemHolder );
   }

}
template<class T>
const FWPFPatJet3DProxyBuilder& FWPFPatJet3DProxyBuilder< T >::operator= ( const FWPFPatJet3DProxyBuilder< T > &  ) [private]