#include <LocalFieldManager.h>
Public Member Functions | |
virtual void | ConfigureForTrack (const G4Track *trk) |
LocalFieldManager () | |
LocalFieldManager (G4Field *commonField, G4FieldManager *priFM, G4FieldManager *altFM) | |
void | SetVerbosity (bool flag) |
virtual | ~LocalFieldManager () |
Protected Member Functions | |
const G4FieldManager * | CopyValuesAndChordFinder (G4FieldManager *fm) |
void | print (const G4Track *trk) |
Private Attributes | |
G4FieldManager * | fAlternativeFM |
G4FieldManager * | fCurrentFM |
G4FieldManager * | fPrimaryFM |
bool | fVerbosity |
Definition at line 8 of file LocalFieldManager.h.
sim::LocalFieldManager::LocalFieldManager | ( | ) | [inline] |
Definition at line 12 of file LocalFieldManager.h.
: G4FieldManager() {}
virtual sim::LocalFieldManager::~LocalFieldManager | ( | ) | [inline, virtual] |
Definition at line 13 of file LocalFieldManager.h.
{}
LocalFieldManager::LocalFieldManager | ( | G4Field * | commonField, |
G4FieldManager * | priFM, | ||
G4FieldManager * | altFM | ||
) |
Definition at line 11 of file LocalFieldManager.cc.
References CopyValuesAndChordFinder(), and fCurrentFM.
: G4FieldManager(commonField,0,false), fPrimaryFM(priFM), fAlternativeFM(altFM), fCurrentFM(0), fVerbosity(false) { this->CopyValuesAndChordFinder(priFM); fCurrentFM = priFM ; }
void LocalFieldManager::ConfigureForTrack | ( | const G4Track * | trk | ) | [virtual] |
Definition at line 23 of file LocalFieldManager.cc.
References abs, CopyValuesAndChordFinder(), fAlternativeFM, fCurrentFM, fPrimaryFM, fVerbosity, and print().
{ int PID = trk->GetDynamicParticle()->GetDefinition()->GetPDGEncoding(); if ( abs(PID)!=13 ) // maybe also high energy pions ?... what else ? { if ( fCurrentFM != fAlternativeFM ) { this->CopyValuesAndChordFinder(fAlternativeFM); fCurrentFM = fAlternativeFM; if ( fVerbosity) print(trk); } } else { if ( fCurrentFM != fPrimaryFM ) { this->CopyValuesAndChordFinder(fPrimaryFM); fCurrentFM = fPrimaryFM; if ( fVerbosity) print(trk); } } return ; }
const G4FieldManager * LocalFieldManager::CopyValuesAndChordFinder | ( | G4FieldManager * | fm | ) | [protected] |
Definition at line 51 of file LocalFieldManager.cc.
Referenced by ConfigureForTrack(), and LocalFieldManager().
{
SetDeltaIntersection(fm->GetDeltaIntersection());
SetDeltaOneStep(fm->GetDeltaOneStep());
G4ChordFinder* cf = fm->GetChordFinder();
cf->SetDeltaChord(cf->GetDeltaChord());
SetChordFinder(cf);
return fm;
}
void sim::LocalFieldManager::print | ( | const G4Track * | trk | ) | [protected] |
Referenced by ConfigureForTrack().
void sim::LocalFieldManager::SetVerbosity | ( | bool | flag | ) | [inline] |
Definition at line 18 of file LocalFieldManager.h.
References fVerbosity.
{ fVerbosity=flag; return; }
G4FieldManager* sim::LocalFieldManager::fAlternativeFM [private] |
Definition at line 25 of file LocalFieldManager.h.
Referenced by ConfigureForTrack().
G4FieldManager* sim::LocalFieldManager::fCurrentFM [private] |
Definition at line 26 of file LocalFieldManager.h.
Referenced by ConfigureForTrack(), and LocalFieldManager().
G4FieldManager* sim::LocalFieldManager::fPrimaryFM [private] |
Definition at line 24 of file LocalFieldManager.h.
Referenced by ConfigureForTrack().
bool sim::LocalFieldManager::fVerbosity [private] |
Definition at line 27 of file LocalFieldManager.h.
Referenced by ConfigureForTrack(), and SetVerbosity().