00001 //================================================= 00002 // 00003 // MagField.h - class to provide information about 00004 // the solenoid in the current run 00005 // A singleton MagField is initially 00006 // made by the GlobalEventDataMaker, then 00007 // accessed by other Algorithms and classes 00008 // 00009 // Authors: Peter Sherwood 00010 // Simon Dean 00011 // 00012 // 00013 //=================================================== 00014 #ifndef ATLFAST_MAGFIELD_H 00015 #define ATLFAST_MAGFIELD_H 00016 #include "HepMC/GenParticle.h" 00017 #include "AtlfastEvent/ChargeService.h" 00018 #include "AtlfastEvent/MCparticleCollection.h" 00019 #include "AtlfastEvent/CollectionDefs.h" 00020 00021 namespace Atlfast{ 00022 00023 class MagField { 00024 00025 public: 00026 00027 static MagField* Instance(); 00028 static MagField* Instance(double); 00029 bool is_on() const; 00030 double strength() const; 00031 00032 private: 00033 00034 MagField(double); 00035 ~MagField(){}; 00036 00037 // The MagField singleton 00038 static MagField* m_instance; 00039 00040 // Only field strength is stored, 00041 // will add direction later 00042 const double m_strength; 00043 00044 }; 00045 } 00046 #endif 00047 00048