#include <SimG4Core/MagneticField/interface/LocalFieldManager.h>
Public Member Functions | |
virtual void | ConfigureForTrack (const G4Track *trk) |
LocalFieldManager (G4Field *commonField, G4FieldManager *priFM, G4FieldManager *altFM) | |
LocalFieldManager () | |
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] |
virtual sim::LocalFieldManager::~LocalFieldManager | ( | ) | [inline, virtual] |
LocalFieldManager::LocalFieldManager | ( | G4Field * | commonField, | |
G4FieldManager * | priFM, | |||
G4FieldManager * | altFM | |||
) |
Definition at line 11 of file LocalFieldManager.cc.
References CopyValuesAndChordFinder(), and fCurrentFM.
00014 : G4FieldManager(commonField,0,false), 00015 fPrimaryFM(priFM), fAlternativeFM(altFM), 00016 fCurrentFM(0), 00017 fVerbosity(false) 00018 { 00019 this->CopyValuesAndChordFinder(priFM); 00020 fCurrentFM = priFM ; 00021 }
void LocalFieldManager::ConfigureForTrack | ( | const G4Track * | trk | ) | [virtual] |
Definition at line 23 of file LocalFieldManager.cc.
References funct::abs(), CopyValuesAndChordFinder(), fAlternativeFM, fCurrentFM, fPrimaryFM, fVerbosity, cmsScimarkStop::PID, and print().
00024 { 00025 00026 int PID = trk->GetDynamicParticle()->GetDefinition()->GetPDGEncoding(); 00027 00028 if ( abs(PID)!=13 ) // maybe also high energy pions ?... what else ? 00029 { 00030 if ( fCurrentFM != fAlternativeFM ) 00031 { 00032 this->CopyValuesAndChordFinder(fAlternativeFM); 00033 fCurrentFM = fAlternativeFM; 00034 if ( fVerbosity) print(trk); 00035 } 00036 } 00037 else 00038 { 00039 if ( fCurrentFM != fPrimaryFM ) 00040 { 00041 this->CopyValuesAndChordFinder(fPrimaryFM); 00042 fCurrentFM = fPrimaryFM; 00043 if ( fVerbosity) print(trk); 00044 } 00045 } 00046 00047 return ; 00048 00049 }
const G4FieldManager * LocalFieldManager::CopyValuesAndChordFinder | ( | G4FieldManager * | fm | ) | [protected] |
Definition at line 51 of file LocalFieldManager.cc.
Referenced by ConfigureForTrack(), and LocalFieldManager().
00052 { 00053 00054 SetDeltaIntersection(fm->GetDeltaIntersection()); 00055 SetDeltaOneStep(fm->GetDeltaOneStep()); 00056 G4ChordFinder* cf = fm->GetChordFinder(); 00057 cf->SetDeltaChord(cf->GetDeltaChord()); 00058 SetChordFinder(cf); 00059 00060 return fm; 00061 00062 }
void LocalFieldManager::print | ( | const G4Track * | trk | ) | [protected] |
Definition at line 64 of file LocalFieldManager.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAlternativeFM, and fCurrentFM.
Referenced by ConfigureForTrack().
00065 { 00066 00067 if (fCurrentFM==fAlternativeFM) 00068 { 00069 std::cout << " Alternative field manager with"; 00070 } 00071 else 00072 { 00073 std::cout << " Global field manager with"; 00074 } 00075 std::cout << " DeltaIntersection " << G4FieldManager::GetDeltaIntersection() 00076 << ", DeltaOneStep " << G4FieldManager::GetDeltaOneStep() 00077 << " and DeltaChord " << G4FieldManager::GetChordFinder()->GetDeltaChord() 00078 << " for " << trk->GetDynamicParticle()->GetDefinition()->GetPDGEncoding() 00079 << " with " << trk->GetKineticEnergy()/MeV << " MeV in " 00080 << trk->GetVolume()->GetName() << std::endl; 00081 00082 return ; 00083 00084 }
Definition at line 18 of file LocalFieldManager.h.
References fVerbosity.
Referenced by sim::FieldBuilder::build().
00018 { fVerbosity=flag; return; }
G4FieldManager* sim::LocalFieldManager::fAlternativeFM [private] |
G4FieldManager* sim::LocalFieldManager::fCurrentFM [private] |
Definition at line 26 of file LocalFieldManager.h.
Referenced by ConfigureForTrack(), LocalFieldManager(), and print().
G4FieldManager* sim::LocalFieldManager::fPrimaryFM [private] |
bool sim::LocalFieldManager::fVerbosity [private] |
Definition at line 27 of file LocalFieldManager.h.
Referenced by ConfigureForTrack(), and SetVerbosity().