CMS 3D CMS Logo

Public Member Functions | Private Member Functions

FWElectronLegoProxyBuilder Class Reference

Inheritance diagram for FWElectronLegoProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::GsfElectron > FWSimpleProxyBuilder FWProxyBuilderBase

List of all members.

Public Member Functions

 FWElectronLegoProxyBuilder ()
 REGISTER_PROXYBUILDER_METHODS ()
virtual ~FWElectronLegoProxyBuilder ()

Private Member Functions

virtual void build (const reco::GsfElectron &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 FWElectronLegoProxyBuilder (const FWElectronLegoProxyBuilder &)
const FWElectronLegoProxyBuilderoperator= (const FWElectronLegoProxyBuilder &)

Detailed Description

Definition at line 21 of file FWElectronLegoProxyBuilder.cc.


Constructor & Destructor Documentation

FWElectronLegoProxyBuilder::FWElectronLegoProxyBuilder ( ) [inline]

Definition at line 24 of file FWElectronLegoProxyBuilder.cc.

{}
virtual FWElectronLegoProxyBuilder::~FWElectronLegoProxyBuilder ( ) [inline, virtual]

Definition at line 25 of file FWElectronLegoProxyBuilder.cc.

{}
FWElectronLegoProxyBuilder::FWElectronLegoProxyBuilder ( const FWElectronLegoProxyBuilder ) [private]

Member Function Documentation

void FWElectronLegoProxyBuilder::build ( const reco::GsfElectron 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< reco::GsfElectron >.

Definition at line 36 of file FWElectronLegoProxyBuilder.cc.

References FWProxyBuilderBase::context(), delta, fireworks::Context::getTrackPropagator(), reco::GsfElectron::gsfTrack(), fireworks::prepareCandidate(), fireworks::prepareTrack(), FWProxyBuilderBase::setupAddElement(), and ExpressReco_HICollisions_FallBack::track.

{
   TEveStraightLineSet *marker = new TEveStraightLineSet("marker");
   setupAddElement(marker, &oItemHolder);
 
   TEveTrack* track(0);
   
   if( iData.gsfTrack().isAvailable() )
     track = fireworks::prepareTrack(*iData.gsfTrack(), context().getTrackPropagator());     
   else
     track = fireworks::prepareCandidate(iData, context().getTrackPropagator());
         
   track->MakeTrack();
   const double delta = 0.1;
   marker->AddLine(track->GetEndMomentum().Eta()-delta, track->GetEndMomentum().Phi()-delta, 0.1,
                   track->GetEndMomentum().Eta()+delta, track->GetEndMomentum().Phi()+delta, 0.1);
   marker->AddLine(track->GetEndMomentum().Eta()-delta, track->GetEndMomentum().Phi()+delta, 0.1,
                   track->GetEndMomentum().Eta()+delta, track->GetEndMomentum().Phi()-delta, 0.1);
   marker->AddLine(track->GetEndMomentum().Eta(), track->GetEndMomentum().Phi()-delta, 0.1,
                   track->GetEndMomentum().Eta(), track->GetEndMomentum().Phi()+delta, 0.1);
   marker->AddLine(track->GetEndMomentum().Eta()-delta, track->GetEndMomentum().Phi(), 0.1,
                   track->GetEndMomentum().Eta()+delta, track->GetEndMomentum().Phi(), 0.1);
}
const FWElectronLegoProxyBuilder& FWElectronLegoProxyBuilder::operator= ( const FWElectronLegoProxyBuilder ) [private]
FWElectronLegoProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )