CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

FWPFTrackSingleton Class Reference

#include <FWPFTrackUtils.h>

List of all members.

Public Member Functions

FWMagFieldgetField ()
TEveTrackPropagator * getTrackerTrackPropagator ()
TEveTrackPropagator * getTrackPropagator ()

Static Public Member Functions

static FWPFTrackSingletonInstance ()

Protected Member Functions

 FWPFTrackSingleton (const FWPFTrackSingleton &)
 FWPFTrackSingleton ()
const FWPFTrackSingletonoperator= (const FWPFTrackSingleton &)
virtual ~FWPFTrackSingleton ()

Private Member Functions

void initPropagator ()

Private Attributes

FWMagFieldm_magField
TEveTrackPropagator * m_trackerTrackPropagator
TEveTrackPropagator * m_trackPropagator

Static Private Attributes

static bool instanceFlag = false
static FWPFTrackSingletonpInstance = NULL

Detailed Description

Definition at line 34 of file FWPFTrackUtils.h.


Constructor & Destructor Documentation

FWPFTrackSingleton::FWPFTrackSingleton ( const FWPFTrackSingleton ) [protected]
FWPFTrackSingleton::FWPFTrackSingleton ( ) [inline, protected]

Definition at line 49 of file FWPFTrackUtils.h.

References initPropagator().

Referenced by Instance().

virtual FWPFTrackSingleton::~FWPFTrackSingleton ( ) [inline, protected, virtual]

Definition at line 50 of file FWPFTrackUtils.h.

References instanceFlag.

{ instanceFlag = false; }

Member Function Documentation

FWMagField* FWPFTrackSingleton::getField ( ) [inline]

Definition at line 42 of file FWPFTrackUtils.h.

References m_magField.

Referenced by FWPFTrackUtils::setupLegoTrack(), and FWPFTrackUtils::setupTrack().

{ return m_magField;                }
TEveTrackPropagator* FWPFTrackSingleton::getTrackerTrackPropagator ( ) [inline]

Definition at line 40 of file FWPFTrackUtils.h.

References m_trackerTrackPropagator.

Referenced by FWPFTrackUtils::getTrack().

TEveTrackPropagator* FWPFTrackSingleton::getTrackPropagator ( ) [inline]

Definition at line 41 of file FWPFTrackUtils.h.

References m_trackPropagator.

Referenced by FWPFTrackUtils::getTrack().

{ return m_trackPropagator;         }
void FWPFTrackSingleton::initPropagator ( ) [private]

Definition at line 21 of file FWPFTrackUtils.cc.

References FWPFGeom::caloR3(), FWPFGeom::caloZ2(), m_magField, m_trackerTrackPropagator, and m_trackPropagator.

Referenced by FWPFTrackSingleton().

{
   m_magField = new FWMagField();

   // Common propagator, helix stepper
   m_trackPropagator = new TEveTrackPropagator();
   m_trackPropagator->SetMagFieldObj( m_magField, false );
   m_trackPropagator->SetMaxR( FWPFGeom::caloR3() );
   m_trackPropagator->SetMaxZ( FWPFGeom::caloZ2() );
   m_trackPropagator->SetDelta( 0.01 );
   m_trackPropagator->SetProjTrackBreaking( TEveTrackPropagator::kPTB_UseLastPointPos );
   m_trackPropagator->SetRnrPTBMarkers( kTRUE );
   m_trackPropagator->IncDenyDestroy();

   // Tracker propagator
   m_trackerTrackPropagator = new TEveTrackPropagator();
   m_trackerTrackPropagator->SetStepper( TEveTrackPropagator::kRungeKutta );
   m_trackerTrackPropagator->SetMagFieldObj( m_magField, false );
   m_trackerTrackPropagator->SetDelta( 0.01 );
   m_trackerTrackPropagator->SetMaxR( FWPFGeom::caloR3() );
   m_trackerTrackPropagator->SetMaxZ( FWPFGeom::caloZ2() );
   m_trackerTrackPropagator->SetProjTrackBreaking( TEveTrackPropagator::kPTB_UseLastPointPos );
   m_trackerTrackPropagator->SetRnrPTBMarkers( kTRUE );
   m_trackerTrackPropagator->IncDenyDestroy();
}
FWPFTrackSingleton * FWPFTrackSingleton::Instance ( ) [static]

Definition at line 8 of file FWPFTrackUtils.cc.

References FWPFTrackSingleton(), instanceFlag, and pInstance.

Referenced by FWPFTrackUtils::FWPFTrackUtils().

{
   if( !instanceFlag )  // Instance doesn't exist yet
   {
      pInstance = new FWPFTrackSingleton();
      instanceFlag = true;
   }

   return pInstance;    // Pointer to sole instance
}
const FWPFTrackSingleton& FWPFTrackSingleton::operator= ( const FWPFTrackSingleton ) [protected]

Member Data Documentation

bool FWPFTrackSingleton::instanceFlag = false [static, private]

Definition at line 58 of file FWPFTrackUtils.h.

Referenced by Instance(), and ~FWPFTrackSingleton().

Definition at line 62 of file FWPFTrackUtils.h.

Referenced by getField(), and initPropagator().

TEveTrackPropagator* FWPFTrackSingleton::m_trackerTrackPropagator [private]

Definition at line 60 of file FWPFTrackUtils.h.

Referenced by getTrackerTrackPropagator(), and initPropagator().

TEveTrackPropagator* FWPFTrackSingleton::m_trackPropagator [private]

Definition at line 61 of file FWPFTrackUtils.h.

Referenced by getTrackPropagator(), and initPropagator().

Definition at line 57 of file FWPFTrackUtils.h.

Referenced by Instance().