Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4EmPenelopePhysicsMI.cc 109526 2018-04-30 07:11:52Z gcosmo $
|
||||
// customized by gpaterno for MI in Rayleigh Scattering, March 2019
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4EmPenelopePhysicsMI_h
|
||||
#define G4EmPenelopePhysicsMI_h 1
|
||||
|
||||
#include "G4VPhysicsConstructor.hh"
|
||||
#include "G4EmParticleList.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4EmPenelopePhysicsMI : public G4VPhysicsConstructor
|
||||
{
|
||||
public:
|
||||
explicit G4EmPenelopePhysicsMI(G4int ver=1, const G4String& name="",
|
||||
G4bool useMI=true);
|
||||
|
||||
virtual ~G4EmPenelopePhysicsMI();
|
||||
|
||||
virtual void ConstructParticle();
|
||||
virtual void ConstructProcess();
|
||||
|
||||
private:
|
||||
G4int fVerbose;
|
||||
G4EmParticleList fPartList;
|
||||
G4bool fUseMIFlag;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSActionInitialization.hh
|
||||
/// \brief Definition of the SAXSActionInitialization class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSActionInitialization_h
|
||||
#define SAXSActionInitialization_h 1
|
||||
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
#include "G4GeneralParticleSource.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// Action initialization class.
|
||||
|
||||
class SAXSActionInitialization : public G4VUserActionInitialization {
|
||||
public:
|
||||
SAXSActionInitialization();
|
||||
~SAXSActionInitialization();
|
||||
|
||||
private:
|
||||
virtual void Build() const;
|
||||
virtual void BuildForMaster() const;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSAnalysis.hh
|
||||
/// \brief Implementation of the SAXSAnalysis class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSAnalysis_h
|
||||
#define SAXSAnalysis_h 1
|
||||
|
||||
#include "g4root.hh"
|
||||
//#include "g4xml.hh"
|
||||
//#include "g4csv.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,269 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSDetectorConstruction.hh
|
||||
/// \brief Implementation of the SAXSDetectorConstruction class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSDetectorConstruction_h
|
||||
#define SAXSDetectorConstruction_h 1
|
||||
#endif
|
||||
|
||||
#include "SAXSDetectorConstructionMessenger.hh"
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4ExtendedMaterial.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// Detector construction.
|
||||
|
||||
class SAXSDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
SAXSDetectorConstruction();
|
||||
~SAXSDetectorConstruction();
|
||||
|
||||
void DefineMaterials();
|
||||
void SetGeometricalVariables();
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
|
||||
G4LogicalVolume* GetSensitiveVolume() const {return fSensitiveVolume;}
|
||||
G4LogicalVolume* GetPhantom() const {return fPhantomLogic;}
|
||||
|
||||
protected:
|
||||
G4LogicalVolume* fSensitiveVolume;
|
||||
|
||||
private:
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
SAXSDetectorConstructionMessenger* fMessenger;
|
||||
|
||||
G4bool fIWantSlits;
|
||||
|
||||
//-----------------definition of Volumes-------------------
|
||||
//World
|
||||
G4Box* fWorldSolid;
|
||||
G4LogicalVolume* fWorldLogic;
|
||||
G4VPhysicalVolume* fWorldPhysical;
|
||||
|
||||
//Phantom
|
||||
G4LogicalVolume* fPhantomLogic;
|
||||
G4VPhysicalVolume* fPhantomPhysical;
|
||||
G4Material* fPhantomMaterial;
|
||||
G4int fPhantomMaterialIndex;
|
||||
|
||||
//Slits
|
||||
G4LogicalVolume* fSlit1Logic;
|
||||
G4LogicalVolume* fSlit2Logic;
|
||||
G4LogicalVolume* fSlit3Logic;
|
||||
G4LogicalVolume* fSlit4Logic;
|
||||
G4VPhysicalVolume* fSlit1Physical;
|
||||
G4VPhysicalVolume* fSlit2Physical;
|
||||
G4VPhysicalVolume* fSlit3Physical;
|
||||
G4VPhysicalVolume* fSlit4Physical;
|
||||
|
||||
//Detector
|
||||
G4LogicalVolume* fDetectorLogic;
|
||||
G4VPhysicalVolume* fDetectorPhysical;
|
||||
|
||||
//Shielding
|
||||
G4LogicalVolume* fShieldingLogic;
|
||||
G4VPhysicalVolume* fShieldingPhysical;
|
||||
G4LogicalVolume* fShieldingBackLogic;
|
||||
G4VPhysicalVolume* fShieldingBackPhysical;
|
||||
|
||||
//--------------------definition of Materials--------------
|
||||
//materials for MIFF study
|
||||
G4Material* fFat;
|
||||
G4Material* fWater;
|
||||
G4Material* fBoneMatrix;
|
||||
G4Material* fMineral;
|
||||
G4Material* fMedMat;
|
||||
G4Material* fPMMA;
|
||||
G4Material* fAdipose;
|
||||
G4Material* fGlandular;
|
||||
G4Material* fBreast5050;
|
||||
G4Material* fcarcinoma;
|
||||
G4Material* fLexan;
|
||||
G4Material* fKapton;
|
||||
G4Material* fNylon;
|
||||
G4Material* fPolyethylene;
|
||||
G4Material* fPolystyrene;
|
||||
G4Material* fGrayMatter;
|
||||
G4Material* fWhiteMatter;
|
||||
G4Material* fbeefBlood;
|
||||
G4Material* fFormaline;
|
||||
G4Material* fAcetone;
|
||||
G4Material* fHperoxide;
|
||||
G4Material* fCIRS3070;
|
||||
G4Material* fCIRS5050;
|
||||
G4Material* fCIRS7030;
|
||||
G4Material* fRMI454;
|
||||
G4Material* fBone;
|
||||
G4Material* ffatLowX;
|
||||
G4Material* fbonematrixLowX;
|
||||
G4Material* fdryBoneLowX;
|
||||
G4Material* fliver;
|
||||
G4Material* fkidney;
|
||||
|
||||
//custom material
|
||||
G4ExtendedMaterial* fCustomMat;
|
||||
G4double fCustomMatDensity;
|
||||
G4double fCustomMatHmassfract;
|
||||
G4double fCustomMatCmassfract;
|
||||
G4double fCustomMatNmassfract;
|
||||
G4double fCustomMatOmassfract;
|
||||
G4double fCustomMatNamassfract;
|
||||
G4double fCustomMatPmassfract;
|
||||
G4double fCustomMatSmassfract;
|
||||
G4double fCustomMatClmassfract;
|
||||
G4double fCustomMatKmassfract;
|
||||
G4double fCustomMatCamassfract;
|
||||
G4String fCustomMatFF;
|
||||
|
||||
//definitions of variables for MedMat composition
|
||||
G4double fComp0,fComp1,fComp2,fComp3;
|
||||
|
||||
//other materials
|
||||
G4Material* fAir;
|
||||
G4Material* fTungsten;
|
||||
G4Material* fLead;
|
||||
G4Material* fGe;
|
||||
|
||||
//-------------definition of Geometrical Variables---------
|
||||
//World
|
||||
G4double fWorldSize;
|
||||
|
||||
//Phantom
|
||||
G4double fPhantomDiameter;
|
||||
G4double fPhantomHeight;
|
||||
G4double fPhantomZ;
|
||||
|
||||
//setup angle (rad)
|
||||
G4double fthetaSetup;
|
||||
|
||||
//Slits
|
||||
G4double fSlitSize;
|
||||
G4double fSlit1Thickness;
|
||||
G4double fSlit2Thickness;
|
||||
G4double fSlit3Thickness;
|
||||
G4double fSlit4Thickness;
|
||||
G4double fSlit1SampleDistance; //center-center
|
||||
G4double fSlit2SampleDistance;
|
||||
G4double fSlit3SampleDistance;
|
||||
G4double fSlit4SampleDistance;
|
||||
G4double fSlit1xAperture;
|
||||
G4double fSlit2xAperture;
|
||||
G4double fSlit3xAperture;
|
||||
G4double fSlit4xAperture;
|
||||
G4double fSlit1yAperture;
|
||||
G4double fSlit2yAperture;
|
||||
G4double fSlit3yAperture;
|
||||
G4double fSlit4yAperture;
|
||||
|
||||
//Detector
|
||||
G4double fDetectorThickness;
|
||||
G4double fDetectorSize;
|
||||
G4double fDetectorSampleDistance; //center-center
|
||||
|
||||
//Shielding
|
||||
G4double fShieldingThickness;
|
||||
|
||||
//-------------set methods for the messenger---------------
|
||||
public:
|
||||
void SetCustomMatFF(const G4String& ffname) {fCustomMatFF = ffname;}
|
||||
|
||||
void SetCustomMatDensity(G4double csd) {fCustomMatDensity = csd;}
|
||||
void SetCustomMatHmassfract(G4double csHmf) {fCustomMatHmassfract = csHmf;}
|
||||
void SetCustomMatCmassfract(G4double csCmf) {fCustomMatCmassfract = csCmf;}
|
||||
void SetCustomMatNmassfract(G4double csNmf) {fCustomMatNmassfract = csNmf;}
|
||||
void SetCustomMatOmassfract(G4double csOmf) {fCustomMatOmassfract = csOmf;}
|
||||
void SetCustomMatNamassfract(G4double csNamf) {fCustomMatNamassfract = csNamf;}
|
||||
void SetCustomMatPmassfract(G4double csPmf) {fCustomMatPmassfract = csPmf;}
|
||||
void SetCustomMatSmassfract(G4double csSmf) {fCustomMatSmassfract = csSmf;}
|
||||
void SetCustomMatClmassfract(G4double csClmf) {fCustomMatClmassfract = csClmf;}
|
||||
void SetCustomMatKmassfract(G4double csKmf) {fCustomMatKmassfract = csKmf;}
|
||||
void SetCustomMatCamassfract(G4double csCamf) {fCustomMatCamassfract = csCamf;}
|
||||
|
||||
void SetPhantomMaterial(G4int mat) {fPhantomMaterialIndex = mat;}
|
||||
|
||||
void SetPhantomDiameter(G4double diam) {fPhantomDiameter = diam;}
|
||||
void SetPhantomHeight(G4double ht) {fPhantomHeight = ht;}
|
||||
void SetPhantomZ(G4double PhZ) {fPhantomZ = PhZ;}
|
||||
|
||||
void SetComp0(G4double c0) {fComp0 = c0;}
|
||||
void SetComp1(G4double c1) {fComp1 = c1;}
|
||||
void SetComp2(G4double c2) {fComp2 = c2;}
|
||||
void SetComp3(G4double c3) {fComp3 = c3;}
|
||||
|
||||
void SetThetaSetup(G4double theta) {fthetaSetup = theta;}
|
||||
|
||||
void SetSlits(G4bool bslits) {fIWantSlits = bslits;}
|
||||
void SetSlit1Thickness(G4double sl1th) {fSlit1Thickness = sl1th;}
|
||||
void SetSlit2Thickness(G4double sl2th) {fSlit2Thickness = sl2th;}
|
||||
void SetSlit3Thickness(G4double sl3th) {fSlit3Thickness = sl3th;}
|
||||
void SetSlit4Thickness(G4double sl4th) {fSlit4Thickness = sl4th;}
|
||||
void SetSlit1SampleDistance(G4double slSampleDist1)
|
||||
{fSlit1SampleDistance = slSampleDist1;}
|
||||
void SetSlit2SampleDistance(G4double slSampleDist2)
|
||||
{fSlit2SampleDistance = slSampleDist2;}
|
||||
void SetSlit3SampleDistance(G4double slSampleDist3)
|
||||
{fSlit3SampleDistance = slSampleDist3;}
|
||||
void SetSlit4SampleDistance(G4double slSampleDist4)
|
||||
{fSlit4SampleDistance = slSampleDist4;}
|
||||
void SetSlit1xAperture(G4double aperture1x) {fSlit1xAperture = aperture1x;}
|
||||
void SetSlit2xAperture(G4double aperture2x) {fSlit2xAperture = aperture2x;}
|
||||
void SetSlit3xAperture(G4double aperture3x) {fSlit3xAperture = aperture3x;}
|
||||
void SetSlit4xAperture(G4double aperture4x) {fSlit4xAperture = aperture4x;}
|
||||
void SetSlit1yAperture(G4double aperture1y) {fSlit1yAperture = aperture1y;}
|
||||
void SetSlit2yAperture(G4double aperture2y) {fSlit2yAperture = aperture2y;}
|
||||
void SetSlit3yAperture(G4double aperture3y) {fSlit3yAperture = aperture3y;}
|
||||
void SetSlit4yAperture(G4double aperture4y) {fSlit4yAperture = aperture4y;}
|
||||
|
||||
void SetDetectorSize(G4double detSize) {fDetectorSize = detSize;}
|
||||
void SetDetectorThickness(G4double detTh) {fDetectorThickness = detTh;}
|
||||
void SetDetectorSampleDistance(G4double detDist)
|
||||
{fDetectorSampleDistance = detDist;}
|
||||
|
||||
};
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSDetectorConstructionMessenger.hh
|
||||
/// \brief Implementation of the SAXSDetectorConstructionMessenger class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSDetectorConstructionMessenger_h
|
||||
#define SAXSDetectorConstructionMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class SAXSDetectorConstruction;
|
||||
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADouble;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWith3VectorAndUnit;
|
||||
class G4UIcmdWithAString;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// DetectorConstruction messenger.
|
||||
|
||||
class SAXSDetectorConstructionMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
SAXSDetectorConstructionMessenger(SAXSDetectorConstruction* detconstr);
|
||||
~SAXSDetectorConstructionMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand* command,G4String newValues);
|
||||
|
||||
private:
|
||||
SAXSDetectorConstruction* fDetector;
|
||||
|
||||
G4UIdirectory* fCmdDir;
|
||||
|
||||
G4UIcmdWithAString* fSetCustomMatFFfilename;
|
||||
G4UIcmdWithADouble* fSetCustomMatDensityCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatHmassfractCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatCmassfractCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatNmassfractCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatOmassfractCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatNamassfractCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatPmassfractCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatSmassfractCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatClmassfractCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatKmassfractCmd;
|
||||
G4UIcmdWithADouble* fSetCustomMatCamassfractCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* fPhantomMaterialCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fPhantomDiameterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fPhantomHeightCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fPhantomZCmd;
|
||||
|
||||
G4UIcmdWithADouble* fSetComp0Cmd;
|
||||
G4UIcmdWithADouble* fSetComp1Cmd;
|
||||
G4UIcmdWithADouble* fSetComp2Cmd;
|
||||
G4UIcmdWithADouble* fSetComp3Cmd;
|
||||
|
||||
G4UIcmdWithADouble* fThetaSetupCmd;
|
||||
|
||||
G4UIcmdWithABool* fSetSlitsCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit1ThicknessCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit2ThicknessCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit3ThicknessCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit4ThicknessCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit1DistanceCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit2DistanceCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit3DistanceCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit4DistanceCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit1xApertureCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit2xApertureCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit3xApertureCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit4xApertureCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit1yApertureCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit2yApertureCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit3yApertureCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSlit4yApertureCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fDetectorThicknessCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fDetectorSizeCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fDetectorDistanceCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSEventAction.hh
|
||||
/// \brief Implementation of the SAXSEventAction class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSEventAction_h
|
||||
#define SAXSEventAction_h 1
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// Event action.
|
||||
|
||||
class SAXSEventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
SAXSEventAction();
|
||||
virtual ~SAXSEventAction();
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
|
||||
private:
|
||||
G4int fSensitiveDetector_ID;
|
||||
G4int fVerboseLevel;
|
||||
|
||||
G4int fNRi;
|
||||
G4int fNCi;
|
||||
G4int fNDi;
|
||||
G4double fEventWeight;
|
||||
|
||||
public:
|
||||
inline void SetVerbose(G4int val) {fVerboseLevel = val;}
|
||||
inline G4int GetVerbose() const {return fVerboseLevel;}
|
||||
|
||||
void AddNRi() {fNRi++;}
|
||||
void AddNCi() {fNCi++;}
|
||||
void AddNDi() {fNDi++;}
|
||||
void UpdateEventWeight(G4double ew) {fEventWeight = ew;}
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSPhysicsList.hh
|
||||
/// \brief Implementation of the SAXSPhysicsList class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSPhysicsList_h
|
||||
#define SAXSPhysicsList_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserPhysicsList.hh"
|
||||
#include "G4VModularPhysicsList.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4VPhysicsConstructor;
|
||||
class SAXSPhysicsListMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// Physics list.
|
||||
/// It includes various EM constructors, which can be selected through macro.
|
||||
/// By defualt "standard" Penelope physics is used. In order to activate
|
||||
/// Molecular interference (MI) effects in Rayleigh scattering, choose
|
||||
/// G4EmPenelopeMI PhysicsList with fUseMIFlag variable set as true (default).
|
||||
|
||||
class SAXSPhysicsList : public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
SAXSPhysicsList();
|
||||
virtual ~SAXSPhysicsList();
|
||||
|
||||
public:
|
||||
virtual void ConstructParticle();
|
||||
virtual void ConstructProcess();
|
||||
virtual void SetCuts();
|
||||
|
||||
//for the Messenger
|
||||
void SetDefaultCutsValue(G4double);
|
||||
void SelectPhysicsList(const G4String& name);
|
||||
void SetUseMIFlag(G4bool val){fUseMIFlag = val;};
|
||||
G4bool GetUseMIFlag(){return fUseMIFlag;};
|
||||
|
||||
private:
|
||||
SAXSPhysicsList & operator = (const SAXSPhysicsList &right);
|
||||
SAXSPhysicsList(const SAXSPhysicsList&);
|
||||
|
||||
G4VPhysicsConstructor* fParticleList;
|
||||
G4VPhysicsConstructor* fEmPhysicsList;
|
||||
|
||||
G4bool fUseMIFlag;
|
||||
|
||||
SAXSPhysicsListMessenger* fPMessenger;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSPhysicsListMessenger.hh
|
||||
/// \brief Definition of the SAXSPhysicsListMessenger class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSPhysicsListMessenger_h
|
||||
#define SAXSPhysicsListMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class SAXSPhysicsList;
|
||||
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithABool;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// PhysicsList messenger
|
||||
|
||||
class SAXSPhysicsListMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
SAXSPhysicsListMessenger(SAXSPhysicsList*);
|
||||
virtual ~SAXSPhysicsListMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
SAXSPhysicsList* fPhysicsList;
|
||||
G4UIdirectory* fPhysDir;
|
||||
G4UIcmdWithADoubleAndUnit* fCutsCmd;
|
||||
G4UIcmdWithAString* fListCmd;
|
||||
G4UIcmdWithABool* fUseMIFlagCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSPrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the SAXSPrimaryGeneratorAction class
|
||||
//
|
||||
/// The G4GeneralParticleSource generator is defined and the
|
||||
/// features of the primary beam are set through macro commands
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSPrimaryGeneratorAction_h
|
||||
#define SAXSPrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4GeneralParticleSource;
|
||||
class G4ParticleGun;
|
||||
class G4Event;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class SAXSPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
SAXSPrimaryGeneratorAction();
|
||||
virtual ~SAXSPrimaryGeneratorAction();
|
||||
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
|
||||
private:
|
||||
G4GeneralParticleSource* fParticleGPS;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSRunAction.hh
|
||||
/// \brief Definition of the SAXSRunAction class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSRunAction_h
|
||||
#define SAXSRunAction_h 1
|
||||
|
||||
#include "SAXSRunActionMessenger.hh"
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Run;
|
||||
class SAXSRunActionMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// Run action class.
|
||||
|
||||
class SAXSRunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
SAXSRunAction();
|
||||
virtual ~SAXSRunAction();
|
||||
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
|
||||
void SetFileName(G4String);
|
||||
|
||||
private:
|
||||
G4String fFileName;
|
||||
SAXSRunActionMessenger* fMessenger;
|
||||
|
||||
G4bool fIsFileOpened;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSRunActionMessenger.hh
|
||||
/// \brief Definition of the SAXSRunActionMessenger class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSRunActionMessenger_h
|
||||
#define SAXSRunActionMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class G4UIcmdWithAString;
|
||||
class SAXSRunAction;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// RunAction messenger.
|
||||
|
||||
class SAXSRunActionMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
SAXSRunActionMessenger(SAXSRunAction*);
|
||||
virtual ~SAXSRunActionMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*,G4String);
|
||||
|
||||
private:
|
||||
SAXSRunAction* fRunAction;
|
||||
G4UIcmdWithAString* fSetFileNameCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSSensitiveDetector.hh
|
||||
/// \brief Definition of the SAXSSensitiveDetector class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSSensitiveDetector_h
|
||||
#define SAXSSensitiveDetector_h 1
|
||||
|
||||
#include "SAXSSensitiveDetectorHit.hh"
|
||||
#include "SAXSSensitiveDetectorMessenger.hh"
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// Sensitive detector.
|
||||
/// It stores the features of the impinging particles.
|
||||
|
||||
class SAXSSensitiveDetector : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
SAXSSensitiveDetector(G4String);
|
||||
virtual ~SAXSSensitiveDetector();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
|
||||
void SetVarStopAndKill(G4bool bVar) {fVarStopAndKill = bVar;}
|
||||
|
||||
private:
|
||||
SensitiveDetectorHitsCollection* fHitsCollection;
|
||||
G4int fHCID;
|
||||
|
||||
SAXSSensitiveDetectorMessenger* fSDMessenger;
|
||||
|
||||
G4bool fVarStopAndKill;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSSensitiveDetectorHit.hh
|
||||
/// \brief Definition of the SAXSSensitiveDetectorHit class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSSensitiveDetectorHit_h
|
||||
#define SAXSSensitiveDetectorHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// Sensitive Detector hit
|
||||
///
|
||||
/// It records:
|
||||
/// - the spatial coordinate of the hit
|
||||
/// - the time at which the hit occurred
|
||||
/// - the type, ID, weight, momentum and energy of the impinging particle
|
||||
/// - the ID of the impinging particle parent
|
||||
|
||||
class SAXSSensitiveDetectorHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
SAXSSensitiveDetectorHit();
|
||||
SAXSSensitiveDetectorHit(const SAXSSensitiveDetectorHit &right);
|
||||
virtual ~SAXSSensitiveDetectorHit(){;}
|
||||
|
||||
const SAXSSensitiveDetectorHit& operator=(const SAXSSensitiveDetectorHit &right);
|
||||
|
||||
int operator==(const SAXSSensitiveDetectorHit &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
virtual void Draw();
|
||||
virtual void Print();
|
||||
|
||||
private:
|
||||
G4int fTrackID;
|
||||
G4int fTrackIDP;
|
||||
G4double fTime;
|
||||
G4ThreeVector fPos;
|
||||
G4ThreeVector fMom;
|
||||
G4double fEnergy;
|
||||
G4int fType;
|
||||
G4double fWeight;
|
||||
|
||||
public:
|
||||
inline void SetTrackID(G4int z) {fTrackID = z;}
|
||||
inline G4int GetTrackID() const {return fTrackID;}
|
||||
|
||||
inline void SetTrackIDP(G4int z) {fTrackIDP = z;}
|
||||
inline G4int GetTrackIDP() const {return fTrackIDP;}
|
||||
|
||||
inline void SetTime(G4double t) {fTime = t;}
|
||||
inline G4double GetTime() const {return fTime;}
|
||||
|
||||
inline void SetPos(G4ThreeVector xyz) {fPos = xyz;}
|
||||
inline G4ThreeVector GetPos() const {return fPos;}
|
||||
|
||||
inline void SetMom(G4ThreeVector xyz) {fMom = xyz;}
|
||||
inline G4ThreeVector GetMom() const {return fMom;}
|
||||
|
||||
inline void SetEnergy(G4double energy) {fEnergy = energy;}
|
||||
inline G4double GetEnergy() const {return fEnergy;}
|
||||
|
||||
inline void SetType(G4int type) {fType = type;}
|
||||
inline G4int GetType() const {return fType;}
|
||||
|
||||
inline void SetWeight(G4double weight) {fWeight = weight;}
|
||||
inline G4double GetWeight() const {return fWeight;}
|
||||
};
|
||||
|
||||
using SensitiveDetectorHitsCollection = G4THitsCollection<SAXSSensitiveDetectorHit>;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<SAXSSensitiveDetectorHit> *hitAllocator;
|
||||
|
||||
inline void* SAXSSensitiveDetectorHit::operator new(size_t)
|
||||
{
|
||||
if (!hitAllocator)
|
||||
{
|
||||
hitAllocator = new G4Allocator<SAXSSensitiveDetectorHit>;
|
||||
}
|
||||
return hitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void SAXSSensitiveDetectorHit::operator delete(void *aHit)
|
||||
{
|
||||
if (!hitAllocator)
|
||||
{
|
||||
hitAllocator = new G4Allocator<SAXSSensitiveDetectorHit>;
|
||||
}
|
||||
hitAllocator->FreeSingle((SAXSSensitiveDetectorHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSSensitiveDetectorMessenger.hh
|
||||
/// \brief Implementation of the SAXSSensitiveDetectorMessenger class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSSensitiveDetectorMessenger_h
|
||||
#define SAXSSensitiveDetectorMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class SAXSSensitiveDetector;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithABool;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// SensitiveDetector messenger.
|
||||
|
||||
class SAXSSensitiveDetectorMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
SAXSSensitiveDetectorMessenger(SAXSSensitiveDetector*);
|
||||
~SAXSSensitiveDetectorMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*,G4String);
|
||||
|
||||
private:
|
||||
SAXSSensitiveDetector* fSenDet;
|
||||
G4UIdirectory* fSenDetDir;
|
||||
G4UIcmdWithABool* fUserStopAndKillCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file SAXSSteppingAction.hh
|
||||
/// \brief Definition of the SAXSSteppingAction class
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef SAXSSteppingAction_h
|
||||
#define SAXSSteppingAction_h 1
|
||||
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include "globals.hh"
|
||||
#include <map>
|
||||
|
||||
class SAXSEventAction;
|
||||
class G4LogicalVolume;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// Stepping Action.
|
||||
/// It is used to retrive information about every interaction of the photons
|
||||
/// occuring iside the phantom, and in particular, scattering events.
|
||||
/// The total number of scattering events (subdivided by tyoe) is passed to
|
||||
/// the EventAction class and stored at the end of the event.
|
||||
|
||||
class SAXSSteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
SAXSSteppingAction(SAXSEventAction*);
|
||||
virtual ~SAXSSteppingAction();
|
||||
|
||||
virtual void UserSteppingAction(const G4Step*);
|
||||
|
||||
private:
|
||||
SAXSEventAction* fEventAction;
|
||||
|
||||
G4LogicalVolume* fPhantom;
|
||||
|
||||
G4int fEventNumber;
|
||||
G4int fNSe;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user