Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low energy EM updates and bug fix #63

Merged
merged 7 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ Build Standalone:
Load REST Libraries:
stage: Load REST Libraries
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- restRoot -b -q

01.NLDBD:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/01.NLDBD/
- restG4 NLDBD.rml
- geant4-config --version
Expand All @@ -81,7 +81,7 @@ Load REST Libraries:
03.Fluorescence:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/03.Fluorescence/
- restG4 gamma.rml
- restManager --c g4Analysis.rml --f Run00111_Gamma_Fluorescence.root
Expand All @@ -91,7 +91,7 @@ Load REST Libraries:
04.MuonScan:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/04.MuonScan/
- restG4 Muon.rml
- geant4-config --version
Expand All @@ -104,23 +104,23 @@ Load REST Libraries:
05.PandaXIII:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/05.PandaXIII/
- restG4 Xe136bb0n.rml
- restRoot -b -q Validate.C'("Xe136bb0n_n2E06.root")'

06.IonRecoils:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/06.IonRecoils/
- restG4 recoils.rml
- restRoot -b -q Validate.C'("Run00001_F20_Recoils.root")'

07.FullChainDecay:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/07.FullChainDecay/
- restG4 fullChain.rml
- restG4 singleDecay.rml
Expand All @@ -133,7 +133,7 @@ Load REST Libraries:
08.Alphas:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/08.Alphas/
- mkdir data
- export REST_ENERGY=5
Expand All @@ -154,23 +154,23 @@ Load REST Libraries:
09.Pb210_Shielding:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/09.Pb210_Shield/
- restG4 Pb210.rml
- restRoot -b -q Validate.C'("Run00001_Pb210_Shielding.root")'

10.Geometries:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/10.Geometries/
- restG4 Assembly.rml
- restRoot -b -q Validate.C'("Run00001_Assembly_Assembly.root")'

11.Xrays:
stage: Run Examples
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- source ${CI_PROJECT_DIR}/install/thisREST.sh
- cd ${CI_PROJECT_DIR}/install/examples/restG4/11.Xrays/
- restG4 xrays.rml
- restManager --c analysis.rml --f RestG4_xrays_00001_ArgonISO.root
Expand Down
21 changes: 10 additions & 11 deletions examples/01.NLDBD/NLDBD.rml
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,25 @@ By default REST units are mm, keV and degrees
<parameter name="minEnergyRangeProductionCuts" value="1" units="keV"/>
<parameter name="maxEnergyRangeProductionCuts" value="1" units="GeV"/>

// Use only one EM physics list
<!-- EM Physics lists -->
<physicsList name="G4EmLivermorePhysics"></physicsList>
<!-- <physicsList name="G4EmPenelopePhysics"> </physicsList> -->
<!-- <physicsList name="G4EmStandardPhysics_option3"> </physicsList> -->
<physicsList name="G4EmLivermorePhysics"> <!-- "G4EmPenelopePhysics", "G4EmStandardPhysics_option3" -->
<option name="pixe" value="true"/>
</physicsList>

<!-- Decay physics lists -->
<physicsList name="G4DecayPhysics"></physicsList>
<physicsList name="G4RadioactiveDecayPhysics"></physicsList>
<physicsList name="G4DecayPhysics"/>
<physicsList name="G4RadioactiveDecayPhysics"/>
<physicsList name="G4RadioactiveDecay">
<option name="ICM" value="true"/>
<option name="ARM" value="true"/>
</physicsList>

<!-- Hadron physics lists -->
<physicsList name="G4HadronElasticPhysicsHP"></physicsList>
<physicsList name="G4IonBinaryCascadePhysics"></physicsList>
<physicsList name="G4HadronPhysicsQGSP_BIC_HP"></physicsList>
<physicsList name="G4NeutronTrackingCut"></physicsList>
<physicsList name="G4EmExtraPhysics"></physicsList>
<physicsList name="G4HadronElasticPhysicsHP"/>
<physicsList name="G4IonBinaryCascadePhysics"/>
<physicsList name="G4HadronPhysicsQGSP_BIC_HP"/>
<physicsList name="G4NeutronTrackingCut"/>
<physicsList name="G4EmExtraPhysics"/>

</TRestGeant4PhysicsLists>

Expand Down
6 changes: 3 additions & 3 deletions examples/04.MuonScan/Muon.rml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
<parameter name="maxEnergyRangeProductionCuts" value="1" units="GeV"/>

<!-- EM Physics lists -->
<physicsList name="G4EmLivermorePhysics"/>
<!-- <physicsList name="G4EmPenelopePhysics"> </physicsList> -->
<!-- <physicsList name="G4EmStandardPhysics_option3"> </physicsList> -->
<physicsList name="G4EmLivermorePhysics"> <!-- "G4EmPenelopePhysics", "G4EmStandardPhysics_option3" -->
<option name="pixe" value="true"/>
</physicsList>

<!-- Decay physics lists -->
<physicsList name="G4DecayPhysics"/>
Expand Down
23 changes: 11 additions & 12 deletions examples/05.PandaXIII/Xe136bb0n.rml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
<parameter name="seed" value="1"/>

<generator type="volume" from="Gas">
<source use="Xe136bb0n.dat">
</source>
<source use="Xe136bb0n.dat"/>
</generator>

<storage sensitiveVolume="Gas">
Expand All @@ -53,24 +52,24 @@
<parameter name="maxEnergyRangeProductionCuts" value="1GeV"/>

<!-- EM Physics lists -->
<physicsList name="G4EmLivermorePhysics"></physicsList>
<!-- <physicsList name="G4EmPenelopePhysics"> </physicsList> -->
<!-- <physicsList name="G4EmStandardPhysics_option3"> </physicsList> -->
<physicsList name="G4EmLivermorePhysics"> <!-- "G4EmPenelopePhysics", "G4EmStandardPhysics_option3" -->
<option name="pixe" value="true"/>
</physicsList>

<!-- Decay physics lists -->
<physicsList name="G4DecayPhysics"></physicsList>
<physicsList name="G4RadioactiveDecayPhysics"></physicsList>
<physicsList name="G4DecayPhysics"/>
<physicsList name="G4RadioactiveDecayPhysics"/>
<physicsList name="G4RadioactiveDecay">
<option name="ICM" value="true"/>
<option name="ARM" value="true"/>
</physicsList>

<!-- Hadron physics lists -->
<physicsList name="G4HadronElasticPhysicsHP"></physicsList>
<physicsList name="G4IonBinaryCascadePhysics"></physicsList>
<physicsList name="G4HadronPhysicsQGSP_BIC_HP"></physicsList>
<physicsList name="G4NeutronTrackingCut"></physicsList>
<physicsList name="G4EmExtraPhysics"></physicsList>
<physicsList name="G4HadronElasticPhysicsHP"/>
<physicsList name="G4IonBinaryCascadePhysics"/>
<physicsList name="G4HadronPhysicsQGSP_BIC_HP"/>
<physicsList name="G4NeutronTrackingCut"/>
<physicsList name="G4EmExtraPhysics"/>

</TRestGeant4PhysicsLists>

Expand Down
7 changes: 3 additions & 4 deletions examples/08.Alphas/alphas.rml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ By default REST units are mm, keV and degrees
<parameter name="minEnergyRangeProductionCuts" value="1" units="keV"/>
<parameter name="maxEnergyRangeProductionCuts" value="1" units="GeV"/>

// Use only one EM physics list
<!-- EM Physics lists -->
<!-- <physicsList name="G4EmLivermorePhysics"> </physicsList> -->
<!-- <physicsList name="G4EmPenelopePhysics"> </physicsList> -->
<physicsList name="G4EmStandardPhysics_option4"/>
<physicsList name="G4EmStandardPhysics_option4"> <!-- "G4EmPenelopePhysics", "G4EmStandardPhysics_option3" -->
<option name="pixe" value="true"/>
</physicsList>

<!-- Decay physics lists -->
<physicsList name="G4DecayPhysics"/>
Expand Down
25 changes: 13 additions & 12 deletions include/PhysicsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,31 @@
#include <G4VModularPhysicsList.hh>
#include <globals.hh>

class G4VPhysicsConstructor;

class PhysicsList : public G4VModularPhysicsList {
public:
PhysicsList();
PhysicsList(TRestGeant4PhysicsLists* restPhysicsLists);
~PhysicsList();
PhysicsList() = delete;
explicit PhysicsList(TRestGeant4PhysicsLists* restPhysicsLists);
~PhysicsList() override;

protected:
// Construct particle and physics
virtual void InitializePhysicsLists();
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void SetCuts();

void ConstructParticle() override;
void ConstructProcess() override;
void SetCuts() override;

private:
G4EmConfigurator fEmConfig;

G4VPhysicsConstructor* fEmPhysicsList;
G4VPhysicsConstructor* fDecPhysicsList;
G4VPhysicsConstructor* fRadDecPhysicsList;
G4VPhysicsConstructor* fEmPhysicsList = nullptr;
std::string fEmPhysicsListName; // Can be different from the output of GetPhysicsName

G4VPhysicsConstructor* fDecPhysicsList = nullptr;
G4VPhysicsConstructor* fRadDecPhysicsList = nullptr;
std::vector<G4VPhysicsConstructor*> fHadronPhys;

TRestGeant4PhysicsLists* restPhysList;
TRestGeant4PhysicsLists* fRestPhysicsLists = nullptr;
};

#endif
2 changes: 2 additions & 0 deletions src/Application.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ void Application::Run(const CommandLineParameters& commandLineParameters) {

fSimulationManager->fRestRun->AddMetadata(fSimulationManager->fRestGeant4Metadata);
fSimulationManager->fRestRun->AddMetadata(fSimulationManager->fRestGeant4PhysicsLists);

fSimulationManager->fRestRun->PrintMetadata();

fSimulationManager->fRestRun->FormOutputFile();
Expand All @@ -138,6 +139,7 @@ void Application::Run(const CommandLineParameters& commandLineParameters) {

runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new PhysicsList(fSimulationManager->fRestGeant4PhysicsLists));
fSimulationManager->fRestGeant4PhysicsLists->PrintMetadata();

runManager->SetUserInitialization(new ActionInitialization(fSimulationManager));

Expand Down
Loading