From 4aa1cd5112b31ea270e168da2fdf8759e05bb52d Mon Sep 17 00:00:00 2001 From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch> Date: Sat, 8 Dec 2018 22:11:18 +0100 Subject: [PATCH] Removed the obsolete directory Simulation/G4Sim/FADS and fixed several compilation failures caused by switching to geant4.10.4.patch02.atlasmt01 --- .../LUCID_OpProcess/src/LucidPhysicsTool.cxx | 4 +- .../src/G4ScoringProcessTool.cxx | 4 +- .../Monopole/src/MonopolePhysicsTool.cxx | 4 +- .../Quirks/src/QuirkPhysicsTool.cxx | 4 +- .../RHadrons/src/RHadronsPhysicsTool.cxx | 4 +- .../Sleptons/src/SleptonsPhysicsTool.cxx | 4 +- .../G4Sim/FADS/FadsControl/doc/packagedoc.h | 32 --- .../G4Sim/FADS/FadsField/CMakeLists.txt | 20 -- .../FadsField/FadsField/EqOfMotionFactory.h | 49 ---- .../FadsField/EqOfMotionFactoryBase.h | 28 --- .../FadsField/FadsField/FadsFieldManager.h | 36 --- .../FadsField/FadsField/FieldIntParameters.h | 190 --------------- .../FADS/FadsField/FadsField/FieldManager.h | 81 ------- .../FadsField/FadsField/FieldManagerFactory.h | 25 -- .../FadsField/FieldManagerFactoryStore.h | 26 --- .../FadsField/FieldManagerFactoryT.h | 25 -- .../FadsField/FadsField/FieldManagerStore.h | 33 --- .../FadsField/IntegratorStepperBase.h | 38 --- .../FadsField/IntegratorStepperFactory.h | 48 ---- .../FadsField/FadsField/MagneticFieldMap.h | 33 --- .../FadsField/FadsField/MagneticFieldMapT.h | 74 ------ .../FadsField/FadsField/RegionInformation.h | 35 --- .../FadsField/FadsField/TestFieldManager.h | 16 -- .../FADS/FadsField/src/FadsFieldManager.cxx | 98 -------- .../FADS/FadsField/src/FieldIntParameters.cxx | 120 ---------- .../G4Sim/FADS/FadsField/src/FieldManager.cxx | 218 ------------------ .../FadsField/src/FieldManagerFactory.cxx | 16 -- .../src/FieldManagerFactoryStore.cxx | 32 --- .../FADS/FadsField/src/FieldManagerStore.cxx | 52 ----- .../G4Sim/FADS/FadsField/src/Integrators.cxx | 33 --- .../FADS/FadsField/src/MagneticFieldMap.cxx | 33 --- .../FADS/FadsField/src/RegionInformation.cxx | 20 -- .../FADS/FadsField/src/TestFieldManager.cxx | 16 -- 33 files changed, 18 insertions(+), 1433 deletions(-) delete mode 100644 Simulation/G4Sim/FADS/FadsControl/doc/packagedoc.h delete mode 100644 Simulation/G4Sim/FADS/FadsField/CMakeLists.txt delete mode 100755 Simulation/G4Sim/FADS/FadsField/FadsField/EqOfMotionFactory.h delete mode 100755 Simulation/G4Sim/FADS/FadsField/FadsField/EqOfMotionFactoryBase.h delete mode 100755 Simulation/G4Sim/FADS/FadsField/FadsField/FadsFieldManager.h delete mode 100644 Simulation/G4Sim/FADS/FadsField/FadsField/FieldIntParameters.h delete mode 100755 Simulation/G4Sim/FADS/FadsField/FadsField/FieldManager.h delete mode 100644 Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactory.h delete mode 100644 Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactoryStore.h delete mode 100644 Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactoryT.h delete mode 100755 Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerStore.h delete mode 100755 Simulation/G4Sim/FADS/FadsField/FadsField/IntegratorStepperBase.h delete mode 100755 Simulation/G4Sim/FADS/FadsField/FadsField/IntegratorStepperFactory.h delete mode 100755 Simulation/G4Sim/FADS/FadsField/FadsField/MagneticFieldMap.h delete mode 100755 Simulation/G4Sim/FADS/FadsField/FadsField/MagneticFieldMapT.h delete mode 100644 Simulation/G4Sim/FADS/FadsField/FadsField/RegionInformation.h delete mode 100644 Simulation/G4Sim/FADS/FadsField/FadsField/TestFieldManager.h delete mode 100755 Simulation/G4Sim/FADS/FadsField/src/FadsFieldManager.cxx delete mode 100644 Simulation/G4Sim/FADS/FadsField/src/FieldIntParameters.cxx delete mode 100755 Simulation/G4Sim/FADS/FadsField/src/FieldManager.cxx delete mode 100644 Simulation/G4Sim/FADS/FadsField/src/FieldManagerFactory.cxx delete mode 100644 Simulation/G4Sim/FADS/FadsField/src/FieldManagerFactoryStore.cxx delete mode 100755 Simulation/G4Sim/FADS/FadsField/src/FieldManagerStore.cxx delete mode 100755 Simulation/G4Sim/FADS/FadsField/src/Integrators.cxx delete mode 100755 Simulation/G4Sim/FADS/FadsField/src/MagneticFieldMap.cxx delete mode 100644 Simulation/G4Sim/FADS/FadsField/src/RegionInformation.cxx delete mode 100644 Simulation/G4Sim/FADS/FadsField/src/TestFieldManager.cxx diff --git a/ForwardDetectors/LUCID/LUCID_SimUtils/LUCID_OpProcess/src/LucidPhysicsTool.cxx b/ForwardDetectors/LUCID/LUCID_SimUtils/LUCID_OpProcess/src/LucidPhysicsTool.cxx index 304fd694f9..b8146c05f2 100644 --- a/ForwardDetectors/LUCID/LUCID_SimUtils/LUCID_OpProcess/src/LucidPhysicsTool.cxx +++ b/ForwardDetectors/LUCID/LUCID_SimUtils/LUCID_OpProcess/src/LucidPhysicsTool.cxx @@ -17,7 +17,9 @@ #include "G4OpRayleigh.hh" #include "G4OpBoundaryProcess.hh" -#if G4VERSION_NUMBER > 1009 +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else #define PARTICLEITERATOR theParticleIterator diff --git a/Simulation/G4Extensions/G4ScoringProcess/src/G4ScoringProcessTool.cxx b/Simulation/G4Extensions/G4ScoringProcess/src/G4ScoringProcessTool.cxx index 18ef4ed326..1dde222df8 100644 --- a/Simulation/G4Extensions/G4ScoringProcess/src/G4ScoringProcessTool.cxx +++ b/Simulation/G4Extensions/G4ScoringProcess/src/G4ScoringProcessTool.cxx @@ -20,7 +20,9 @@ // 26-10-2015 : Edoardo Farina //----------------------------------------------------------------------------- -#if G4VERSION_NUMBER > 1009 +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else #define PARTICLEITERATOR theParticleIterator diff --git a/Simulation/G4Extensions/Monopole/src/MonopolePhysicsTool.cxx b/Simulation/G4Extensions/Monopole/src/MonopolePhysicsTool.cxx index 611429fefe..b65b52d29b 100644 --- a/Simulation/G4Extensions/Monopole/src/MonopolePhysicsTool.cxx +++ b/Simulation/G4Extensions/Monopole/src/MonopolePhysicsTool.cxx @@ -22,7 +22,9 @@ // 14-05-2015 Edoardo Farina //----------------------------------------------------------------------------- -#if G4VERSION_NUMBER > 1009 +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else #define PARTICLEITERATOR theParticleIterator diff --git a/Simulation/G4Extensions/Quirks/src/QuirkPhysicsTool.cxx b/Simulation/G4Extensions/Quirks/src/QuirkPhysicsTool.cxx index fcf81ccf27..91cb357574 100644 --- a/Simulation/G4Extensions/Quirks/src/QuirkPhysicsTool.cxx +++ b/Simulation/G4Extensions/Quirks/src/QuirkPhysicsTool.cxx @@ -35,7 +35,9 @@ // 15-05-2015 : Edoardo Farina //----------------------------------------------------------------------------- #include "G4Version.hh" -#if G4VERSION_NUMBER > 1009 +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else #define PARTICLEITERATOR theParticleIterator diff --git a/Simulation/G4Extensions/RHadrons/src/RHadronsPhysicsTool.cxx b/Simulation/G4Extensions/RHadrons/src/RHadronsPhysicsTool.cxx index 89c408afbc..f841633b3f 100644 --- a/Simulation/G4Extensions/RHadrons/src/RHadronsPhysicsTool.cxx +++ b/Simulation/G4Extensions/RHadrons/src/RHadronsPhysicsTool.cxx @@ -30,7 +30,9 @@ // 2015-05-14 Edoardo Farina //----------------------------------------------------------------------------- -#if G4VERSION_NUMBER > 1009 +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else #define PARTICLEITERATOR theParticleIterator diff --git a/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.cxx b/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.cxx index 9889a9f7d6..ef4b01da38 100644 --- a/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.cxx +++ b/Simulation/G4Extensions/Sleptons/src/SleptonsPhysicsTool.cxx @@ -33,7 +33,9 @@ // 15-05-2015 : Edoardo Farina //----------------------------------------------------------------------------- -#if G4VERSION_NUMBER > 1009 +#if G4VERSION_NUMBER > 1029 +#define PARTICLEITERATOR (this->GetParticleIterator()) +#elif G4VERSION_NUMBER > 1009 #define PARTICLEITERATOR aParticleIterator #else #define PARTICLEITERATOR theParticleIterator diff --git a/Simulation/G4Sim/FADS/FadsControl/doc/packagedoc.h b/Simulation/G4Sim/FADS/FadsControl/doc/packagedoc.h deleted file mode 100644 index 34e7ed779e..0000000000 --- a/Simulation/G4Sim/FADS/FadsControl/doc/packagedoc.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** -@page FadsControl_page FadsControl -@author Andrea Dell'Acqua (dellacqu@mail.cern.ch) - -@section FadsControl_FadsControl Introduction - -This package includes several useful base classes that are used throughout the simulation. - -@section FadsControl_FadsControl Class Overview - -This package's classes are logically divided in the following way: - - - DetectorConstructionEntryBase , PhysicsListEntryBase , PrimaryGeneratorEntryBase , RunManagerEntryBase , UserActionEntryBase : Pure athena base classes for the corresponding G4 objects - - DetectorConstructionEntry , PhysicsListEntry , PrimaryGeneratorEntry , RunManagerEntry , UserActionEntry : Inherit from the pure-athena base classes and add support for the Geant4 object (usually through members rather than through inheritance) - - DetectorDef , PhysicsListDef , PrimaryGeneratorDef , RunManagerDef , UserActionDef : Definitions for the classes (only C++ definitions) - - DetectorConstructionManager , PhysicsListManager , PrimaryGeneratorActionManager , RunManagerStore , UserActionManager : Logical managers for keeping track of the defined objects and which are activated - -These individual classes are what one would expect. DetectorConstruction* deal with engines for constructing the detector; PhysicsList* deal with G4PhysicsLists; PrimaryGenerator* deal with G4PrimaryGenerators, RunManager* deal with G4RunManagers (note that there should only be one active at a time, which is why the manager is called a "store"); UserAction* deal with G4UserActions. - -Three other classes are included in this package: - - - RandomNrCenter : Defines the random number generator to be used, including seeds, for Geant4 (essentially an interface for HepRandomEngines) - - FadsActionBase : A generic action that includes all the G4 action types (stepping actions, tracking actions, run actions, stacking actions). All other action types can inherit from this one and select the methods they wish to implement. - - SteppingVerboseDef : An interface for G4 stepping verbose within the athena framework - - - -*/ diff --git a/Simulation/G4Sim/FADS/FadsField/CMakeLists.txt b/Simulation/G4Sim/FADS/FadsField/CMakeLists.txt deleted file mode 100644 index 3ce5e812a6..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################ -# Package: FadsField -################################################################################ - -# Declare the package name: -atlas_subdir( FadsField ) - -# External dependencies: -find_package( CLHEP ) -find_package( Geant4 ) -find_package( XercesC ) - -# Component(s) in the package: -atlas_add_library( FadsField - src/*.cxx - PUBLIC_HEADERS FadsField - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ) - diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/EqOfMotionFactory.h b/Simulation/G4Sim/FADS/FadsField/FadsField/EqOfMotionFactory.h deleted file mode 100755 index 252b1e65e5..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/EqOfMotionFactory.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef EqOfMotionFactory_H -#define EqOfMotionFactory_H - -#include "FadsField/EqOfMotionFactoryBase.h" -#include "FadsField/FieldManager.h" -#include "G4Mag_EqRhs.hh" -#include "G4MagneticField.hh" - -namespace FADS { - -template <class T> -class EqOfMotionFactory : public EqOfMotionFactoryBase { -private: - T* m_theEqOfMotion; -public: - EqOfMotionFactory(std::string n): EqOfMotionFactoryBase(n) , m_theEqOfMotion(0) - { - RegisterToStore(); - } - void Create() - { - if (!m_theEqOfMotion) - { - m_theEqOfMotion= - new T(FieldManager::GetFieldManager()->GetMagneticFieldMap()); - } - } - void Delete() - { - if (m_theEqOfMotion) - { - delete m_theEqOfMotion; - m_theEqOfMotion=0; - } - } - virtual G4Mag_EqRhs* Build() - { - Create(); return m_theEqOfMotion; - } - void RegisterToStore() {FieldManager::GetFieldManager()->RegisterEqOfMotion(this);} -}; - -} // end namespace - -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/EqOfMotionFactoryBase.h b/Simulation/G4Sim/FADS/FadsField/FadsField/EqOfMotionFactoryBase.h deleted file mode 100755 index d7511515e5..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/EqOfMotionFactoryBase.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef EqOfMotionFactoryBase_H -#define EqOfMotionFactoryBase_H - -#include <string> - -class G4EquationOfMotion; -class G4Mag_EqRhs; - -namespace FADS { - -// abstract base class for implementing a templated stepper factory -class EqOfMotionFactoryBase { -public: - EqOfMotionFactoryBase(std::string n):m_EqOfMotionName(n) {} - virtual G4Mag_EqRhs* Build()=0; - std::string GetName() const {return m_EqOfMotionName;} - void SetName(std::string n) {m_EqOfMotionName=n;} -protected: - std::string m_EqOfMotionName; -}; - -} // end namespace - -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/FadsFieldManager.h b/Simulation/G4Sim/FADS/FadsField/FadsField/FadsFieldManager.h deleted file mode 100755 index 3137c4c62c..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/FadsFieldManager.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FadsFieldManager_H -#define FadsFieldManager_H - -#include "G4FieldManager.hh" -#include <string> -#include "FadsField/FieldIntParameters.h" -class G4Track; -class G4Region; -class G4MagneticField; -class G4MagIntegratorStepper; - -namespace FADS { - -class FadsFieldManager: public G4FieldManager { -public: - FadsFieldManager(std::string); - std::string GetName() const; - void SetField(std::string); - virtual ~FadsFieldManager() {;} - void SetStepper(G4MagIntegratorStepper* ); -private: - std::string m_name; - FADS::FieldIntParameters* m_defaultParameters; - const G4Track* m_previousTrack; - G4Region* m_previousRegion; - -}; - -} // end namespace - -#endif - diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldIntParameters.h b/Simulation/G4Sim/FADS/FadsField/FadsField/FieldIntParameters.h deleted file mode 100644 index 3fe550c09e..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldIntParameters.h +++ /dev/null @@ -1,190 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FieldIntParameters_H -#define FieldIntParameters_H - -class G4Track; -#include "globals.hh" - -namespace FADS { - -class FieldIntParameters -{ - public: - FieldIntParameters(); - virtual ~FieldIntParameters(); - - public: - void List(G4int iFlg=0) const; - - public: - virtual void GetParameters(const G4Track*, - G4double& /*maxLengthForConstField*/, - G4double& /*missDistance*/, - G4double& /*typicalLongStep*/, - G4double& /*tolerableBiasError*/, - G4double& /*tolerableIntegrationError*/, - G4double& /*expectedNumBoundaries*/, - G4double& /*expectedTrackLength*/); - // - // This method is invoked when a track gets into the region. - // - // Return values - // - // maxLengthForConstField: - // if the estimated step size is shorter than this maxLengthForConstField, - // the field is assumed to be constant for the step. - // - // missDistance: - // tolerable deviation between actual trajectory and estimated - // chord. - // - // typicalLongStep: - // typicalLongStep is a suggestion to G4PathFinder. There is no - // need to be exact in this parameter but just the typical length - // of the "long" step in this detector region. - // Typically it would be 95-98 percentile of the step length in - // the region. For example, it could be (a factor times) distance - // between layers for barrel silicon detector. - // - // tolerableBiasError: - // tolerable biasing error (in length) accumulated in the region - // - // tolerableIntegrationError: - // tolerable integration (statistical) error (in length) accumulated - // in the region - // - // expectedNumBoundaries: - // number of geometrical boundaries this track is exprected to cross - // in the region - // - // expectedTrackLength: - // maximum distance this track could travel (neglecting spiral path) - // in the region - // - // Note: - // deltaIntersection, deltaOneStep, maxEpsilonStep, minEpsilonStep - // are given by - // deltaIntersection = tolerableBiasError / expectedNumBoundaries - // maxEpsilonStep = 2. * tolerableIntegrationError / expectedTrackLength - // minEpsilonStep = maxEpsilonStep / 10. - // deltaOneStep = minEpsilonStep * typicalLongStep - // - - protected: - static G4double s_default_kineticEnergyThreshold; - static G4double s_default_maxLengthForConstField; - static G4double s_default_missDistance; - static G4double s_default_typicalLongStep; - static G4double s_default_tolerableBiasError; - static G4double s_default_tolerableIntegrationError; - static G4double s_default_expectedNumBoundaries; - static G4double s_default_expectedTrackLength; - - G4double m_current_kineticEnergyThreshold; - // in the following parameters - // idx=0 for e+/e- track below E-threshold - // idx=1 for e+/e- track above E-threshold - // and all other charged track except mu+/mu- - // of any kinetic energy - // idx=2 for mu+/mu- track of any kinetic energy - G4double m_current_maxLengthForConstField[3]; - G4double m_current_missDistance[3]; - G4double m_current_typicalLongStep[3]; - G4double m_current_tolerableBiasError[3]; - G4double m_current_tolerableIntegrationError[3]; - G4double m_current_expectedNumBoundaries[3]; - G4double m_current_expectedTrackLength[3]; - - public: - inline static G4double GetDefault_kineticEnergyThreshold() - { return s_default_kineticEnergyThreshold; } - inline static void SetDefault_kineticEnergyThreshold(G4double val) - { s_default_kineticEnergyThreshold= val; } - inline static G4double GetDefault_maxLengthForConstField() - { return s_default_maxLengthForConstField; } - inline static void SetDefault_maxLengthForConstField(G4double val) - { s_default_maxLengthForConstField= val; } - inline static G4double GetDefault_missDistance() - { return s_default_missDistance; } - inline static void SetDefault_missDistance(G4double val) - { s_default_missDistance = val; } - inline static G4double GetDefault_typicalLongStep() - { return s_default_typicalLongStep; } - inline static void SetDefault_typicalLongStep(G4double val) - { s_default_typicalLongStep = val; } - inline static G4double GetDefault_tolerableBiasError() - { return s_default_tolerableBiasError; } - inline static void SetDefault_tolerableBiasError(G4double val) - { s_default_tolerableBiasError = val; } - inline static G4double GetDefault_tolerableIntegrationError() - { return s_default_tolerableIntegrationError; } - inline static void SetDefault_tolerableIntegrationError(G4double val) - { s_default_tolerableIntegrationError = val; } - inline static G4double GetDefault_expectedNumBoundaries() - { return s_default_expectedNumBoundaries; } - inline static void SetDefault_expectedNumBoundaries(G4double val) - { s_default_expectedNumBoundaries = val; } - inline static G4double GetDefault_expectedTrackLength() - { return s_default_expectedTrackLength; } - inline static void SetDefault_expectedTrackLength(G4double val) - { s_default_expectedTrackLength = val; } - - inline G4double GetCurrent_kineticEnergyThreshold() const - { return m_current_kineticEnergyThreshold; } - inline void SetCurrent_kineticEnergyThreshold(G4double val) - { m_current_kineticEnergyThreshold= val; } - // in the following parameters - // idx=0 for e+/e- track below E-threshold - // idx=1 for e+/e- track above E-threshold - // and all other charged track except mu+/mu- - // of any kinetic energy - // idx=2 for mu+/mu- track of any kinetic energy - inline G4double GetCurrent_maxLengthForConstField(G4int idx) const - { return m_current_maxLengthForConstField[idx]; } - inline void SetCurrent_maxLengthForConstField(G4int idx,G4double val) - { m_current_maxLengthForConstField[idx]= val; } - inline G4double GetCurrent_missDistance(G4int idx) const - { return m_current_missDistance[idx]; } - inline void SetCurrent_missDistance(G4int idx,G4double val) - { m_current_missDistance[idx] = val; } - inline G4double GetCurrent_typicalLongStep(G4int idx) const - { return m_current_typicalLongStep[idx]; } - inline void SetCurrent_typicalLongStep(G4int idx,G4double val) - { m_current_typicalLongStep[idx] = val; } - inline G4double GetCurrent_tolerableBiasError(G4int idx) const - { return m_current_tolerableBiasError[idx]; } - inline void SetCurrent_tolerableBiasError(G4int idx,G4double val) - { m_current_tolerableBiasError[idx] = val; } - inline G4double GetCurrent_tolerableIntegrationError(G4int idx) const - { return m_current_tolerableIntegrationError[idx]; } - inline void SetCurrent_tolerableIntegrationError(G4int idx,G4double val) - { m_current_tolerableIntegrationError[idx] = val; } - inline G4double GetCurrent_expectedNumBoundaries(G4int idx) const - { return m_current_expectedNumBoundaries[idx]; } - inline void SetCurrent_expectedNumBoundaries(G4int idx,G4double val) - { m_current_expectedNumBoundaries[idx] = val; } - inline G4double GetCurrent_expectedTrackLength(G4int idx) const - { return m_current_expectedTrackLength[idx]; } - inline void SetCurrent_expectedTrackLength(G4int idx,G4double val) - { m_current_expectedTrackLength[idx] = val; } - - private: - G4int m_nLongStep[3]; - G4int m_nShortStep[3]; - G4int m_idx; - - public: - inline void LongStep() - { m_nLongStep[m_idx]++; } - inline void ShortStep() - { m_nShortStep[m_idx]++; } - -}; - -} - -#endif - diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManager.h b/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManager.h deleted file mode 100755 index ba56b2fd51..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManager.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FieldManager_H -#define FieldManager_H - -#include <string> -#include <map> - -class G4MagIntegratorStepper; -class G4Mag_EqRhs; -class G4ChordFinder; -#include "G4MagneticField.hh" -#include "FadsField/MagneticFieldMap.h" - -namespace FADS { - - - class MagneticFieldMap; - class IntegratorStepperBase; - class EqOfMotionFactoryBase; - - typedef std::map<std::string, MagneticFieldMap*, std::less<std::string> > FieldMap; - typedef std::map<std::string, IntegratorStepperBase*, std::less<std::string> > StepperMap; - typedef std::map<std::string, EqOfMotionFactoryBase*, std::less<std::string> > EquationMap; - - class FieldManager { - private: - static FieldManager* s_thePointer; - FieldManager(); - - public: - static FieldManager* GetFieldManager(); - - void RegisterMagneticField(MagneticFieldMap* map); - void SelectMagneticField(const std::string& name); - void SelectAndCreateMagneticField(const std::string& name); - MagneticFieldMap* GetMagneticField(const std::string& name); - const MagneticFieldMap* GetMagneticField(const std::string& name) const; - void InitializeField(); - void PrintFieldList() const; - - void RegisterEqOfMotion(EqOfMotionFactoryBase*); - G4Mag_EqRhs* GetEqOfMotion(const std::string); - - void RegisterStepper(IntegratorStepperBase* stepper); - void ListSteppers() const; - const StepperMap Steppers() const { return m_theSteppers; } - std::string CurrentStepper() const { return m_currentStepperName; } - void SetCurrentStepper(const std::string& name); - void UseCurrentStepper(); - void UseStepper(const std::string& name); - G4MagIntegratorStepper* GetStepper(const std::string&); - G4Mag_EqRhs *GetEquationOfMotion(); - - static void SetDeltaOneStep(double); - static void SetDeltaIntersection(double); - static void SetMinimumEpsilonStep(double); - static void SetMaximumEpsilonStep(double); - void EquationOfMotion(const std::string s) {m_eqOfMotion=s;} - std::string EquationOfMotion() const {return m_eqOfMotion;} - G4MagneticField* GetMagneticFieldMap() {return m_currentField;} - - G4MagIntegratorStepper* GetCurrentStepper() {return m_currentStepper;} - - private: - FieldMap m_fieldCatalog; - StepperMap m_theSteppers; - EquationMap m_theEquations; - MagneticFieldMap* m_currentField; - G4MagIntegratorStepper* m_currentStepper; - std::string m_currentStepperName; - G4Mag_EqRhs* m_theEquation; - G4ChordFinder* m_theChordFinder; - std::string m_eqOfMotion; - }; - -} - -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactory.h b/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactory.h deleted file mode 100644 index 065045805d..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactory.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FieldManagerFactory_H -#define FieldManagerFactory_H - -#include "FadsField/FadsFieldManager.h" -#include <string> - -namespace FADS { - -class FieldManagerFactory { -public: - FieldManagerFactory(std::string n):m_name(n) { RegisterToStore(); } - std::string GetName() {return m_name;} - virtual FadsFieldManager *CreateFieldManager(std::string) = 0; - virtual ~FieldManagerFactory() {} -private: - std::string m_name; - void RegisterToStore(); -}; - -} -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactoryStore.h b/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactoryStore.h deleted file mode 100644 index 214aa3b855..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactoryStore.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FieldManagerFactoryStore_H -#define FieldManagerFactoryStore_H - -#include "FadsField/FieldManagerFactory.h" -#include <map> -namespace FADS { -// class FieldManagerFactory; - -typedef std::map<std::string,FieldManagerFactory*,std::less<std::string> > factoryMap; - -class FieldManagerFactoryStore { -public: - static FieldManagerFactoryStore* GetStore(); - void AddFieldManagerFactory(FieldManagerFactory *); - FieldManagerFactory *GetFieldManagerFactory(std::string n); -private: - FieldManagerFactoryStore(); - factoryMap m_theFactories; -}; - -} -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactoryT.h b/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactoryT.h deleted file mode 100644 index 249aae31fc..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerFactoryT.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FieldManagerFactoryT_H -#define FieldManagerFactoryT_H - -#include "FadsField/FieldManagerFactory.h" - -namespace FADS { - -template <class T> class FieldManagerFactoryT:public FieldManagerFactory { -public: - FieldManagerFactoryT(std::string n):FieldManagerFactory(n),m_theFactory(0) {} - FadsFieldManager *CreateFieldManager(std::string n) - { - if (!m_theFactory) m_theFactory=new T(n); - return m_theFactory; - } -private: - T* m_theFactory; -}; - -} -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerStore.h b/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerStore.h deleted file mode 100755 index 3fe02abd44..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/FieldManagerStore.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FieldManagerStore_H -#define FieldManagerStore_H - -#include <map> -#include <string> - -namespace FADS { - -class FadsFieldManager; - -typedef std::map<std::string,FadsFieldManager*,std::less<std::string> > fmList; - -class FieldManagerStore { -friend class FadsFieldManager; -public: - static FieldManagerStore* GetFieldManagerStore(); - FadsFieldManager* GetFieldManager(std::string); -private: - FieldManagerStore(); - FieldManagerStore(const FieldManagerStore&); - static FieldManagerStore* GetFMStore(); - static FieldManagerStore* s_fieldManagerStore; - void RegisterFieldManager(FadsFieldManager*); - fmList m_fieldManagerList; -}; - -} // end namespace - -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/IntegratorStepperBase.h b/Simulation/G4Sim/FADS/FadsField/FadsField/IntegratorStepperBase.h deleted file mode 100755 index d177818581..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/IntegratorStepperBase.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef IntegratorStepperBase_H -#define IntegratorStepperBase_H - -#include <string> -#include "G4MagIntegratorStepper.hh" - -namespace FADS { - - - /// Abstract base class for implementing a templated stepper factory - class IntegratorStepperBase { - public: - IntegratorStepperBase(const std::string& n) - : m_stepperName(n) - { } - - virtual G4MagIntegratorStepper* Build() = 0; - - std::string GetName() const { - return m_stepperName; - } - - void SetName(const std::string& n) { - m_stepperName = n; - } - - protected: - std::string m_stepperName; - }; - - -} - -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/IntegratorStepperFactory.h b/Simulation/G4Sim/FADS/FadsField/FadsField/IntegratorStepperFactory.h deleted file mode 100755 index e57627c436..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/IntegratorStepperFactory.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef IntegratorStepperFactory_H -#define IntegratorStepperFactory_H - -#include "FadsField/IntegratorStepperBase.h" -#include "FadsField/FieldManager.h" -#include "G4MagIntegratorStepper.hh" - -namespace FADS { - -template <class T> -class IntegratorStepperFactory : public IntegratorStepperBase { -private: - T* m_theStepper; -public: - IntegratorStepperFactory(std::string n): IntegratorStepperBase(n) , m_theStepper(0) - { - RegisterToStore(); - } - void Create() - { - if (!m_theStepper) - { - m_theStepper= - new T(FieldManager::GetFieldManager()->GetEquationOfMotion()); - } - } - void Delete() - { - if (m_theStepper) - { - delete m_theStepper; - m_theStepper=0; - } - } - virtual G4MagIntegratorStepper* Build() - { - Create(); return m_theStepper; - } - void RegisterToStore() {FieldManager::GetFieldManager()->RegisterStepper(this);} -}; - -} // end namespace - -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/MagneticFieldMap.h b/Simulation/G4Sim/FADS/FadsField/FadsField/MagneticFieldMap.h deleted file mode 100755 index 233348c895..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/MagneticFieldMap.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef MagneticFieldMap_H -#define MagneticFieldMap_H - -#include "G4MagneticField.hh" -#include <string> - -namespace FADS { - -class MagneticFieldMap: public G4MagneticField { -public: - MagneticFieldMap(); - MagneticFieldMap(std::string n); - void GetFieldValue( const double *xyzPos, double *xyzField) const; - virtual void Initialize() {} - virtual void Terminate() {} - virtual MagneticFieldMap* Create() {return this;} - virtual MagneticFieldMap* Create(std::string) {return this;} - bool IsInitialized() {return m_initialized;} - virtual void FieldValue( const double *xyzPos, double *xyzField) const = 0; - std::string GetName() {return m_name;} - void SetInitialValues(); -protected: - std::string m_name; - bool m_initialized; -}; - -} // end namespace - -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/MagneticFieldMapT.h b/Simulation/G4Sim/FADS/FadsField/FadsField/MagneticFieldMapT.h deleted file mode 100755 index 1f2820c8d4..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/MagneticFieldMapT.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef MagneticFieldMapT_H -#define MagneticFieldMapT_H - -#include "FadsField/MagneticFieldMap.h" -#include "FadsField/FieldManager.h" - -#include <map> -#include <string> - -#include <iostream> - -namespace FADS { - -template <class T> class MagneticFieldMapT: public MagneticFieldMap { - -private: - MagneticFieldMap *m_g; - std::map<std::string, MagneticFieldMap *, std::less<std::string> > m_fMaps; - -public: - MagneticFieldMapT(std::string n): MagneticFieldMap(n),m_g(0) - { - FieldManager::GetFieldManager()->RegisterMagneticField(this); - } - - ~MagneticFieldMapT() {if (m_g) delete m_g;} - - MagneticFieldMap* Create() { - //std::cout<<" This is "<<GetName()<<std::endl; - if (m_g) return m_g; - m_g=new T; - return m_g; - } - - MagneticFieldMap* Create(std::string n) { - //std::cout<<" This is "<<GetName()<<" field name "<<n<<std::endl; - //std::cout<<" building the map "; - if (m_fMaps.find(n) != m_fMaps.end() ) - return m_fMaps[n]; - else - { - //std::cout<<" Map not found in the list: building it "; - m_fMaps[n]=new T(n); - if (m_g==0) m_g=m_fMaps[n]; - //std::cout<<m_fMaps[n]<<std::endl; - return m_fMaps[n]; - } - } - - void Initialize() { - if (m_g) m_g->Initialize(); - } - - void Terminate() { - m_g->Terminate(); - delete m_g; - m_g=0; - } - - void FieldValue(const double *xyzPos, double *xyzField) const { - if (m_g) m_g->FieldValue(xyzPos, xyzField); - else - for (int i=0;i<3;i++) xyzField[i] = 0.; - } - -}; - -} // end namespace - -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/RegionInformation.h b/Simulation/G4Sim/FADS/FadsField/FadsField/RegionInformation.h deleted file mode 100644 index 9fe75e1b32..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/RegionInformation.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef RegionInformation_H -#define RegionInformation_H - -#include "G4VUserRegionInformation.hh" -#include "FadsField/FieldIntParameters.h" - -namespace FADS { - -class RegionInformation : public G4VUserRegionInformation -{ - public: - RegionInformation(); - virtual ~RegionInformation(); - - public: - void Print() const; - - private: - FADS::FieldIntParameters* m_fieldIntPara; - - public: - inline FADS::FieldIntParameters* GetFieldIntParameters() const - { return m_fieldIntPara; } - inline void SetFieldIntParameters(FADS::FieldIntParameters* fip) - { m_fieldIntPara = fip; } -}; - -} - -#endif - diff --git a/Simulation/G4Sim/FADS/FadsField/FadsField/TestFieldManager.h b/Simulation/G4Sim/FADS/FadsField/FadsField/TestFieldManager.h deleted file mode 100644 index 0063ef3787..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/FadsField/TestFieldManager.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TestFieldManager_H -#define TestFieldManager_H - -#include "FadsField/FadsFieldManager.h" - -class TestFieldManager: public FADS::FadsFieldManager { -public: - TestFieldManager(std::string s):FADS::FadsFieldManager(s) {;} - void ConfigureForTrack(const G4Track* ); -}; - -#endif diff --git a/Simulation/G4Sim/FADS/FadsField/src/FadsFieldManager.cxx b/Simulation/G4Sim/FADS/FadsField/src/FadsFieldManager.cxx deleted file mode 100755 index 8407df4099..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/FadsFieldManager.cxx +++ /dev/null @@ -1,98 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/FadsFieldManager.h" -#include "FadsField/FieldManagerStore.h" -#include "FadsField/FieldManager.h" -#include "FadsField/MagneticFieldMap.h" - -#include "G4ChordFinder.hh" -#include "G4Mag_UsualEqRhs.hh" -#include "G4Track.hh" -#include "G4VPhysicalVolume.hh" -#include "G4LogicalVolume.hh" -#include "G4Region.hh" -#include "G4MagIntegratorStepper.hh" - -#include "FadsField/RegionInformation.h" -#include "FadsField/FieldIntParameters.h" - -namespace FADS { - - - FadsFieldManager::FadsFieldManager(std::string name):G4FieldManager(),m_name(name) - { - FieldManagerStore* fms=FieldManagerStore::GetFMStore(); - fms->RegisterFieldManager(this); - - m_defaultParameters = new FADS::FieldIntParameters(); - m_previousTrack = NULL; - m_previousRegion = NULL; - } - - - void FadsFieldManager::SetField(std::string /*fName*/) - { - // FADS::FieldManager *fm=FADS::FieldManager::GetFieldManager(); - - // step one - get the field map, create it, initialize it - // MagneticFieldMap* magField=fm->GetMagneticField(fName); - - // if (!magField) return; - - // G4MagneticField* theMap=magField->Create(fName); - // if (!magField->IsInitialized()) magField->SetInitialValues(); - // std::cout<<"Field initialization completed!"<<std::endl; - - // G4Mag_EqRhs* eqMotion = fm->GetEquationOfMotion(); - // fStepperDispatcher = new FADS::StepperDispatcher(eqMotion); - - // G4double minStep = 0.001*CLHEP::mm; - // std::cout<<"Making a chord finder with the stepper dispatcher!"<<std::endl; - - // G4ChordFinder* chordFinder = new G4ChordFinder(theMap,minStep,fStepperDispatcher); - - // SetDetectorField(theMap); - // SetChordFinder(chordFinder); - - // std::cout<<"Construction of FadsFieldManager complete!!"<<std::endl; - } - - std::string FadsFieldManager::GetName() const - { - return m_name; - } - - void FadsFieldManager::SetStepper(G4MagIntegratorStepper* stepper) - { - if (stepper == 0) - { - std::cout<<"FadsFieldManager: Can't set NULL stepper. Nothing changed." <<std::endl; - return; - } - - G4ChordFinder * theChordFinder = this->GetChordFinder(); - - if (theChordFinder) - { - if (theChordFinder->GetIntegrationDriver()) - { - theChordFinder->GetIntegrationDriver()->RenewStepperAndAdjust(stepper); - } - else - { - std::cout<<"FadsFieldManager: theChordFinder=" << theChordFinder << - " theChordFinder->GetIntegrationDriver()=" << - theChordFinder->GetIntegrationDriver() << - ". Something is wrong. " <<std::endl; - } - } - else - { - std::cout<<"FadsFieldManager: theChordFinder=NULL. Something is wrong. " <<std::endl; - } - return; - } - -} diff --git a/Simulation/G4Sim/FADS/FadsField/src/FieldIntParameters.cxx b/Simulation/G4Sim/FADS/FadsField/src/FieldIntParameters.cxx deleted file mode 100644 index c9a03b3e91..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/FieldIntParameters.cxx +++ /dev/null @@ -1,120 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/FieldIntParameters.h" - -#include "G4Track.hh" -#include "G4ParticleDefinition.hh" -#include "G4Electron.hh" -#include "G4Positron.hh" -#include "G4MuonPlus.hh" -#include "G4MuonMinus.hh" -//#include "G4ChargedGeantino.hh" - -namespace FADS { - -G4double FieldIntParameters::s_default_kineticEnergyThreshold = 1.0*CLHEP::GeV; -G4double FieldIntParameters::s_default_maxLengthForConstField = 1.0*CLHEP::mm; -G4double FieldIntParameters::s_default_missDistance = 0.25*CLHEP::mm; -G4double FieldIntParameters::s_default_typicalLongStep = 1.0*CLHEP::cm; -G4double FieldIntParameters::s_default_tolerableBiasError = 1.0e-5*CLHEP::m; -G4double FieldIntParameters::s_default_tolerableIntegrationError = 1.0e-4*CLHEP::m; -G4double FieldIntParameters::s_default_expectedNumBoundaries = 1.0e2; -G4double FieldIntParameters::s_default_expectedTrackLength = 20.0*CLHEP::m; - -FieldIntParameters::FieldIntParameters() -{ - m_current_kineticEnergyThreshold = s_default_kineticEnergyThreshold; - - // for e+/e- track below m_current_kineticEnergyThreshold - m_current_maxLengthForConstField[0] = s_default_maxLengthForConstField * 100.; - m_current_missDistance[0] = s_default_missDistance; - m_current_typicalLongStep[0] = s_default_typicalLongStep; - m_current_tolerableBiasError[0] = s_default_tolerableBiasError; - m_current_tolerableIntegrationError[0] = s_default_tolerableIntegrationError * 10.; - m_current_expectedNumBoundaries[0] = s_default_expectedNumBoundaries / 10.; - m_current_expectedTrackLength[0] = s_default_expectedTrackLength / 100.; - - // for e+/e- track above m_current_kineticEnergyThreshold - // and all other charged track except mu+/mu- of any kinetic energy - m_current_maxLengthForConstField[1] = s_default_maxLengthForConstField / 1000.; - m_current_missDistance[1] = s_default_missDistance; - m_current_typicalLongStep[1] = s_default_typicalLongStep; - m_current_tolerableBiasError[1] = s_default_tolerableBiasError; - m_current_tolerableIntegrationError[1] = s_default_tolerableIntegrationError; - m_current_expectedNumBoundaries[1] = s_default_expectedNumBoundaries; - m_current_expectedTrackLength[1] = s_default_expectedTrackLength; - - // for mu+/mu- track of any kinetic energy - m_current_maxLengthForConstField[2] = s_default_maxLengthForConstField / 1000.; - m_current_missDistance[2] = s_default_missDistance; - m_current_typicalLongStep[2] = s_default_typicalLongStep; - m_current_tolerableBiasError[2] = s_default_tolerableBiasError / 10.; - m_current_tolerableIntegrationError[2] = s_default_tolerableIntegrationError; - m_current_expectedNumBoundaries[2] = s_default_expectedNumBoundaries; - m_current_expectedTrackLength[2] = s_default_expectedTrackLength; - - for(int i=0;i<3;i++) - { - m_nLongStep[i] = 0; - m_nShortStep[i] = 0; - } - - m_idx = -1; -} - -FieldIntParameters::~FieldIntParameters() -{;} - -void FieldIntParameters::List(G4int iFlg) const -{ - if(iFlg) - { - G4cout<<" Number of Long Steps for each pType \t"<<m_nLongStep[0]<<"\t"<<m_nLongStep[1] - <<"\t"<<m_nLongStep[2]<<"\t-- Total long steps "<<m_nLongStep[0]+m_nLongStep[1]+m_nLongStep[2]<<G4endl; - G4cout<<" Number of Short Steps for each pType\t"<<m_nShortStep[0]<<"\t"<<m_nShortStep[1] - <<"\t"<<m_nShortStep[2]<<"\t-- Total short steps "<<m_nShortStep[0]+m_nShortStep[1]+m_nShortStep[2]<<G4endl; - } - G4cout<<" kineticEnergyThreshold [MeV] \t"<<m_current_kineticEnergyThreshold<<G4endl; - G4cout<<" maxLengthForConstField [mm] \t"<<m_current_maxLengthForConstField[0]<<"\t" - <<m_current_maxLengthForConstField[1]<<"\t" - <<m_current_maxLengthForConstField[2]<<G4endl; - G4cout<<" missDistance [mm] \t"<<m_current_missDistance[0]<<"\t" - <<m_current_missDistance[1]<<"\t" - <<m_current_missDistance[2]<<G4endl; - G4cout<<" tolerableBiasError [mm] \t"<<m_current_tolerableBiasError[0]<<"\t" - <<m_current_tolerableBiasError[1]<<"\t" - <<m_current_tolerableBiasError[2]<<G4endl; - G4cout<<" tolerableIntegrationError [mm] \t"<<m_current_tolerableIntegrationError[0]<<"\t" - <<m_current_tolerableIntegrationError[1]<<"\t" - <<m_current_tolerableIntegrationError[2]<<G4endl; -} - -void FieldIntParameters::GetParameters(const G4Track* aTrack, - G4double& maxLengthForConstField, - G4double& missDistance, - G4double& typicalLongStep, - G4double& tolerableBiasError, - G4double& tolerableIntegrationError, - G4double& expectedNumBoundaries, - G4double& expectedTrackLength) -{ - m_idx = 1; - G4ParticleDefinition* partDef = aTrack->GetDefinition(); - if(partDef==G4Electron::Definition() || partDef==G4Positron::Definition()) - { if(aTrack->GetKineticEnergy() < m_current_kineticEnergyThreshold) m_idx = 0; } - else if(partDef==G4MuonPlus::Definition() || partDef==G4MuonMinus::Definition()) - { m_idx = 2; } - - maxLengthForConstField = m_current_maxLengthForConstField[m_idx]; - missDistance = m_current_missDistance[m_idx]; - typicalLongStep = m_current_typicalLongStep[m_idx]; - tolerableBiasError = m_current_tolerableBiasError[m_idx]; - tolerableIntegrationError = m_current_tolerableIntegrationError[m_idx]; - expectedNumBoundaries = m_current_expectedNumBoundaries[m_idx]; - expectedTrackLength = m_current_expectedTrackLength[m_idx]; -} - -} - diff --git a/Simulation/G4Sim/FADS/FadsField/src/FieldManager.cxx b/Simulation/G4Sim/FADS/FadsField/src/FieldManager.cxx deleted file mode 100755 index 59978f57b6..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/FieldManager.cxx +++ /dev/null @@ -1,218 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/FieldManager.h" -#include "FadsField/MagneticFieldMap.h" -#include "FadsField/IntegratorStepperBase.h" -#include "FadsField/IntegratorStepperFactory.h" -#include "FadsField/EqOfMotionFactoryBase.h" -#include "FadsField/EqOfMotionFactory.h" - -#include "G4FieldManager.hh" -#include "G4TransportationManager.hh" -#include "G4ChordFinder.hh" -#include "G4Mag_UsualEqRhs.hh" -#include "G4Mag_EqRhs.hh" - -using namespace std; - -namespace FADS { - - - - FieldManager* FieldManager::s_thePointer = FieldManager::GetFieldManager(); - - - FieldManager::FieldManager() - : m_currentField(NULL),m_currentStepper(NULL), - m_theEquation(NULL),m_theChordFinder(NULL),m_eqOfMotion("Default") - { - // default primary event action - } - - - FieldManager* FieldManager::GetFieldManager() { - if (!s_thePointer) s_thePointer = new FieldManager(); - return s_thePointer; - } - - - void FieldManager::RegisterMagneticField(MagneticFieldMap* map) { - m_fieldCatalog[map->GetName()] = map; - } - - void FieldManager::InitializeField() - { - if (!m_currentField) - { - std::cout<<" Field Manager initialization: a field map" - <<" has not been set: running without field? "<<std::endl; - return; - } - m_currentField->Create(); - if (!m_currentField->IsInitialized()) m_currentField->SetInitialValues(); - G4FieldManager* fieldMgr=G4TransportationManager::GetTransportationManager()->GetFieldManager(); - fieldMgr->SetDetectorField(m_currentField); - fieldMgr->CreateChordFinder(m_currentField); - m_theChordFinder=fieldMgr->GetChordFinder(); - m_theEquation = GetEquationOfMotion(); - } - - void FieldManager::SelectMagneticField(const string& name) { - if (m_fieldCatalog.find(name) == m_fieldCatalog.end()) { - cout << "FieldManager Warning!!! Field " << name <<" not found!!!!" << endl; - return; - } - // if (m_currentField) m_currentField->Terminate; - m_currentField = m_fieldCatalog[name]; - } - - - void FieldManager::SelectAndCreateMagneticField(const string& name) { - if (m_fieldCatalog.find(name) == m_fieldCatalog.end()) { - cout << "FieldManager Warning!!! Field " << name << " not found!!!!" << endl; - return; - } - // if (m_currentField) m_currentField->Terminate; - m_currentField = m_fieldCatalog[name]; - m_currentField->Create(); - } - - - MagneticFieldMap* FieldManager::GetMagneticField(const string& name) { - FieldMap::iterator it_f = m_fieldCatalog.find(name); - if (it_f == m_fieldCatalog.end()) { - cout << " FieldManager Warning!!! Field " << name << " not found!!!!" << endl; - return 0; - } - return it_f->second; - } - - G4Mag_EqRhs* FieldManager::GetEquationOfMotion() - { - if (!m_theEquation) { - if (m_eqOfMotion=="Default") { - m_theEquation=new G4Mag_UsualEqRhs(m_currentField); - } - else { - m_theEquation=GetEqOfMotion(m_eqOfMotion); - } - } - return m_theEquation; - } - - - const MagneticFieldMap* FieldManager::GetMagneticField(const string& name) const { - FieldMap::const_iterator it_f = m_fieldCatalog.find(name); - if (it_f == m_fieldCatalog.end()) { - cout << " FieldManager Warning!!! Field " << name << " not found!!!!" << endl; - return 0; - } - return it_f->second; - } - - - /// @todo Not very useful... returning the field list would be better - void FieldManager::PrintFieldList() const { - FieldMap::const_iterator it; - cout << " List of Magnetic Field Maps available: " << endl; - for (it = m_fieldCatalog.begin(); it != m_fieldCatalog.end(); ++it) - cout << "\t---> " << it->first << "\t\t<---" << endl; - cout << " <--------------------------------------->" << endl; - } - - void FieldManager::RegisterEqOfMotion(EqOfMotionFactoryBase* eq) { - cout << "Registering equation of motion" << eq->GetName() << endl; - m_theEquations[eq->GetName()] = eq; - } - - G4Mag_EqRhs* FieldManager::GetEqOfMotion(const std::string eqM) { - if (m_theEquations.find(eqM) == m_theEquations.end()) - { - cout << " FieldManager could not find equation of motion " << eqM << endl; - return 0; - } - return m_theEquations[eqM]->Build(); - } - - void FieldManager::RegisterStepper(IntegratorStepperBase* stepper) { - //cout << "Registering stepper " << stepper->GetName() << endl; - m_theSteppers[stepper->GetName()] = stepper; - } - - - void FieldManager::ListSteppers() const { - cout << " List of all Integrator Steppers available " << endl; - for (StepperMap::const_iterator it = m_theSteppers.begin(); it != m_theSteppers.end(); ++it) { - cout << "---- " << it->first << " ----" << endl; - } - } - - - void FieldManager::SetCurrentStepper(const string& n) { - if (m_theSteppers.find(n) == m_theSteppers.end()) { - cout << "Stepper " << n << " not found! Stepper not changed" << endl; - return; - } - m_currentStepperName = n; - m_currentStepper = m_theSteppers[n]->Build(); - } - - - void FieldManager::UseCurrentStepper() { - if (m_theChordFinder && m_theChordFinder->GetIntegrationDriver()) { - m_theChordFinder->GetIntegrationDriver()->RenewStepperAndAdjust(m_currentStepper); - } - } - - - void FieldManager::UseStepper(const string& n) { - /// @todo It would be good to replace most of this with a call to SetCurrentStepper... - /// but we can't since there is no way to report a failure. Is this function actually needed? - if (m_theSteppers.find(n) == m_theSteppers.end()) { - cout << "Stepper " << n << " not found! Stepper not changed" << endl; - return; - } - m_currentStepperName = n; - m_currentStepper = m_theSteppers[n]->Build(); - UseCurrentStepper(); - } - - G4MagIntegratorStepper* FieldManager::GetStepper(const std::string& n){ - if (n == m_currentStepperName) { - cout << "FieldManager: the stepper " << n << " and m_currentStepper are the same. Return the m_currentStepper." << endl; - return m_currentStepper; - } - if (m_theSteppers.find(n) == m_theSteppers.end()) { - cout << "Stepper " << n << " not found. Return 0!!!" << endl; - return 0; - } - return m_theSteppers[n]->Build(); - } - - void FieldManager::SetDeltaOneStep(double value) { - G4FieldManager* fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager(); - fieldMgr->SetDeltaOneStep(value); - } - - - void FieldManager::SetDeltaIntersection(double value) { - G4FieldManager* fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager(); - fieldMgr->SetDeltaIntersection(value); - } - - - void FieldManager::SetMinimumEpsilonStep(double value) { - G4FieldManager* fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager(); - fieldMgr->SetMinimumEpsilonStep(value); - } - - - void FieldManager::SetMaximumEpsilonStep(double value) { - G4FieldManager* fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager(); - fieldMgr->SetMaximumEpsilonStep(value); - } - - -} diff --git a/Simulation/G4Sim/FADS/FadsField/src/FieldManagerFactory.cxx b/Simulation/G4Sim/FADS/FadsField/src/FieldManagerFactory.cxx deleted file mode 100644 index e4e4948f97..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/FieldManagerFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/FieldManagerFactory.h" -#include "FadsField/FieldManagerFactoryStore.h" - -namespace FADS { - -void FieldManagerFactory::RegisterToStore() -{ - FieldManagerFactoryStore *fStore=FieldManagerFactoryStore::GetStore(); - fStore->AddFieldManagerFactory(this); -} - -} diff --git a/Simulation/G4Sim/FADS/FadsField/src/FieldManagerFactoryStore.cxx b/Simulation/G4Sim/FADS/FadsField/src/FieldManagerFactoryStore.cxx deleted file mode 100644 index 1cd93bbf93..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/FieldManagerFactoryStore.cxx +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/FieldManagerFactory.h" -#include "FadsField/FieldManagerFactoryStore.h" - -namespace FADS { - -FieldManagerFactoryStore::FieldManagerFactoryStore() -{ -} - -FieldManagerFactoryStore* FieldManagerFactoryStore::GetStore() -{ - static FieldManagerFactoryStore* theStore=0; - if (!theStore) - theStore=new FieldManagerFactoryStore; - return theStore; -} - -void FieldManagerFactoryStore::AddFieldManagerFactory(FieldManagerFactory *f) -{ - m_theFactories[f->GetName()] = f; -} - -FieldManagerFactory *FieldManagerFactoryStore::GetFieldManagerFactory(std::string n) -{ - if (m_theFactories.find(n)!=m_theFactories.end()) return m_theFactories[n]; - else return 0; -} -} diff --git a/Simulation/G4Sim/FADS/FadsField/src/FieldManagerStore.cxx b/Simulation/G4Sim/FADS/FadsField/src/FieldManagerStore.cxx deleted file mode 100755 index 9e1b3ae49d..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/FieldManagerStore.cxx +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/FieldManagerStore.h" -#include "FadsField/FadsFieldManager.h" - -namespace FADS { - -FieldManagerStore* FieldManagerStore::s_fieldManagerStore=0; - -FieldManagerStore::FieldManagerStore() -{ -} - -FieldManagerStore::FieldManagerStore(const FieldManagerStore& ) -{ -} - -FieldManagerStore* FieldManagerStore::GetFMStore() -{ - if (!s_fieldManagerStore) s_fieldManagerStore=new FieldManagerStore; - return s_fieldManagerStore; -} - -FieldManagerStore* FieldManagerStore::GetFieldManagerStore() -{ - return s_fieldManagerStore; -} - -void FieldManagerStore::RegisterFieldManager(FadsFieldManager* fm) -{ - std::string name=fm->GetName(); - if (m_fieldManagerList.find(name) != m_fieldManagerList.end()) - std::cout <<"FieldManagerStore: FieldManager "<<name<< - " already registered"<<std::endl; - else - m_fieldManagerList[name]=fm; -} - -FadsFieldManager* FieldManagerStore::GetFieldManager(std::string managerName) -{ - if (m_fieldManagerList.find(managerName) != m_fieldManagerList.end()) - return m_fieldManagerList[managerName]; - else - { - std::cout<<" field manager "<<managerName<<" not found!"<<std::endl; - return 0; - } -} - -} diff --git a/Simulation/G4Sim/FADS/FadsField/src/Integrators.cxx b/Simulation/G4Sim/FADS/FadsField/src/Integrators.cxx deleted file mode 100755 index 1cbc36c053..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/Integrators.cxx +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/IntegratorStepperBase.h" -#include "FadsField/IntegratorStepperFactory.h" - -#include "G4CashKarpRKF45.hh" -static FADS::IntegratorStepperFactory<G4CashKarpRKF45> s1("CashKarpRKF45"); - -#include "G4ClassicalRK4.hh" -static FADS::IntegratorStepperFactory<G4ClassicalRK4> s2("ClassicalRK4"); - -#include "G4SimpleHeum.hh" -static FADS::IntegratorStepperFactory<G4SimpleHeum> s3("SimpleHeum"); - -#include "G4SimpleRunge.hh" -static FADS::IntegratorStepperFactory<G4SimpleRunge> s4("SimpleRunge"); - -#include "G4HelixExplicitEuler.hh" -static FADS::IntegratorStepperFactory<G4HelixExplicitEuler> s5("HelixExplicitEuler"); - -#include "G4HelixImplicitEuler.hh" -static FADS::IntegratorStepperFactory<G4HelixImplicitEuler> s6("HelixImplicitEuler"); - -#include "G4HelixSimpleRunge.hh" -static FADS::IntegratorStepperFactory<G4HelixSimpleRunge> s7("HelixSimpleRunge"); - -#include "G4AtlasRK4.hh" -static FADS::IntegratorStepperFactory<G4AtlasRK4> s8("AtlasRK4"); - -#include "G4NystromRK4.hh" -static FADS::IntegratorStepperFactory<G4NystromRK4> s9("NystromRK4"); diff --git a/Simulation/G4Sim/FADS/FadsField/src/MagneticFieldMap.cxx b/Simulation/G4Sim/FADS/FadsField/src/MagneticFieldMap.cxx deleted file mode 100755 index 27da075177..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/MagneticFieldMap.cxx +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/FieldManager.h" -#include "FadsField/MagneticFieldMap.h" - -#include <string> - -namespace FADS { - -MagneticFieldMap::MagneticFieldMap() -{ - m_name="GenericFieldMap"; - m_initialized=false; -} - -MagneticFieldMap::MagneticFieldMap(std::string n): m_name(n) -{ - m_initialized=false; -} - -void MagneticFieldMap::GetFieldValue(const double *xyzPos, double *xyzField) const { - FieldValue(xyzPos, xyzField); -} - -void MagneticFieldMap::SetInitialValues() -{ - Initialize(); - m_initialized=true; -} - -} // end namespace diff --git a/Simulation/G4Sim/FADS/FadsField/src/RegionInformation.cxx b/Simulation/G4Sim/FADS/FadsField/src/RegionInformation.cxx deleted file mode 100644 index b13ff2cf4d..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/RegionInformation.cxx +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/RegionInformation.h" - -namespace FADS { - -RegionInformation::RegionInformation() -:m_fieldIntPara(0) -{;} - -RegionInformation::~RegionInformation() -{;} - -void RegionInformation::Print() const -{;} - -} - diff --git a/Simulation/G4Sim/FADS/FadsField/src/TestFieldManager.cxx b/Simulation/G4Sim/FADS/FadsField/src/TestFieldManager.cxx deleted file mode 100644 index c60146bcf9..0000000000 --- a/Simulation/G4Sim/FADS/FadsField/src/TestFieldManager.cxx +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FadsField/TestFieldManager.h" - -#include "FadsField/FieldManagerFactoryT.h" - -FADS::FieldManagerFactoryT<TestFieldManager> a("TestFieldManager"); -FADS::FieldManagerFactoryT<TestFieldManager> b("AnotherFieldManager"); - - -void TestFieldManager::ConfigureForTrack(const G4Track* ) -{ - std::cout<<"This is TestFieldManager::ConfigureForTrack"<<std::endl; -} -- GitLab