CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
FWPFTrackSingleton Class Reference

#include <FWPFTrackUtils.h>

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 = 0
 

Detailed Description

Definition at line 34 of file FWPFTrackUtils.h.

Constructor & Destructor Documentation

FWPFTrackSingleton::FWPFTrackSingleton ( const FWPFTrackSingleton )
protected
FWPFTrackSingleton::FWPFTrackSingleton ( )
inlineprotected

Definition at line 49 of file FWPFTrackUtils.h.

References initPropagator().

Referenced by getField(), and Instance().

49 { initPropagator(); }
virtual FWPFTrackSingleton::~FWPFTrackSingleton ( )
inlineprotectedvirtual

Definition at line 50 of file FWPFTrackUtils.h.

References initPropagator(), and instanceFlag.

50 { instanceFlag = false; }
static bool instanceFlag

Member Function Documentation

FWMagField* FWPFTrackSingleton::getField ( )
inline

Definition at line 42 of file FWPFTrackUtils.h.

References FWPFTrackSingleton(), m_magField, and operator=().

42 { return m_magField; }
FWMagField * m_magField
TEveTrackPropagator* FWPFTrackSingleton::getTrackerTrackPropagator ( )
inline

Definition at line 40 of file FWPFTrackUtils.h.

References m_trackerTrackPropagator.

40 { return m_trackerTrackPropagator; }
TEveTrackPropagator * m_trackerTrackPropagator
TEveTrackPropagator* FWPFTrackSingleton::getTrackPropagator ( )
inline

Definition at line 41 of file FWPFTrackUtils.h.

References m_trackPropagator.

41 { return m_trackPropagator; }
TEveTrackPropagator * 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(), and ~FWPFTrackSingleton().

22 {
23  m_magField = new FWMagField();
24 
25  // Common propagator, helix stepper
26  m_trackPropagator = new TEveTrackPropagator();
27  m_trackPropagator->SetMagFieldObj( m_magField, false );
28  m_trackPropagator->SetMaxR( FWPFGeom::caloR3() );
29  m_trackPropagator->SetMaxZ( FWPFGeom::caloZ2() );
30  m_trackPropagator->SetDelta( 0.01 );
31  m_trackPropagator->SetProjTrackBreaking( TEveTrackPropagator::kPTB_UseLastPointPos );
32  m_trackPropagator->SetRnrPTBMarkers( kTRUE );
33  m_trackPropagator->IncDenyDestroy();
34 
35  // Tracker propagator
36  m_trackerTrackPropagator = new TEveTrackPropagator();
37  m_trackerTrackPropagator->SetStepper( TEveTrackPropagator::kRungeKutta );
38  m_trackerTrackPropagator->SetMagFieldObj( m_magField, false );
39  m_trackerTrackPropagator->SetDelta( 0.01 );
42  m_trackerTrackPropagator->SetProjTrackBreaking( TEveTrackPropagator::kPTB_UseLastPointPos );
43  m_trackerTrackPropagator->SetRnrPTBMarkers( kTRUE );
44  m_trackerTrackPropagator->IncDenyDestroy();
45 }
float caloZ2()
Definition: FWPFGeom.h:27
TEveTrackPropagator * m_trackerTrackPropagator
TEveTrackPropagator * m_trackPropagator
float caloR3()
Definition: FWPFGeom.h:26
FWMagField * m_magField
FWPFTrackSingleton * FWPFTrackSingleton::Instance ( )
static

Definition at line 8 of file FWPFTrackUtils.cc.

References FWPFTrackSingleton(), instanceFlag, and pInstance.

Referenced by FWPFTrackUtils::FWPFTrackUtils().

9 {
10  if( !instanceFlag ) // Instance doesn't exist yet
11  {
13  instanceFlag = true;
14  }
15 
16  return pInstance; // Pointer to sole instance
17 }
static FWPFTrackSingleton * pInstance
static bool instanceFlag
const FWPFTrackSingleton& FWPFTrackSingleton::operator= ( const FWPFTrackSingleton )
protected

Member Data Documentation

bool FWPFTrackSingleton::instanceFlag = false
staticprivate

Definition at line 58 of file FWPFTrackUtils.h.

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

FWMagField* FWPFTrackSingleton::m_magField
private

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().

FWPFTrackSingleton * FWPFTrackSingleton::pInstance = 0
staticprivate

Definition at line 57 of file FWPFTrackUtils.h.

Referenced by Instance().