Skip to content

Commit f6cfc9a

Browse files
authored
Merge pull request #93 from rest-for-physics/jgalan_bIAXO_example
Helioscope signal sensitivity
2 parents 3802d10 + 79e2cbd commit f6cfc9a

35 files changed

+4004
-16
lines changed

.github/workflows/validation.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,27 @@ jobs:
266266
export REST_GAS_STEP=2
267267
restManager --c BabyIAXO_Micromegas_XMM.rml --o output.root
268268
restRoot -q ValidateChain.C'("output.root")'
269+
270+
Sensitivity:
271+
name: Sensitivity tests
272+
runs-on: ubuntu-latest
273+
container:
274+
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
275+
needs: [ build-axionlib ]
276+
steps:
277+
- uses: rest-for-physics/framework/.github/actions/checkout@master
278+
with:
279+
branch: ${{ env.BRANCH_NAME }}
280+
repository: rest-for-physics/axionlib
281+
path: ${{ env.AXION_LIB_PATH }}
282+
- name: Restore cache
283+
uses: actions/cache@v3
284+
id: axionlib-install-cache
285+
with:
286+
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
287+
path: ${{ env.REST_PATH }}
288+
- name: Dummy IAXO
289+
run: |
290+
source ${{ env.REST_PATH }}/thisREST.sh
291+
cd ${{ env.AXION_LIB_PATH }}/pipeline/sensitivity/
292+
restRoot -b -q Validation.C
File renamed without changes.
File renamed without changes.

examples/03.IAXO/BabyIAXO.rml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<BabyIAXO>
3+
<globals>
4+
<constant name="Pi" value="3.1415927" />
5+
<constant name="Bores" value="2" />
6+
<constant name="SpotRadius" value="0.309" />
7+
<constant name="BField" value="1.73" />
8+
<constant name="Years" value="1.5" />
9+
<constant name="MagnetRadius" value="35" />
10+
<constant name="MagnetLength" value="10" />
11+
<constant name="WindowEff" value="0.7" />
12+
<constant name="OpticsEff" value="0.35" />
13+
<constant name="BckRate" value="1e-7" />
14+
</globals>
15+
16+
<TRestSensitivity name="VacuumPhase" strategy="nodes" >
17+
18+
<TRestExperiment name="Vacuum" exposureTime="Years*365*12hr" useAverage="true">
19+
<!-- Background -->
20+
<TRestComponentFormula name="Flat7" nature="background" >
21+
<parameter name="formulaUnits" value="keV^-1" />
22+
<cVariable name="energy" range="(0,10)keV" bins="20" />
23+
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" />
24+
</TRestComponentFormula>
25+
26+
<!-- Signal -->
27+
<TRestAxionHelioscopeSignal name="Vacuum" nature="signal" parameter="ma"
28+
conversionType="IAXO" bores="Bores"
29+
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T"
30+
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" >
31+
32+
<cVariable name="energy" range="(0,10)keV" bins="20" />
33+
34+
<parameter name="firstParameterValue" value="0.001" />
35+
<parameter name="lastParameterValue" value="10" />
36+
<parameter name="stepParameterValue" value="1.02" />
37+
<parameter name="exponential" value="true" />
38+
39+
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10"
40+
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" />
41+
</TRestAxionHelioscopeSignal>
42+
</TRestExperiment>
43+
44+
</TRestSensitivity>
45+
46+
<TRestSensitivity name="CombinedPhase" strategy="nodes" >
47+
<TRestExperiment name="Vacuum" exposureTime="1.5*300*12hr" useAverage="true">
48+
<!-- Background -->
49+
<TRestComponentFormula name="Flat7" nature="background" >
50+
<parameter name="formulaUnits" value="keV^-1" />
51+
<cVariable name="energy" range="(0,10)keV" bins="20" />
52+
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" />
53+
</TRestComponentFormula>
54+
55+
<!-- Signal -->
56+
<TRestAxionHelioscopeSignal name="Vacuum" nature="signal" parameter="ma"
57+
conversionType="IAXO" bores="Bores"
58+
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T"
59+
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" >
60+
61+
<cVariable name="energy" range="(0,10)keV" bins="20" />
62+
63+
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10"
64+
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" />
65+
66+
67+
<parameter name="firstParameterValue" value="0.001" />
68+
<parameter name="lastParameterValue" value="10" />
69+
<parameter name="stepParameterValue" value="1.02" />
70+
<parameter name="exponential" value="true" />
71+
</TRestAxionHelioscopeSignal>
72+
</TRestExperiment>
73+
74+
<TRestExperimentList name="GasPhase" exposureTime="0"
75+
componentPattern="output/SignalsBabyIAXO.root" experimentsFile="output/BabyIAXO.settings" useAverage="true">
76+
77+
<TRestComponentFormula name="Flat7" nature="background" >
78+
<parameter name="formulaUnits" value="keV^-1" />
79+
<cVariable name="energy" range="(0,10)keV" bins="20" />
80+
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" />
81+
</TRestComponentFormula>
82+
</TRestExperimentList>
83+
</TRestSensitivity>
84+
85+
<TRestAxionHelioscopeSignal name="GasSignal" nature="signal" parameter="ma"
86+
conversionType="IAXO" bores="Bores"
87+
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T"
88+
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" >
89+
90+
<cVariable name="energy" range="(0,10)keV" bins="20" />
91+
92+
<parameter name="firstParameterValue" value="0.001" />
93+
<parameter name="lastParameterValue" value="10" />
94+
<parameter name="stepParameterValue" value="1.02" />
95+
<parameter name="exponential" value="true" />
96+
97+
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10"
98+
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" />
99+
100+
<TRestAxionBufferGas name="helium" >
101+
<gas name="He" density="0.0025e-6g/cm^3"/>
102+
</TRestAxionBufferGas>
103+
104+
</TRestAxionHelioscopeSignal>
105+
106+
</BabyIAXO>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
Double_t Eo = 0.5; // keV
2+
Double_t Ef = 10; // keV
3+
4+
Int_t GenerateSignalComponents(std::string rmlFile, std::string name, Double_t totalYears = 1.5,
5+
size_t firstSteps = 5, Double_t firstYears = 0.5) {
6+
Double_t totalExposureTime = totalYears * 365. * 12 * 3600;
7+
Double_t firstStepsExposure = firstYears * 365. * 12 * 3600;
8+
9+
TRestAxionField field;
10+
std::vector<std::pair<Double_t, Double_t>> scanSteps =
11+
field.GetMassDensityScanning("He", 0.25, 20); // Up to 0.25 eV
12+
13+
TRestAxionHelioscopeSignal gasPhase(rmlFile.c_str(), name.c_str());
14+
std::filesystem::path filePath = rmlFile;
15+
std::filesystem::path newExtension = ".settings";
16+
std::string settingsFile = filePath.replace_extension(newExtension);
17+
std::filesystem::path rootExtension = ".root";
18+
std::string componentsFile = "Signals" + (std::string)filePath.replace_extension(rootExtension);
19+
20+
std::filesystem::create_directories("output");
21+
settingsFile = "output/" + settingsFile;
22+
componentsFile = "output/" + componentsFile;
23+
24+
TFile* f = TFile::Open((TString)componentsFile, "RECREATE");
25+
std::vector<Double_t> exposureTimes;
26+
for (size_t n = 0; n < scanSteps.size(); n++) {
27+
Double_t mass = scanSteps[n].first;
28+
Double_t density = scanSteps[n].second;
29+
30+
gasPhase.SetName("P" + (TString)IntegerToString(n + 1));
31+
gasPhase.GetGas()->SetGasDensity("He", density);
32+
gasPhase.RegenerateHistograms();
33+
34+
Double_t nGamma = gasPhase.GetSignalRate(mass, Eo, Ef);
35+
Double_t ksvzFactor = 3.75523 * mass;
36+
Double_t exposureTime = 0;
37+
if (n < firstSteps)
38+
exposureTime = firstStepsExposure / firstSteps;
39+
else
40+
exposureTime = TMath::Log(20.) / TMath::Power(ksvzFactor, 4) / nGamma;
41+
exposureTimes.push_back(exposureTime);
42+
43+
gasPhase.Write("P" + (TString)IntegerToString(n + 1));
44+
}
45+
f->Close();
46+
47+
std::cout << "Generated signals file: " << componentsFile << std::endl;
48+
49+
Double_t generatedExposureTime = 0;
50+
for (size_t n = firstSteps; n < scanSteps.size(); n++) generatedExposureTime += exposureTimes[n];
51+
52+
FILE* g = fopen(settingsFile.c_str(), "wt");
53+
for (size_t n = 0; n < firstSteps; n++) fprintf(g, "%lf\tP%d\n", exposureTimes[n], (int)(n + 1));
54+
55+
for (size_t n = firstSteps; n < scanSteps.size(); n++)
56+
fprintf(g, "%lf\tP%d\n",
57+
(totalExposureTime - firstStepsExposure) * exposureTimes[n] / generatedExposureTime,
58+
(int)(n + 1));
59+
fclose(g);
60+
61+
std::cout << "Generated settings file: " << settingsFile << std::endl;
62+
63+
return 0;
64+
}

examples/03.IAXO/IAXO.rml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<BabyIAXO>
3+
<globals>
4+
<constant name="Pi" value="3.1415927" />
5+
<constant name="Bores" value="8" />
6+
<constant name="SpotRadius" value="0.2185" /> <!-- Area 0.15 cm2 -->
7+
<constant name="BField" value="2.55" />
8+
<constant name="Years" value="3" />
9+
<constant name="MagnetRadius" value="30" />
10+
<constant name="MagnetLength" value="20" />
11+
<constant name="WindowEff" value="0.8" />
12+
<constant name="OpticsEff" value="0.7" />
13+
<constant name="BckRate" value="1e-8" />
14+
</globals>
15+
16+
<TRestSensitivity name="VacuumPhase" strategy="nodes" >
17+
18+
<TRestExperiment name="Vacuum" exposureTime="Years*365*12hr" useAverage="true">
19+
<!-- Background -->
20+
<TRestComponentFormula name="Flat8" nature="background" >
21+
<parameter name="formulaUnits" value="keV^-1" />
22+
<cVariable name="energy" range="(0,10)keV" bins="20" />
23+
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" />
24+
</TRestComponentFormula>
25+
26+
<!-- Signal -->
27+
<TRestAxionHelioscopeSignal name="Vacuum" nature="signal" parameter="ma"
28+
conversionType="IAXO" bores="Bores"
29+
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T"
30+
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" >
31+
32+
<cVariable name="energy" range="(0,10)keV" bins="20" />
33+
34+
<parameter name="firstParameterValue" value="0.001" />
35+
<parameter name="lastParameterValue" value="10" />
36+
<parameter name="stepParameterValue" value="1.02" />
37+
<parameter name="exponential" value="true" />
38+
39+
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10"
40+
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" />
41+
</TRestAxionHelioscopeSignal>
42+
</TRestExperiment>
43+
44+
</TRestSensitivity>
45+
46+
<TRestSensitivity name="CombinedPhase" strategy="nodes" >
47+
<TRestExperiment name="Vacuum" exposureTime="1.5*300*12hr" useAverage="true">
48+
<!-- Background -->
49+
<TRestComponentFormula name="Flat8" nature="background" >
50+
<parameter name="formulaUnits" value="keV^-1" />
51+
<cVariable name="energy" range="(0,10)keV" bins="20" />
52+
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" />
53+
</TRestComponentFormula>
54+
55+
<!-- Signal -->
56+
<TRestAxionHelioscopeSignal name="Vacuum" nature="signal" parameter="ma"
57+
conversionType="IAXO" bores="Bores"
58+
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T"
59+
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" >
60+
61+
<cVariable name="energy" range="(0,10)keV" bins="20" />
62+
63+
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10"
64+
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" />
65+
66+
<parameter name="firstParameterValue" value="0.001" />
67+
<parameter name="lastParameterValue" value="10" />
68+
<parameter name="stepParameterValue" value="1.02" />
69+
<parameter name="exponential" value="true" />
70+
</TRestAxionHelioscopeSignal>
71+
</TRestExperiment>
72+
73+
<TRestExperimentList name="GasPhase" exposureTime="0"
74+
componentPattern="output/SignalsIAXO.root" experimentsFile="output/IAXO.settings" useAverage="true">
75+
76+
<TRestComponentFormula name="Flat8" nature="background" >
77+
<parameter name="formulaUnits" value="keV^-1" />
78+
<cVariable name="energy" range="(0,10)keV" bins="20" />
79+
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" />
80+
</TRestComponentFormula>
81+
</TRestExperimentList>
82+
</TRestSensitivity>
83+
84+
<TRestAxionHelioscopeSignal name="GasSignal" nature="signal" parameter="ma"
85+
conversionType="IAXO" bores="Bores"
86+
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T"
87+
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" >
88+
89+
<cVariable name="energy" range="(0,10)keV" bins="20" />
90+
91+
<parameter name="firstParameterValue" value="0.001" />
92+
<parameter name="lastParameterValue" value="10" />
93+
<parameter name="stepParameterValue" value="1.02" />
94+
<parameter name="exponential" value="true" />
95+
96+
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10"
97+
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" />
98+
99+
<TRestAxionBufferGas name="helium" >
100+
<gas name="He" density="0.0025e-6g/cm^3"/>
101+
</TRestAxionBufferGas>
102+
103+
</TRestAxionHelioscopeSignal>
104+
105+
</BabyIAXO>

0 commit comments

Comments
 (0)