CMS 3D CMS Logo

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

#include <CMSFieldManager.h>

Inheritance diagram for CMSFieldManager:

Public Member Functions

 CMSFieldManager ()
 
void ConfigureForTrack (const G4Track *) override
 
void InitialiseForVolume (const edm::ParameterSet &, sim::Field *, G4ChordFinder *, G4ChordFinder *, const std::string &vol, const std::string &type, const std::string &stepper, double delta, double minstep)
 
void SetMonopoleTracking (G4bool)
 
 ~CMSFieldManager () override
 

Private Member Functions

 CMSFieldManager (const CMSFieldManager &)=delete
 
CMSFieldManageroperator= (const CMSFieldManager &)=delete
 

Private Attributes

G4ChordFinder * chordFinder
 
G4ChordFinder * chordFinderMonopole
 
G4ChordFinder * currChordFinder
 
double dChord
 
double dChordSimple
 
double dIntersection
 
double dIntersectionSimple
 
double dOneStep
 
double dOneStepSimple
 
double energyThreshold
 
std::unique_ptr< sim::FieldtheField
 

Detailed Description

Definition at line 17 of file CMSFieldManager.h.

Constructor & Destructor Documentation

CMSFieldManager::CMSFieldManager ( )
explicit

Definition at line 9 of file CMSFieldManager.cc.

10  : G4FieldManager(), currChordFinder(nullptr), chordFinder(nullptr),
11  chordFinderMonopole(nullptr), dChord(0.001), dOneStep(0.001),
12  dIntersection(0.0001), energyThreshold(0.0), dChordSimple(0.1),
14 {}
G4ChordFinder * chordFinder
G4ChordFinder * chordFinderMonopole
double dIntersectionSimple
G4ChordFinder * currChordFinder
CMSFieldManager::~CMSFieldManager ( )
override

Definition at line 16 of file CMSFieldManager.cc.

17 {}
CMSFieldManager::CMSFieldManager ( const CMSFieldManager )
privatedelete

Member Function Documentation

void CMSFieldManager::ConfigureForTrack ( const G4Track *  track)
override

Definition at line 71 of file CMSFieldManager.cc.

References chordFinder, dChord, dChordSimple, dIntersection, dIntersectionSimple, dOneStep, dOneStepSimple, and energyThreshold.

Referenced by MonopoleTransportation::AlongStepGetPhysicalInteractionLength().

72 {
73  // run time parameters per track
74  if(track->GetKineticEnergy() <= energyThreshold && track->GetParentID() > 0) {
75  chordFinder->SetDeltaChord(dChordSimple);
76  SetDeltaOneStep(dOneStepSimple);
77  SetDeltaIntersection(dIntersectionSimple);
78  } else {
79  chordFinder->SetDeltaChord(dChord);
80  SetDeltaOneStep(dOneStep);
81  SetDeltaIntersection(dIntersection);
82  }
83 }
G4ChordFinder * chordFinder
double dIntersectionSimple
void CMSFieldManager::InitialiseForVolume ( const edm::ParameterSet p,
sim::Field field,
G4ChordFinder *  cf,
G4ChordFinder *  cfmon,
const std::string &  vol,
const std::string &  type,
const std::string &  stepper,
double  delta,
double  minstep 
)

Definition at line 19 of file CMSFieldManager.cc.

References chordFinder, chordFinderMonopole, dChord, dChordSimple, dIntersection, dIntersectionSimple, dOneStep, dOneStepSimple, energyThreshold, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), GeV, createfilelist::int, SetMonopoleTracking(), and theField.

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

24 {
25  dChord = p.getParameter<double>("DeltaChord")*CLHEP::mm;
26  dOneStep = p.getParameter<double>("DeltaOneStep")*CLHEP::mm;
27  dIntersection = p.getParameter<double>("DeltaIntersection")*CLHEP::mm;
28  energyThreshold = p.getParameter<double>("EnergyThSimple")*CLHEP::GeV;
29  dChordSimple = p.getParameter<double>("DeltaChordSimple")*CLHEP::mm;
30  dOneStepSimple = p.getParameter<double>("DeltaOneStepSimple")*CLHEP::mm;
31  dIntersectionSimple = p.getParameter<double>("DeltaIntersectionSimple")*CLHEP::mm;
32  int maxLC = (int)p.getUntrackedParameter<double>("MaximumLoopCounts",1000);
33  double minEpsStep =
34  p.getUntrackedParameter<double>("MinimumEpsilonStep",0.00001)*CLHEP::mm;
35  double maxEpsStep =
36  p.getUntrackedParameter<double>("MaximumEpsilonStep",0.01)*CLHEP::mm;
37  edm::LogInfo("SimG4CoreApplication")
38  << " New CMSFieldManager: LogicalVolume: <" << vol << ">\n"
39  << " Stepper: <" << stepper << ">\n"
40  << " Field type <" << type<< ">\n"
41  << " Field const delta(mm) " << delta << "\n"
42  << " MinStep(mm) " << minstep<< "\n"
43  << " DeltaChord(mm) " << dChord<< "\n"
44  << " DeltaOneStep(mm) " << dOneStep<< "\n"
45  << " DeltaIntersection(mm) " << dIntersection<< "\n"
46  << " EnergyThreshold(GeV) " << energyThreshold<< "\n"
47  << " DeltaChordSimple(mm) " << dChord<< "\n"
48  << " DeltaOneStepSimple(mm) " << dOneStep<< "\n"
49  << " DeltaIntersectionSimple(mm) " << dIntersection<< "\n"
50  << " MaximumLoopCounts " << maxLC<< "\n"
51  << " MinimumEpsilonStep " << minEpsStep<< "\n"
52  << " MaximumEpsilonStep " << maxEpsStep;
53 
54  // initialisation of chord finders
55  chordFinder = cf;
56  chordFinderMonopole = cfmon;
57  chordFinder->SetDeltaChord(dChord);
58  chordFinderMonopole->SetDeltaChord(dChord);
59 
60  // initialisation of field manager
61  theField.reset(field);
62  SetDetectorField(field);
63  SetDeltaOneStep(dOneStep);
64  SetDeltaIntersection(dIntersection);
65  SetMinimumEpsilonStep(minEpsStep);
66  SetMaximumEpsilonStep(maxEpsStep);
67 
68  SetMonopoleTracking(false);
69 }
dbl * delta
Definition: mlp_gen.cc:36
type
Definition: HCALResponse.h:21
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const double GeV
Definition: MathUtil.h:16
G4ChordFinder * chordFinder
G4ChordFinder * chordFinderMonopole
double dIntersectionSimple
std::unique_ptr< sim::Field > theField
void SetMonopoleTracking(G4bool)
CMSFieldManager& CMSFieldManager::operator= ( const CMSFieldManager )
privatedelete
void CMSFieldManager::SetMonopoleTracking ( G4bool  flag)

Definition at line 85 of file CMSFieldManager.cc.

References chordFinder, chordFinderMonopole, and currChordFinder.

Referenced by MonopoleTransportation::AlongStepGetPhysicalInteractionLength(), InitialiseForVolume(), and MonopoleTransportation::PostStepDoIt().

86 {
87  if(flag) {
89  SetFieldChangesEnergy(true);
90  } else {
92  SetFieldChangesEnergy(false);
93  }
94  SetChordFinder(currChordFinder);
95 }
G4ChordFinder * chordFinder
G4ChordFinder * chordFinderMonopole
G4ChordFinder * currChordFinder

Member Data Documentation

G4ChordFinder* CMSFieldManager::chordFinder
private

Definition at line 41 of file CMSFieldManager.h.

Referenced by ConfigureForTrack(), InitialiseForVolume(), and SetMonopoleTracking().

G4ChordFinder* CMSFieldManager::chordFinderMonopole
private

Definition at line 42 of file CMSFieldManager.h.

Referenced by InitialiseForVolume(), and SetMonopoleTracking().

G4ChordFinder* CMSFieldManager::currChordFinder
private

Definition at line 40 of file CMSFieldManager.h.

Referenced by SetMonopoleTracking().

double CMSFieldManager::dChord
private

Definition at line 44 of file CMSFieldManager.h.

Referenced by ConfigureForTrack(), and InitialiseForVolume().

double CMSFieldManager::dChordSimple
private

Definition at line 48 of file CMSFieldManager.h.

Referenced by ConfigureForTrack(), and InitialiseForVolume().

double CMSFieldManager::dIntersection
private

Definition at line 46 of file CMSFieldManager.h.

Referenced by ConfigureForTrack(), and InitialiseForVolume().

double CMSFieldManager::dIntersectionSimple
private

Definition at line 50 of file CMSFieldManager.h.

Referenced by ConfigureForTrack(), and InitialiseForVolume().

double CMSFieldManager::dOneStep
private

Definition at line 45 of file CMSFieldManager.h.

Referenced by ConfigureForTrack(), and InitialiseForVolume().

double CMSFieldManager::dOneStepSimple
private

Definition at line 49 of file CMSFieldManager.h.

Referenced by ConfigureForTrack(), and InitialiseForVolume().

double CMSFieldManager::energyThreshold
private

Definition at line 47 of file CMSFieldManager.h.

Referenced by ConfigureForTrack(), and InitialiseForVolume().

std::unique_ptr<sim::Field> CMSFieldManager::theField
private

Definition at line 38 of file CMSFieldManager.h.

Referenced by InitialiseForVolume().