Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: Analysis.hh,v 1.1 2007/11/16 14:29:32 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
//
|
||||
// ====================================================================
|
||||
// Analysis.hh
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#ifndef ANALYSIS_MANAGER_H
|
||||
#define ANALYSIS_MANAGER_H
|
||||
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
class TH1D;
|
||||
class TH2D;
|
||||
|
||||
class Analysis {
|
||||
private:
|
||||
static Analysis* myanalysis;
|
||||
|
||||
TH2D* incident_map;
|
||||
TH1D* incident_x_hist;
|
||||
|
||||
TH2D* dose_map;
|
||||
TH1D* dose_hist;
|
||||
|
||||
Analysis(); // protected
|
||||
|
||||
G4bool incidentFlag;
|
||||
|
||||
public:
|
||||
~Analysis();
|
||||
|
||||
static Analysis* GetAnalysis();
|
||||
|
||||
void Update();
|
||||
void Clear();
|
||||
void Save(const G4String& fname);
|
||||
|
||||
void FillIncident(const G4ThreeVector& p);
|
||||
void FillDose(const G4ThreeVector& p, G4double dedx);
|
||||
|
||||
void ClearIncidentFlag();
|
||||
|
||||
};
|
||||
|
||||
// ====================================================================
|
||||
// inline functions
|
||||
// ====================================================================
|
||||
|
||||
inline void Analysis::ClearIncidentFlag()
|
||||
{ incidentFlag= false; }
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: DetectorConstruction.hh,v 1.1 2007/11/16 14:29:32 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
//
|
||||
// ====================================================================
|
||||
// DetectorConstruction.hh
|
||||
//
|
||||
// Q
|
||||
// ====================================================================
|
||||
#ifndef DETECTOR_CONSTRUCTION_H
|
||||
#define DETECTOR_CONSTRUCTION_H
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction {
|
||||
|
||||
public:
|
||||
DetectorConstruction();
|
||||
~DetectorConstruction();
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: EventAction.hh,v 1.2 2007/12/10 16:28:34 gunter Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// EventAction.hh
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#ifndef EVENT_ACTION_H
|
||||
#define EVENT_ACTION_H
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
class EventAction : public G4UserEventAction {
|
||||
|
||||
public:
|
||||
EventAction();
|
||||
~EventAction();
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event* aevent);
|
||||
virtual void EndOfEventAction(const G4Event* aevent);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,145 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: MedicalBeam.hh,v 1.1 2007/11/16 14:29:33 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// MedicalBeam.hh
|
||||
//
|
||||
// 2005 Q
|
||||
// ====================================================================
|
||||
#ifndef MEDICAL_BEAM_H
|
||||
#define MEDICAL_BEAM_H
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
class G4ParticleDefinition;
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
class MedicalBeam : public G4VUserPrimaryGeneratorAction {
|
||||
public:
|
||||
enum FieldShape{ SQUARE=0, CIRCLE };
|
||||
|
||||
protected:
|
||||
G4ParticleDefinition* particle;
|
||||
G4double kineticE;
|
||||
G4ThreeVector sourcePosition;
|
||||
|
||||
G4double SSD; // (SSD= Source Skin Depth)
|
||||
FieldShape fieldShape;
|
||||
G4double fieldXY[2];
|
||||
G4double fieldR;
|
||||
|
||||
// local methods...
|
||||
G4ThreeVector GenerateBeamDirection() const;
|
||||
|
||||
public:
|
||||
MedicalBeam();
|
||||
~MedicalBeam();
|
||||
|
||||
// set/get functions...
|
||||
void SetParticleDefinition(G4ParticleDefinition* pd);
|
||||
const G4ParticleDefinition* GetParticleDefinition() const;
|
||||
|
||||
void SetKineticE(G4double e);
|
||||
G4double GetKineticE() const;
|
||||
|
||||
void SetSourcePosition(const G4ThreeVector& pos);
|
||||
G4ThreeVector GetSourcePosition() const;
|
||||
|
||||
void SetFieldShape(FieldShape shape);
|
||||
FieldShape GetFieldShape() const;
|
||||
|
||||
void SetSSD(G4double ssd);
|
||||
G4double GetSSD() const;
|
||||
|
||||
void SetFieldXY(G4double fx, G4double fy);
|
||||
G4double GetFieldX() const;
|
||||
G4double GetFieldY() const;
|
||||
|
||||
void SetFieldR(G4double r);
|
||||
G4double GetFieldR() const;
|
||||
|
||||
// methods...
|
||||
virtual void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
};
|
||||
|
||||
// ====================================================================
|
||||
// inline functions
|
||||
// ====================================================================
|
||||
inline void MedicalBeam::SetParticleDefinition(G4ParticleDefinition* pd)
|
||||
{ particle= pd; }
|
||||
|
||||
inline const G4ParticleDefinition* MedicalBeam::GetParticleDefinition() const
|
||||
{ return particle; }
|
||||
|
||||
inline void MedicalBeam::SetKineticE(G4double e)
|
||||
{ kineticE= e; }
|
||||
|
||||
inline G4double MedicalBeam::GetKineticE() const
|
||||
{ return kineticE; }
|
||||
|
||||
inline void MedicalBeam::SetSourcePosition(const G4ThreeVector& pos)
|
||||
{ sourcePosition= pos; }
|
||||
|
||||
inline G4ThreeVector MedicalBeam::GetSourcePosition() const
|
||||
{ return sourcePosition; }
|
||||
|
||||
inline void MedicalBeam::SetFieldShape(MedicalBeam::FieldShape shape)
|
||||
{ fieldShape= shape; }
|
||||
|
||||
inline MedicalBeam::FieldShape MedicalBeam::GetFieldShape() const
|
||||
{ return fieldShape; }
|
||||
|
||||
inline void MedicalBeam::SetSSD(G4double ssd)
|
||||
{ SSD= ssd; }
|
||||
|
||||
inline G4double MedicalBeam::GetSSD() const
|
||||
{ return SSD; }
|
||||
|
||||
inline void MedicalBeam::SetFieldXY(G4double fx, G4double fy)
|
||||
{ fieldXY[0]= fx; fieldXY[1]= fy; }
|
||||
|
||||
inline G4double MedicalBeam::GetFieldX() const
|
||||
{ return fieldXY[0]; }
|
||||
|
||||
inline G4double MedicalBeam::GetFieldY() const
|
||||
{ return fieldXY[1]; }
|
||||
|
||||
inline void MedicalBeam::SetFieldR(G4double r)
|
||||
{ fieldR= r; }
|
||||
|
||||
inline G4double MedicalBeam::GetFieldR() const
|
||||
{ return fieldR; }
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: RunAction.hh,v 1.2 2007/12/10 16:28:39 gunter Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// RunAction.hh
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#ifndef RUN_ACTION_H
|
||||
#define RUN_ACTION_H
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
class RunAction : public G4UserRunAction {
|
||||
|
||||
public:
|
||||
RunAction();
|
||||
~RunAction();
|
||||
|
||||
virtual void BeginOfRunAction(const G4Run* arun);
|
||||
virtual void EndOfRunAction(const G4Run* arun);
|
||||
|
||||
};
|
||||
|
||||
#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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: VoxelParam.hh,v 1.1 2007/11/16 14:29:33 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
//
|
||||
// ====================================================================
|
||||
// VoxelParam.hh
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#ifndef VOXEL_PARAM_H
|
||||
#define VOXEL_PARAM_H
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
class VoxelParam : public G4VPVParameterisation {
|
||||
|
||||
public:
|
||||
VoxelParam();
|
||||
~VoxelParam();
|
||||
|
||||
virtual void ComputeTransformation(const G4int id,
|
||||
G4VPhysicalVolume* vol) const;
|
||||
|
||||
virtual void ComputeDimensions(G4Box& box, const G4int id,
|
||||
const G4VPhysicalVolume* vol) const;
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Trd&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Trap&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Cons&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Sphere&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Orb&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Torus&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Para&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Hype&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Tubs&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Polycone&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
virtual void ComputeDimensions
|
||||
(G4Polyhedra&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
|
||||
};
|
||||
|
||||
#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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: VoxelSD.hh,v 1.1 2007/11/16 14:29:33 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
//
|
||||
// ====================================================================
|
||||
// VoxelSD.hh
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#ifndef VOXEL_SD_H
|
||||
#define VOXEL_SD_H
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
class VoxelSD : public G4VSensitiveDetector {
|
||||
|
||||
public:
|
||||
VoxelSD(const G4String& name);
|
||||
~VoxelSD();
|
||||
|
||||
// virtual methods
|
||||
virtual G4bool ProcessHits(G4Step* astep, G4TouchableHistory* rohist);
|
||||
virtual void Initialize(G4HCofThisEvent* HCTE);
|
||||
virtual void EndOfEvent(G4HCofThisEvent* HCTE);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user