CMS 3D CMS Logo

Public Member Functions | Private Member Functions

FWMuonLegoProxyBuilder Class Reference

Inheritance diagram for FWMuonLegoProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::Muon > FWSimpleProxyBuilder FWProxyBuilderBase

List of all members.

Public Member Functions

 FWMuonLegoProxyBuilder (void)
 REGISTER_PROXYBUILDER_METHODS ()
virtual ~FWMuonLegoProxyBuilder (void)

Private Member Functions

virtual void build (const reco::Muon &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 FWMuonLegoProxyBuilder (const FWMuonLegoProxyBuilder &)
const FWMuonLegoProxyBuilderoperator= (const FWMuonLegoProxyBuilder &)

Detailed Description

Definition at line 15 of file FWMuonLegoProxyBuilder.cc.


Constructor & Destructor Documentation

FWMuonLegoProxyBuilder::FWMuonLegoProxyBuilder ( void  ) [inline]

Definition at line 18 of file FWMuonLegoProxyBuilder.cc.

{}
virtual FWMuonLegoProxyBuilder::~FWMuonLegoProxyBuilder ( void  ) [inline, virtual]

Definition at line 19 of file FWMuonLegoProxyBuilder.cc.

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

Member Function Documentation

void FWMuonLegoProxyBuilder::build ( const reco::Muon 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::Muon >.

Definition at line 33 of file FWMuonLegoProxyBuilder.cc.

References reco::Muon::calEnergy(), reco::LeafCandidate::eta(), reco::Muon::isEnergyValid(), reco::LeafCandidate::phi(), FWProxyBuilderBase::setupAddElement(), reco::Muon::standAloneMuon(), and reco::Muon::track().

{
   TEvePointSet* points = new TEvePointSet;
   setupAddElement( points, &oItemHolder );
 
   points->SetMarkerStyle( 2 );
   points->SetMarkerSize( 0.2 );
    
   // get ECAL position of the propagated trajectory if available
   if( iData.isEnergyValid() && iData.calEnergy().ecal_position.r() > 100 )
   {
      points->SetNextPoint( iData.calEnergy().ecal_position.eta(),
                            iData.calEnergy().ecal_position.phi(),
                            0.1 );
     return;
   }
    
   // get position of the muon at surface of the tracker
   if( iData.track().isAvailable() && iData.track()->extra().isAvailable())
   {
      points->SetNextPoint( iData.track()->outerPosition().eta(),
                            iData.track()->outerPosition().phi(),
                            0.1 );
      return;
   } 

   // get position of the inner state of the stand alone muon
   if( iData.standAloneMuon().isAvailable() && iData.standAloneMuon()->extra().isAvailable())
   {
      if( iData.standAloneMuon()->innerPosition().R() <  iData.standAloneMuon()->outerPosition().R())
         points->SetNextPoint( iData.standAloneMuon()->innerPosition().eta(),
                               iData.standAloneMuon()->innerPosition().phi(),
                               0.1 );
      else
         points->SetNextPoint( iData.standAloneMuon()->outerPosition().eta(),
                               iData.standAloneMuon()->outerPosition().phi(),
                               0.1 );
      return;
   } 
   
   // WARNING: use direction at POCA as the last option
   points->SetNextPoint( iData.eta(), iData.phi(), 0.1 );
}
const FWMuonLegoProxyBuilder& FWMuonLegoProxyBuilder::operator= ( const FWMuonLegoProxyBuilder ) [private]
FWMuonLegoProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )