117 #include "TRestAxionFieldPropagationProcess.h"
119 #include <TVectorD.h>
153 SetSectionName(this->ClassName());
154 SetLibraryVersion(LIBRARY_VERSION);
164 RESTDebug <<
"Entering ... TRestAxionFieldPropagationProcess::InitProcess" << RESTendl;
168 if (!fMagneticField) {
169 RESTError <<
"TRestAxionFieldPropagationprocess. Magnetic Field was not defined!" << RESTendl;
173 for (
size_t n = 0; n < fMagneticField->GetNumberOfVolumes(); n++) fMagneticField->ReMap(n, fReMap);
180 fAxionField->AssignBufferGas(fBufferGas);
182 fBufferGasAdditionalLength = 0;
184 fAxionField->AssignMagneticField(fMagneticField);
186 fMagneticField->PrintMetadata();
189 RESTDebug <<
"Axion-field : " << fAxionField << RESTendl;
190 RESTDebug <<
"Buffer gas : " << fBufferGas << RESTendl;
191 RESTDebug <<
"Magnetic field : " << fMagneticField << RESTendl;
197 RESTDebug <<
"TRestAxionFieldPropagationProcess::ProcessEvent : " << fAxionEvent->GetID() << RESTendl;
199 fMagneticField->SetTrack(fAxionEvent->GetPosition(), fAxionEvent->GetDirection());
201 Double_t Ea = fAxionEvent->GetEnergy();
202 Double_t ma = fAxionEvent->GetMass() *
units(
"eV");
204 std::pair<Double_t, Double_t> prob =
205 fAxionField->GammaTransmissionFieldMapProbability(Ea, ma, fAccuracy, fNumIntervals, fQawoLevels);
207 SetObservableValue(
"probability", prob.first);
208 SetObservableValue(
"error", prob.second);
210 Double_t transmission = 1;
211 if (fBufferGas && fBufferGasAdditionalLength > 0) {
212 Double_t Gamma = fBufferGas->GetPhotonAbsorptionLength(Ea);
213 Double_t GammaL = Gamma * fBufferGasAdditionalLength *
units(
"cm");
214 transmission = exp(-GammaL);
217 SetObservableValue(
"transmission", transmission);
219 RESTDebug <<
" --- Process observables: " << RESTendl;
220 RESTDebug <<
"Probability: " << prob.first <<
" T" << RESTendl;
221 RESTDebug <<
"Error: " << prob.second <<
" T" << RESTendl;
222 RESTDebug <<
"Transmission: " << transmission <<
" mm" << RESTendl;
A metadata class to define the gas properties used in axion search calculations.
An event data class to define the parameters related to an axion particle.
A process to introduce the magnetic field profile integration along the track.
TRestEvent * ProcessEvent(TRestEvent *eventInput) override
Process one event.
void InitProcess() override
Process initialization. Data members that require initialization just before start processing should ...
~TRestAxionFieldPropagationProcess()
Default destructor.
TRestAxionFieldPropagationProcess()
Default constructor.
void Initialize() override
Function to initialize input/output event members and define the section name.
A basic class to define analytical axion-photon conversion calculations for axion helioscopes.
A class to load magnetic field maps and evaluate the field on those maps including interpolation.
A base class for any REST event.
@ REST_Info
+show most of the information for each steps
@ REST_Debug
+show the defined debug messages