Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -0,0 +1,52 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
#ifndef STCyclotronActionInitialization_h
#define STCyclotronActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
#include "STCyclotronDetectorConstruction.hh"
class G4GeneralParticleSource;
class STCyclotronActionInitialization: public G4VUserActionInitialization
{
public:
STCyclotronActionInitialization(STCyclotronDetectorConstruction* det);
virtual ~STCyclotronActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
private:
STCyclotronDetectorConstruction* fDetector;
};
#endif
@@ -0,0 +1,38 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
/// \file STCyclotronAnalysis.hh
/// \brief Selection of the analysis technology
#ifndef STCyclotronAnalysis_h
#define STCyclotronAnalysis_h 1
#include "g4root.hh"
//#include "g4csv.hh"
//#include "g4xml.hh"
#endif
@@ -0,0 +1,188 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
/// file STCyclotronDetectorConstruction.cc
#ifndef STCyclotronDetectorConstruction_h
#define STCyclotronDetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
#include "G4PhysicalConstants.hh"
#include <fstream>
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4Region;
class G4Tubs;
class G4Material;
class STCyclotronDetectorMessenger;
class G4Element;
/// Detector construction class to define materials and geometry.
class STCyclotronDetectorConstruction : public G4VUserDetectorConstruction
{
public:
STCyclotronDetectorConstruction();
~STCyclotronDetectorConstruction();
G4VPhysicalVolume* Construct();
void ConstructSDandField();
void SetTargetDiameter(G4double );
void SetTargetIsotopeName(G4String );
void SetTargetIsotopeZ(G4double );
void SetTargetIsotopeN(G4int );
void SetTargetIsotopeA(G4double );
void SetTargetElementName(G4String );
void SetTargetElementSymbole(G4String );
void SetTargetElementNComponents(G4int );
void SetTargetElementAbundance(G4double );
void SetTargetMaterialDensity(G4double );
void SetTargetMaterialNComponents(G4int );
void SetTargetMaterialFractionMass(G4double );
void SetTargetNaturalElement(G4String );
void SetTargetNaturalMaterialFractionMass(G4double );
G4bool UpdateMaterial();
void SetTargetMaterial(G4String );
void SetFoilIsotopeName(G4String );
void SetFoilIsotopeZ(G4double );
void SetFoilIsotopeN(G4int );
void SetFoilIsotopeA(G4double );
void SetFoilElementName(G4String );
void SetFoilElementSymbole(G4String );
void SetFoilElementNComponents(G4int );
void SetFoilElementAbundance(G4double );
void SetFoilMaterialDensity(G4double );
void SetFoilMaterialNComponents(G4int );
void SetFoilMaterialFractionMass(G4double );
void SetFoilNaturalElement(G4String );
void SetFoilNaturalMaterialFractionMass(G4double );
G4bool UpdateFoilMaterial();
void SetFoilMaterial(G4String );
void SetTargetThickness(G4double );
void SetFoilThickness(G4double );
//Get methods
inline G4double GetTargetPosition1(){return fLayer1_z_position_PART4 + 0.5*11.5 - fTarget_thickness;}
inline G4double GetTargetPosition2(){return fLayer1_z_position_PART4 + 0.5*11.5;}
inline G4double GetVolumeTarget(){return pi*fTarget_diameter*fTarget_diameter/4*fTarget_thickness;}
inline G4double GetFoilPosition1(){return fZ_foil_position - 0.5*fFoil_thickness;}
inline G4double GetTargetVolume(){return fTargetVolume;}
inline G4double GetFoilVolume(){return fFoilVolume;}
inline G4double GetFoilThickness(){return fFoil_thickness;}
inline G4double GetTargetThickness(){return fTarget_thickness;}
inline G4double GetTargetDiameter(){return fTarget_diameter;}
private:
STCyclotronDetectorMessenger* fDetectorMessenger;
//Messenger parameters
G4double fTarget_diameter;
std::vector<G4String> fIsotopeName;
std::vector<G4double> fIsotopeZ;
std::vector<G4int> fIsotopeN;
std::vector<G4double> fIsotopeA;
std::vector<G4String> fElementName;
std::vector<G4String> fElementSymbole;
std::vector<G4int> fElementNComponents;
std::vector<G4double> fElementAbundance;
std::vector<G4String> fNaturalElementName;
std::vector<G4double> fNaturalMaterialFractionMass;
G4double fDensity_target;
G4int fTarget_NComponents;
std::vector<G4double> fMaterialFractionMass;
std::vector<G4String> fIsotopeNameFoil;
std::vector<G4double> fIsotopeZFoil;
std::vector<G4int> fIsotopeNFoil;
std::vector<G4double> fIsotopeAFoil;
std::vector<G4String> fElementNameFoil;
std::vector<G4String> fElementSymboleFoil;
std::vector<G4int> fElementNComponentsFoil;
std::vector<G4double> fElementAbundanceFoil;
std::vector<G4String> fNaturalElementNameFoil;
std::vector<G4double> fNaturalMaterialFractionMassFoil;
G4double fDensity_foil;
G4int fFoil_NComponents;
std::vector<G4double> fMaterialFractionMassFoil;
G4double fTarget_thickness;
G4double fFoil_thickness;
//Parameters that are used/modified in the set methods
//When modifying the target parameters
//Material
G4Material* fTarget_Material;
G4Material* fFoil_Material;
//Foil
G4double fZ_foil_position;
G4Tubs* fSolidFoil;
G4LogicalVolume* fLogicFoil;
G4VPhysicalVolume* fPhysFoil;
//WORLD
G4LogicalVolume* fLogicWorld;
//PART 3
G4double fLayer_z_position_PART3;
G4VPhysicalVolume* fPhysLayer_PART3;
G4VPhysicalVolume* fPhysTube_PART3;
//PART 4
G4double fTube_outerRadius_PART4;
G4double fTube_length_PART4;
G4double fLayer_z_position_PART4;
G4VPhysicalVolume* fPhysTube_PART4;
G4VPhysicalVolume* fPhysLayer_PART4;
G4double fLayer1_z_position_PART4;
G4VPhysicalVolume* fPhysLayer1_PART4;
//Target
G4LogicalVolume* fLogicTarget;
G4double fTarget_z_position;
G4Tubs* fSolidTarget;
G4VPhysicalVolume* fPhysTarget;
//PART 5
G4double fLayer1_z_position_PART5;
G4VPhysicalVolume* fPhysLayer1_PART5;
G4double fLayer2_z_position_PART5;
G4VPhysicalVolume* fPhysLayer2_PART5;
G4double fLayer3_z_position_PART5;
G4VPhysicalVolume* fPhysLayer3_PART5;
G4Region* fRegionTarget;
G4Region* fRegionFoil;
G4double fTargetVolume;
G4double fFoilVolume;
std::ofstream fParametersSummary;
};
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
// file STCyclotronDetectorMessenger.hh
//
#ifndef STCyclotronDetectorMessenger_h
#define STCyclotronDetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class STCyclotronDetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
class G4UIcmdWithADouble;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmd;
class STCyclotronDetectorMessenger: public G4UImessenger
{
public:
STCyclotronDetectorMessenger(STCyclotronDetectorConstruction* );
~STCyclotronDetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
// Pointer to the phantom/detector
STCyclotronDetectorConstruction* fDet;
G4UIdirectory *fChangeTarget, *fChangeTargetMaterial, *fChangeFoil, *fChangeFoilMaterial;
G4UIcmdWithoutParameter *fUpdateMaterial, *fUpdateFoilMaterial;
G4UIcmdWithAnInteger *fTargetIsotopeN, *fTargetElementNComponents,*fTargetMaterialNComponents, *fFoilIsotopeN, *fFoilElementNComponents, *fFoilMaterialNComponents;
G4UIcmdWithADouble *fTargetIsotopeZ, *fTargetIsotopeA, *fTargetElementAbundance, *fTargetMaterialFractionMass, *fTargetMaterialNaturalElementFractionMass, *fFoilIsotopeZ, *fFoilIsotopeA, *fFoilElementAbundance, *fFoilMaterialFractionMass, *fFoilMaterialNaturalElementFractionMass, *fChangeTargetMaterialDensityCmd, *fChangeFoilMaterialDensityCmd;
G4UIcmdWithADoubleAndUnit *fChangeTargetThicknessCmd, *fChangeFoilThicknessCmd, *fChangeTargetDiameterCmd;
G4UIcmdWithAString *fChangeTargetMaterialCmd, *fTargetIsotopeName, *fTargetElementName, *fTargetElementSymbole, *fTargetMaterialNaturalElement, *fFoilIsotopeName, *fFoilElementName, *fFoilElementSymbole, *fFoilMaterialNaturalElement, *fChangeFoilMaterialCmd;
};
#endif
@@ -0,0 +1,92 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
#ifndef STCyclotronPhysicsList_h
#define STCyclotronPhysicsList_h 1
#include "STCyclotronDetectorConstruction.hh"
#include "G4VModularPhysicsList.hh"
#include "globals.hh"
#include <vector>
class G4PhysicsConstructor;
class STCyclotronDetectorConstruction;
class STCyclotronPhysicsList: public G4VModularPhysicsList
{
public:
STCyclotronPhysicsList(STCyclotronDetectorConstruction* det);
virtual ~STCyclotronPhysicsList();
void ConstructParticle();
void ConstructProcess();
void SetCuts();
void SetCutForGamma(G4double);
void SetCutForElectron(G4double);
void SetCutForPositron(G4double);
void SetCutFoil(G4double cutProton, G4double cutElectron, G4double cutPositron, G4double cutGamma, G4double cutNeutron);
void SetCutTarget(G4double cutProton, G4double cutElectron, G4double cutPositron, G4double cutGamma, G4double cutNeutron);
private:
G4String fEmName;
G4VPhysicsConstructor* fEmPhysicsList;
G4VPhysicsConstructor* fDecPhysicsList;
G4VPhysicsConstructor* fHadPhysicsList;
G4VPhysicsConstructor* fRaddecayList;
G4double fThickness_target;
G4double fThickness_foil;
G4double fCutForGamma;
G4double fCutForElectron;
G4double fCutForPositron;
G4double fCutTargetProton;
G4double fCutTargetElectron;
G4double fCutTargetPositron;
G4double fCutTargetGamma;
G4double fCutTargetNeutron;
G4double fCutFoilProton;
G4double fCutFoilElectron;
G4double fCutFoilPositron;
G4double fCutFoilGamma;
G4double fCutFoilNeutron;
STCyclotronDetectorConstruction* fDetector;
};
#endif
@@ -0,0 +1,61 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
// file STCyclotronPrimaryGeneratorAction.hh
//
#ifndef STCyclotronPrimaryGeneratorAction_h
#define STCyclotronPrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4ThreeVector.hh"
#include "globals.hh"
#include "STCyclotronPrimaryGeneratorActionMessenger.hh"
#include "STCyclotronDetectorConstruction.hh"
class G4GeneralParticleSource;
class G4Event;
class STCyclotronPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
STCyclotronPrimaryGeneratorAction();
virtual ~STCyclotronPrimaryGeneratorAction();
// methods
virtual void GeneratePrimaries(G4Event*);
virtual void SetBeamCurrent(G4double );
G4GeneralParticleSource* GetParticleGun(){return fParticleBeam;};
G4double GetBeamCurrent(){return fBeamCurrent;};
private:
// data members
G4GeneralParticleSource* fParticleBeam;
G4double fBeamCurrent;
STCyclotronPrimaryGeneratorActionMessenger* fMessenger;
};
#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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
#ifndef STCyclotronPrimaryGeneratorActionMessenger_h
#define STCyclotronPrimaryGeneratorActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class STCyclotronPrimaryGeneratorAction;
class G4UIdirectory;
class G4UIcmdWithADouble;
class STCyclotronPrimaryGeneratorActionMessenger: public G4UImessenger
{
public:
STCyclotronPrimaryGeneratorActionMessenger(STCyclotronPrimaryGeneratorAction*);
~STCyclotronPrimaryGeneratorActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
STCyclotronPrimaryGeneratorAction* fG4Primary;
G4UIdirectory *fBeamCurrent;
G4UIcmdWithADouble *fChangeBeamCurrentCmd;
};
#endif
+142
View File
@@ -0,0 +1,142 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
// file STCyclotronRun.hh
#ifndef STCyclotronRun_h
#define STCyclotronRun_h 1
#include "G4Run.hh"
#include "globals.hh"
#include <map>
#include <fstream>
/// Run class
///
/// In RecordEvent() there is collected information event per event
/// from Hits Collections, and accumulated statistic for the run
class STCyclotronRun : public G4Run
{
public:
STCyclotronRun();
virtual ~STCyclotronRun();
virtual void Merge(const G4Run*);
virtual void EndOfRun(G4double);
public:
//Accumulation functions
void EnergyDepositionTarget(G4double);
void EnergyDepositionFoil(G4double);
void CountParticlesTarget();
//Setting functions
//parameters for the geometry
//---> Target
void SetTargetVolume(G4double);
void SetTargetDiameter(G4double);
void SetTargetThickness(G4double);
//--->Foil
void SetFoilVolume(G4double);
void SetFoilThickness(G4double);
//parameters for the beam
void SetIrradiationTime(G4double);
void SetBeamName(G4String);
void SetBeamEnergy(G4double);
void SetBeamCurrent(G4double);
//parameters of the run
void SetPrimariesPerEvent(G4int);
void SetTimePerEvent(G4double);
void StoreIsotopeID(G4int, G4String);
std::map<G4int, G4String> GetIsotopeID();
void ParticleParent(G4String,G4String);
//Acumulation functions for maps
//---->Accumulation of isotopes
void PrimaryIsotopeCountTarget(G4String, G4double);
void CountStableIsotopes(G4String);
void DecayIsotopeCountTarget(G4String, G4String, G4double);
//---->Accumulation of other particles
void ParticleCountTarget(G4String);
private:
//Accumulable variables
G4double fTotalEnergyDepositTarget;
G4double fTotalEnergyDepositFoil;
G4int fParticleTarget;
//Store Isotopes created inside maps during the run
std::map<G4String,G4int> fPrimaryIsotopeCountTarget;
std::map<G4String,G4double> fPrimaryIsotopeTimeTarget;
std::map<G4String,G4int> fParticleCountTarget;
std::map<G4String,G4double> fDecayIsotopeTimeTarget;
std::map<G4String,G4String> fDecayIsotopeCountTarget;
std::map<G4String,G4String> fParticleParent;
std::map<G4String,G4int> fStableIsotopeCountTarget;
std::map<G4String,G4String> fStableIsotopeMumTarget;
//Stored and used during the run
std::map<G4int,G4String> fIsotopeIDTarget;
//Parameters that may be modified via messenger classes
//--> geometry
G4double fTargetThickness;
G4double fTargetDiameter;
G4double fFoilThickness;
G4double fTargetVolume;
G4double fFoilVolume;
//---> run
G4int fPrimariesPerEvent;
G4double fTimePerEvent;
//--> beam
G4String fBeamName;
G4double fBeamCurrent;
G4double fBeamEnergy;
//Write output in ASCII
std::ofstream fOutPut;
std::ofstream fOutPut1;
std::ofstream fOutPut2;
std::ofstream fOutPut3;
std::ofstream fOutPut4;
};
#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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
// file STCyclotronRunAction.hh
//
#ifndef STCyclotronRunAction_h
#define STCyclotronRunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
#include "STCyclotronRunActionMessenger.hh"
#include "STCyclotronDetectorConstruction.hh"
#include "STCyclotronRun.hh"
class G4Run;
class STCyclotronRun;
class STCyclotronDetectorConstruction;
class STCyclotronRunAction : public G4UserRunAction
{
public:
STCyclotronRunAction(STCyclotronDetectorConstruction*);
virtual ~STCyclotronRunAction();
virtual void BeginOfRunAction(const G4Run*);
virtual void EndOfRunAction(const G4Run*);
virtual G4Run* GenerateRun();
void SetIrradiationTime(G4double);
private:
STCyclotronRun* fRun;
STCyclotronRunActionMessenger* fMessenger;
//position beginning/end of the target
//along the z axis (= beam axis)
G4double fIn,fOut;
//Parameters
G4double fIrradiationTime;
};
#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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
#ifndef STCyclotronRunActionMessenger_h
#define STCyclotronRunActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class STCyclotronRunAction;
class G4UIdirectory;
class G4UIcmdWithADouble;
class STCyclotronRunActionMessenger: public G4UImessenger
{
public:
STCyclotronRunActionMessenger(STCyclotronRunAction* );
~STCyclotronRunActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
// Pointer to the phantom/detector
STCyclotronRunAction* fG4Run;
G4UIdirectory *fIrradiationTime;
G4UIcmdWithADouble *fChangeIrradiationTimeCmd;
};
#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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
// file STCyclotronSensitiveFoil.hh
//
#ifndef STCyclotronSensitiveFoil_h
#define STCyclotronSensitiveFoil_h 1
#include "G4VSensitiveDetector.hh"
#include "STCyclotronDetectorConstruction.hh"
#include <vector>
class G4Step;
class G4HCofThisEvent;
class STCyclotronRun;
class STCyclotronSensitiveFoil : public G4VSensitiveDetector
{
public:
STCyclotronSensitiveFoil(const G4String& name,
STCyclotronDetectorConstruction* det);
virtual ~STCyclotronSensitiveFoil();
//methods from base class
virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory* history);
private:
STCyclotronDetectorConstruction* fDet;
STCyclotronRun* fRun;
G4int fTempTrack;
G4int fTempTrack1;
G4ThreeVector fTempVector;
G4double fTempEnergy;
};
#endif
@@ -0,0 +1,59 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Author: F. Poignant, floriane.poignant@gmail.com
//
// file STCyclotronSensitiveTarget.hh
#ifndef STCyclotronSensitiveTarget_h
#define STCyclotronSensitiveTarget_h 1
#include "G4VSensitiveDetector.hh"
#include <vector>
#include "STCyclotronDetectorConstruction.hh"
class G4Step;
class G4HCofThisEvent;
class G4Track;
class STCyclotronSensitiveTarget : public G4VSensitiveDetector
{
public:
STCyclotronSensitiveTarget(G4String, STCyclotronDetectorConstruction*);
virtual ~STCyclotronSensitiveTarget();
//methods from base class
virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory* history);
private:
STCyclotronDetectorConstruction* fDet;
G4int fTempTrack;
G4int fTempTrack1;
G4ThreeVector fTempVector;
G4double fTempEnergy;
G4Track* fTrack;
};
#endif