Import Geant4 9.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:37:50 +02:00
parent a8e9364cea
commit 96c8bcd0af
6923 changed files with 198390 additions and 41849 deletions
@@ -0,0 +1,195 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04DetectorConstruction_h
#define F04DetectorConstruction_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4RotationMatrix.hh"
class G4Tubs;
class G4LogicalVolume;
class G4VPhysicalVolume;
class F04Materials;
class G4Material;
class F04SimpleSolenoid;
class F04FocusSolenoid;
class F04DetectorMessenger;
#include "G4VUserDetectorConstruction.hh"
class F04DetectorConstruction : public G4VUserDetectorConstruction
{
public:
F04DetectorConstruction();
~F04DetectorConstruction();
G4VPhysicalVolume* Construct();
G4VPhysicalVolume* ConstructDetector();
void UpdateGeometry();
// stringToRotationMatrix() converts a string "X90,Y45" into a
// G4RotationMatrix.
// This is an active rotation, in that the object is first rotated
// around the parent's X axis by 90 degrees, then the object is
// further rotated around the parent's Y axis by 45 degrees.
// The return value points to a G4RotationMatrix on the heap, so
// it is persistent. Angles are in degrees, can have decimals,
// and can be negative. Axes are X, Y, Z.
static G4RotationMatrix stringToRotationMatrix(G4String rotation);
public:
void SetWorldMaterial(G4String);
void SetWorldSizeZ(G4double);
void SetWorldSizeR(G4double);
void SetCaptureMgntRadius(G4double);
void SetCaptureMgntLength(G4double);
void SetCaptureMgntB1(G4double);
void SetCaptureMgntB2(G4double);
void SetTransferMgntRadius(G4double);
void SetTransferMgntLength(G4double);
void SetTransferMgntB(G4double);
void SetTransferMgntPos(G4double);
void SetTargetMaterial (G4String);
void SetTargetThickness(G4double);
void SetTargetRadius(G4double);
void SetTargetPos(G4double);
void SetTargetAngle(G4int);
void SetDegraderMaterial (G4String);
void SetDegraderThickness(G4double);
void SetDegraderRadius(G4double);
void SetDegraderPos(G4double);
public:
G4Material* GetWorldMaterial() {return WorldMaterial;};
G4double GetWorldSizeZ() {return WorldSizeZ;};
G4double GetWorldSizeR() {return WorldSizeR;};
G4double GetCaptureMgntRadius() {return CaptureMgntRadius;};
G4double GetCaptureMgntLength() {return CaptureMgntLength;};
G4double GetCaptureMgntB1() {return CaptureMgntB1;};
G4double GetCaptureMgntB2() {return CaptureMgntB2;};
G4double GetTransferMgntRadius() {return TransferMgntRadius;};
G4double GetTransferMgntLength() {return TransferMgntLength;};
G4double GetTransferMgntB() {return TransferMgntB;};
G4double GetTransferMgntPos() {return TransferMgntPos;};
G4Material* GetTargetMaterial() {return TargetMaterial;};
G4double GetTargetRadius() {return TargetRadius;};
G4double GetTargetThickness() {return TargetThickness;};
G4double GetTargetPos() {return TargetPos;};
G4int GetTargetAngle() {return TargetAngle;};
G4Material* GetDegraderMaterial() {return DegraderMaterial;};
G4double GetDegraderRadius() {return DegraderRadius;};
G4double GetDegraderThickness() {return DegraderThickness;};
G4double GetDegraderPos() {return DegraderPos;};
private:
F04Materials* materials;
G4Material* Vacuum;
G4Tubs* solidWorld;
G4LogicalVolume* logicWorld;
G4VPhysicalVolume* physiWorld;
G4Tubs* solidTarget;
G4LogicalVolume* logicTarget;
G4VPhysicalVolume* physiTarget;
G4Tubs* solidDegrader;
G4LogicalVolume* logicDegrader;
G4VPhysicalVolume* physiDegrader;
G4Tubs* solidCaptureMgnt;
G4LogicalVolume* logicCaptureMgnt;
G4VPhysicalVolume* physiCaptureMgnt;
G4Tubs* solidTransferMgnt;
G4LogicalVolume* logicTransferMgnt;
G4VPhysicalVolume* physiTransferMgnt;
G4Material* WorldMaterial;
G4double WorldSizeR;
G4double WorldSizeZ;
G4double CaptureMgntLength;
G4double CaptureMgntRadius;
G4double CaptureMgntB1;
G4double CaptureMgntB2;
G4double TransferMgntLength;
G4double TransferMgntRadius;
G4double TransferMgntB;
G4double TransferMgntPos;
G4Material* TargetMaterial;
G4double TargetThickness;
G4double TargetRadius;
G4double TargetPos;
G4int TargetAngle;
G4Material* DegraderMaterial;
G4double DegraderThickness;
G4double DegraderRadius;
G4double DegraderPos;
F04FocusSolenoid* focusSolenoid;
F04SimpleSolenoid* simpleSolenoid;
private:
void DefineMaterials();
F04DetectorMessenger* detectorMessenger; // pointer to the Messenger
};
#endif
@@ -0,0 +1,93 @@
//
// ********************************************************************
// * 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: F04DetectorMessenger.hh,v 1.1 2007/10/30 02:01:47 gum Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04DetectorMessenger_h
#define F04DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "F04DetectorConstruction.hh"
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
class F04DetectorMessenger : public G4UImessenger
{
public:
F04DetectorMessenger(F04DetectorConstruction* );
~F04DetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
F04DetectorConstruction* Detector;
G4UIdirectory* detDir;
G4UIcmdWithAString* WorldMaterCmd;
G4UIcmdWithADoubleAndUnit* WorldRCmd;
G4UIcmdWithADoubleAndUnit* WorldZCmd;
G4UIcmdWithADoubleAndUnit* CaptureRCmd;
G4UIcmdWithADoubleAndUnit* CaptureZCmd;
G4UIcmdWithADoubleAndUnit* CaptureB1Cmd;
G4UIcmdWithADoubleAndUnit* CaptureB2Cmd;
G4UIcmdWithADoubleAndUnit* TransferRCmd;
G4UIcmdWithADoubleAndUnit* TransferZCmd;
G4UIcmdWithADoubleAndUnit* TransferBCmd;
G4UIcmdWithADoubleAndUnit* TransferPCmd;
G4UIcmdWithAString* TgtMaterCmd;
G4UIcmdWithADoubleAndUnit* TgtRadCmd;
G4UIcmdWithADoubleAndUnit* TgtThickCmd;
G4UIcmdWithADoubleAndUnit* TgtPosCmd;
G4UIcmdWithAnInteger* TgtAngCmd;
G4UIcmdWithAString* DgrMaterCmd;
G4UIcmdWithADoubleAndUnit* DgrRadCmd;
G4UIcmdWithADoubleAndUnit* DgrThickCmd;
G4UIcmdWithADoubleAndUnit* DgrPosCmd;
G4UIcmdWithoutParameter* UpdateCmd;
};
#endif
@@ -0,0 +1,159 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04ElementField_h
#define F04ElementField_h 1
#include "globals.hh"
#include "G4Navigator.hh"
#include "G4TransportationManager.hh"
#include "G4UserLimits.hh"
#include "G4VisAttributes.hh"
// class F04ElementField - interface for the EM field of one element
// This is the interface class used by GlobalField to compute the field
// value at a given point[].
// An element that represents an element with an EM field will
// derive a class from this one and implement the computation for the
// element. The construct() function will add the derived object into
// GlobalField.
class F04ElementField
{
private:
F04ElementField& operator=(const F04ElementField&);
public:
/// Constructor.
F04ElementField(const G4ThreeVector, G4LogicalVolume*);
/// the actual implementation constructs the F04ElementField
void construct();
/// Destructor.
virtual ~F04ElementField() { if (aNavigator) delete aNavigator; }
/// setMaxStep(G4double) sets the max. step size
void setMaxStep(G4double s)
{
maxStep = s;
userLimits->SetMaxAllowedStep(maxStep);
lvolume->SetUserLimits(userLimits);
}
/// getMaxStep() returns the max. step size
G4double getMaxStep() { return maxStep; }
/// setColor(G4String) sets the color
void setColor(G4String c)
{
color = c;
lvolume->SetVisAttributes(getVisAttribute(color));
}
/// getColor() returns the color
G4String getColor() { return color; }
/// getVisAttribute() returns the appropriate G4VisAttributes.
static G4VisAttributes* getVisAttribute(G4String color);
/// setGlobalPoint() ensures that the point is within the global
/// bounding box of this ElementField's global coordinates.
/// Normally called 8 times for the corners of the local bounding
/// box, after a local->global coordinate transform.
/// If never called, the global bounding box is infinite.
/// BEWARE: if called only once, the bounding box is just a point.
void setGlobalPoint(const G4double point[4])
{
if(minX == -DBL_MAX || minX > point[0]) minX = point[0];
if(minY == -DBL_MAX || minY > point[1]) minY = point[1];
if(minZ == -DBL_MAX || minZ > point[2]) minZ = point[2];
if(maxX == DBL_MAX || maxX < point[0]) maxX = point[0];
if(maxY == DBL_MAX || maxY < point[1]) maxY = point[1];
if(maxZ == DBL_MAX || maxZ < point[2]) maxZ = point[2];
}
/// isInBoundingBox() returns true if the point is within the
/// global bounding box - global coordinates.
bool isInBoundingBox(const G4double point[4]) const
{
if(point[2] < minZ || point[2] > maxZ) return false;
if(point[0] < minX || point[0] > maxX) return false;
if(point[1] < minY || point[1] > maxY) return false;
return true;
}
/// addFieldValue() will add the field value for this element to field[].
/// Implementations must be sure to verify that point[] is within
/// the field region, and do nothing if not.
/// point[] is in global coordinates and geant4 units; x,y,z,t.
/// field[] is in geant4 units; Bx,By,Bz,Ex,Ey,Ez.
/// For efficiency, the caller may (but need not) call
/// isInBoundingBox(point), and only call this function if that
/// returns true.
virtual void
addFieldValue(const G4double point[4], G4double field[6]) const = 0;
virtual G4double getLength() = 0;
virtual G4double getWidth() = 0;
virtual G4double getHeight() = 0;
protected:
G4LogicalVolume* lvolume;
G4AffineTransform global2local;
// F04ElementField(const F04ElementField&);
private:
static G4Navigator* aNavigator;
G4String color;
G4ThreeVector center;
G4double minX, minY, minZ, maxX, maxY,maxZ;
G4double maxStep;
G4UserLimits* userLimits;
};
#endif
@@ -0,0 +1,72 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04EventAction_h
#define F04EventAction_h 1
#include "globals.hh"
#include "G4UserEventAction.hh"
class F04RunAction;
class F04EventActionMessenger;
class F04EventAction : public G4UserEventAction
{
public:
F04EventAction(F04RunAction* RA);
~F04EventAction();
public:
void BeginOfEventAction(const G4Event*);
void EndOfEventAction(const G4Event*);
G4int GetEventNo();
void SetEventVerbose(G4int);
void SetDrawFlag(G4String val) { drawFlag = val; };
void SetPrintModulo(G4int val) { printModulo = val; };
private:
F04RunAction* runaction;
F04EventActionMessenger* eventMessenger;
G4int verboselevel;
G4int printModulo;
G4String drawFlag;
};
#endif
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04EventActionMessenger_h
#define F04EventActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class F04EventAction;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class F04EventActionMessenger: public G4UImessenger
{
public:
F04EventActionMessenger(F04EventAction*);
~F04EventActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
F04EventAction* eventAction;
G4UIcmdWithAnInteger* setVerboseCmd;
G4UIcmdWithAString* DrawCmd;
G4UIcmdWithAnInteger* PrintCmd;
};
#endif
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04ExtraPhysics_h
#define F04ExtraPhysics_h 1
#include "globals.hh"
#include "G4VPhysicsConstructor.hh"
class F04ExtraPhysics : public G4VPhysicsConstructor
{
public:
F04ExtraPhysics();
virtual ~F04ExtraPhysics();
virtual void ConstructParticle();
virtual void ConstructProcess();
};
#endif
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04FieldMessenger_h
#define F04FieldMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class F04GlobalField;
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
class F04FieldMessenger: public G4UImessenger
{
public:
F04FieldMessenger(F04GlobalField* );
~F04FieldMessenger();
void SetNewValue(G4UIcommand*, G4String);
void SetNewValue(G4UIcommand*, G4int);
private:
F04GlobalField* fGlobalField;
G4UIdirectory* detDir;
G4UIcmdWithAnInteger* fStepperCMD;
G4UIcmdWithADoubleAndUnit* fMinStepCMD;
G4UIcmdWithADoubleAndUnit* fDeltaChordCMD;
G4UIcmdWithADoubleAndUnit* fDeltaOneStepCMD;
G4UIcmdWithADoubleAndUnit* fDeltaIntersectionCMD;
G4UIcmdWithADoubleAndUnit* fEpsMinCMD;
G4UIcmdWithADoubleAndUnit* fEpsMaxCMD;
G4UIcmdWithoutParameter* fUpdateCMD;
};
#endif
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04FocusSolenoid_h
#define F04FocusSolenoid_h 1
#include "G4LogicalVolume.hh"
#include "F04SimpleSolenoid.hh"
// F04FocusSolenoid implements a solenoid magnet with an increased
// cylindrical magnetic field in +/- z-direction (or half focusing)
class F04FocusSolenoid : public F04SimpleSolenoid
{
public:
/// Default constructor.
F04FocusSolenoid(G4double, G4double, G4double,
G4LogicalVolume*, G4ThreeVector);
/// Destructor.
virtual ~F04FocusSolenoid() {}
/// Set F04FocusSolenoid to only half-focusing (default negative z)
void SetHalf(G4bool h) { Half = h; }
/// addFieldValue() adds the field for this solenoid into field[].
/// point[] is in global coordinates.
void addFieldValue(const G4double point[4], G4double field[6]) const;
private:
G4bool Half;
G4double B1;
G4double B2;
};
#endif
@@ -0,0 +1,176 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04GlobalField_h
#define F04GlobalField_h 1
#include <vector>
#include "G4FieldManager.hh"
#include "G4PropagatorInField.hh"
#include "G4MagIntegratorStepper.hh"
#include "G4ChordFinder.hh"
#include "G4MagneticField.hh"
#include "G4ElectroMagneticField.hh"
#include "G4Mag_EqRhs.hh"
#include "G4Mag_SpinEqRhs.hh"
#include "G4EqMagElectricField.hh"
#include "G4EqEMFieldWithSpin.hh"
#include "F04FieldMessenger.hh"
#include "F04ElementField.hh"
// F04GlobalField - handles the global ElectroMagnetic field
//
// There is a single G04GlobalField object.
//
// The field from each individual beamline element is given by a
// ElementField object. Any number of overlapping ElementField
// objects can be added to the global field. Any element that
// represents an element with an EM field must add the appropriate
// ElementField to the global GlobalField object.
typedef std::vector<F04ElementField*> FieldList;
class F04GlobalField : public G4ElectroMagneticField {
//class F04GlobalField : public G4MagneticField {
private:
F04GlobalField();
F04GlobalField(const F04GlobalField&);
~F04GlobalField();
F04GlobalField& operator=(const F04GlobalField&);
void setupArray();
public:
/// getObject() returns the single F04GlobalField object.
/// It is constructed, if necessary.
static F04GlobalField* getObject();
/// GetFieldValue() returns the field value at a given point[].
/// field is really field[6]: Bx,By,Bz,Ex,Ey,Ez.
/// point[] is in global coordinates: x,y,z,t.
void GetFieldValue(const G4double* point, G4double* field) const;
/// DoesFieldChangeEnergy() returns true.
G4bool DoesFieldChangeEnergy() const { return true; }
/// addElementField() adds the ElementField object for a single
/// element to the global field.
void addElementField(F04ElementField* f) { if (fields) fields->push_back(f); }
/// clear() removes all ElementField-s from the global object,
/// and destroys them. Used before the geometry is completely
/// re-created.
void clear();
/// updates all field tracking objects and clear()
void updateField();
/// Set the Stepper types
void SetStepperType( G4int i ) { fStepperType = i; }
/// Set the Stepper
void SetStepper();
/// Set the minimum step length
void SetMinStep(G4double s) { minStep = s; }
/// Set the delta chord length
void SetDeltaChord(G4double s) { deltaChord = s; }
/// Set the delta one step length
void SetDeltaOneStep(G4double s) { deltaOneStep = s; }
/// Set the delta intersection length
void SetDeltaIntersection(G4double s) { deltaIntersection = s; }
/// Set the minimum eps length
void SetEpsMin(G4double s) { epsMin = s; }
/// Set the maximum eps length
void SetEpsMax(G4double s) { epsMax = s; }
/// Return the list of Element Fields
FieldList* getFields() { return fields; }
protected:
/// Get the global field manager
G4FieldManager* GetGlobalFieldManager();
private:
static F04GlobalField* object;
G4int nfp;
G4bool first;
FieldList* fields;
const F04ElementField **fp;
private:
G4int fStepperType;
G4double minStep;
G4double deltaChord;
G4double deltaOneStep;
G4double deltaIntersection;
G4double epsMin;
G4double epsMax;
// G4Mag_EqRhs* fEquation;
// G4Mag_SpinEqRhs* fEquation;
// G4EqMagElectricField* fEquation;
G4EqEMFieldWithSpin* fEquation;
G4FieldManager* fFieldManager;
G4PropagatorInField* fFieldPropagator;
G4MagIntegratorStepper* fStepper;
G4ChordFinder* fChordFinder;
F04FieldMessenger* fFieldMessenger;
};
#endif
@@ -0,0 +1,69 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04Materials_h
#define F04Materials_h 1
#include "globals.hh"
#include "G4Material.hh"
#include "G4NistManager.hh"
class F04Materials
{
public:
~F04Materials();
static F04Materials* GetInstance();
G4Material* GetMaterial(G4String);
private:
F04Materials();
void CreateMaterials();
private:
static F04Materials* instance;
G4NistManager* nistMan;
G4Material* Vacuum;
G4Material* Air;
G4Material* Sci;
G4Material* BeO;
};
#endif /*F04Materials_h*/
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04OpticalPhysics_h
#define F04OpticalPhysics_h 1
#include "globals.hh"
#include "G4VPhysicsConstructor.hh"
class F04OpticalPhysics : public G4VPhysicsConstructor
{
public:
F04OpticalPhysics();
virtual ~F04OpticalPhysics();
virtual void ConstructParticle();
virtual void ConstructProcess();
};
#endif
@@ -0,0 +1,102 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04PhysicsList_h
#define F04PhysicsList_h 1
#include "globals.hh"
#include "G4VModularPhysicsList.hh"
class G4VPhysicsConstructor;
class F04PhysicsListMessenger;
class F04StepMax;
class F04PhysicsList: public G4VModularPhysicsList
{
public:
F04PhysicsList(G4String);
virtual ~F04PhysicsList();
void ConstructParticle();
void SetCuts();
void SetCutForGamma(G4double);
void SetCutForElectron(G4double);
void SetCutForPositron(G4double);
void SetStepMax(G4double);
F04StepMax* GetStepMaxProcess();
void AddStepMax();
/// Add physics to the Physics List
void AddPhysicsList(const G4String& name);
/// Remove specific EM physics from EM physics list.
void RemoveFromEMPhysicsList(const G4String&);
/// Remove specific Hadron physics from Hadron physics list.
void RemoveFromHadronPhysicsList(const G4String&);
/// Make sure that the EM physics list is empty.
void ClearEMPhysics();
/// Make sure that the hadron physics list is empty.
void ClearHadronPhysics();
void ConstructProcess();
void List();
private:
typedef std::vector<G4VPhysicsConstructor*> PhysicsListVector;
void SetStandardList(G4bool flagHP = false, G4bool glauber = false);
G4double fCutForGamma;
G4double fCutForElectron;
G4double fCutForPositron;
G4VPhysicsConstructor* fParticleList;
PhysicsListVector* fEMPhysics;
PhysicsListVector* fHadronPhysics;
G4double MaxChargedStep;
F04StepMax* stepMaxProcess;
F04PhysicsListMessenger* fMessenger;
G4bool fDump;
};
#endif
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04PhysicsListMessenger_h
#define F04PhysicsListMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4DecayTable.hh"
#include "G4VDecayChannel.hh"
class F04PhysicsList;
class G4UIdirectory;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithAString;
class G4UIcmdWithoutParameter;
/// Provide control of the physics list and cut parameters
class F04PhysicsListMessenger : public G4UImessenger
{
public:
F04PhysicsListMessenger(F04PhysicsList* );
virtual ~F04PhysicsListMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
F04PhysicsList* fPhysicsList;
G4UIdirectory* fDirectory;
G4UIdirectory* fDecayDirectory;
G4UIcmdWithADoubleAndUnit* fGammaCutCMD;
G4UIcmdWithADoubleAndUnit* fElectCutCMD;
G4UIcmdWithADoubleAndUnit* fPosCutCMD;
G4UIcmdWithADoubleAndUnit* fAllCutCMD;
G4UIcmdWithADoubleAndUnit* fStepMaxCMD;
G4UIcmdWithAString* fAddPhysicsCMD;
G4UIcmdWithAString* fRemoveEMPhysicsCMD;
G4UIcmdWithAString* fRemoveHadronPhysicsCMD;
G4UIcmdWithoutParameter* fClearEMPhysicsCMD;
G4UIcmdWithoutParameter* fClearHadronPhysicsCMD;
G4UIcmdWithoutParameter* fListCMD;
G4UIcmdWithoutParameter* fPienuCMD;
G4UIcmdWithoutParameter* fPimunuCMD;
G4ParticleTable* particleTable;
G4ParticleDefinition* particleDef;
G4DecayTable* table;
G4VDecayChannel* mode;
};
#endif
@@ -0,0 +1,85 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04PrimaryGeneratorAction_h
#define F04PrimaryGeneratorAction_h 1
#include "globals.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4Navigator.hh"
#include "G4TransportationManager.hh"
class G4ParticleGun;
class G4Event;
class F04DetectorConstruction;
class F04PrimaryGeneratorMessenger;
class F04PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
F04PrimaryGeneratorAction(F04DetectorConstruction*);
~F04PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event*);
void SetRndmFlag(G4String val) { rndmFlag = val;}
void Setxvertex(G4double x) ;
void Setyvertex(G4double y) ;
void Setzvertex(G4double z) ;
private:
F04DetectorConstruction* Detector; // pointer to the geometry
G4ParticleGun* particleGun; // pointer a to G4 service class
F04PrimaryGeneratorMessenger* gunMessenger; // messenger of this class
G4String rndmFlag; // flag for random impact point
static G4bool first;
G4AffineTransform global2local;
G4double xvertex, yvertex, zvertex;
G4bool vertexdefined;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04PrimaryGeneratorMessenger_h
#define F04PrimaryGeneratorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
class F04PrimaryGeneratorAction;
class F04PrimaryGeneratorMessenger : public G4UImessenger
{
public:
F04PrimaryGeneratorMessenger(F04PrimaryGeneratorAction*);
~F04PrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
F04PrimaryGeneratorAction* Action;
G4UIcmdWithAString* RndmCmd;
G4UIcmdWithADoubleAndUnit* setxvertexCmd;
G4UIcmdWithADoubleAndUnit* setyvertexCmd;
G4UIcmdWithADoubleAndUnit* setzvertexCmd;
};
#endif
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04RunAction_h
#define F04RunAction_h 1
#include "globals.hh"
#include "G4UserRunAction.hh"
class F04RunActionMessenger;
class G4Run;
class F04RunAction : public G4UserRunAction
{
public:
F04RunAction();
~F04RunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
void SetRndmFreq(G4int val) {saveRndm = val;}
G4int GetRndmFreq() {return saveRndm;}
private:
F04RunActionMessenger* runMessenger;
G4int saveRndm;
};
#endif
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04RunActionMessenger_h
#define F04RunActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class F04RunAction;
class G4UIdirectory;
class G4UIcmdWithAnInteger;
class G4UIcmdWithAString;
class F04RunActionMessenger : public G4UImessenger
{
public:
F04RunActionMessenger(F04RunAction* );
~F04RunActionMessenger();
void SetNewValue(G4UIcommand* ,G4String );
private:
F04RunAction* runAction;
G4UIdirectory* RndmDir;
G4UIcmdWithAnInteger* RndmSaveCmd;
G4UIcmdWithAString* RndmReadCmd;
};
#endif
@@ -0,0 +1,91 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04SimpleSolenoid_h
#define F04SimpleSolenoid_h 1
#include "G4LogicalVolume.hh"
#include "G4Tubs.hh"
#include "F04ElementField.hh"
#include "F04GlobalField.hh"
// F04SimpleSolenoid implements a solenoid magnet with a constant
// cylindrical magnetic field in z-direction
class F04SimpleSolenoid : public F04ElementField
{
public:
/// Default constructor.
F04SimpleSolenoid(G4double, G4double, G4LogicalVolume*, G4ThreeVector);
/// Destructor.
virtual ~F04SimpleSolenoid() {}
/// getLength() returns the length of the solenoid
virtual G4double getLength() { return fieldLength; }
/// getWidth() returns the solenoid diameter
virtual G4double getWidth() { return fieldRadius*2.0; }
/// getHeight() returns the solenoid diameter
virtual G4double getHeight() { return fieldRadius*2.0; }
/// setFringeZ(G4double) sets the solenoid fringe field z-length
void setFringeZ(G4double z) { fringeZ = z; }
/// getFringeZ() returns the solenoid fringe field z-length
G4double getFringeZ() { return fringeZ; }
/// isOutside() returns true when outside the solenoid
G4bool isOutside(G4ThreeVector& local) const;
/// isWithin() returns true when inside the solenoid
G4bool isWithin(G4ThreeVector& local) const;
/// addFieldValue() adds the field for this solenoid into field[].
/// point[] is in global coordinates.
void addFieldValue(const G4double point[4], G4double field[6]) const;
private:
G4double Bfield;
G4double fringeZ;
G4double fieldRadius;
G4double fieldLength;
};
#endif
@@ -0,0 +1,54 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04StackingAction_h
#define F04StackingAction_h 1
#include "G4UserStackingAction.hh"
class F04StackingAction : public G4UserStackingAction
{
public:
F04StackingAction();
~F04StackingAction();
public:
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
virtual void NewStage();
virtual void PrepareNewEvent();
private:
};
#endif
@@ -0,0 +1,78 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04StepMax_h
#define F04StepMax_h 1
#include "globals.hh"
#include "G4Step.hh"
#include "G4VDiscreteProcess.hh"
#include "G4ParticleDefinition.hh"
class F04StepMax : public G4VDiscreteProcess
{
public:
F04StepMax(const G4String& processName = "UserStepMax");
F04StepMax(F04StepMax &);
~F04StepMax();
G4bool IsApplicable(const G4ParticleDefinition&);
void SetStepMax(G4double);
G4double GetStepMax() {return MaxChargedStep;};
G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition);
G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
protected:
G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*);
private:
// hide assignment operator as private
F04StepMax & operator=(const F04StepMax &right);
F04StepMax(const F04StepMax&);
private:
G4double MaxChargedStep;
};
#endif
@@ -0,0 +1,57 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04SteppingAction_h
#define F04SteppingAction_h 1
#include "G4UserSteppingAction.hh"
class F04SteppingActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class F04SteppingAction : public G4UserSteppingAction
{
public:
F04SteppingAction();
~F04SteppingAction();
void UserSteppingAction(const G4Step*);
private:
F04SteppingActionMessenger* steppingMessenger;
};
#endif
@@ -0,0 +1,58 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04SteppingActionMessenger_h
#define F04SteppingActionMessenger_h 1
#include "G4UImessenger.hh"
class F04SteppingAction;
class G4UIdirectory;
class F04SteppingActionMessenger: public G4UImessenger
{
public:
F04SteppingActionMessenger(F04SteppingAction* );
~F04SteppingActionMessenger();
void SetNewValue(G4UIcommand* ,G4String );
private:
F04SteppingAction* steppingAction;
G4UIdirectory* steppingDir;
};
#endif
@@ -0,0 +1,49 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04SteppingVerbose_h
#define F04SteppingVerbose_h 1
#include "G4SteppingVerbose.hh"
class F04SteppingVerbose : public G4SteppingVerbose
{
public:
F04SteppingVerbose();
~F04SteppingVerbose();
void StepInfo();
void TrackingStarted();
};
#endif
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04TrackingAction_h
#define F04TrackingAction_h 1
#include "G4UserTrackingAction.hh"
class F04TrackingAction : public G4UserTrackingAction {
public:
F04TrackingAction() { };
~F04TrackingAction() { };
void PreUserTrackingAction(const G4Track*);
void PostUserTrackingAction(const G4Track*);
};
#endif
@@ -0,0 +1,130 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04Trajectory_h
#define F04Trajectory_h 1
#include <vector>
#include <stdlib.h>
#include "globals.hh"
#include "G4ios.hh"
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4Allocator.hh"
#include "G4VTrajectory.hh"
#include "G4ParticleDefinition.hh"
#include "G4TrajectoryPoint.hh"
typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
class F04Trajectory : public G4VTrajectory
{
//--------
public: // without description
//--------
// Constructor/Destructor
F04Trajectory();
F04Trajectory(const G4Track* aTrack);
F04Trajectory(F04Trajectory &);
virtual ~F04Trajectory();
// Operators
inline void* operator new(size_t);
inline void operator delete(void*);
inline int operator == (const F04Trajectory& right) const
{ return (this==&right); }
// Get/Set functions
inline G4int GetTrackID() const { return fTrackID; }
inline G4int GetParentID() const { return fParentID; }
inline G4String GetParticleName() const { return ParticleName; }
inline G4double GetCharge() const { return PDGCharge; }
inline G4int GetPDGEncoding() const { return PDGEncoding; }
inline G4ThreeVector GetInitialMomentum() const { return initialMomentum; }
// Other member functions
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
virtual void DrawTrajectory(G4int i_mode=0) const;
virtual void AppendStep(const G4Step* aStep);
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
G4ParticleDefinition* GetParticleDefinition();
virtual int GetPointEntries() const
{ return fpPointsContainer->size(); }
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
{ return (*fpPointsContainer)[i]; }
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual std::vector<G4AttValue>* CreateAttValues() const;
//---------
private:
//---------
// Member data
TrajectoryPointContainer* fpPointsContainer;
G4int fTrackID;
G4int fParentID;
G4double PDGCharge;
G4int PDGEncoding;
G4String ParticleName;
G4ThreeVector initialMomentum;
};
#if defined G4TRACKING_ALLOC_EXPORT
extern G4DLLEXPORT G4Allocator<F04Trajectory> aTrajectoryAllocator;
#else
extern G4DLLIMPORT G4Allocator<F04Trajectory> aTrajectoryAllocator;
#endif
inline void* F04Trajectory::operator new(size_t) {
void* aTrajectory = (void*) aTrajectoryAllocator.MallocSingle();
return aTrajectory;
}
inline void F04Trajectory::operator delete(void* aTrajectory) {
aTrajectoryAllocator.FreeSingle((F04Trajectory*)aTrajectory);
}
#endif
@@ -0,0 +1,112 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04TrajectoryPoint_h
#define F04TrajectoryPoint_h 1
#include "globals.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
#include "G4TrajectoryPoint.hh"
#include "G4StepStatus.hh"
class G4Track;
class G4Step;
class G4VProcess;
class F04TrajectoryPoint : public G4TrajectoryPoint {
//--------
public: // without description
//--------
// Constructor/Destructor
F04TrajectoryPoint();
F04TrajectoryPoint(const G4Track* aTrack);
F04TrajectoryPoint(const G4Step* aStep);
F04TrajectoryPoint(const F04TrajectoryPoint &right);
virtual ~F04TrajectoryPoint();
// Operators
inline void *operator new(size_t);
inline void operator delete(void *aTrajectoryPoint);
inline int operator==(const F04TrajectoryPoint& right) const
{ return (this==&right); };
// Get/Set functions
inline G4double GetTime() const { return fTime; };
inline const G4ThreeVector GetMomentum() const { return fMomentum; };
inline G4StepStatus GetStepStatus() const { return fStepStatus; };
inline G4String GetVolumeName() const { return fVolumeName; };
// Get method for HEPRep style attributes
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual std::vector<G4AttValue>* CreateAttValues() const;
//---------
private:
//---------
// Member data
G4double fTime;
G4ThreeVector fMomentum;
G4StepStatus fStepStatus;
G4String fVolumeName;
};
#if defined G4TRACKING_ALLOC_EXPORT
extern G4DLLEXPORT G4Allocator<F04TrajectoryPoint> aTrajPointAllocator;
#else
extern G4DLLIMPORT G4Allocator<F04TrajectoryPoint> aTrajPointAllocator;
#endif
inline void* F04TrajectoryPoint::operator new(size_t)
{
void *aTrajectoryPoint = (void *) aTrajPointAllocator.MallocSingle();
return aTrajectoryPoint;
}
inline void F04TrajectoryPoint::operator delete(void *aTrajectoryPoint)
{
aTrajPointAllocator.FreeSingle(
(F04TrajectoryPoint *) aTrajectoryPoint);
}
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifndef F04UserTrackInformation_h
#define F04UserTrackInformation_h 1
#include "G4VUserTrackInformation.hh"
enum TrackStatus { undefined, left, right, reverse };
/*TrackStatus:
undefined:
left: track is going -z
right: track is going +z
reverse: track has reversed direction from left to right
*/
class F04UserTrackInformation : public G4VUserTrackInformation
{
public:
F04UserTrackInformation();
~F04UserTrackInformation();
void SetTrackStatusFlag(TrackStatus s){ status = s; }
TrackStatus GetTrackStatusFlag()const { return status; }
void Print() const { }
private:
TrackStatus status;
};
#endif