Import Geant4 9.3.0 source tree
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AdjointCrossSurfChecker.hh,v 1.2 2009/11/18 18:04:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Class Name: G4AdjointCrossSurfChecker
|
||||
// Author: L. Desorgher
|
||||
// Organisation: SpaceIT GmbH
|
||||
// Contract: ESA contract 21435/08/NL/AT
|
||||
// Customer: ESA/ESTEC
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CHANGE HISTORY
|
||||
// --------------
|
||||
// ChangeHistory:
|
||||
// 15 January 2007 creation by L. Desorgher
|
||||
// - 01/11/2009 Some cleaning and adding of documentation for the
|
||||
// first Release in the Geant4 toolkit, L. Desorgher
|
||||
//
|
||||
//-------------------------------------------------------------
|
||||
// Documentation:
|
||||
// This class is responsible for checking the crossing of a surface
|
||||
// that could be the external boundary of a volume or the external
|
||||
// surface of a sphere.
|
||||
// It is used to check if an adjoint particle reaches the external
|
||||
// surface or reenter the sensitive region delimited by the adjoint
|
||||
// source.
|
||||
//
|
||||
|
||||
#ifndef G4AdjointCrossSurfChecker_h
|
||||
#define G4AdjointCrossSurfChecker_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4Step;
|
||||
|
||||
|
||||
class G4AdjointCrossSurfChecker
|
||||
{
|
||||
public:
|
||||
|
||||
static G4AdjointCrossSurfChecker* GetInstance();
|
||||
|
||||
public:
|
||||
|
||||
G4bool CrossingASphere(const G4Step* aStep,G4double sphere_radius, G4ThreeVector sphere_center,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
|
||||
G4bool GoingInOrOutOfaVolume(const G4Step* aStep,const G4String& volume_name, G4double& cos_to_surface, G4bool& GoingIn);
|
||||
G4bool GoingInOrOutOfaVolumeByExtSurface(const G4Step* aStep,const G4String& volume_name,const G4String& mother_log_vol_name, G4double& cos_to_surface, G4bool& GoingIn);
|
||||
|
||||
G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep,const G4String& surface_name,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
|
||||
G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep, int ind,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
|
||||
G4bool CrossingOneOfTheRegisteredSurface(const G4Step* aStep,G4String& surface_name,G4ThreeVector& crossing_pos,G4double& cos_to_surface, G4bool& GoingIn);
|
||||
G4bool CrossingAnInterfaceBetweenTwoVolumes(const G4Step* aStep,const G4String& vol1_name,const G4String& vol2_name,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
|
||||
|
||||
G4bool AddaSphericalSurface(const G4String& SurfaceName, G4double radius, G4ThreeVector pos,G4double& area);
|
||||
G4bool AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(const G4String& SurfaceName, G4double radius, const G4String& volume_name, G4ThreeVector& center, G4double& area);
|
||||
G4bool AddanExtSurfaceOfAvolume(const G4String& SurfaceName,const G4String& volume_name,G4double& area);
|
||||
G4bool AddanInterfaceBetweenTwoVolumes(const G4String& SurfaceName, const G4String& volume_name1, const G4String& volume_name2,G4double& area);
|
||||
void ClearListOfSelectedSurface();
|
||||
|
||||
private:
|
||||
|
||||
G4AdjointCrossSurfChecker();
|
||||
~G4AdjointCrossSurfChecker();
|
||||
|
||||
G4int FindRegisteredSurface(const G4String& name);
|
||||
|
||||
private:
|
||||
static G4AdjointCrossSurfChecker* instance;
|
||||
|
||||
std::vector<G4String> ListOfSurfaceName;
|
||||
std::vector<G4String> ListOfSurfaceType;
|
||||
std::vector<G4double> ListOfSphereRadius;
|
||||
std::vector<G4ThreeVector> ListOfSphereCenter;
|
||||
std::vector<G4String> ListOfVol1Name;
|
||||
std::vector<G4String> ListOfVol2Name;
|
||||
std::vector<G4double> AreaOfSurface;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AdjointSteppingAction.hh,v 1.3 2009/11/20 14:24:34 ldesorgh Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Class Name: G4AdjointSteppingAction
|
||||
// Author: L. Desorgher
|
||||
// Contract: ESA contract 21435/08/NL/AT
|
||||
// Organisation: SpaceIT GmbH
|
||||
// Customer: ESA/ESTEC
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CHANGE HISTORY
|
||||
// --------------
|
||||
// ChangeHistory:
|
||||
// -15/01/2007 Creation by L. Desorgher
|
||||
// -01/11/2009 Some cleaning and adding of documentation for the first Release in the Geant4 toolkit, L. Desorgher
|
||||
// -04/11/2009 Adding the possibility to use user stepping action, L. Desorgher
|
||||
// -20/11/2009 Correct the stop of adjoint particles tracking when it reenters the adjoint source.
|
||||
//
|
||||
//
|
||||
//-------------------------------------------------------------
|
||||
// Documentation:
|
||||
// Stepping action used in the adjoint simulation.
|
||||
// It is responsible to stop the adjoint tracking phase when:
|
||||
// -a)The adjoint track reaches the external surface.
|
||||
// -b)The being tracked adjoint dynamic particle get an energy higher than the maximum energy of the external source.
|
||||
// -c)The adjoint track enters the volume delimited by the adjoint source.
|
||||
// In the case a) the info (energy,weight,...) of the adjoint dynamic particle associated to the track
|
||||
// when crossing the external source is registered and in the next event a forward primary is generated. In the other cases b) and c)
|
||||
// The next generated fwd particle is killed before being tracked and the next tracking of an adjoint particle is started directly.
|
||||
//
|
||||
|
||||
#ifndef G4AdjointSteppingAction_h
|
||||
#define G4AdjointSteppingAction_h 1
|
||||
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
class G4AdjointCrossSurfChecker;
|
||||
class G4ParticleDefinition;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4AdjointSteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
G4AdjointSteppingAction();
|
||||
~G4AdjointSteppingAction();
|
||||
|
||||
void UserSteppingAction(const G4Step*);
|
||||
|
||||
inline void SetExtSourceEMax(G4double Emax){ext_sourceEMax=Emax;}
|
||||
inline void SetStartEvent(G4bool aBool){start_event =aBool;}
|
||||
inline G4bool GetDidAdjParticleReachTheExtSource(){return did_adj_part_reach_ext_source;}
|
||||
inline G4ThreeVector GetLastMomentum(){return last_momentum;}
|
||||
inline G4ThreeVector GetLastPosition(){return last_pos;}
|
||||
inline G4double GetLastEkin(){return last_ekin;}
|
||||
inline G4double GetLastWeight(){return last_weight;}
|
||||
inline void SetPrimWeight(G4double weight){prim_weight=weight;}
|
||||
inline G4ParticleDefinition* GetLastPartDef(){return last_part_def;}
|
||||
inline void SetUserAdjointSteppingAction( G4UserSteppingAction* anAction) {theUserAdjointSteppingAction = anAction;}
|
||||
|
||||
private:
|
||||
|
||||
G4double ext_sourceEMax;
|
||||
G4AdjointCrossSurfChecker* theG4AdjointCrossSurfChecker;
|
||||
G4bool start_event;
|
||||
|
||||
G4bool did_adj_part_reach_ext_source;
|
||||
G4ThreeVector last_momentum, last_pos;
|
||||
G4double last_ekin;
|
||||
G4double last_weight ;
|
||||
G4double prim_weight ;
|
||||
G4ParticleDefinition* last_part_def;
|
||||
G4UserSteppingAction* theUserAdjointSteppingAction;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RichTrajectory.hh,v 1.4 2006/06/29 21:15:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4RichTrajectory.hh,v 1.6 2009/11/24 10:04:14 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -41,6 +41,7 @@
|
||||
// includes:
|
||||
// 4) physical volume and next physical volume;
|
||||
// 5) creator process;
|
||||
// ...and much more.
|
||||
//
|
||||
// Contact:
|
||||
// Questions and comments on G4Trajectory should be sent to
|
||||
@@ -58,6 +59,8 @@
|
||||
|
||||
#include "G4Trajectory.hh"
|
||||
|
||||
#include "G4TouchableHandle.hh"
|
||||
|
||||
typedef std::vector<G4VTrajectoryPoint*> RichTrajectoryPointsContainer;
|
||||
|
||||
class G4RichTrajectory : public G4Trajectory {
|
||||
@@ -91,9 +94,13 @@ private:
|
||||
|
||||
// Extended information (only publicly accessible through AttValues)...
|
||||
RichTrajectoryPointsContainer* fpRichPointsContainer;
|
||||
G4VPhysicalVolume* fpInitialVolume;
|
||||
G4VPhysicalVolume* fpInitialNextVolume;
|
||||
const G4VProcess* fpCreatorProcess;
|
||||
G4TouchableHandle fpInitialVolume;
|
||||
G4TouchableHandle fpInitialNextVolume;
|
||||
const G4VProcess* fpCreatorProcess;
|
||||
G4TouchableHandle fpFinalVolume;
|
||||
G4TouchableHandle fpFinalNextVolume;
|
||||
const G4VProcess* fpEndingProcess;
|
||||
G4double fFinalKineticEnergy;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RichTrajectoryPoint.hh,v 1.5 2006/09/27 20:42:52 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4RichTrajectoryPoint.hh,v 1.7 2009/11/24 10:04:14 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -39,8 +39,10 @@
|
||||
// includes:
|
||||
// 2) Auxiliary points, as in G4SmoothTrajectory.
|
||||
// 3) Total energy deposit.
|
||||
// 4) Procees defining end of step.
|
||||
// 5) Global time (from start of event) at pre- amd post-step.
|
||||
// 4) Remaining energy.
|
||||
// 5) Process defining end of step.
|
||||
// 6) Global time (from start of event) at pre- amd post-step.
|
||||
// ...and more.
|
||||
//
|
||||
// Contact:
|
||||
// Questions and comments to this code should be sent to
|
||||
@@ -58,6 +60,7 @@
|
||||
|
||||
#include "G4TrajectoryPoint.hh"
|
||||
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include <vector>
|
||||
|
||||
@@ -96,9 +99,12 @@ private:
|
||||
// Extended member data
|
||||
std::vector<G4ThreeVector>* fpAuxiliaryPointVector;
|
||||
G4double fTotEDep;
|
||||
G4double fRemainingEnergy;
|
||||
const G4VProcess* fpProcess;
|
||||
G4double fPreStepPointGlobalTime;
|
||||
G4double fPostStepPointGlobalTime;
|
||||
G4TouchableHandle fpPreStepPointVolume;
|
||||
G4TouchableHandle fpPostStepPointVolume;
|
||||
};
|
||||
|
||||
#if defined G4TRACKING_ALLOC_EXPORT
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SmoothTrajectory.hh,v 1.11 2006/06/29 21:15:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4SmoothTrajectory.hh,v 1.12 2009/11/12 09:09:56 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -94,6 +94,8 @@ public: // with description
|
||||
{ return PDGCharge; }
|
||||
inline G4int GetPDGEncoding() const
|
||||
{ return PDGEncoding; }
|
||||
inline G4double GetInitialKineticEnergy() const
|
||||
{ return initialKineticEnergy; }
|
||||
inline G4ThreeVector GetInitialMomentum() const
|
||||
{ return initialMomentum; }
|
||||
|
||||
@@ -108,7 +110,7 @@ public: // with description
|
||||
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
|
||||
// Get method for HEPRep style attributes
|
||||
// Get method for HEPRep style attributes
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
@@ -122,6 +124,7 @@ public: // with description
|
||||
G4int PDGEncoding;
|
||||
G4double PDGCharge;
|
||||
G4String ParticleName;
|
||||
G4double initialKineticEnergy;
|
||||
G4ThreeVector initialMomentum;
|
||||
|
||||
};
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trajectory.hh,v 1.24 2006/06/29 21:15:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Trajectory.hh,v 1.25 2009/11/12 09:09:56 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -100,6 +100,8 @@ public: // with description
|
||||
{ return PDGCharge; }
|
||||
inline G4int GetPDGEncoding() const
|
||||
{ return PDGEncoding; }
|
||||
inline G4double GetInitialKineticEnergy() const
|
||||
{ return initialKineticEnergy; }
|
||||
inline G4ThreeVector GetInitialMomentum() const
|
||||
{ return initialMomentum; }
|
||||
|
||||
@@ -127,6 +129,7 @@ public: // with description
|
||||
G4int PDGEncoding;
|
||||
G4double PDGCharge;
|
||||
G4String ParticleName;
|
||||
G4double initialKineticEnergy;
|
||||
G4ThreeVector initialMomentum;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user