Skip to content

Commit 68b9410

Browse files
committed
Adding full-chain validation pipeline test
1 parent 92a4882 commit 68b9410

File tree

4 files changed

+199
-0
lines changed

4 files changed

+199
-0
lines changed

Diff for: .github/workflows/validation.yml

+9
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,12 @@ jobs:
243243
restManager --c photonConversion.rml
244244
restRoot -b -q Validate.C'(5.86614e-19, 1.61288)'
245245
python3 validateStreamer.py
246+
- name: Full ray-tracing
247+
run: |
248+
source ${{ env.REST_PATH }}/thisREST.sh
249+
cd ${{ env.AXION_LIB_PATH }}/pipeline/ray-tracing/full-chain/
250+
export REST_LOW_AXION_MASS=1e-2
251+
export REST_HIGH_AXION_MASS=1e-1
252+
export REST_GAS_STEP=2
253+
restManager --c BabyIAXO_Micromegas_XMM.rml --o output.root
254+
restRoot -q ValidateChain.C'("output.root")'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="2.0" encoding="UTF-8" standalone="no"?>
2+
<TRestManager name="RESTManagerSim" title="Template manager to process a simulation generated by restG4." verboseLevel="info">
3+
<globals>
4+
<parameter name="verboseLevel" value="essential"/>
5+
<constant name="opticsPosition" value="7000"/>
6+
<constant name="focalPosition" value="7538"/>
7+
<variable name="REST_YAW" value="1"/>
8+
<variable name="REST_GAS_STEP" value="1"/>
9+
<variable name="REST_LOW_AXION_MASS" value="1e-3"/>
10+
<variable name="REST_HIGH_AXION_MASS" value="1e-2"/>
11+
<variable name="CONDOR_RUN" value="auto"/>
12+
</globals>
13+
<TRestRun name="axionRun" title="BabyIAXO V1.0" verboseLevel="info">
14+
<parameter name="experimentName" value="BabyIAXO"/>
15+
<parameter name="runType" value="rayTracing"/>
16+
<parameter name="runNumber" value="137"/>
17+
<parameter name="runTag" value="Primakoff_XMM_Micromegas_P${REST_GAS_STEP}"/>
18+
<parameter name="runDescription" value=""/>
19+
<parameter name="user" value="pipeline"/>
20+
<parameter name="verboseLevel" value="2"/>
21+
<parameter name="outputFileName" value="run_[fRunNumber]_[fRunType]_[fRunTag]_V[fVersion].root"/>
22+
<TRestAxionSolarFlux file="fluxes.rml" name="LennertHoofPrimakoff"/>
23+
<TRestAxionMagneticField file="fields.rml" name="babyIAXO"/>
24+
<TRestAxionBufferGas file="bufferGases.rml" name="helium_${REST_GAS_STEP}"/>
25+
<TRestAxionTrueWolterOptics file="xmmTrueWolter.rml" name="xmm"/>
26+
<TRestAxionXrayWindow name="magnetBoreWindow" material="Vacuum">
27+
<TRestPatternMask name="mask" maskRadius="35cm" verboseLevel="info"/>
28+
</TRestAxionXrayWindow>
29+
<TRestAxionXrayWindow file="windows.rml" name="MicromegasAluminumFoil"/>
30+
<TRestAxionXrayWindow file="windows.rml" name="MicromegasStrongBack"/>
31+
<TRestAxionXrayWindow file="windows.rml" name="MicromegasMylar"/>
32+
</TRestRun>
33+
<TRestProcessRunner name="EventProcess" verboseLevel="info">
34+
<parameter name="eventsToProcess" value="100"/>
35+
<!-- By default the generator will place the Z-position at 1 A.U. -->
36+
<addProcess type="TRestAxionGeneratorProcess" name="axionGen">
37+
<parameter name="generatorType" value="solarFlux"/>
38+
<parameter name="targetRadius" value="35cm"/>
39+
<parameter name="axionMassRange" value="(${REST_LOW_AXION_MASS},${REST_HIGH_AXION_MASS})eV"/>
40+
<parameter name="seed" value="314"/>
41+
</addProcess>
42+
<addProcess type="TRestAxionAnalysisProcess" name="initial" observables="all"/>
43+
<!-- We do not need to transport the axion. It is just to evaluate the axion at a given Z-position using the analysis process -->
44+
<addProcess type="TRestAxionTransportProcess" zPosition="-10m" name="tom5m"/>
45+
<addProcess type="TRestAxionAnalysisProcess" name="magnetEntrance">
46+
<observable name="posX"/>
47+
<observable name="posY"/>
48+
<observable name="posZ"/>
49+
<observable name="R"/>
50+
</addProcess>
51+
<addProcess type="TRestAxionFieldPropagationProcess" name="axionPhoton" integrationStep="5cm" position="(0,0,-5)m" bufferGasAdditionalLength="5m" observables="all" verboseLevel="info"/>
52+
<!-- Checking the generator target defined by TRestAxionGeneratorProcess -->
53+
<addProcess type="TRestAxionTransportProcess" zPosition="0" name="origin"/>
54+
<addProcess type="TRestAxionAnalysisProcess" name="magnetExit">
55+
<observable name="posX"/>
56+
<observable name="posY"/>
57+
<observable name="posZ"/>
58+
<observable name="R"/>
59+
</addProcess>
60+
<addProcess type="TRestAxionTransmissionProcess" name="boreExitGate" position="(0,0,0)m">
61+
<window name="magnetBoreWindow"/>
62+
</addProcess>
63+
<addProcess type="TRestAxionOpticsProcess" name="optics" position="(0,0,opticsPosition)mm">
64+
<parameter name="internalYaw" value="${REST_YAW}degrees"/>
65+
<parameter name="opticalAxis" value="false"/>
66+
<observable name="efficiency" value="ON"/>
67+
</addProcess>
68+
<addProcess type="TRestAxionAnalysisProcess" name="afterOptics">
69+
<observable name="posX"/>
70+
<observable name="posY"/>
71+
<observable name="posZ"/>
72+
<observable name="R"/>
73+
</addProcess>
74+
<addProcess type="TRestAxionTransmissionProcess" name="window" position="(0,0,focalPosition + opticsPosition)mm">
75+
<window name="MicromegasMylar"/>
76+
<window name="MicromegasStrongBack"/>
77+
<window name="MicromegasAluminumFoil"/>
78+
</addProcess>
79+
80+
<addProcess type="TRestAxionTransportProcess" zPosition="focalPosition+opticsPosition-500" name="origin"/>
81+
<addProcess type="TRestAxionAnalysisProcess" name="offset">
82+
<observable name="posX"/>
83+
<observable name="posY"/>
84+
<observable name="posZ"/>
85+
<observable name="R"/>
86+
</addProcess>
87+
88+
<addProcess type="TRestAxionTransportProcess" zPosition="focalPosition+opticsPosition" name="origin"/>
89+
<addProcess type="TRestAxionAnalysisProcess" name="final" observables="all"/>
90+
</TRestProcessRunner>
91+
<addTask command="EventProcess-&gt;RunProcess()" value="ON"/>
92+
</TRestManager>

Diff for: pipeline/ray-tracing/full-chain/ValidateChain.C

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#include <TH1D.h>
2+
#include <TRestRun.h>
3+
4+
Int_t ValidateChain(std::string fname) {
5+
std::cout << "Filename : " << fname << std::endl;
6+
TRestRun* run = new TRestRun(fname);
7+
8+
if (run->GetEntries() != 100) {
9+
std::cout << "Error. Number of entries is not 100!" << std::endl;
10+
11+
return 1;
12+
}
13+
14+
run->GetAnalysisTree()->Draw("axionPhoton_probability", "axionPhoton_probability");
15+
16+
run->GetEntry(10);
17+
run->GetAnalysisTree()->PrintObservables();
18+
19+
TH1D* h = (TH1D*)run->GetAnalysisTree()->GetHistogram();
20+
21+
if (h == nullptr) {
22+
std::cout << "Problems generating axionPhoton histogram" << std::endl;
23+
return 2;
24+
}
25+
26+
Double_t integral = h->Integral() / run->GetEntries();
27+
std::cout << "Average axion-photon probability : " << integral << std::endl;
28+
if (integral < 9.71489e-24 || integral > 9.91489e-24) {
29+
std::cout << "Axion-photon probability is not within the expected range!" << std::endl;
30+
return 3;
31+
}
32+
33+
run->GetAnalysisTree()->Draw("window_transmission", "window_transmission");
34+
TH1D* g = (TH1D*)run->GetAnalysisTree()->GetHistogram();
35+
if (g == nullptr) {
36+
std::cout << "Problems generating window_transmission histogram" << std::endl;
37+
return 4;
38+
}
39+
40+
Double_t integral2 = g->Integral() / run->GetEntries();
41+
std::cout << "Average window transmission : " << integral2 << std::endl;
42+
if (integral2 < 0.135 || integral2 > 0.145) {
43+
std::cout << "Axion-photon probability is not within the expected range!" << std::endl;
44+
return 3;
45+
}
46+
47+
run->GetAnalysisTree()->Draw("optics_efficiency", "optics_efficiency");
48+
TH1D* l = (TH1D*)run->GetAnalysisTree()->GetHistogram();
49+
if (l == nullptr) {
50+
std::cout << "Problems generating optics_efficiency histogram" << std::endl;
51+
return 6;
52+
}
53+
54+
Double_t integral3 = l->Integral() / run->GetEntries();
55+
std::cout << "Average optics efficiency : " << integral3 << std::endl;
56+
if (integral3 < 0.045 || integral3 > 0.055) {
57+
std::cout << "Optics efficiency is not within the expected range!" << std::endl;
58+
return 7;
59+
}
60+
61+
delete run;
62+
63+
return 0;
64+
}

Diff for: pipeline/ray-tracing/full-chain/bufferGases.rml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0"?>
2+
<gas>
3+
<!-- It could be done using variables ${step}. However there are some issues that need to be fixed -->
4+
<TRestAxionBufferGas name="helium_1" verboseLevel="warning">
5+
<gas name="He" density="0.0167mg/cm^3"/>
6+
</TRestAxionBufferGas>
7+
<TRestAxionBufferGas name="helium_2" verboseLevel="warning">
8+
<gas name="He" density="0.0334mg/cm^3"/>
9+
</TRestAxionBufferGas>
10+
<TRestAxionBufferGas name="helium_3" verboseLevel="warning">
11+
<gas name="He" density="0.0501mg/cm^3"/>
12+
</TRestAxionBufferGas>
13+
<TRestAxionBufferGas name="helium_4" verboseLevel="warning">
14+
<gas name="He" density="0.0668mg/cm^3"/>
15+
</TRestAxionBufferGas>
16+
<TRestAxionBufferGas name="helium_5" verboseLevel="warning">
17+
<gas name="He" density="0.0835mg/cm^3"/>
18+
</TRestAxionBufferGas>
19+
<TRestAxionBufferGas name="helium_6" verboseLevel="warning">
20+
<gas name="He" density="0.1002mg/cm^3"/>
21+
</TRestAxionBufferGas>
22+
<TRestAxionBufferGas name="helium_7" verboseLevel="warning">
23+
<gas name="He" density="0.1169mg/cm^3"/>
24+
</TRestAxionBufferGas>
25+
<TRestAxionBufferGas name="helium_8" verboseLevel="warning">
26+
<gas name="He" density="0.1336mg/cm^3"/>
27+
</TRestAxionBufferGas>
28+
<TRestAxionBufferGas name="helium_9" verboseLevel="warning">
29+
<gas name="He" density="0.1503mg/cm^3"/>
30+
</TRestAxionBufferGas>
31+
<TRestAxionBufferGas name="helium_10" verboseLevel="warning">
32+
<gas name="He" density="0.167mg/cm^3"/>
33+
</TRestAxionBufferGas>
34+
</gas>

0 commit comments

Comments
 (0)