Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -23,30 +23,35 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// -------------------------------------------------------------------
// $Id$
// -------------------------------------------------------------------
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamTrackingAction_h
#define MicrobeamTrackingAction_h 1
#ifndef ActionInitialization_h
#define ActionInitialization_h 1
#include "G4UserTrackingAction.hh"
#include "G4VUserActionInitialization.hh"
class MicrobeamRunAction;
class DetectorConstruction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class MicrobeamTrackingAction : public G4UserTrackingAction
class ActionInitialization : public G4VUserActionInitialization
{
public:
ActionInitialization(DetectorConstruction*);
virtual ~ActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
public:
MicrobeamTrackingAction(MicrobeamRunAction*);
~MicrobeamTrackingAction() {};
void PostUserTrackingAction(const G4Track*);
private:
MicrobeamRunAction * Run;
DetectorConstruction* fDetectorConstruction;
};
#endif
@@ -23,25 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// -------------------------------------------------------------------
// $Id$
// -------------------------------------------------------------------
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamSteppingVerbose_h
#define MicrobeamSteppingVerbose_h 1
#ifndef Analysis_h
#define Analysis_h 1
#include "G4SteppingVerbose.hh"
class MicrobeamSteppingVerbose : public G4SteppingVerbose {
public:
MicrobeamSteppingVerbose();
~MicrobeamSteppingVerbose();
void StepInfo();
void TrackingStarted();
};
#include "g4root.hh"
#endif
@@ -23,47 +23,35 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// -------------------------------------------------------------------
// $Id$
// -------------------------------------------------------------------
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamCellParameterisation_H
#define MicrobeamCellParameterisation_H 1
#ifndef CellParameterisation_H
#define CellParameterisation_H 1
#include "G4VPVParameterisation.hh"
#include "G4ThreeVector.hh"
#include "G4Material.hh"
#include "G4VisAttributes.hh"
class G4VPhysicalVolume;
class G4Box;
class G4Tubs;
class G4Trd;
class G4Trap;
class G4Cons;
class G4Sphere;
class G4Orb;
class G4Torus;
class G4Para;
class Polycone;
class Polyhedra;
class G4Hype;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class MicrobeamCellParameterisation : public G4VPVParameterisation
class CellParameterisation : public G4VPVParameterisation
{
public:
MicrobeamCellParameterisation
CellParameterisation
(G4int NoBoxes, G4float DimBoxX, G4float DimBoxY, G4float DimBoxZ,
G4Material* nucleus1, G4Material* cytoplasm1,
G4Material* nucleus2, G4Material* cytoplasm2,
G4Material* nucleus3, G4Material* cytoplasm3
);
virtual
~MicrobeamCellParameterisation();
virtual ~CellParameterisation();
void ComputeTransformation (const G4int copyNo,G4VPhysicalVolume* physVol) const;
@@ -91,6 +79,10 @@ class MicrobeamCellParameterisation : public G4VPVParameterisation
const G4int,
const G4VPhysicalVolume *) const {}
void ComputeDimensions(G4Ellipsoid &,
const G4int,
const G4VPhysicalVolume *) const {}
void ComputeDimensions(G4Orb &,
const G4int,
const G4VPhysicalVolume *) const {}
@@ -115,7 +107,7 @@ class MicrobeamCellParameterisation : public G4VPVParameterisation
const G4int,
const G4VPhysicalVolume *) const {}
G4int GetNoBoxes() {return NoCellBoxes;}
G4int GetNoBoxes() {return fNoCellBoxes;}
G4Material* ComputeMaterial(const G4int copyNo,
G4VPhysicalVolume* physVol,
@@ -123,29 +115,28 @@ class MicrobeamCellParameterisation : public G4VPVParameterisation
private:
G4int NoCellBoxes;
G4float DimCellBoxX;
G4float DimCellBoxY;
G4float DimCellBoxZ;
G4int fNoCellBoxes;
G4float fDimCellBoxX;
G4float fDimCellBoxY;
G4float fDimCellBoxZ;
G4Material * nucleusMaterial1;
G4Material * cytoplasmMaterial1;
G4Material * nucleusMaterial2;
G4Material * cytoplasmMaterial2;
G4Material * nucleusMaterial3;
G4Material * cytoplasmMaterial3;
G4Material * fNucleusMaterial1;
G4Material * fCytoplasmMaterial1;
G4Material * fNucleusMaterial2;
G4Material * fCytoplasmMaterial2;
G4Material * fNucleusMaterial3;
G4Material * fCytoplasmMaterial3;
G4VisAttributes * nucleusAttributes1;
G4VisAttributes * cytoplasmAttributes1;
G4VisAttributes * nucleusAttributes2;
G4VisAttributes * cytoplasmAttributes2;
G4VisAttributes * nucleusAttributes3;
G4VisAttributes * cytoplasmAttributes3;
G4VisAttributes * fNucleusAttributes1;
G4VisAttributes * fCytoplasmAttributes1;
G4VisAttributes * fNucleusAttributes2;
G4VisAttributes * fCytoplasmAttributes2;
G4VisAttributes * fNucleusAttributes3;
G4VisAttributes * fCytoplasmAttributes3;
// PHANTOM SIZE IN VOXELS
G4ThreeVector *mapCell ; // VOXEL COORDINATES
G4float *material ; // MATERIAL
G4float *mass ; // DENSITY REGION
G4ThreeVector * fMapCell ; // VOXEL COORDINATES
G4float * fMaterial ; // MATERIAL
G4float * fMass ; // DENSITY REGION
};
+226
View File
@@ -0,0 +1,226 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "G4Box.hh"
#include "G4Cons.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4UserLimits.hh"
#include "G4PVParameterised.hh"
#include "PhantomConfiguration.hh"
#include "CellParameterisation.hh"
#include "EMField.hh"
#include "G4EqMagElectricField.hh"
#include "G4PropagatorInField.hh"
#include "G4TransportationManager.hh"
#include "G4ChordFinder.hh"
#include "G4ClassicalRK4.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
DetectorConstruction();
~DetectorConstruction();
G4VPhysicalVolume* Construct();
void ConstructSDandField();
void SetMassNucleus(G4float mN){ fMassNucleus = mN;}
G4float GetMassNucleus(){return fMassNucleus;}
void SetMassCytoplasm(G4float mC){ fMassCytoplasm = mC;}
G4float GetMassCytoplasm(){return fMassCytoplasm;}
void SetNbOfPixelsInPhantom(G4int nP){ fNbOfPixelsInPhantom = nP;}
G4int GetNbOfPixelsInPhantom(){return fNbOfPixelsInPhantom;}
// Returns the logical volumes
G4LogicalVolume* GetLogicalCollDetYoke() {return fLogicYoke2;};
G4LogicalVolume* GetLogicalIsobutane() {return fLogicBoiteIso;};
G4LogicalVolume* GetLogicalCollDetGap4() {return fLogic4Gap;};
G4LogicalVolume* GetLogicalPolyprop() {return fLogicBoite3;};
G4LogicalVolume* GetLogicalKgm() {return fLogicKgm;};
private:
G4float fMassPhantom;
G4float fMassNucleus;
G4float fMassCytoplasm;
G4double fDensityPhantom;
G4double fDensityNucleus;
G4double fDensityCytoplasm;
G4int fNbOfPixelsInPhantom;
G4double fWorldSizeXY;
G4double fWorldSizeZ;
G4double fCollObjSizeXY;
G4double fCollObjSizeZ;
G4double fCiblePositionX;
G4double fCiblePositionY;
G4double fCiblePositionZ;
G4double fLineAngle;
// Materials
G4Material* fDefaultMaterial;
G4Material* fCollimatorMaterial;
G4Material* fBoiteMaterial;
G4Material* fCathodeMaterial;
G4Material* fVerreMaterial;
G4Material* fVerre2Material;
G4Material* fKgmMaterial;
G4Material* fBoite2Material;
G4Material* fBoite3Material;
G4Material* fNucleusMaterial1;
G4Material* fCytoplasmMaterial1;
G4Material* fNucleusMaterial2;
G4Material* fCytoplasmMaterial2;
G4Material* fNucleusMaterial3;
G4Material* fCytoplasmMaterial3;
// Volumes
G4VPhysicalVolume* fPhysiWorld;
G4LogicalVolume* fLogicWorld;
G4Box* fSolidWorld;
G4VPhysicalVolume* fPhysiVol;
G4LogicalVolume* fLogicVol;
G4Box* fSolidVol;
G4VPhysicalVolume* fPhysiBoite;
G4LogicalVolume* fLogicBoite;
G4Box* fSolidBoite;
G4VPhysicalVolume* fPhysiYoke1;
G4LogicalVolume* fLogicYoke1;
G4Box* fSolidYoke1;
G4VPhysicalVolume* fPhysi1Gap;
G4LogicalVolume* fLogic1Gap;
G4Cons* fSolid1Gap;
G4VPhysicalVolume* fPhysi2Gap;
G4LogicalVolume* fLogic2Gap;
G4Cons* fSolid2Gap;
G4VPhysicalVolume* fPhysi3Gap;
G4LogicalVolume* fLogic3Gap;
G4Cons* fSolid3Gap;
G4VPhysicalVolume* fPhysiYoke2;
G4LogicalVolume* fLogicYoke2;
G4Box* fSolidYoke2;
G4VPhysicalVolume* fPhysi4Gap;
G4LogicalVolume* fLogic4Gap;
G4Cons* fSolid4Gap;
G4VPhysicalVolume* fPhysi5Gap;
G4LogicalVolume* fLogic5Gap;
G4Cons* fSolid5Gap;
G4VPhysicalVolume* fPhysiBoiteIso;
G4LogicalVolume* fLogicBoiteIso;
G4Box* fSolidBoiteIso;
G4VPhysicalVolume* fPhysiCathode;
G4LogicalVolume* fLogicCathode;
G4Box* fSolidCathode;
G4VPhysicalVolume* fPhysiIso;
G4LogicalVolume* fLogicIso;
G4Box* fSolidIso;
G4VPhysicalVolume* fPhysiVerre;
G4LogicalVolume* fLogicVerre;
G4Box* fSolidVerre;
G4VPhysicalVolume* fPhysiBoite2;
G4LogicalVolume* fLogicBoite2;
G4Box* fSolidBoite2;
G4VPhysicalVolume* fPhysiBoite3;
G4LogicalVolume* fLogicBoite3;
G4Box* fSolidBoite3;
G4VPhysicalVolume* fPhysiKgm;
G4LogicalVolume* fLogicKgm;
G4Box* fSolidKgm;
G4VPhysicalVolume* fPhysiVerre2;
G4LogicalVolume* fLogicVerre2;
G4Box* fSolidVerre2;
// CELL PHANTOM
G4VPhysicalVolume* fPhysiPhantom;
G4LogicalVolume* fLogicPhantom;
G4Box* fSolidPhantom;
//
PhantomConfiguration fMyPhantomConfiguration;
CellParameterisation* fPhantomParam ;
static G4ThreadLocal EMField * fField;
G4FieldManager * fFieldMgr;
G4MagIntegratorStepper * fStepper;
G4EqMagElectricField * fEquation;
G4MagInt_Driver * fIntgrDriver;
G4ChordFinder * fChordFinder ;
G4PropagatorInField * fPropInField;
//
void DefineMaterials();
G4VPhysicalVolume* ConstructLine();
};
#endif
@@ -23,31 +23,34 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// -------------------------------------------------------------------
// $Id$
// -------------------------------------------------------------------
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamEMField_h
#define MicrobeamEMField_h 1
#ifndef EMField_h
#define EMField_h 1
#include "globals.hh"
#include "G4ElectroMagneticField.hh"
#include "G4FieldManager.hh"
#include "G4TransportationManager.hh"
class MicrobeamEMField
class EMField
#ifndef STANDALONE
: public G4ElectroMagneticField
#endif
{
public:
MicrobeamEMField();
void GetFieldValue( const double Point[4], double *Bfield ) const;
G4bool DoesFieldChangeEnergy() const {return true;}
{
public:
EMField();
void GetFieldValue( const double Point[4], double *Bfield ) const;
G4bool DoesFieldChangeEnergy() const {return true;}
};
#endif
@@ -23,41 +23,38 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// -------------------------------------------------------------------
// $Id$
// -------------------------------------------------------------------
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamEventAction_h
#define MicrobeamEventAction_h 1
#ifndef EventAction_h
#define EventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class MicrobeamRunAction;
class MicrobeamHistoManager;
class G4Event;
class RunAction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class MicrobeamEventAction : public G4UserEventAction
class EventAction : public G4UserEventAction
{
public:
MicrobeamEventAction(MicrobeamRunAction*, MicrobeamHistoManager *);
~MicrobeamEventAction();
EventAction(RunAction*);
~EventAction();
void BeginOfEventAction(const G4Event*);
void EndOfEventAction(const G4Event*);
void SetDrawFlag (G4String val) {drawFlag = val;};
void SetPrintModulo(G4int val) {printModulo = val;};
private:
MicrobeamRunAction* Run;
MicrobeamHistoManager* Histo;
G4String drawFlag;
G4int printModulo;
RunAction* fRun;
};
#endif
@@ -1,209 +0,0 @@
//
// ********************************************************************
// * 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$
// -------------------------------------------------------------------
#ifndef MicrobeamDetectorConstruction_h
#define MicrobeamDetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "G4Box.hh"
#include "G4Cons.hh"
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4PVPlacement.hh"
#include "G4UserLimits.hh"
//#include "G4Ellipsoid.hh"
#include "G4PVParameterised.hh"
#include "G4EqMagElectricField.hh"
#include "G4PropagatorInField.hh"
#include "G4TransportationManager.hh"
#include "G4ChordFinder.hh"
#include "G4ClassicalRK4.hh"
#include "MicrobeamPhantomConfiguration.hh"
#include "MicrobeamCellParameterisation.hh"
#include "MicrobeamEMField.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class MicrobeamDetectorConstruction : public G4VUserDetectorConstruction
{
public:
MicrobeamDetectorConstruction();
~MicrobeamDetectorConstruction();
G4VPhysicalVolume* Construct();
void SetMassNucleus(G4float mN){ massNucleus = mN;}
G4float GetMassNucleus(){return massNucleus;}
void SetMassCytoplasm(G4float mC){ massCytoplasm = mC;}
G4float GetMassCytoplasm(){return massCytoplasm;}
void SetNbOfPixelsInPhantom(G4int nP){ nbOfPixelsInPhantom = nP;}
G4int GetNbOfPixelsInPhantom(){return nbOfPixelsInPhantom;}
private:
G4float massPhantom;
G4float massNucleus;
G4float massCytoplasm;
G4double densityPhantom;
G4double densityNucleus;
G4double densityCytoplasm;
G4int nbOfPixelsInPhantom;
G4double WorldSizeXY;
G4double WorldSizeZ;
G4double CollObjSizeXY;
G4double CollObjSizeZ;
G4double CiblePositionX;
G4double CiblePositionY;
G4double CiblePositionZ;
G4double lineAngle;
// Materials
G4Material* defaultMaterial;
G4Material* collimatorMaterial;
G4Material* BoiteMaterial;
G4Material* CathodeMaterial;
G4Material* VerreMaterial;
G4Material* Verre2Material;
G4Material* KgmMaterial;
G4Material* Boite2Material;
G4Material* Boite3Material;
G4Material* nucleusMaterial1;
G4Material* cytoplasmMaterial1;
G4Material* nucleusMaterial2;
G4Material* cytoplasmMaterial2;
G4Material* nucleusMaterial3;
G4Material* cytoplasmMaterial3;
// Volumes
G4VPhysicalVolume* physiWorld;
G4LogicalVolume* logicWorld;
G4Box* solidWorld;
G4VPhysicalVolume* physiVol;
G4LogicalVolume* logicVol;
G4Box* solidVol;
G4VPhysicalVolume* physiBoite;
G4LogicalVolume* logicBoite;
G4Box* solidBoite;
G4VPhysicalVolume* physiYoke1;
G4LogicalVolume* logicYoke1;
G4Box* solidYoke1;
G4VPhysicalVolume* physi1Gap;
G4LogicalVolume* logic1Gap;
G4Cons* solid1Gap;
G4VPhysicalVolume* physi2Gap;
G4LogicalVolume* logic2Gap;
G4Cons* solid2Gap;
G4VPhysicalVolume* physi3Gap;
G4LogicalVolume* logic3Gap;
G4Cons* solid3Gap;
G4VPhysicalVolume* physiYoke2;
G4LogicalVolume* logicYoke2;
G4Box* solidYoke2;
G4VPhysicalVolume* physi4Gap;
G4LogicalVolume* logic4Gap;
G4Cons* solid4Gap;
G4VPhysicalVolume* physi5Gap;
G4LogicalVolume* logic5Gap;
G4Cons* solid5Gap;
G4VPhysicalVolume* physiBoiteIso;
G4LogicalVolume* logicBoiteIso;
G4Box* solidBoiteIso;
G4VPhysicalVolume* physiCathode;
G4LogicalVolume* logicCathode;
G4Box* solidCathode;
G4VPhysicalVolume* physiIso;
G4LogicalVolume* logicIso;
G4Box* solidIso;
G4VPhysicalVolume* physiVerre;
G4LogicalVolume* logicVerre;
G4Box* solidVerre;
G4VPhysicalVolume* physiBoite2;
G4LogicalVolume* logicBoite2;
G4Box* solidBoite2;
G4VPhysicalVolume* physiBoite3;
G4LogicalVolume* logicBoite3;
G4Box* solidBoite3;
G4VPhysicalVolume* physiKgm;
G4LogicalVolume* logicKgm;
G4Box* solidKgm;
G4VPhysicalVolume* physiVerre2;
G4LogicalVolume* logicVerre2;
G4Box* solidVerre2;
// CELL
G4VPhysicalVolume* physiPhantom;
G4LogicalVolume* logicPhantom;
G4Box* solidPhantom;
MicrobeamPhantomConfiguration myMicrobeamPhantomConfiguration;
MicrobeamCellParameterisation* phantomParam ;
MicrobeamEMField * Field;
void DefineMaterials();
G4VPhysicalVolume* ConstructMicrobeamLine();
G4FieldManager *pFieldMgr;
G4MagIntegratorStepper * pStepper;
G4EqMagElectricField * pEquation;
G4MagInt_Driver * pIntgrDriver;
G4ChordFinder *pChordFinder ;
G4PropagatorInField *propInField;
};
#endif
@@ -1,79 +0,0 @@
//
// ********************************************************************
// * 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$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef MicrobeamHistoManager_h
#define MicrobeamHistoManager_h 1
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
namespace AIDA {
class IAnalysisFactory;
class ITree;
class ITuple;
}
const G4int MaxNtupl = 5;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class MicrobeamHistoManager
{
public:
MicrobeamHistoManager();
~MicrobeamHistoManager();
void book();
void save();
void FillNtuple(G4int id, G4int column, G4double value);
void AddRowNtuple(G4int id);
private:
G4String fileName[2];
G4String fileType;
G4String fileOption;
AIDA::IAnalysisFactory* af;
AIDA::ITree* tree;
AIDA::ITuple* ntupl0; // MicrobeamSteppingAction
AIDA::ITuple* ntupl1; // MicrobeamSteppingAction
AIDA::ITuple* ntupl2; // MicrobeamSteppingAction
AIDA::ITuple* ntupl3; // MicrobeamEventAction
AIDA::ITuple* ntupl4; // MicrobeamRunAction
G4bool factoryOn;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,112 +0,0 @@
//
// ********************************************************************
// * 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$
// -------------------------------------------------------------------
#ifndef MicrobeamRunAction_h
#define MicrobeamRunAction_h 1
#include "G4UserRunAction.hh"
#include "G4ThreeVector.hh"
#include "MicrobeamDetectorConstruction.hh"
#include "MicrobeamHistoManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4Run;
class MicrobeamRunAction : public G4UserRunAction
{
public:
MicrobeamRunAction(MicrobeamDetectorConstruction*, MicrobeamHistoManager*);
~MicrobeamRunAction();
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
void SetRndmFreq(G4int val) {saveRndm = val;}
G4int GetRndmFreq() {return saveRndm;}
void AddDoseN(G4float dose){ DoseN += dose;}
void SetDoseN(G4float dose){ DoseN = dose;}
G4float GetDoseN(){return DoseN;}
void AddDoseC(G4float dose){ DoseC += dose;}
void SetDoseC(G4float dose){ DoseC = dose;}
G4float GetDoseC(){return DoseC;}
G4int GetNumEvent(){return numEvent;}
void SetNumEvent(G4int i){numEvent = i;}
G4int GetNbOfHitsGas(){return nbOfHitsGas;}
void AddNbOfHitsGas(){nbOfHitsGas = nbOfHitsGas+1;}
void SetMassNucleus(G4float mN){ massNucleus = mN;}
G4float GetMassNucleus(){return massNucleus;}
void SetMassCytoplasm(G4float mC){ massCytoplasm = mC;}
G4float GetMassCytoplasm(){return massCytoplasm;}
void AddDoseBox(G4int i, G4float x){ dose3DDose[i] +=x;}
G4float GetDoseBox(G4int i){ return dose3DDose[i];}
G4ThreeVector GetVectCell(G4int i) {return mapVoxels[i];}
private:
MicrobeamDetectorConstruction* Detector;
MicrobeamHistoManager* Histo;
MicrobeamPhantomConfiguration myMicrobeamPhantomConfiguration;
G4int saveRndm;
G4int numEvent;
G4int nbOfPixels;
G4int nbOfHitsGas;
G4float SP;
G4float R;
G4float RnElec;
G4float RcElec;
G4float DoseN;
G4float DoseC;
G4float DoseNElec;
G4float DoseCElec;
G4float massPhantom;
G4float massCytoplasm;
G4float massNucleus;
G4bool boolSP;
G4int * x3DDose;
G4int * y3DDose;
G4int * z3DDose;
G4float * dose3DDose;
G4ThreeVector * mapVoxels;
};
#endif
@@ -23,46 +23,51 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// -------------------------------------------------------------------
// $Id$
// -------------------------------------------------------------------
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamPhantomConfiguration_h
#define MicrobeamPhantomDicomConfiguration_h 1
#ifndef PhantomConfiguration_h
#define PhantomDicomConfiguration_h 1
#include "G4ThreeVector.hh"
class MicrobeamPhantomConfiguration
class PhantomConfiguration
{
public:
MicrobeamPhantomConfiguration();
~MicrobeamPhantomConfiguration();
PhantomConfiguration();
~PhantomConfiguration();
G4int Initialize();
G4int GetPhantomTotalPixels() {return phantomTotalPixels;}
G4int GetNucleusTotalPixels() {return nucleusTotalPixels;}
G4int GetCytoplasmTotalPixels() {return cytoplasmTotalPixels;}
G4float GetPixelSizeX() {return dx;}
G4float GetPixelSizeY() {return dy;}
G4float GetPixelSizeZ() {return dz;}
G4float GetCytoplasmMass() {return cytoplasmMass;}
G4float GetNucleusMass() {return nucleusMass;}
G4int GetPhantomTotalPixels() {return fPhantomTotalPixels;}
G4int GetNucleusTotalPixels() {return fNucleusTotalPixels;}
G4int GetCytoplasmTotalPixels() {return fCytoplasmTotalPixels;}
G4float GetPixelSizeX() {return fDx;}
G4float GetPixelSizeY() {return fDy;}
G4float GetPixelSizeZ() {return fDz;}
G4float GetCytoplasmMass() {return fCytoplasmMass;}
G4float GetNucleusMass() {return fNucleusMass;}
G4ThreeVector GetVoxelThreeVector(G4int i) {return voxelThreeVector[i];}
G4ThreeVector GetVoxelThreeVector(G4int i) {return fVoxelThreeVector[i];}
private:
static G4int phantomTotalPixels;
static G4int nucleusTotalPixels;
static G4int cytoplasmTotalPixels;
static G4float dx;
static G4float dy;
static G4float dz;
static G4float nucleusMass;
static G4float cytoplasmMass;
static G4int fPhantomTotalPixels;
static G4int fNucleusTotalPixels;
static G4int fCytoplasmTotalPixels;
static G4float fDx;
static G4float fDy;
static G4float fDz;
static G4float fNucleusMass;
static G4float fCytoplasmMass;
G4ThreeVector * voxelThreeVector;
G4ThreeVector * fVoxelThreeVector;
};
#endif
@@ -23,26 +23,32 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamPhysicsList_h
#define MicrobeamPhysicsList_h 1
#ifndef PhysicsList_h
#define PhysicsList_h 1
#include "G4VModularPhysicsList.hh"
#include "globals.hh"
class G4VPhysicsConstructor;
class G4StepLimiter;
class MicrobeamPhysicsListMessenger;
class PhysicsListMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class MicrobeamPhysicsList: public G4VModularPhysicsList
class PhysicsList: public G4VModularPhysicsList
{
public:
MicrobeamPhysicsList();
virtual ~MicrobeamPhysicsList();
PhysicsList();
virtual ~PhysicsList();
void ConstructParticle();
@@ -55,21 +61,21 @@ public:
void ConstructProcess();
void AddStepMax();
G4StepLimiter* GetStepMaxProcess() {return stepMaxProcess;};
G4StepLimiter* GetStepMaxProcess() {return fStepMaxProcess;};
private:
G4double cutForGamma;
G4double cutForElectron;
G4double cutForPositron;
G4double fCutForGamma;
G4double fCutForElectron;
G4double fCutForPositron;
G4String emName;
G4VPhysicsConstructor* emPhysicsList;
G4VPhysicsConstructor* decPhysicsList;
G4String fEmName;
G4VPhysicsConstructor* fEmPhysicsList;
G4VPhysicsConstructor* fDecPhysicsList;
G4StepLimiter* stepMaxProcess;
G4StepLimiter* fStepMaxProcess;
MicrobeamPhysicsListMessenger* pMessenger;
PhysicsListMessenger* fMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,43 +23,46 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamPhysicsListMessenger_h
#define MicrobeamPhysicsListMessenger_h 1
#ifndef PhysicsListMessenger_h
#define PhysicsListMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class MicrobeamPhysicsList;
class PhysicsList;
class G4UIdirectory;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class MicrobeamPhysicsListMessenger: public G4UImessenger
class PhysicsListMessenger: public G4UImessenger
{
public:
MicrobeamPhysicsListMessenger(MicrobeamPhysicsList* );
~MicrobeamPhysicsListMessenger();
PhysicsListMessenger(PhysicsList* );
~PhysicsListMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
MicrobeamPhysicsList* pPhysicsList;
PhysicsList* fPhysicsList;
G4UIdirectory* physDir;
G4UIcmdWithADoubleAndUnit* gammaCutCmd;
G4UIcmdWithADoubleAndUnit* electCutCmd;
G4UIcmdWithADoubleAndUnit* protoCutCmd;
G4UIcmdWithADoubleAndUnit* allCutCmd;
G4UIcmdWithAString* pListCmd;
G4UIdirectory* fPhysDir;
G4UIcmdWithADoubleAndUnit* fGammaCutCmd;
G4UIcmdWithADoubleAndUnit* fElectCutCmd;
G4UIcmdWithADoubleAndUnit* fProtoCutCmd;
G4UIcmdWithADoubleAndUnit* fAllCutCmd;
G4UIcmdWithAString* fListCmd;
};
@@ -23,33 +23,35 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// -------------------------------------------------------------------
// $Id$
// -------------------------------------------------------------------
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamPrimaryGeneratorAction_h
#define MicrobeamPrimaryGeneratorAction_h 1
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4ParticleGun.hh"
#include "MicrobeamDetectorConstruction.hh"
class G4Event;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class MicrobeamPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
MicrobeamPrimaryGeneratorAction(MicrobeamDetectorConstruction*);
~MicrobeamPrimaryGeneratorAction();
PrimaryGeneratorAction();
~PrimaryGeneratorAction();
void GeneratePrimaries(G4Event*);
private:
G4ParticleGun* particleGun;
MicrobeamDetectorConstruction* Detector;
G4ParticleGun* fParticleGun;
};
#endif
+115
View File
@@ -0,0 +1,115 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef RunAction_h
#define RunAction_h 1
#include "G4UserRunAction.hh"
//#include "G4ThreeVector.hh"
#include "DetectorConstruction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4Run;
class RunAction : public G4UserRunAction
{
public:
RunAction(DetectorConstruction*);
~RunAction();
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
void SetRndmFreq(G4int val) {fSaveRndm = val;}
G4int GetRndmFreq() {return fSaveRndm;}
void AddDoseN(G4float dose){ fDoseN += dose;}
void SetDoseN(G4float dose){ fDoseN = dose;}
G4float GetDoseN(){return fDoseN;}
void AddDoseC(G4float dose){ fDoseC += dose;}
void SetDoseC(G4float dose){ fDoseC = dose;}
G4float GetDoseC(){return fDoseC;}
G4int GetNumEvent(){return fNumEvent;}
void SetNumEvent(G4int i){fNumEvent = i;}
G4int GetNbOfHitsGas(){return fNbOfHitsGas;}
void AddNbOfHitsGas(){fNbOfHitsGas = fNbOfHitsGas+1;}
void SetMassNucleus(G4float mN){ fMassNucleus = mN;}
G4float GetMassNucleus(){return fMassNucleus;}
void SetMassCytoplasm(G4float mC){ fMassCytoplasm = mC;}
G4float GetMassCytoplasm(){return fMassCytoplasm;}
void AddDoseBox(G4int i, G4float x){ fDose3DDose[i] +=x;}
G4float GetDoseBox(G4int i){ return fDose3DDose[i];}
G4ThreeVector GetVectCell(G4int i) {return fMapVoxels[i];}
private:
DetectorConstruction* fDetector;
PhantomConfiguration fMyPhantomConfiguration;
G4int fSaveRndm;
G4int fNumEvent;
G4int fNbOfPixels;
G4int fNbOfHitsGas;
G4float fSP;
G4float fR;
G4float fRnElec;
G4float fRcElec;
G4float fDoseN;
G4float fDoseC;
G4float fDoseNElec;
G4float fDoseCElec;
G4float fMassPhantom;
G4float fMassCytoplasm;
G4float fMassNucleus;
G4bool fBoolSP;
G4int * fX3DDose;
G4int * fY3DDose;
G4int * fZ3DDose;
G4float * fDose3DDose;
G4ThreeVector * fMapVoxels;
};
#endif
@@ -23,35 +23,37 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// -------------------------------------------------------------------
// $Id$
// -------------------------------------------------------------------
// This example is provided by the Geant4-DNA collaboration
// Any report or published results obtained using the Geant4-DNA software
// shall cite the following Geant4-DNA collaboration publication:
// Med. Phys. 37 (2010) 4692-4708
// The Geant4-DNA web site is available at http://geant4-dna.org
//
// If you use this example, please cite the following publication:
// Rad. Prot. Dos. 133 (2009) 2-11
#ifndef MicrobeamSteppingAction_h
#define MicrobeamSteppingAction_h 1
#ifndef SteppingAction_h
#define SteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "MicrobeamRunAction.hh"
#include "MicrobeamDetectorConstruction.hh"
#include "MicrobeamHistoManager.hh"
#include "RunAction.hh"
#include "DetectorConstruction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class MicrobeamSteppingAction : public G4UserSteppingAction
class SteppingAction : public G4UserSteppingAction
{
public:
MicrobeamSteppingAction(MicrobeamRunAction* ,MicrobeamDetectorConstruction*,
MicrobeamHistoManager *);
~MicrobeamSteppingAction();
SteppingAction(RunAction* ,DetectorConstruction*);
~SteppingAction();
void UserSteppingAction(const G4Step*);
private:
MicrobeamRunAction* Run;
MicrobeamDetectorConstruction* Detector;
MicrobeamHistoManager* Histo;
G4float massPhantom;
RunAction* fRun;
DetectorConstruction* fDetector;
G4float fMassPhantom;
};