CMS 3D CMS Logo

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

#include <CurrentG4Track.h>

Static Public Member Functions

static void setTrack (const G4Track *)
 
static const G4Track * track ()
 

Static Private Attributes

static thread_local const G4Track * m_track = nullptr
 

Detailed Description

This class is NOT intended for general use. It provides immediate access to the currently tracked G4Track for places that can't access this information easily, like StackingAction. If an acceptable geant4 mechanism is found for this, this class will be removed.

Definition at line 14 of file CurrentG4Track.h.

Member Function Documentation

void CurrentG4Track::setTrack ( const G4Track *  t)
static

Definition at line 5 of file CurrentG4Track.cc.

References m_track, and protons_cff::t.

5 { m_track = t; }
static thread_local const G4Track * m_track
const G4Track * CurrentG4Track::track ( )
static

Definition at line 7 of file CurrentG4Track.cc.

References m_track.

Referenced by KillSecondariesStackingAction::ClassifyNewTrack().

7 { return m_track; }
static thread_local const G4Track * m_track

Member Data Documentation

thread_local const G4Track * CurrentG4Track::m_track = nullptr
staticprivate

Definition at line 20 of file CurrentG4Track.h.

Referenced by setTrack(), and track().