-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from rest-for-physics/jgalan_bIAXO_example
Helioscope signal sensitivity
- Loading branch information
Showing
35 changed files
with
4,004 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<BabyIAXO> | ||
<globals> | ||
<constant name="Pi" value="3.1415927" /> | ||
<constant name="Bores" value="2" /> | ||
<constant name="SpotRadius" value="0.309" /> | ||
<constant name="BField" value="1.73" /> | ||
<constant name="Years" value="1.5" /> | ||
<constant name="MagnetRadius" value="35" /> | ||
<constant name="MagnetLength" value="10" /> | ||
<constant name="WindowEff" value="0.7" /> | ||
<constant name="OpticsEff" value="0.35" /> | ||
<constant name="BckRate" value="1e-7" /> | ||
</globals> | ||
|
||
<TRestSensitivity name="VacuumPhase" strategy="nodes" > | ||
|
||
<TRestExperiment name="Vacuum" exposureTime="Years*365*12hr" useAverage="true"> | ||
<!-- Background --> | ||
<TRestComponentFormula name="Flat7" nature="background" > | ||
<parameter name="formulaUnits" value="keV^-1" /> | ||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" /> | ||
</TRestComponentFormula> | ||
|
||
<!-- Signal --> | ||
<TRestAxionHelioscopeSignal name="Vacuum" nature="signal" parameter="ma" | ||
conversionType="IAXO" bores="Bores" | ||
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T" | ||
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" > | ||
|
||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
|
||
<parameter name="firstParameterValue" value="0.001" /> | ||
<parameter name="lastParameterValue" value="10" /> | ||
<parameter name="stepParameterValue" value="1.02" /> | ||
<parameter name="exponential" value="true" /> | ||
|
||
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10" | ||
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" /> | ||
</TRestAxionHelioscopeSignal> | ||
</TRestExperiment> | ||
|
||
</TRestSensitivity> | ||
|
||
<TRestSensitivity name="CombinedPhase" strategy="nodes" > | ||
<TRestExperiment name="Vacuum" exposureTime="1.5*300*12hr" useAverage="true"> | ||
<!-- Background --> | ||
<TRestComponentFormula name="Flat7" nature="background" > | ||
<parameter name="formulaUnits" value="keV^-1" /> | ||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" /> | ||
</TRestComponentFormula> | ||
|
||
<!-- Signal --> | ||
<TRestAxionHelioscopeSignal name="Vacuum" nature="signal" parameter="ma" | ||
conversionType="IAXO" bores="Bores" | ||
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T" | ||
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" > | ||
|
||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
|
||
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10" | ||
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" /> | ||
|
||
|
||
<parameter name="firstParameterValue" value="0.001" /> | ||
<parameter name="lastParameterValue" value="10" /> | ||
<parameter name="stepParameterValue" value="1.02" /> | ||
<parameter name="exponential" value="true" /> | ||
</TRestAxionHelioscopeSignal> | ||
</TRestExperiment> | ||
|
||
<TRestExperimentList name="GasPhase" exposureTime="0" | ||
componentPattern="output/SignalsBabyIAXO.root" experimentsFile="output/BabyIAXO.settings" useAverage="true"> | ||
|
||
<TRestComponentFormula name="Flat7" nature="background" > | ||
<parameter name="formulaUnits" value="keV^-1" /> | ||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" /> | ||
</TRestComponentFormula> | ||
</TRestExperimentList> | ||
</TRestSensitivity> | ||
|
||
<TRestAxionHelioscopeSignal name="GasSignal" nature="signal" parameter="ma" | ||
conversionType="IAXO" bores="Bores" | ||
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T" | ||
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" > | ||
|
||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
|
||
<parameter name="firstParameterValue" value="0.001" /> | ||
<parameter name="lastParameterValue" value="10" /> | ||
<parameter name="stepParameterValue" value="1.02" /> | ||
<parameter name="exponential" value="true" /> | ||
|
||
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10" | ||
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" /> | ||
|
||
<TRestAxionBufferGas name="helium" > | ||
<gas name="He" density="0.0025e-6g/cm^3"/> | ||
</TRestAxionBufferGas> | ||
|
||
</TRestAxionHelioscopeSignal> | ||
|
||
</BabyIAXO> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Double_t Eo = 0.5; // keV | ||
Double_t Ef = 10; // keV | ||
|
||
Int_t GenerateSignalComponents(std::string rmlFile, std::string name, Double_t totalYears = 1.5, | ||
size_t firstSteps = 5, Double_t firstYears = 0.5) { | ||
Double_t totalExposureTime = totalYears * 365. * 12 * 3600; | ||
Double_t firstStepsExposure = firstYears * 365. * 12 * 3600; | ||
|
||
TRestAxionField field; | ||
std::vector<std::pair<Double_t, Double_t>> scanSteps = | ||
field.GetMassDensityScanning("He", 0.25, 20); // Up to 0.25 eV | ||
|
||
TRestAxionHelioscopeSignal gasPhase(rmlFile.c_str(), name.c_str()); | ||
std::filesystem::path filePath = rmlFile; | ||
std::filesystem::path newExtension = ".settings"; | ||
std::string settingsFile = filePath.replace_extension(newExtension); | ||
std::filesystem::path rootExtension = ".root"; | ||
std::string componentsFile = "Signals" + (std::string)filePath.replace_extension(rootExtension); | ||
|
||
std::filesystem::create_directories("output"); | ||
settingsFile = "output/" + settingsFile; | ||
componentsFile = "output/" + componentsFile; | ||
|
||
TFile* f = TFile::Open((TString)componentsFile, "RECREATE"); | ||
std::vector<Double_t> exposureTimes; | ||
for (size_t n = 0; n < scanSteps.size(); n++) { | ||
Double_t mass = scanSteps[n].first; | ||
Double_t density = scanSteps[n].second; | ||
|
||
gasPhase.SetName("P" + (TString)IntegerToString(n + 1)); | ||
gasPhase.GetGas()->SetGasDensity("He", density); | ||
gasPhase.RegenerateHistograms(); | ||
|
||
Double_t nGamma = gasPhase.GetSignalRate(mass, Eo, Ef); | ||
Double_t ksvzFactor = 3.75523 * mass; | ||
Double_t exposureTime = 0; | ||
if (n < firstSteps) | ||
exposureTime = firstStepsExposure / firstSteps; | ||
else | ||
exposureTime = TMath::Log(20.) / TMath::Power(ksvzFactor, 4) / nGamma; | ||
exposureTimes.push_back(exposureTime); | ||
|
||
gasPhase.Write("P" + (TString)IntegerToString(n + 1)); | ||
} | ||
f->Close(); | ||
|
||
std::cout << "Generated signals file: " << componentsFile << std::endl; | ||
|
||
Double_t generatedExposureTime = 0; | ||
for (size_t n = firstSteps; n < scanSteps.size(); n++) generatedExposureTime += exposureTimes[n]; | ||
|
||
FILE* g = fopen(settingsFile.c_str(), "wt"); | ||
for (size_t n = 0; n < firstSteps; n++) fprintf(g, "%lf\tP%d\n", exposureTimes[n], (int)(n + 1)); | ||
|
||
for (size_t n = firstSteps; n < scanSteps.size(); n++) | ||
fprintf(g, "%lf\tP%d\n", | ||
(totalExposureTime - firstStepsExposure) * exposureTimes[n] / generatedExposureTime, | ||
(int)(n + 1)); | ||
fclose(g); | ||
|
||
std::cout << "Generated settings file: " << settingsFile << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<BabyIAXO> | ||
<globals> | ||
<constant name="Pi" value="3.1415927" /> | ||
<constant name="Bores" value="8" /> | ||
<constant name="SpotRadius" value="0.2185" /> <!-- Area 0.15 cm2 --> | ||
<constant name="BField" value="2.55" /> | ||
<constant name="Years" value="3" /> | ||
<constant name="MagnetRadius" value="30" /> | ||
<constant name="MagnetLength" value="20" /> | ||
<constant name="WindowEff" value="0.8" /> | ||
<constant name="OpticsEff" value="0.7" /> | ||
<constant name="BckRate" value="1e-8" /> | ||
</globals> | ||
|
||
<TRestSensitivity name="VacuumPhase" strategy="nodes" > | ||
|
||
<TRestExperiment name="Vacuum" exposureTime="Years*365*12hr" useAverage="true"> | ||
<!-- Background --> | ||
<TRestComponentFormula name="Flat8" nature="background" > | ||
<parameter name="formulaUnits" value="keV^-1" /> | ||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" /> | ||
</TRestComponentFormula> | ||
|
||
<!-- Signal --> | ||
<TRestAxionHelioscopeSignal name="Vacuum" nature="signal" parameter="ma" | ||
conversionType="IAXO" bores="Bores" | ||
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T" | ||
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" > | ||
|
||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
|
||
<parameter name="firstParameterValue" value="0.001" /> | ||
<parameter name="lastParameterValue" value="10" /> | ||
<parameter name="stepParameterValue" value="1.02" /> | ||
<parameter name="exponential" value="true" /> | ||
|
||
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10" | ||
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" /> | ||
</TRestAxionHelioscopeSignal> | ||
</TRestExperiment> | ||
|
||
</TRestSensitivity> | ||
|
||
<TRestSensitivity name="CombinedPhase" strategy="nodes" > | ||
<TRestExperiment name="Vacuum" exposureTime="1.5*300*12hr" useAverage="true"> | ||
<!-- Background --> | ||
<TRestComponentFormula name="Flat8" nature="background" > | ||
<parameter name="formulaUnits" value="keV^-1" /> | ||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" /> | ||
</TRestComponentFormula> | ||
|
||
<!-- Signal --> | ||
<TRestAxionHelioscopeSignal name="Vacuum" nature="signal" parameter="ma" | ||
conversionType="IAXO" bores="Bores" | ||
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T" | ||
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" > | ||
|
||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
|
||
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10" | ||
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" /> | ||
|
||
<parameter name="firstParameterValue" value="0.001" /> | ||
<parameter name="lastParameterValue" value="10" /> | ||
<parameter name="stepParameterValue" value="1.02" /> | ||
<parameter name="exponential" value="true" /> | ||
</TRestAxionHelioscopeSignal> | ||
</TRestExperiment> | ||
|
||
<TRestExperimentList name="GasPhase" exposureTime="0" | ||
componentPattern="output/SignalsIAXO.root" experimentsFile="output/IAXO.settings" useAverage="true"> | ||
|
||
<TRestComponentFormula name="Flat8" nature="background" > | ||
<parameter name="formulaUnits" value="keV^-1" /> | ||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
<formula name="bck" expression="Bores*BckRate*Pi*SpotRadius*SpotRadius" /> | ||
</TRestComponentFormula> | ||
</TRestExperimentList> | ||
</TRestSensitivity> | ||
|
||
<TRestAxionHelioscopeSignal name="GasSignal" nature="signal" parameter="ma" | ||
conversionType="IAXO" bores="Bores" | ||
magnetRadius="MagnetRadius cm" magnetLength="MagnetLength m" magnetStrength="BField T" | ||
opticsEfficiency="OpticsEff" windowEfficiency="WindowEff" > | ||
|
||
<cVariable name="energy" range="(0,10)keV" bins="20" /> | ||
|
||
<parameter name="firstParameterValue" value="0.001" /> | ||
<parameter name="lastParameterValue" value="10" /> | ||
<parameter name="stepParameterValue" value="1.02" /> | ||
<parameter name="exponential" value="true" /> | ||
|
||
<TRestAxionSolarQCDFlux name="LennertHoofPrimakoff" couplingType="g_ag" couplingStrength="1.e-10" | ||
fluxDataFile="Primakoff_LennertHoof_202203.dat" seed="137" /> | ||
|
||
<TRestAxionBufferGas name="helium" > | ||
<gas name="He" density="0.0025e-6g/cm^3"/> | ||
</TRestAxionBufferGas> | ||
|
||
</TRestAxionHelioscopeSignal> | ||
|
||
</BabyIAXO> |
Oops, something went wrong.