CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
sim::LocalFieldManager Class Reference

#include <LocalFieldManager.h>

Inheritance diagram for sim::LocalFieldManager:

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
 

Detailed Description

Definition at line 8 of file LocalFieldManager.h.

Constructor & Destructor Documentation

sim::LocalFieldManager::LocalFieldManager ( )
inline

Definition at line 12 of file LocalFieldManager.h.

12 : G4FieldManager() {}
virtual sim::LocalFieldManager::~LocalFieldManager ( )
inlinevirtual

Definition at line 13 of file LocalFieldManager.h.

13 {}
LocalFieldManager::LocalFieldManager ( G4Field *  commonField,
G4FieldManager *  priFM,
G4FieldManager *  altFM 
)

Definition at line 11 of file LocalFieldManager.cc.

References CopyValuesAndChordFinder(), and fCurrentFM.

14  : G4FieldManager(commonField,0,false),
15  fPrimaryFM(priFM), fAlternativeFM(altFM),
16  fCurrentFM(0),
17  fVerbosity(false)
18 {
19  this->CopyValuesAndChordFinder(priFM);
20  fCurrentFM = priFM ;
21 }
G4FieldManager * fCurrentFM
G4FieldManager * fAlternativeFM
const G4FieldManager * CopyValuesAndChordFinder(G4FieldManager *fm)
G4FieldManager * fPrimaryFM

Member Function Documentation

void LocalFieldManager::ConfigureForTrack ( const G4Track *  trk)
virtual

Definition at line 23 of file LocalFieldManager.cc.

References abs, CopyValuesAndChordFinder(), fAlternativeFM, fCurrentFM, fPrimaryFM, fVerbosity, print(), and hitfit::return.

24 {
25 
26  int PID = trk->GetDynamicParticle()->GetDefinition()->GetPDGEncoding();
27 
28  if ( abs(PID)!=13 ) // maybe also high energy pions ?... what else ?
29  {
30  if ( fCurrentFM != fAlternativeFM )
31  {
34  if ( fVerbosity) print(trk);
35  }
36  }
37  else
38  {
39  if ( fCurrentFM != fPrimaryFM )
40  {
43  if ( fVerbosity) print(trk);
44  }
45  }
46 
47  return ;
48 
49 }
G4FieldManager * fCurrentFM
G4FieldManager * fAlternativeFM
#define abs(x)
Definition: mlp_lapack.h:159
const G4FieldManager * CopyValuesAndChordFinder(G4FieldManager *fm)
void print(const G4Track *trk)
G4FieldManager * fPrimaryFM
const G4FieldManager * LocalFieldManager::CopyValuesAndChordFinder ( G4FieldManager *  fm)
protected

Definition at line 51 of file LocalFieldManager.cc.

Referenced by ConfigureForTrack(), and LocalFieldManager().

52 {
53 
54  SetDeltaIntersection(fm->GetDeltaIntersection());
55  SetDeltaOneStep(fm->GetDeltaOneStep());
56  G4ChordFinder* cf = fm->GetChordFinder();
57  cf->SetDeltaChord(cf->GetDeltaChord());
58  SetChordFinder(cf);
59 
60  return fm;
61 
62 }
void LocalFieldManager::print ( const G4Track *  trk)
protected

Definition at line 64 of file LocalFieldManager.cc.

References gather_cfg::cout, fAlternativeFM, fCurrentFM, and hitfit::return.

Referenced by ConfigureForTrack().

65 {
66 
68  {
69  std::cout << " Alternative field manager with";
70  }
71  else
72  {
73  std::cout << " Global field manager with";
74  }
75  std::cout << " DeltaIntersection " << G4FieldManager::GetDeltaIntersection()
76  << ", DeltaOneStep " << G4FieldManager::GetDeltaOneStep()
77  << " and DeltaChord " << G4FieldManager::GetChordFinder()->GetDeltaChord()
78  << " for " << trk->GetDynamicParticle()->GetDefinition()->GetPDGEncoding()
79  << " with " << trk->GetKineticEnergy()/MeV << " MeV in "
80  << trk->GetVolume()->GetName() << std::endl;
81 
82  return ;
83 
84 }
G4FieldManager * fCurrentFM
G4FieldManager * fAlternativeFM
tuple cout
Definition: gather_cfg.py:121
void sim::LocalFieldManager::SetVerbosity ( bool  flag)
inline

Definition at line 18 of file LocalFieldManager.h.

References fVerbosity.

Referenced by sim::FieldBuilder::build().

18 { fVerbosity=flag; return; }
long int flag
Definition: mlp_lapack.h:47

Member Data Documentation

G4FieldManager* sim::LocalFieldManager::fAlternativeFM
private

Definition at line 25 of file LocalFieldManager.h.

Referenced by ConfigureForTrack(), and print().

G4FieldManager* sim::LocalFieldManager::fCurrentFM
private

Definition at line 26 of file LocalFieldManager.h.

Referenced by ConfigureForTrack(), LocalFieldManager(), and print().

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