CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/SimG4Core/MagneticField/interface/FieldBuilder.h

Go to the documentation of this file.
00001 #ifndef SimG4Core_FieldBuilder_H
00002 #define SimG4Core_FieldBuilder_H
00003 
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005 // #include "SimG4Core/Geometry/interface/G4LogicalVolumeToDDLogicalPartMap.h"
00006 #include <memory>
00007 
00008 // class DDLogicalPart;
00009 class MagneticField;
00010 
00011 class G4FieldManager;
00012 class G4ChordFinder;
00013 class G4Mag_UsualEqRhs;
00014 class G4PropagatorInField;
00015 class G4LogicalVolume;
00016 
00017 namespace sim {
00018   class Field;
00019   class FieldBuilder {
00020   public:
00021     FieldBuilder(const MagneticField*, const edm::ParameterSet&);
00022     //~FieldBuilder();
00023 
00024     /*
00025       void readFieldParameters(DDLogicalPart theLogicalPart,
00026                                const std::string& keywordField);
00027     */
00028     void build(G4FieldManager* fM = 0,
00029                G4PropagatorInField* fP = 0) ;
00030 
00031     /*
00032       void configure(const std::string& keywordField,
00033                      G4FieldManager * fM = 0,
00034                      G4PropagatorInField * fP = 0);
00035     */
00036     void configureForVolume( const std::string& volName, 
00037                              edm::ParameterSet& volPSet,
00038                              G4FieldManager * fM = 0,
00039                              G4PropagatorInField * fP = 0);
00040     G4LogicalVolume * fieldTopVolume();
00041     void setStepperAndChordFinder (G4FieldManager * fM, int val);
00042 
00043   private:
00044     void configureFieldManager(G4FieldManager * fM);
00045     void configurePropagatorInField(G4PropagatorInField * fP);  
00046   private:
00047     std::auto_ptr<Field> theField;
00048     G4Mag_UsualEqRhs *theFieldEquation;
00049     G4LogicalVolume  *theTopVolume;
00050     G4ChordFinder    *fChordFinder, *fChordFinderMonopole;
00051          
00052     std::string keywordField;
00053     std::string fieldType;
00054     double fieldValue;
00055     std::string stepper;
00056     double minStep;
00057     double dChord;
00058     double dOneStep;
00059     double dIntersection;
00060     double dIntersectionAndOneStep;
00061     double maxLoopCount;
00062     double minEpsilonStep;
00063     double maxEpsilonStep;
00064     edm::ParameterSet thePSet ;
00065   };
00066 }
00067 
00068 #endif