CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FieldBuilder.h
Go to the documentation of this file.
1 #ifndef SimG4Core_FieldBuilder_H
2 #define SimG4Core_FieldBuilder_H
3 
5 // #include "SimG4Core/Geometry/interface/G4LogicalVolumeToDDLogicalPartMap.h"
6 #include <memory>
7 
8 // class DDLogicalPart;
9 class MagneticField;
10 
11 class G4FieldManager;
12 class G4Mag_UsualEqRhs;
13 class G4PropagatorInField;
14 class G4LogicalVolume;
15 
16 namespace sim {
17  class Field;
18  class ChordFinderSetter;
19  class FieldBuilder {
20  public:
22  //~FieldBuilder();
23 
24  /*
25  void readFieldParameters(DDLogicalPart theLogicalPart,
26  const std::string& keywordField);
27  */
28  void build(G4FieldManager* fM = nullptr,
29  G4PropagatorInField* fP = nullptr,
30  ChordFinderSetter *setter = nullptr);
31 
32  /*
33  void configure(const std::string& keywordField,
34  G4FieldManager * fM = 0,
35  G4PropagatorInField * fP = 0);
36  */
37  void configureForVolume( const std::string& volName,
38  edm::ParameterSet& volPSet,
39  G4FieldManager * fM = nullptr,
40  G4PropagatorInField * fP = nullptr,
41  ChordFinderSetter *setter = nullptr);
42  G4LogicalVolume * fieldTopVolume();
43 
44  private:
45  void configureFieldManager(G4FieldManager * fM, ChordFinderSetter *setter);
46  void configurePropagatorInField(G4PropagatorInField * fP);
47  private:
48  std::auto_ptr<Field> theField;
49  G4Mag_UsualEqRhs *theFieldEquation;
50  G4LogicalVolume *theTopVolume;
51 
54  double fieldValue;
56  double minStep;
57  double dChord;
58  double dOneStep;
59  double dIntersection;
61  double maxLoopCount;
64  double delta;
66  };
67 }
68 
69 #endif
std::string fieldType
Definition: FieldBuilder.h:53
void configureForVolume(const std::string &volName, edm::ParameterSet &volPSet, G4FieldManager *fM=nullptr, G4PropagatorInField *fP=nullptr, ChordFinderSetter *setter=nullptr)
Definition: FieldBuilder.cc:98
Definition: sim.h:19
void configureFieldManager(G4FieldManager *fM, ChordFinderSetter *setter)
void build(G4FieldManager *fM=nullptr, G4PropagatorInField *fP=nullptr, ChordFinderSetter *setter=nullptr)
Definition: FieldBuilder.cc:48
G4LogicalVolume * theTopVolume
Definition: FieldBuilder.h:50
double dIntersectionAndOneStep
Definition: FieldBuilder.h:60
FieldBuilder(const MagneticField *, const edm::ParameterSet &)
Definition: FieldBuilder.cc:34
std::auto_ptr< Field > theField
Definition: FieldBuilder.h:48
std::string keywordField
Definition: FieldBuilder.h:52
G4LogicalVolume * fieldTopVolume()
G4Mag_UsualEqRhs * theFieldEquation
Definition: FieldBuilder.h:49
edm::ParameterSet thePSet
Definition: FieldBuilder.h:65
std::string stepper
Definition: FieldBuilder.h:55
void configurePropagatorInField(G4PropagatorInField *fP)