Import Geant4 10.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2017-06-30 10:49:55 +02:00
parent 3a5407696b
commit 1a1316fea4
2180 changed files with 237880 additions and 59109 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4FieldManager.hh 93661 2015-10-28 09:47:47Z gcosmo $
// $Id: G4FieldManager.hh 104525 2017-06-02 07:22:58Z gcosmo $
//
//
// class G4FieldManager
@@ -65,6 +65,7 @@
// valid for each region detector.
// History:
// - 09.06.15 John Apostolakis, Fix to push G4FieldManager* to equation
// - 05.11.03 John Apostolakis, Added Min/MaximumEpsilonStep
// - 20.06.03 John Apostolakis, Abstract & ability to ConfigureForTrack
// - 10.03.97 John Apostolakis, design and implementation.
@@ -93,7 +94,30 @@ class G4FieldManager
// - assumes pure magnetic field (so Energy constant)
virtual ~G4FieldManager();
G4bool SetDetectorField(G4Field *detectorField);
G4bool SetDetectorField(G4Field *detectorField, int failMode= 0); // =1 is for Debugging ## Was =0
// Pushes the field to the equation.
// ( New behaviour June 2015 - to avoid the simplest user confusion. )
// Failure to push the field ( due to absence of a chord finder, driver,
// stepper or equation ) is
// - '0' = quiet : Do not complain if chordFinder == 0
// (It will still warn for other error.)
// - '1' = warn : a warning if anything is missing
// - '2'/else = FATAL : a fatal error for all other values.
// Returns success (true) or failure (false)
inline void ProposeDetectorField(G4Field *detectorField);
// Pushes the field to this class only -- no further.
// Should be used to initialise this field, only *before* creating
// the chord finder and its dependent classes.
// User is then responsible to ensure that:
// i) an equation, stepper, driver and chord finder are created
// ii) this field is used by the equation.
inline void ChangeDetectorField(G4Field *detectorField);
// Pushes the field to the equation ( & keeps its address )
// Can be used only once the equation, stepper, driver and chord finder
// have all been created. Else it is an error.
inline const G4Field* GetDetectorField() const;
inline G4bool DoesFieldExist() const;
// Set, get and check the field object
@@ -149,6 +173,12 @@ class G4FieldManager
G4FieldManager& operator=(const G4FieldManager&);
// Private copy constructor and assignment operator.
void InitialiseFieldChangesEnergy();
// Check whether field/equation change the energy,
// and sets the data member accordingly
// Note: does not handle special cases - this must be done
// separately (e.g. magnetic monopole in B field )
private:
// Dependent objects -- with state that depends on tracking
G4Field* fDetectorField;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4FieldManager.icc 93661 2015-10-28 09:47:47Z gcosmo $
// $Id: G4FieldManager.icc 104525 2017-06-02 07:22:58Z gcosmo $
//
//
// G4FieldManager inline implementation
@@ -134,3 +134,20 @@ void G4FieldManager::SetMaximumEpsilonStep( G4double newEpsMax )
fEpsilonMax = newEpsMax;
}
}
inline
void G4FieldManager::ChangeDetectorField(G4Field *detectorField)
{
int errorType = 2; // Fatal !
this->SetDetectorField( detectorField, errorType );
}
inline
void G4FieldManager::ProposeDetectorField(G4Field *detectorField)
{
fDetectorField= detectorField;
this->InitialiseFieldChangesEnergy();
}
// Note: this is equivalent to
// this->SetDetectorField( detectorField, 0 );
// but simpler!
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4FieldManagerStore.hh 66872 2013-01-15 01:25:57Z japost $
// $Id: G4FieldManagerStore.hh 103228 2017-03-22 14:52:32Z gcosmo $
//
// class G4FieldManagerStore
//
@@ -65,13 +65,15 @@ class G4FieldManagerStore : public std::vector<G4FieldManager*>
// Remove the logical volume from the collection.
static G4FieldManagerStore* GetInstance();
// Get a ptr to the unique G4FieldManagerStore, creating it if necessary.
static G4FieldManagerStore* GetInstanceIfExist();
// Get a ptr to the unique G4FieldManagerStore.
static void Clean();
// Delete all volumes from the store.
void ClearAllChordFindersState();
// Looping over all field managers, call each one to reset step estimate
virtual ~G4FieldManagerStore();
~G4FieldManagerStore();
// Destructor: takes care to delete allocated field managers.
protected:
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4MagIntegratorDriver.hh 69699 2013-05-13 08:50:30Z gcosmo $
// $Id: G4MagIntegratorDriver.hh 104525 2017-06-02 07:22:58Z gcosmo $
//
//
// class G4MagInt_Driver
@@ -240,7 +240,8 @@ class G4MagInt_Driver
// ---------------------------------------------------------------
// STATE
G4int fNoTotalSteps, fNoBadSteps, fNoSmallSteps, fNoInitialSmallSteps;
unsigned long fNoTotalSteps, fNoBadSteps, fNoSmallSteps, fNoInitialSmallSteps;
unsigned long fNoCalls;
G4double fDyerr_max, fDyerr_mx2;
G4double fDyerrPos_smTot, fDyerrPos_lgTot, fDyerrVel_lgTot;
G4double fSumH_sm, fSumH_lg;