diff options
| author | shivesh <s.p.mandalia@qmul.ac.uk> | 2018-08-16 14:01:19 +0100 |
|---|---|---|
| committer | shivesh <s.p.mandalia@qmul.ac.uk> | 2018-08-16 14:01:19 +0100 |
| commit | 3a83ec3bce239359f1cd71d1c0bfbf23b61d0db8 (patch) | |
| tree | 7b75a539576992ec9a82ec0add0d0e9b565347dd /include | |
| download | G4BeamTest-3a83ec3bce239359f1cd71d1c0bfbf23b61d0db8.tar.gz G4BeamTest-3a83ec3bce239359f1cd71d1c0bfbf23b61d0db8.zip | |
initial commit
Diffstat (limited to 'include')
| -rw-r--r-- | include/G4BeamTestDetectorConstruction.h | 45 | ||||
| -rw-r--r-- | include/G4BeamTestEMPhysics.h | 64 | ||||
| -rw-r--r-- | include/G4BeamTestGeneralPhysics.h | 35 | ||||
| -rw-r--r-- | include/G4BeamTestHadronPhysics.h | 338 | ||||
| -rw-r--r-- | include/G4BeamTestIonPhysics.h | 100 | ||||
| -rw-r--r-- | include/G4BeamTestMuonPhysics.h | 71 | ||||
| -rw-r--r-- | include/G4BeamTestPhysicsList.h | 35 | ||||
| -rw-r--r-- | include/G4BeamTestRunManager.h | 46 | ||||
| -rw-r--r-- | include/G4BeamTestTank.h | 120 | ||||
| -rw-r--r-- | include/G4BeamTestUserSteppingAction.h | 31 | ||||
| -rw-r--r-- | include/G4BeamTestUserTrackingAction.h | 32 | ||||
| -rw-r--r-- | include/G4Interface.h | 68 | ||||
| -rw-r--r-- | include/G4TankIceSD.h | 69 |
13 files changed, 1054 insertions, 0 deletions
diff --git a/include/G4BeamTestDetectorConstruction.h b/include/G4BeamTestDetectorConstruction.h new file mode 100644 index 0000000..ce53256 --- /dev/null +++ b/include/G4BeamTestDetectorConstruction.h @@ -0,0 +1,45 @@ +#ifndef _TOPSIMULATOR_G4BEAMTESTDETECTORCONSTRUCTION_H_ +#define _TOPSIMULATOR_G4BEAMTESTDETECTORCONSTRUCTION_H_ + +#include <G4VUserDetectorConstruction.hh> +#include <G4ThreeVector.hh> + +// class G4BeamTestTank; + +class G4BeamTestDetectorConstruction: public G4VUserDetectorConstruction +{ + public: + G4BeamTestDetectorConstruction(); + + ~G4BeamTestDetectorConstruction(); + + G4VPhysicalVolume* Construct(); + + void SetVerboseLevel(G4int level) {verboseLevel_=level;} + + /* void InstallTank(G4BeamTestTank* tank) {tankList_.push_back(tank);} */ + + const G4ThreeVector& GetWorldOrigin() const {return origin_;} + + private: + + void CreateMaterials(); + + void CreateAir(); + /* void CreateIce(); */ + /* void CreateSnow(); */ + void CreateWater(); + void CreatePlastic(); + /* void CreateTyvek(); */ + /* void CreatePerlite(); */ + void CreateGlassSphere(); + void CreateEffectiveDOMMaterial(); + + G4ThreeVector origin_; + + G4int verboseLevel_; + + // std::vector<G4BeamTestTank*> tankList_; +}; + +#endif diff --git a/include/G4BeamTestEMPhysics.h b/include/G4BeamTestEMPhysics.h new file mode 100644 index 0000000..797719e --- /dev/null +++ b/include/G4BeamTestEMPhysics.h @@ -0,0 +1,64 @@ +/* + * copyright (C) 2010 + * The Icecube Collaboration + * + * $Id: G4BeamTestEMPhysics.h 154687 2017-04-05 15:46:57Z jgonzalez $ + * + * @version $Revision: 154687 $ + * @date $LastChangedDate: 2017-04-05 16:46:57 +0100 (Wed, 05 Apr 2017) $ + * @author Fabian Kislat <fabian.kislat@desy.de>, Peter Nießen (tanktop) + * Last changed by: $LastChangedBy: jgonzalez $ + */ + +#ifndef G4TANKRESPONSE_G4BEAMTESTEMPHYSICS_H_INCLUDED +#define G4TANKRESPONSE_G4BEAMTESTEMPHYSICS_H_INCLUDED + +#include <globals.hh> +#include <G4VPhysicsConstructor.hh> +#include <G4PhotoElectricEffect.hh> +#include <G4ComptonScattering.hh> +#include <G4GammaConversion.hh> +#include <G4eMultipleScattering.hh> +#include <G4eIonisation.hh> +#include <G4eBremsstrahlung.hh> +#include <G4eplusAnnihilation.hh> + +/** + @class G4BeamTestEMPhysics + @brief Electromagnetic physics. Used only if Geant4 version is earlier than 4.10. + + This class implements the electromagnetic interactions + - Photoelectric effect + - Compton scattering + - Gamma conversion + - Multiple scattering + - Ionisation/Bremsstrahlung for electrons + - Positron annihilation +*/ +class G4BeamTestEMPhysics : public G4VPhysicsConstructor { +public: + G4BeamTestEMPhysics(); + ~G4BeamTestEMPhysics(); + + void ConstructParticle(); + void ConstructProcess(); + +private: + // Gamma physics + G4PhotoElectricEffect photoEffect; + G4ComptonScattering comptonEffect; + G4GammaConversion pairProduction; + + // Electron physics + G4eMultipleScattering electronMultipleScattering; + G4eIonisation electronIonisation; + G4eBremsstrahlung electronBremsStrahlung; + + //Positron physics + G4eMultipleScattering positronMultipleScattering; + G4eIonisation positronIonisation; + G4eBremsstrahlung positronBremsStrahlung; + G4eplusAnnihilation annihilation; +}; + +#endif // G4TANKRESPONSE_G4BEAMTESTEMPHYSICS_H_INCLUDED diff --git a/include/G4BeamTestGeneralPhysics.h b/include/G4BeamTestGeneralPhysics.h new file mode 100644 index 0000000..012bf40 --- /dev/null +++ b/include/G4BeamTestGeneralPhysics.h @@ -0,0 +1,35 @@ +/* + * copyright (C) 2010 + * The Icecube Collaboration + * + * $Id: G4BeamTestGeneralPhysics.h 149388 2016-08-18 21:50:04Z jgonzalez $ + * + * @version $Revision: 149388 $ + * @date $LastChangedDate: 2016-08-18 22:50:04 +0100 (Thu, 18 Aug 2016) $ + * @author Fabian Kislat <fabian.kislat@desy.de> Last changed by: $LastChangedBy: jgonzalez $ + */ + +#ifndef G4TANKRESPONSE_G4BEAMTESTGENERALPHYSICS_H_INCLUDED +#define G4TANKRESPONSE_G4BEAMTESTGENERALPHYSICS_H_INCLUDED + +#include <globals.hh> +#include <G4VPhysicsConstructor.hh> +#include <G4Decay.hh> + +/** + * Implementation of G4VPhysicsConstructor for decay processes and geantino. + */ +class G4BeamTestGeneralPhysics : public G4VPhysicsConstructor +{ +public: + G4BeamTestGeneralPhysics(); + virtual ~G4BeamTestGeneralPhysics(); + + void ConstructParticle(); + void ConstructProcess(); + +private: + G4Decay decay; +}; + +#endif // G4TANKRESPONSE_G4BEAMTESTGENERALPHYSICS_H_INCLUDED diff --git a/include/G4BeamTestHadronPhysics.h b/include/G4BeamTestHadronPhysics.h new file mode 100644 index 0000000..0fd9868 --- /dev/null +++ b/include/G4BeamTestHadronPhysics.h @@ -0,0 +1,338 @@ +/* + * copyright (C) 2010 + * The Icecube Collaboration + * + * $Id: G4BeamTestHadronPhysics.h 154687 2017-04-05 15:46:57Z jgonzalez $ + * + * @version $Revision: 154687 $ + * @date $LastChangedDate: 2017-04-05 16:46:57 +0100 (Wed, 05 Apr 2017) $ + * @author Fabian Kislat <fabian.kislat@desy.de> Last changed by: $LastChangedBy: jgonzalez $ + */ + +#ifndef G4TANKRESPONSE_G4BEAMTESTHADRONPHYSICS_H_INCLUDED +#define G4TANKRESPONSE_G4BEAMTESTHADRONPHYSICS_H_INCLUDED + +#include <vector> + +#include <globals.hh> + +#include <G4VPhysicsConstructor.hh> + +#include <G4hMultipleScattering.hh> +#include <G4hIonisation.hh> + +#include <G4HadronElasticProcess.hh> +#include <G4HadronFissionProcess.hh> +#include <G4HadronCaptureProcess.hh> + +#include <G4PionPlusInelasticProcess.hh> +#include <G4PionMinusInelasticProcess.hh> +#include <G4KaonPlusInelasticProcess.hh> +#include <G4KaonZeroSInelasticProcess.hh> +#include <G4KaonZeroLInelasticProcess.hh> +#include <G4KaonMinusInelasticProcess.hh> +#include <G4ProtonInelasticProcess.hh> +#include <G4AntiProtonInelasticProcess.hh> +#include <G4NeutronInelasticProcess.hh> +#include <G4AntiNeutronInelasticProcess.hh> +#include <G4LambdaInelasticProcess.hh> +#include <G4AntiLambdaInelasticProcess.hh> +#include <G4SigmaPlusInelasticProcess.hh> +#include <G4SigmaMinusInelasticProcess.hh> +#include <G4AntiSigmaPlusInelasticProcess.hh> +#include <G4AntiSigmaMinusInelasticProcess.hh> +#include <G4XiZeroInelasticProcess.hh> +#include <G4XiMinusInelasticProcess.hh> +#include <G4AntiXiZeroInelasticProcess.hh> +#include <G4AntiXiMinusInelasticProcess.hh> +#include <G4DeuteronInelasticProcess.hh> +#include <G4TritonInelasticProcess.hh> +#include <G4AlphaInelasticProcess.hh> +#include <G4OmegaMinusInelasticProcess.hh> +#include <G4AntiOmegaMinusInelasticProcess.hh> + +// Low-energy Models +#include <G4LElastic.hh> +#include <G4LFission.hh> +#include <G4LCapture.hh> + +#include <G4LEPionPlusInelastic.hh> +#include <G4LEPionMinusInelastic.hh> +#include <G4LEKaonPlusInelastic.hh> +#include <G4LEKaonZeroSInelastic.hh> +#include <G4LEKaonZeroLInelastic.hh> +#include <G4LEKaonMinusInelastic.hh> +#include <G4LEProtonInelastic.hh> +#include <G4LEAntiProtonInelastic.hh> +#include <G4LENeutronInelastic.hh> +#include <G4LEAntiNeutronInelastic.hh> +#include <G4LELambdaInelastic.hh> +#include <G4LEAntiLambdaInelastic.hh> +#include <G4LESigmaPlusInelastic.hh> +#include <G4LESigmaMinusInelastic.hh> +#include <G4LEAntiSigmaPlusInelastic.hh> +#include <G4LEAntiSigmaMinusInelastic.hh> +#include <G4LEXiZeroInelastic.hh> +#include <G4LEXiMinusInelastic.hh> +#include <G4LEAntiXiZeroInelastic.hh> +#include <G4LEAntiXiMinusInelastic.hh> +#include <G4LEDeuteronInelastic.hh> +#include <G4LETritonInelastic.hh> +#include <G4LEAlphaInelastic.hh> +#include <G4LEOmegaMinusInelastic.hh> +#include <G4LEAntiOmegaMinusInelastic.hh> + +// High-energy Models + +#include <G4HEPionPlusInelastic.hh> +#include <G4HEPionMinusInelastic.hh> +#include <G4HEKaonPlusInelastic.hh> +#include <G4HEKaonZeroInelastic.hh> +#include <G4HEKaonZeroInelastic.hh> +#include <G4HEKaonMinusInelastic.hh> +#include <G4HEProtonInelastic.hh> +#include <G4HEAntiProtonInelastic.hh> +#include <G4HENeutronInelastic.hh> +#include <G4HEAntiNeutronInelastic.hh> +#include <G4HELambdaInelastic.hh> +#include <G4HEAntiLambdaInelastic.hh> +#include <G4HESigmaPlusInelastic.hh> +#include <G4HESigmaMinusInelastic.hh> +#include <G4HEAntiSigmaPlusInelastic.hh> +#include <G4HEAntiSigmaMinusInelastic.hh> +#include <G4HEXiZeroInelastic.hh> +#include <G4HEXiMinusInelastic.hh> +#include <G4HEAntiXiZeroInelastic.hh> +#include <G4HEAntiXiMinusInelastic.hh> +#include <G4HEOmegaMinusInelastic.hh> +#include <G4HEAntiOmegaMinusInelastic.hh> + +// Stopping processes +#include <G4AntiProtonAnnihilationAtRest.hh> +#include <G4AntiNeutronAnnihilationAtRest.hh> + +#ifdef TRIUMF_STOP_PIMINUS +#include <G4PionMinusAbsorptionAtRest.hh> +#else +#include <G4PiMinusAbsorptionAtRest.hh> +#endif +#ifdef TRIUMF_STOP_KMINUS +#include <G4KaonMinusAbsorption.hh> +#else +#include <G4KaonMinusAbsorptionAtRest.hh> +#endif + +// quark gluon string model with chips afterburner. +#include <G4TheoFSGenerator.hh> +#include <G4ExcitationHandler.hh> +#include <G4PreCompoundModel.hh> +#include <G4GeneratorPrecompoundInterface.hh> +#include <G4QGSModel.hh> +#include <G4QGSParticipants.hh> +#include <G4QGSMFragmentation.hh> +#include <G4ExcitedStringDecay.hh> + +/** + @brief Hadron physics. Used only if Geant4 version is earlier than 4.10. + @author GEANT4/Peter Niessen + @date Sat Jul 24 23:53:47 EDT 2004 + + Many processes. You're encouraged to check the source. +*/ +class G4BeamTestHadronPhysics : public G4VPhysicsConstructor { +public: + + /** + * The constructor + */ + G4BeamTestHadronPhysics(); + + /** + * The virtual destructor + */ + virtual ~G4BeamTestHadronPhysics(); + + /** + * This method will be invoked in the Construct() method. + * each particle type will be instantiated + */ + virtual void ConstructParticle(); + + /** + * This method will be invoked in the Construct() method. + * each physics process will be instantiated and + * registered to the process manager of each particle type + */ + virtual void ConstructProcess(); + +protected: + + // Elastic Process + G4HadronElasticProcess elasticProcess_; + G4LElastic *elasticModel_; + + // Pi + + G4PionPlusInelasticProcess pionPlusInelastic_; + G4LEPionPlusInelastic *lePionPlusModel_; + G4hMultipleScattering pionPlusMult_; + G4hIonisation pionPlusIonisation_; + + // Pi - + G4PionMinusInelasticProcess pionMinusInelastic_; + G4LEPionMinusInelastic *lePionMinusModel_; + G4hMultipleScattering pionMinusMult_; + G4hIonisation pionMinusIonisation_; +#ifdef TRIUMF_STOP_PIMINUS + G4PionMinusAbsorptionAtRest pionMinusAbsorption_; +#else + G4PiMinusAbsorptionAtRest pionMinusAbsorption_; +#endif + + // pi+ and pi- + G4TheoFSGenerator theoModel_; + G4ExcitationHandler excitationHandler_; + G4PreCompoundModel *preEquilib_; + G4GeneratorPrecompoundInterface cascade_; + G4QGSModel< G4QGSParticipants > stringModel_; + G4QGSMFragmentation fragmentation_; + G4ExcitedStringDecay *stringDecay_; + + // K + + G4KaonPlusInelasticProcess kaonPlusInelastic_; + G4LEKaonPlusInelastic *leKaonPlusModel_; + G4HEKaonPlusInelastic *heKaonPlusModel_; + G4hMultipleScattering kaonPlusMult_; + G4hIonisation kaonPlusIonisation_; + + // K - + G4KaonMinusInelasticProcess kaonMinusInelastic_; + G4LEKaonMinusInelastic *leKaonMinusModel_; + G4HEKaonMinusInelastic *heKaonMinusModel_; + G4hMultipleScattering kaonMinusMult_; + G4hIonisation kaonMinusIonisation_; +#ifdef TRIUMF_STOP_KMINUS + G4KaonMinusAbsorption kaonMinusAbsorption_; +#else + G4PiMinusAbsorptionAtRest kaonMinusAbsorption_; +#endif + + // K0L + G4KaonZeroLInelasticProcess kaonZeroLInelastic_; + G4LEKaonZeroLInelastic *leKaonZeroLModel_; + G4HEKaonZeroInelastic *heKaonZeroLModel_; + + // K0S + G4KaonZeroSInelasticProcess kaonZeroSInelastic_; + G4LEKaonZeroSInelastic *leKaonZeroSModel_; + G4HEKaonZeroInelastic *heKaonZeroSModel_; + + // Proton + G4ProtonInelasticProcess protonInelastic_; + G4LEProtonInelastic *leProtonModel_; + G4HEProtonInelastic *heProtonModel_; + G4hMultipleScattering protonMult_; + G4hIonisation protonIonisation_; + + // anti-proton + G4AntiProtonInelasticProcess antiProtonInelastic_; + G4LEAntiProtonInelastic *leAntiProtonModel_; + G4HEAntiProtonInelastic *heAntiProtonModel_; + G4hMultipleScattering antiProtonMult_; + G4hIonisation antiProtonIonisation_; + G4AntiProtonAnnihilationAtRest antiProtonAnnihilation_; + + // neutron + G4NeutronInelasticProcess neutronInelastic_; + G4LENeutronInelastic *leNeutronModel_; + G4HENeutronInelastic *heNeutronModel_; + G4HadronFissionProcess neutronFission_; + G4LFission *neutronFissionModel_; + G4HadronCaptureProcess neutronCapture_; + G4LCapture *neutronCaptureModel_; + + + // anti-neutron + G4AntiNeutronInelasticProcess antiNeutronInelastic_; + G4LEAntiNeutronInelastic *leAntiNeutronModel_; + G4HEAntiNeutronInelastic *heAntiNeutronModel_; + G4AntiNeutronAnnihilationAtRest antiNeutronAnnihilation_; + + // Lambda + G4LambdaInelasticProcess lambdaInelastic_; + G4LELambdaInelastic *leLambdaModel_; + G4HELambdaInelastic *heLambdaModel_; + + // AntiLambda + G4AntiLambdaInelasticProcess antiLambdaInelastic_; + G4LEAntiLambdaInelastic *leAntiLambdaModel_; + G4HEAntiLambdaInelastic *heAntiLambdaModel_; + + // SigmaMinus + G4SigmaMinusInelasticProcess sigmaMinusInelastic_; + G4LESigmaMinusInelastic *leSigmaMinusModel_; + G4HESigmaMinusInelastic *heSigmaMinusModel_; + G4hMultipleScattering sigmaMinusMult_; + G4hIonisation sigmaMinusIonisation_; + + // AntiSigmaMinus + G4AntiSigmaMinusInelasticProcess antiSigmaMinusInelastic_; + G4LEAntiSigmaMinusInelastic *leAntiSigmaMinusModel_; + G4HEAntiSigmaMinusInelastic *heAntiSigmaMinusModel_; + G4hMultipleScattering antiSigmaMinusMult_; + G4hIonisation antiSigmaMinusIonisation_; + + // SigmaPlus + G4SigmaPlusInelasticProcess sigmaPlusInelastic_; + G4LESigmaPlusInelastic *leSigmaPlusModel_; + G4HESigmaPlusInelastic *heSigmaPlusModel_; + G4hMultipleScattering sigmaPlusMult_; + G4hIonisation sigmaPlusIonisation_; + + // AntiSigmaPlus + G4AntiSigmaPlusInelasticProcess antiSigmaPlusInelastic_; + G4LEAntiSigmaPlusInelastic *leAntiSigmaPlusModel_; + G4HEAntiSigmaPlusInelastic *heAntiSigmaPlusModel_; + G4hMultipleScattering antiSigmaPlusMult_; + G4hIonisation antiSigmaPlusIonisation_; + + // XiZero + G4XiZeroInelasticProcess xiZeroInelastic_; + G4LEXiZeroInelastic *leXiZeroModel_; + G4HEXiZeroInelastic *heXiZeroModel_; + + // AntiXiZero + G4AntiXiZeroInelasticProcess antiXiZeroInelastic_; + G4LEAntiXiZeroInelastic* leAntiXiZeroModel_; + G4HEAntiXiZeroInelastic* heAntiXiZeroModel_; + + // XiMinus + G4XiMinusInelasticProcess xiMinusInelastic_; + G4LEXiMinusInelastic *leXiMinusModel_; + G4HEXiMinusInelastic *heXiMinusModel_; + G4hMultipleScattering xiMinusMult_; + G4hIonisation xiMinusIonisation_; + + // AntiXiMinus + G4AntiXiMinusInelasticProcess antiXiMinusInelastic_; + G4LEAntiXiMinusInelastic *leAntiXiMinusModel_; + G4HEAntiXiMinusInelastic *heAntiXiMinusModel_; + G4hMultipleScattering antiXiMinusMult_; + G4hIonisation antiXiMinusIonisation_; + + // OmegaMinus + G4OmegaMinusInelasticProcess omegaMinusInelastic_; + G4LEOmegaMinusInelastic *leOmegaMinusModel_; + G4HEOmegaMinusInelastic *heOmegaMinusModel_; + G4hMultipleScattering omegaMinusMult_; + G4hIonisation omegaMinusIonisation_; + + // AntiOmegaMinus + G4AntiOmegaMinusInelasticProcess antiOmegaMinusInelastic_; + G4LEAntiOmegaMinusInelastic *leAntiOmegaMinusModel_; + G4HEAntiOmegaMinusInelastic *heAntiOmegaMinusModel_; + G4hMultipleScattering antiOmegaMinusMult_; + G4hIonisation antiOmegaMinusIonisation_; +}; + + +#endif // G4TANKRESPONSE_G4BEAMTESTHADRONPHYSICS_H_INCLUDED diff --git a/include/G4BeamTestIonPhysics.h b/include/G4BeamTestIonPhysics.h new file mode 100644 index 0000000..276b0d5 --- /dev/null +++ b/include/G4BeamTestIonPhysics.h @@ -0,0 +1,100 @@ +/* + * copyright (C) 2010 + * The Icecube Collaboration + * + * $Id: G4BeamTestIonPhysics.h 154687 2017-04-05 15:46:57Z jgonzalez $ + * + * @version $Revision: 154687 $ + * @date $LastChangedDate: 2017-04-05 16:46:57 +0100 (Wed, 05 Apr 2017) $ + * @author Fabian Kislat <fabian.kislat@desy.de>, Peter Nießen (tanktop) + * Last changed by: $LastChangedBy: jgonzalez $ + */ + +#ifndef G4TANKRESPONSE_G4BEAMTESTIONPHYSICS_H_INCLUDED +#define G4TANKRESPONSE_G4BEAMTESTIONPHYSICS_H_INCLUDED + +#include <globals.hh> +#include <G4ios.hh> +#include <G4VPhysicsConstructor.hh> +#include <G4HadronElasticProcess.hh> +#include <G4LElastic.hh> +#include <G4DeuteronInelasticProcess.hh> +#include <G4LEDeuteronInelastic.hh> +#include <G4TritonInelasticProcess.hh> +#include <G4LETritonInelastic.hh> +#include <G4AlphaInelasticProcess.hh> +#include <G4LEAlphaInelastic.hh> +#include <G4hIonisation.hh> +#include <G4ionIonisation.hh> +#include <G4hMultipleScattering.hh> + +/** + @class G4BeamTestIonPhysics + @brief Ion physics. Used only if Geant4 version is earlier than 4.10. + @author GEANT4/Peter Niessen + @date Sun Jul 25 00:24:42 EDT 2004 + + The ion physics. Check the source for details. +*/ +class G4BeamTestIonPhysics : public G4VPhysicsConstructor { + +public: + + /** + * The constructor + */ + G4BeamTestIonPhysics(); + + /** + * The virtual destructor + */ + virtual ~G4BeamTestIonPhysics(); + + /** + * This method will be invoked in the Construct() method. + * each particle type will be instantiated + */ + virtual void ConstructParticle(); + + /** + * This method will be invoked in the Construct() method. + * each physics process will be instantiated and + * registered to the process manager of each particle type + */ + virtual void ConstructProcess(); + +protected: + // Elastic Process + G4HadronElasticProcess elasticProcess_; + G4LElastic* elasticModel_; + + // Generic Ion physics + G4hMultipleScattering ionMultipleScattering_; + G4ionIonisation ionIonisation_; + + // Deuteron physics + G4hMultipleScattering deuteronMultipleScattering_; + G4hIonisation deuteronIonisation_; + G4DeuteronInelasticProcess deuteronProcess_; + G4LEDeuteronInelastic* deuteronModel_; + + // Triton physics + G4hMultipleScattering tritonMultipleScattering_; + G4hIonisation tritonIonisation_; + G4TritonInelasticProcess tritonProcess_; + G4LETritonInelastic* tritonModel_; + + // Alpha physics + G4hMultipleScattering alphaMultipleScattering_; + G4hIonisation alphaIonisation_; + G4AlphaInelasticProcess alphaProcess_; + G4LEAlphaInelastic* alphaModel_; + + // He3 physics + G4hMultipleScattering he3MultipleScattering_; + G4hIonisation he3Ionisation_; + +}; + + +#endif // G4TANKRESPONSE_G4BEAMTESTIONPHYSICS_H_INCLUDED diff --git a/include/G4BeamTestMuonPhysics.h b/include/G4BeamTestMuonPhysics.h new file mode 100644 index 0000000..de09d73 --- /dev/null +++ b/include/G4BeamTestMuonPhysics.h @@ -0,0 +1,71 @@ +/* + * copyright (C) 2010 + * The Icecube Collaboration + * + * $Id: G4BeamTestMuonPhysics.h 154687 2017-04-05 15:46:57Z jgonzalez $ + * + * @version $Revision: 154687 $ + * @date $LastChangedDate: 2017-04-05 16:46:57 +0100 (Wed, 05 Apr 2017) $ + * @author Fabian Kislat <fabian.kislat@desy.de>, Peter Nießen (tanktop) + * Last changed by: $LastChangedBy: jgonzalez $ + */ + +#ifndef G4TANKRESPONSE_G4BEAMTESTMUONPHYSICS_H_INCLUDED +#define G4TANKRESPONSE_G4BEAMTESTMUONPHYSICS_H_INCLUDED + +#include <globals.hh> +#include <G4VPhysicsConstructor.hh> +#include <G4MuMultipleScattering.hh> +#include <G4MuBremsstrahlung.hh> +#include <G4MuPairProduction.hh> +#include <G4MuIonisation.hh> +#include <G4hIonisation.hh> +#include <G4MuonMinusCaptureAtRest.hh> + +/** + @class G4BeamTestMuonPhysics + @brief Muon/tau Physics. Used only if Geant4 version is earlier than 4.10. + + This class implements the physics processes for the muons. For + muons, it contains + - Ionisation + - Multiple scattering + - Bremsstrahlung + - Pair production + - Capture at rest (mu-) + For taus, it does + - Multiple scattering + - Ionisation +*/ +class G4BeamTestMuonPhysics : public G4VPhysicsConstructor +{ +public: + G4BeamTestMuonPhysics(); + ~G4BeamTestMuonPhysics(); + + void ConstructParticle(); + void ConstructProcess(); + +private: + // Muon physics + G4MuIonisation muPlusIonisation_; + G4MuMultipleScattering muPlusMultipleScattering_; + G4MuBremsstrahlung muPlusBremsstrahlung_; + G4MuPairProduction muPlusPairProduction_; + + G4MuIonisation muMinusIonisation_; + G4MuMultipleScattering muMinusMultipleScattering_; + G4MuBremsstrahlung muMinusBremsstrahlung_; + G4MuPairProduction muMinusPairProduction_; + + G4MuonMinusCaptureAtRest muMinusCaptureAtRest_; + + // Tau physics + G4MuMultipleScattering tauPlusMultipleScattering_; + G4hIonisation tauPlusIonisation_; + + G4MuMultipleScattering tauMinusMultipleScattering_; + G4hIonisation tauMinusIonisation_; +}; + +#endif // G4TANKRESPONSE_G4BEAMTESTMUONPHYSICS_H_INCLUDED diff --git a/include/G4BeamTestPhysicsList.h b/include/G4BeamTestPhysicsList.h new file mode 100644 index 0000000..e253e33 --- /dev/null +++ b/include/G4BeamTestPhysicsList.h @@ -0,0 +1,35 @@ +/** + * Copyright (C) 2009 + * The IceCube collaboration + * ID: $Id: G4BeamTestPhysicsList.h 149388 2016-08-18 21:50:04Z jgonzalez $ + * + * @file G4BeamTestPhysicsList.h + * @version $Rev: 149388 $ + * @date $Date: 2016-08-18 22:50:04 +0100 (Thu, 18 Aug 2016) $ + * @author Tilo Waldenmaier, Thomas Melzig, Fabian Kislat + */ + +#ifndef _TOPSIMULATOR_G4BEAMTESTPHYSICSLIST_H +#define _TOPSIMULATOR_G4BEAMTESTPHYSICSLIST_H + +#include <G4VModularPhysicsList.hh> + +/** + * Implementation of G4VModularPhysicsList. The top-level physics list. It combines all the other physics lists: + * + * \li G4BeamTestGeneralPhysics + * \li G4BeamTestHadronPhysics + * \li G4BeamTestIonPhysics + * \li G4BeamTestMuonPhysics + * \li G4BeamTestEMPhysics + */ +class G4BeamTestPhysicsList: public G4VModularPhysicsList +{ +public: + G4BeamTestPhysicsList(); + ~G4BeamTestPhysicsList(); +private: + void SetCuts(); +}; + +#endif diff --git a/include/G4BeamTestRunManager.h b/include/G4BeamTestRunManager.h new file mode 100644 index 0000000..c142b38 --- /dev/null +++ b/include/G4BeamTestRunManager.h @@ -0,0 +1,46 @@ +/** + * Copyright (C) 2009 + * The IceCube collaboration + * ID: $Id: G4BeamTestRunManager.h 149391 2016-08-18 21:58:04Z jgonzalez $ + * + * @file G4BeamTestRunManager.h + * @version $Rev: 149391 $ + * @date $Date: 2016-08-18 22:58:04 +0100 (Thu, 18 Aug 2016) $ + * @author Tilo Waldenmaier + */ + + +#ifndef TOPSIMULATOR_G4BEAMTESTRUNMANAGER_H +#define TOPSIMULATOR_G4BEAMTESTRUNMANAGER_H + +#include <G4RunManager.hh> + +class G4ParticleGun; + +/** + * Implementation of G4RunManager + */ +class G4BeamTestRunManager: public G4RunManager +{ + public: + G4BeamTestRunManager(); + + static G4BeamTestRunManager* GetIceTopRunManager() {return (G4IceTopRunManager*)GetRunManager();} + + // Disable BeamOn + void BeamOn(G4int n_event,const char* macroFile=0,G4int n_select=-1); + + void InitializeRun(); + void InjectParticle(G4ParticleGun* particleGun); + void TerminateRun(); + + protected: + G4Event* GenerateEvent(G4int i_event); + + private: + // This method is an exact copy of UpdateScoring which is private in the G4RunManager + void Update_Scoring(); + +}; + +#endif diff --git a/include/G4BeamTestTank.h b/include/G4BeamTestTank.h new file mode 100644 index 0000000..b08e223 --- /dev/null +++ b/include/G4BeamTestTank.h @@ -0,0 +1,120 @@ +/** + * Copyright (C) 2009 + * The IceCube collaboration + * ID: $Id: G4BeamTestTank.h 149431 2016-08-19 17:38:06Z jgonzalez $ + * + * @file G4BeamTestTank.h + * @version $Rev: 149431 $ + * @date $Date: 2016-08-19 18:38:06 +0100 (Fri, 19 Aug 2016) $ + * @author Tilo Waldenmaier, Thomas Melzig + */ + + +#ifndef _TOPSIMULATOR_G4BEAMTESTTANK_H_ +#define _TOPSIMULATOR_G4BEAMTESTTANK_H_ + +class OMKey; +struct TankKey; +class I3Geometry; +class I3Position; + +class G4LogicalVolume; +class G4VPhysicalVolume; +class G4TankIceSD; + +#include <G4Types.hh> +#include <G4ThreeVector.hh> +#include <map> + +#include <icetray/I3Logging.h> + +/** + * This class constructs the physical volume of single tanks, serves as bridge to the sensitive detector in the tank, and computes the location of the point that define the snow surface. It also stores the basic tank dimensions (height, radius, snow). + * + * The sensitive detectors are not PMTs. Instead, the ice itself is the sensitive detector through G4TankIceSD. In this way, time is saved by not tracking photons. + * + * The points that are used to interpolate the snow surface are chosen so the snow surface is essentially flat on top of the tanks. This is done by determining the three vertices of a 10-meter equilateral triangle centered at the tank. The orientation of the triangle depends on whether the tank is part of a station with one or two tanks (if there are more tanks in a station, a fatal error occurs). In the single-tank case, the first vertex lies along the line pointing toward the first DOM. In the two-tank case, it lies along the line pointing toward it's neighboring tank. + * + */ +class G4BeamTestTank +{ + public: + G4BeamTestTank(const TankKey& tankKey, const I3Geometry& geometry); + + ~G4BeamTestTank(); + + const G4ThreeVector& GetPos() const {return position_;} + + /// Position of center of the tank + I3Position GetPos_I3(); + double GetX_I3(); + double GetY_I3(); + double GetZ_I3(); + + /// Delaunay points around tank + const G4ThreeVector& GetDelaunayPoint1() const {return delaunayPoint1_;} + const G4ThreeVector& GetDelaunayPoint2() const {return delaunayPoint2_;} + const G4ThreeVector& GetDelaunayPoint3() const {return delaunayPoint3_;} + + /// Tank dimensions in Geant4 units + G4double GetTankHeight_G4() {return tankHeight_;} + G4double GetTankRadius_G4() {return outerRadius_;} + G4double GetSnowHeight_G4() {return snowHeight_;} + + /// Tank dimensions in IceCube units and reference system + double GetTankHeight_I3(); + double GetTankRadius_I3(); + double GetSnowHeight_I3(); + + /// Energy deposit for a given OM, in Geant4 units (from G4TankIceSD) + G4double GetEDep_G4(const OMKey& omKey); + /// Emission time for a given OM, in Geant4 units (from G4TankIceSD) + G4double GetTime_G4(const OMKey& omKey); + + /// Energy deposit for a given OM, in Geant4 units (from G4TankIceSD) + double GetEDep_I3(const OMKey& omKey); + /// Emission time for a given OM, in Geant4 units (from G4TankIceSD) + double GetTime_I3(const OMKey& omKey); + + /// Number of Cherenkovs for a given OM (from G4TankIceSD) + double GetNumCherenkov(const OMKey& omKey); + /// Number of Cherenkovs weighted by emission point (from G4TankIceSD) + double GetNumCherenkovWeight(const OMKey& omKey); + + const TankKey& GetTankKey() const {return tankKey_;} + + /// Method to call when constructing detector + G4VPhysicalVolume* InstallTank(G4VPhysicalVolume* mother, const G4ThreeVector& origin); + + private: + + G4double tankThickness_; + G4double tankHeight_; + G4double fillHeight_; + G4double innerRadius_; + G4double outerRadius_; + + G4double snowHeight_; + G4double perliteHeight_; + + G4double glassOuterRadius_; + G4double glassThickness_; + + G4ThreeVector position_; + + G4ThreeVector delaunayPoint1_; + G4ThreeVector delaunayPoint2_; + G4ThreeVector delaunayPoint3_; + + std::map<OMKey, G4ThreeVector> relDomPositions_; + + G4LogicalVolume* tankLog_; + G4TankIceSD* iceSD_; + + const TankKey& tankKey_; + const I3Geometry& geometry_; + + SET_LOGGER("G4BeamTestTank"); +}; + +#endif diff --git a/include/G4BeamTestUserSteppingAction.h b/include/G4BeamTestUserSteppingAction.h new file mode 100644 index 0000000..9807bbf --- /dev/null +++ b/include/G4BeamTestUserSteppingAction.h @@ -0,0 +1,31 @@ +#ifndef G4BEAMTESTUSERSTEPPINGACTION_H_INCLUDED +#define G4BEAMTESTUSERSTEPPINGACTION_H_INCLUDED +/** + * Copyright (C) 2011 + * The IceCube collaboration + * ID: $Id$ + * + * @file G4BeamTestUserSteppingAction.h + * @version $Revision$ + * @date $Date$ + * @author Thomas Melzig + * + * $LastChangedBy$ + */ + + +#include "G4UserSteppingAction.hh" + +/** + * Implementation of G4UserSteppingAction. This class kills gammas below threshold (set by G4BeamTestTank). + */ +class G4BeamTestUserSteppingAction : public G4UserSteppingAction { + + public: + G4BeamTestUserSteppingAction(); + ~G4BeamTestUserSteppingAction() {} + + void UserSteppingAction(const G4Step*); +}; + +#endif // G4BEAMTESTUSERSTEPPINGACTION_H_INCLUDED diff --git a/include/G4BeamTestUserTrackingAction.h b/include/G4BeamTestUserTrackingAction.h new file mode 100644 index 0000000..bb6d155 --- /dev/null +++ b/include/G4BeamTestUserTrackingAction.h @@ -0,0 +1,32 @@ +#ifndef G4BEAMTESTUSERTRACKINGACTION_H_INCLUDED +#define G4BEAMTESTUSERTRACKINGACTION_H_INCLUDED +/** + * Copyright (C) 2011 + * The IceCube collaboration + * ID: $Id$ + * + * @file G4BeamTestUserTrackingAction.h + * @version $Revision$ + * @date $Date$ + * @author Thomas Melzig + * + * $LastChangedBy$ + */ + + +#include "G4UserTrackingAction.hh" + +/** + * Implementation of G4UserTrackingAction. This class kills gammas below threshold (set by G4BeamTestTank). + */ +class G4BeamTestUserTrackingAction : public G4UserTrackingAction { + + public: + G4BeamTestUserTrackingAction(); + ~G4BeamTestUserTrackingAction() {} + + void PreUserTrackingAction(const G4Track*); + void PostUserTrackingAction(const G4Track*); +}; + +#endif // G4BEAMTESTUSERTRACKINGACTION_H_INCLUDED diff --git a/include/G4Interface.h b/include/G4Interface.h new file mode 100644 index 0000000..c9bec07 --- /dev/null +++ b/include/G4Interface.h @@ -0,0 +1,68 @@ +/** + * Copyright (C) 2009 + * The IceCube collaboration + * ID: $Id: G4Interface.h 149388 2016-08-18 21:50:04Z jgonzalez $ + * + * @file G4Interface.h + * @version $Rev: 149388 $ + * @date $Date: 2016-08-18 22:50:04 +0100 (Thu, 18 Aug 2016) $ + * @author Tilo Waldenmaier + */ + +#ifndef _TOPSIM_G4INTERFACE_H_ +#define _TOPSIM_G4INTERFACE_H_ + +#include <g4-tankresponse/g4classes/G4BeamTestRunManager.h> +#include <icetray/I3Logging.h> + +#ifdef G4VIS_USE +class G4VisManager; +#endif + +class I3Particle; +class G4BeamTestTank; +class G4BeamTestDetectorConstruction; + +/** + * Top-level class to handle Geant4. All global things are initialized here (run manager, visualization manager, detector construction, physics list and user actions). + */ + +class G4Interface +{ + public: + G4Interface(const std::string& visMacro=""); + ~G4Interface(); + + // Static method which returns the singleton pointer to this class + static G4Interface* GetInstance() {return g4Interface_;} + + /// Add a tank to the geometry. Should not be called after initialized. + void InstallTank(G4BeamTestTank* tank); + + /// Initialize event. Most Geant4 global things are initialized the first time this is called. + void InitializeEvent(); + /// To be called after simulating each IceTray event. + void TerminateEvent(); + /// Simulate a single particle (InitializeEvent must be called first) + void InjectParticle(const I3Particle& particle); + + private: + void Initialize(); + + static G4Interface* g4Interface_; + + G4BeamTestRunManager runManager_; + +#ifdef G4VIS_USE + G4VisManager* visManager_; +#endif + + G4BeamTestDetectorConstruction* detector_; + bool initialized_; + bool eventInitialized_; + std::string visMacro_; + + SET_LOGGER("G4Interface"); +}; + +#endif diff --git a/include/G4TankIceSD.h b/include/G4TankIceSD.h new file mode 100644 index 0000000..75375c1 --- /dev/null +++ b/include/G4TankIceSD.h @@ -0,0 +1,69 @@ +/** + * Copyright (C) 2009 + * The IceCube collaboration + * ID: $Id: G4TankIceSD.h 149388 2016-08-18 21:50:04Z jgonzalez $ + * + * @file G4TankIceSD.h + * @version $Rev: 149388 $ + * @date $Date: 2016-08-18 22:50:04 +0100 (Thu, 18 Aug 2016) $ + * @author Tilo Waldenmaier, Thomas Melzig + */ + + +#ifndef _G4TANKRESPONSE_G4TankIceSD_H +#define _G4TANKRESPONSE_G4TankIceSD_H + +#include <icetray/OMKey.h> + +#include <G4VSensitiveDetector.hh> +#include <G4ThreeVector.hh> + +#include <map> + +class G4Step; +class G4HCofThisEvent; +class G4TouchableHistory; + + +/** + * An "ice sensitive detector". This sensitive detector is meant to be associated with the ice logical volume in a tank. + * + * This class keeps track of the energy losses and number Cherenkov photons produced in the ice of each tank. + * The Cherenkov photons are counted in two ways. One is a simple count and the other is a weighted count + * where the weight depends on the distance from the photon emission point an the OM. + */ +class G4TankIceSD : public G4VSensitiveDetector +{ + public: + G4TankIceSD(G4String name, const std::map<OMKey, G4ThreeVector>& domPositions); + ~G4TankIceSD(); + + /// Methods called by Geant4 framework + void Initialize(G4HCofThisEvent *HCE); + G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist); + void EndOfEvent(G4HCofThisEvent *HCE); + + /// Get total energy deposit for a given OM (same for both OMs in a tank) + G4double GetEDep(const OMKey& omKey) {return sumEdep_[omKey];} + /// Get average emission time weighted by deposited energy (same for both OMs in a tank) + G4double GetTime(const OMKey& omKey) {return cogTime_[omKey];} + /// Get number of Cherenkov photons for a given OM (same for both OMs in a tank) + G4double GetNumCherenkov(const OMKey& omKey) {return cherenkovCounter_[omKey];} + /// Get number of Cherenkov photons for a given OM weighted relative to emission point + G4double GetNumCherenkovWeight(const OMKey& omKey) {return cherenkovCounterWeight_[omKey];} + + private: + //ExN04TrackerHitsCollection *trackerCollection; + const std::map<OMKey, G4ThreeVector> domPositions_; + + /// Cherenkov production. See technical note + G4double GetCerenkovNumber(G4Step* aStep); + G4double GetProbability(G4double radius, G4double height); + + std::map<OMKey, G4double> sumEdep_; + std::map<OMKey, G4double> cogTime_; + std::map<OMKey, G4double> cherenkovCounter_; + std::map<OMKey, G4double> cherenkovCounterWeight_; +}; + +#endif |
