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

References initPropagator().

Referenced by Instance().

48 { initPropagator(); }

◆ ~FWPFTrackSingleton()

virtual FWPFTrackSingleton::~FWPFTrackSingleton ( )
inlineprotectedvirtual

Definition at line 49 of file FWPFTrackUtils.h.

References instanceFlag.

49 { instanceFlag = false; }
static bool instanceFlag

Member Function Documentation

◆ getField()

FWMagField* FWPFTrackSingleton::getField ( )
inline

Definition at line 41 of file FWPFTrackUtils.h.

References m_magField.

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

41 { return m_magField; }
FWMagField * m_magField

◆ getTrackerTrackPropagator()

TEveTrackPropagator* FWPFTrackSingleton::getTrackerTrackPropagator ( )
inline

Definition at line 39 of file FWPFTrackUtils.h.

References m_trackerTrackPropagator.

Referenced by FWPFTrackUtils::getTrack().

39 { return m_trackerTrackPropagator; }
TEveTrackPropagator * m_trackerTrackPropagator

◆ getTrackPropagator()

TEveTrackPropagator* FWPFTrackSingleton::getTrackPropagator ( )
inline

Definition at line 40 of file FWPFTrackUtils.h.

References m_trackPropagator.

Referenced by FWPFTrackUtils::getTrack().

40 { return m_trackPropagator; }
TEveTrackPropagator * m_trackPropagator

◆ initPropagator()

void FWPFTrackSingleton::initPropagator ( )
private

Definition at line 18 of file FWPFTrackUtils.cc.

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

Referenced by FWPFTrackSingleton().

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 }
float caloZ2()
Definition: FWPFGeom.h:28
TEveTrackPropagator * m_trackerTrackPropagator
TEveTrackPropagator * m_trackPropagator
float caloR3()
Definition: FWPFGeom.h:27
FWMagField * m_magField

◆ Instance()

FWPFTrackSingleton * FWPFTrackSingleton::Instance ( )
static

Definition at line 7 of file FWPFTrackUtils.cc.

References FWPFTrackSingleton(), instanceFlag, and pInstance.

Referenced by FWPFTrackUtils::FWPFTrackUtils().

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

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