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 ()
 
 FWPFTrackSingleton (const 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 = nullptr
 

Detailed Description

Definition at line 34 of file FWPFTrackUtils.h.

Constructor & Destructor Documentation

◆ FWPFTrackSingleton() [1/2]

FWPFTrackSingleton::FWPFTrackSingleton ( const FWPFTrackSingleton )
protected

◆ FWPFTrackSingleton() [2/2]

FWPFTrackSingleton::FWPFTrackSingleton ( )
inlineprotected

Definition at line 48 of file FWPFTrackUtils.h.

48 { initPropagator(); }

References initPropagator().

Referenced by Instance().

◆ ~FWPFTrackSingleton()

virtual FWPFTrackSingleton::~FWPFTrackSingleton ( )
inlineprotectedvirtual

Definition at line 49 of file FWPFTrackUtils.h.

49 { instanceFlag = false; }

References instanceFlag.

Member Function Documentation

◆ getField()

FWMagField* FWPFTrackSingleton::getField ( )
inline

Definition at line 41 of file FWPFTrackUtils.h.

41 { return m_magField; }

References m_magField.

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

◆ getTrackerTrackPropagator()

TEveTrackPropagator* FWPFTrackSingleton::getTrackerTrackPropagator ( )
inline

Definition at line 39 of file FWPFTrackUtils.h.

39 { return m_trackerTrackPropagator; }

References m_trackerTrackPropagator.

Referenced by FWPFTrackUtils::getTrack().

◆ getTrackPropagator()

TEveTrackPropagator* FWPFTrackSingleton::getTrackPropagator ( )
inline

Definition at line 40 of file FWPFTrackUtils.h.

40 { return m_trackPropagator; }

References m_trackPropagator.

Referenced by FWPFTrackUtils::getTrack().

◆ initPropagator()

void FWPFTrackSingleton::initPropagator ( )
private

Definition at line 18 of file FWPFTrackUtils.cc.

18  {
19  m_magField = new FWMagField();
20 
21  // Common propagator, helix stepper
22  m_trackPropagator = new TEveTrackPropagator();
23  m_trackPropagator->SetMagFieldObj(m_magField, false);
26  m_trackPropagator->SetDelta(0.01);
27  m_trackPropagator->SetProjTrackBreaking(TEveTrackPropagator::kPTB_UseLastPointPos);
28  m_trackPropagator->SetRnrPTBMarkers(kTRUE);
29  m_trackPropagator->IncDenyDestroy();
30 
31  // Tracker propagator
32  m_trackerTrackPropagator = new TEveTrackPropagator();
33  m_trackerTrackPropagator->SetStepper(TEveTrackPropagator::kRungeKutta);
34  m_trackerTrackPropagator->SetMagFieldObj(m_magField, false);
35  m_trackerTrackPropagator->SetDelta(0.01);
38  m_trackerTrackPropagator->SetProjTrackBreaking(TEveTrackPropagator::kPTB_UseLastPointPos);
39  m_trackerTrackPropagator->SetRnrPTBMarkers(kTRUE);
40  m_trackerTrackPropagator->IncDenyDestroy();
41 }

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

Referenced by FWPFTrackSingleton().

◆ Instance()

FWPFTrackSingleton * FWPFTrackSingleton::Instance ( )
static

Definition at line 7 of file FWPFTrackUtils.cc.

7  {
8  if (!instanceFlag) // Instance doesn't exist yet
9  {
11  instanceFlag = true;
12  }
13 
14  return pInstance; // Pointer to sole instance
15 }

References FWPFTrackSingleton(), instanceFlag, and pInstance.

Referenced by FWPFTrackUtils::FWPFTrackUtils().

◆ operator=()

const FWPFTrackSingleton& FWPFTrackSingleton::operator= ( const FWPFTrackSingleton )
protected

Member Data Documentation

◆ instanceFlag

bool FWPFTrackSingleton::instanceFlag = false
staticprivate

Definition at line 57 of file FWPFTrackUtils.h.

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

◆ m_magField

FWMagField* FWPFTrackSingleton::m_magField
private

Definition at line 61 of file FWPFTrackUtils.h.

Referenced by getField(), and initPropagator().

◆ m_trackerTrackPropagator

TEveTrackPropagator* FWPFTrackSingleton::m_trackerTrackPropagator
private

Definition at line 59 of file FWPFTrackUtils.h.

Referenced by getTrackerTrackPropagator(), and initPropagator().

◆ m_trackPropagator

TEveTrackPropagator* FWPFTrackSingleton::m_trackPropagator
private

Definition at line 60 of file FWPFTrackUtils.h.

Referenced by getTrackPropagator(), and initPropagator().

◆ pInstance

FWPFTrackSingleton * FWPFTrackSingleton::pInstance = nullptr
staticprivate

Definition at line 56 of file FWPFTrackUtils.h.

Referenced by Instance().

FWPFTrackSingleton::m_trackPropagator
TEveTrackPropagator * m_trackPropagator
Definition: FWPFTrackUtils.h:60
FWPFTrackSingleton::initPropagator
void initPropagator()
Definition: FWPFTrackUtils.cc:18
FWPFGeom::caloR3
float caloR3()
Definition: FWPFGeom.h:27
FWMagField
Definition: FWMagField.h:14
FWPFTrackSingleton::m_magField
FWMagField * m_magField
Definition: FWPFTrackUtils.h:61
FWPFGeom::caloZ2
float caloZ2()
Definition: FWPFGeom.h:28
FWPFTrackSingleton::instanceFlag
static bool instanceFlag
Definition: FWPFTrackUtils.h:57
FWPFTrackSingleton::pInstance
static FWPFTrackSingleton * pInstance
Definition: FWPFTrackUtils.h:56
FWPFTrackSingleton::FWPFTrackSingleton
FWPFTrackSingleton()
Definition: FWPFTrackUtils.h:48
FWPFTrackSingleton::m_trackerTrackPropagator
TEveTrackPropagator * m_trackerTrackPropagator
Definition: FWPFTrackUtils.h:59