REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionField.cxx
1/*************************************************************************
2 * This file is part of the REST software framework. *
3 * *
4 * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5 * For more information see http://gifna.unizar.es/trex *
6 * *
7 * REST is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * REST is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have a copy of the GNU General Public License along with *
18 * REST in $REST_PATH/LICENSE. *
19 * If not, see http://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
209#include "TRestAxionField.h"
210
211#include <TComplex.h>
212#include <TVectorD.h>
213#include <gsl/gsl_errno.h>
214#include <gsl/gsl_integration.h>
215
216#include <numeric>
217
218#include "TH1F.h"
219
220using namespace std;
221
222ClassImp(TRestAxionField);
223
228
233
238 fBufferGas = NULL;
239
243}
244
251double TRestAxionField::BL(Double_t Bmag, Double_t Lcoh) {
252 Double_t lengthInMeters = Lcoh * units("m");
253
254 Double_t tm =
255 REST_Physics::lightSpeed / REST_Physics::naturalElectron * units("GeV") / units("eV"); // eV --> GeV
256 Double_t sol = lengthInMeters * Bmag * tm;
257 sol = sol * 1.0e-10;
258
259 return sol;
260}
261
268double TRestAxionField::BLHalfSquared(Double_t Bmag, Double_t Lcoh) // (BL/2)**2
269{
270 Double_t lengthInMeters = Lcoh * units("m");
271
272 Double_t tm =
273 REST_Physics::lightSpeed / REST_Physics::naturalElectron * units("GeV") / units("eV"); // eV --> GeV
274 Double_t sol = lengthInMeters * Bmag * tm / 2;
275 sol = sol * sol * 1.0e-20;
276
277 return sol;
278}
279
294Double_t TRestAxionField::GammaTransmissionProbability(Double_t Ea, Double_t ma, Double_t mg,
295 Double_t absLength) {
296 fEa = Ea;
297 Double_t cohLength = fLcoh * units("m"); // Default REST units are mm;
298
299 Double_t photonMass = mg;
300
301 if (mg == 0 && fBufferGas) photonMass = fBufferGas->GetPhotonMass(fEa);
302
303 RESTDebug << "+--------------------------------------------------------------------------+" << RESTendl;
304 RESTDebug << " TRestAxionField::GammaTransmissionProbability. Parameter summary" << RESTendl;
305 RESTDebug << " Photon mass : " << photonMass << " eV" << RESTendl;
306 RESTDebug << " Axion mass : " << ma << " eV" << RESTendl;
307 RESTDebug << " Axion energy : " << fEa << " keV" << RESTendl;
308 RESTDebug << " Lcoh : " << fLcoh << " mm" << RESTendl;
309 RESTDebug << " Bmag : " << fBmag << " T" << RESTendl;
310 RESTDebug << "+--------------------------------------------------------------------------+" << RESTendl;
311
312 if (ma == 0.0 && photonMass == 0.0) return BLHalfSquared(fBmag, fLcoh);
313
314 Double_t q = (ma * ma - photonMass * photonMass) / 2. / (fEa * units("eV"));
315 Double_t l = cohLength * REST_Physics::PhMeterIneV;
316 Double_t phi = q * l;
317
318 Double_t Gamma = absLength;
319 if (absLength == 0 && fBufferGas) Gamma = fBufferGas->GetPhotonAbsorptionLength(fEa); // cm-1
320 Double_t GammaL = Gamma * cohLength * units("cm") / units("m"); // m --> cm
321
322 if (fDebug) {
323 std::cout << "+------------------------+" << std::endl;
324 std::cout << " Intermediate calculations" << std::endl;
325 std::cout << " q : " << q << " eV" << std::endl;
326 std::cout << " l : " << l << " eV-1" << std::endl;
327 std::cout << " phi : " << phi << std::endl;
328 std::cout << "Gamma : " << Gamma << std::endl;
329 std::cout << "GammaL : " << GammaL << std::endl;
330 std::cout << "+------------------------+" << std::endl;
331 }
332
333 Double_t MFactor = phi * phi + GammaL * GammaL / 4.0;
334 MFactor = 1.0 / MFactor;
335
336 if (fDebug) {
337 std::cout << "Mfactor : " << MFactor << std::endl;
338 std::cout << "(BL/2)^2 : " << BLHalfSquared(fBmag, fLcoh) << std::endl;
339 std::cout << "cos(phi) : " << cos(phi) << std::endl;
340 std::cout << "Exp(-GammaL) : " << exp(-GammaL) << std::endl;
341 }
342
343 double sol = (double)(MFactor * BLHalfSquared(fBmag, fLcoh) *
344 (1 + exp(-GammaL) - 2 * exp(-GammaL / 2) * cos(phi)));
345
346 if (fDebug) std::cout << "Axion-photon transmission probability : " << sol << std::endl;
347
348 return sol;
349}
350
355Double_t TRestAxionField::GammaTransmissionProbability(Double_t Bmag, Double_t Lcoh, Double_t Ea, Double_t ma,
356 Double_t mg, Double_t absLength) {
357 fBmag = Bmag;
358 fLcoh = Lcoh;
359 fEa = Ea;
360
361 return GammaTransmissionProbability(ma, mg, absLength);
362}
363
383Double_t TRestAxionField::GammaTransmissionProbability(std::vector<Double_t> Bmag, Double_t deltaL,
384 Double_t Ea, Double_t ma, Double_t mg,
385 Double_t absLength) {
386 // Default REST units are mm. We express cohLength in m.
387 Double_t Lcoh = (Bmag.size() - 1) * deltaL; // in mm
388 Double_t cohLength = Lcoh * units("m"); // in m
389
390 Double_t photonMass = mg;
391
392 if (mg == 0 && fBufferGas) photonMass = fBufferGas->GetPhotonMass(Ea);
393
394 Double_t fieldAverage = 0;
395 if (Bmag.size() > 0) fieldAverage = std::accumulate(Bmag.begin(), Bmag.end(), 0.0) / Bmag.size();
396
397 if (fDebug) {
398 std::cout << "+--------------------------------------------------------------------------+"
399 << std::endl;
400 std::cout << " TRestAxionField::GammaTransmissionProbability. Parameter summary" << std::endl;
401 std::cout << " Photon mass : " << photonMass << " eV" << std::endl;
402 std::cout << " Axion mass : " << ma << " eV" << std::endl;
403 std::cout << " Axion energy : " << Ea << " keV" << std::endl;
404 std::cout << " Lcoh : " << cohLength << " m" << std::endl;
405 std::cout << " Bmag average : " << fieldAverage << " T" << std::endl;
406 std::cout << "+--------------------------------------------------------------------------+"
407 << std::endl;
408 }
409
410 // In vacuum
411 if (ma == 0.0 && photonMass == 0.0) return BLHalfSquared(fieldAverage, Lcoh);
412
413 Double_t q = (ma * ma - photonMass * photonMass) / 2. / (Ea * units("eV"));
414 Double_t l = cohLength * REST_Physics::PhMeterIneV;
415 Double_t phi = q * l;
416
417 Double_t Gamma = absLength;
418 if (absLength == 0 && fBufferGas) Gamma = fBufferGas->GetPhotonAbsorptionLength(Ea); // cm-1
419 Double_t GammaL = Gamma * cohLength * units("cm") / units("m"); // m --> cm
420
421 if (fDebug) {
422 std::cout << "+------------------------+" << std::endl;
423 std::cout << " Intermediate calculations" << std::endl;
424 std::cout << " q : " << q << " eV" << std::endl;
425 std::cout << " l : " << l << " eV-1" << std::endl;
426 std::cout << " phi : " << phi << std::endl;
427 std::cout << "Gamma : " << Gamma << std::endl;
428 std::cout << "GammaL : " << GammaL << std::endl;
429 std::cout << "+------------------------+" << std::endl;
430 }
431
432 Double_t MFactor = phi * phi + GammaL * GammaL / 4.0;
433 MFactor = 1.0 / MFactor;
434
435 if (fDebug) {
436 std::cout << "Mfactor : " << MFactor << std::endl;
437 std::cout << "(BL/2)^2 : " << BLHalfSquared(fieldAverage, Lcoh) << std::endl;
438 std::cout << "cos(phi) : " << cos(phi) << std::endl;
439 std::cout << "Exp(-GammaL) : " << exp(-GammaL) << std::endl;
440 }
441
443 Double_t deltaIneV = deltaL * units("m") * REST_Physics::PhMeterIneV;
444 TComplex sum(0, 0);
445 for (unsigned int n = 0; n < Bmag.size() - 1; n++) {
446 Double_t Bmiddle = 0.5 * (Bmag[n] + Bmag[n + 1]);
447
448 Double_t lStepIneV = ((double)n + 0.5) * deltaIneV;
449 Double_t lStepInCm = ((double)n + 0.5) * deltaL * units("cm");
450
451 TComplex qCgC(0.5 * Gamma * lStepInCm, -q * lStepIneV);
452 qCgC = TComplex::Exp(qCgC);
453
454 TComplex integrand = Bmiddle * deltaL * qCgC; // The integrand is in T by mm
455
456 sum += integrand;
457 }
458
459 Double_t sol = exp(-GammaL) * sum.Rho2() * BLHalfSquared(1, 1);
460 // Now T and mm have been recalculated in natural units using BLHalfSquared(1,1).
461
462 if (fDebug) std::cout << "Axion-photon transmission probability : " << sol << std::endl;
463
464 return (Double_t)sol;
465}
466
484std::pair<Double_t, Double_t> TRestAxionField::GammaTransmissionFieldMapProbability(Double_t Ea, Double_t ma,
485 Double_t accuracy,
486 Int_t num_intervals,
487 Int_t qawo_levels) {
488 gsl_set_error_handler_off();
489
490 if (!fMagneticField) {
491 RESTError << "TRestAxionField::GammaTransmissionFieldMapProbability requires a magnetic field map!"
492 << RESTendl;
493 RESTError << "Use TRestAxionField::AssignMagneticField method to assign one" << RESTendl;
494 return {0.0, 0.0};
495 }
496
497 if (fMagneticField->GetTrackLength() <= 0) return {0.0, 0.0};
498
499 double photonMass = 0; // Vacuum
500 if (fBufferGas) photonMass = fBufferGas->GetPhotonMass(Ea);
501
502 if (fDebug) {
503 std::cout << "+--------------------------------------------------------------------------+"
504 << std::endl;
505 std::cout << " TRestAxionField::GammaTransmissionProbability. Parameter summary" << std::endl;
506 std::cout << " Photon mass : " << photonMass << " eV" << std::endl;
507 std::cout << " Axion mass : " << ma << " eV" << std::endl;
508 std::cout << " Axion energy : " << Ea << " keV" << std::endl;
509 std::cout << "+--------------------------------------------------------------------------+"
510 << std::endl;
511 }
512
513 double q = (ma * ma - photonMass * photonMass) / 2. / (Ea * units("eV"));
514 q = q * REST_Physics::PhMeterIneV * units("m") / units("mm"); // mm-1
515
516 double Gamma = 0;
517 if (fBufferGas) Gamma = fBufferGas->GetPhotonAbsorptionLength(Ea) * units("cm") / units("mm"); // mm-1
518
519 if (fDebug) {
520 std::cout << "+------------------------+" << std::endl;
521 std::cout << " Intermediate calculations" << std::endl;
522 std::cout << " q : " << q << " eV" << std::endl;
523 std::cout << "Gamma : " << Gamma << std::endl;
524 std::cout << "+------------------------+" << std::endl;
525 }
526
527 if (q == 0)
528 return ComputeResonanceIntegral(Gamma, accuracy, num_intervals);
529 else
530 return ComputeOffResonanceIntegral(q, Gamma, accuracy, num_intervals, qawo_levels);
531
532 return {0.0, 0.0};
533}
534
551std::pair<Double_t, Double_t> TRestAxionField::ComputeResonanceIntegral(Double_t Gamma, Double_t accuracy,
552 Int_t num_intervals) {
553 double reprob, rerr;
554
555 std::pair<TRestAxionMagneticField*, double> params = {fMagneticField, Gamma};
556
557 gsl_integration_workspace* workspace = gsl_integration_workspace_alloc(num_intervals);
558
559 gsl_function F;
560 F.function = &Integrand;
561 F.params = &params;
562
563 auto start = std::chrono::system_clock::now();
564
565 int status = gsl_integration_qag(&F, 0, fMagneticField->GetTrackLength(), accuracy, accuracy,
566 num_intervals, GSL_INTEG_GAUSS61, workspace, &reprob, &rerr);
567
568 if (status > 0) return {0, status};
569
570 auto end = std::chrono::system_clock::now();
571 auto seconds = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
572
573 double GammaL = Gamma * fMagneticField->GetTrackLength();
574 double C = exp(-GammaL) * BLHalfSquared(1, 1);
575
576 double prob = C * reprob * reprob;
577 double proberr = 2 * C * reprob * rerr;
578
579 if (fDebug) {
580 std::cout << " ---- TRestAxionField::ComputeResonanceIntegral (QAG) ----" << std::endl;
581 std::cout << "Gamma: " << Gamma << " mm-1" << std::endl;
582 std::cout << "accuracy: " << accuracy << std::endl;
583 std::cout << "num_intervals: " << num_intervals << std::endl;
584 std::cout << " -------" << std::endl;
585 std::cout << "Probability: " << prob << std::endl;
586 std::cout << "Probability error: " << proberr << std::endl;
587 std::cout << "Computing time: " << seconds.count() << std::endl;
588 std::cout << " -------" << std::endl;
589 }
590
591 std::pair<Double_t, Double_t> sol = {prob, proberr};
592 return sol;
593}
594
611std::pair<Double_t, Double_t> TRestAxionField::ComputeOffResonanceIntegral(Double_t q, Double_t Gamma,
612 Double_t accuracy,
613 Int_t num_intervals,
614 Int_t qawo_levels) {
615 double reprob, rerr;
616 double improb, imerr;
617
618 std::pair<TRestAxionMagneticField*, double> params = {fMagneticField, Gamma};
619
620 gsl_integration_workspace* workspace = gsl_integration_workspace_alloc(num_intervals);
621
622 gsl_function F;
623 F.function = &Integrand;
624 F.params = &params;
625
626 auto start = std::chrono::system_clock::now();
627
628 gsl_integration_qawo_table* wf =
629 gsl_integration_qawo_table_alloc(q, fMagneticField->GetTrackLength(), GSL_INTEG_COSINE, qawo_levels);
630 int status =
631 gsl_integration_qawo(&F, 0, accuracy, accuracy, num_intervals, workspace, wf, &reprob, &rerr);
632 if (status > 0) {
633 gsl_integration_qawo_table_free(wf);
634 return {0, status};
635 }
636
637 gsl_integration_qawo_table_set(wf, q, fMagneticField->GetTrackLength(), GSL_INTEG_SINE);
638 status = gsl_integration_qawo(&F, 0, accuracy, accuracy, num_intervals, workspace, wf, &improb, &imerr);
639 if (status > 0) {
640 gsl_integration_qawo_table_free(wf);
641 return {0, status};
642 }
643
644 auto end = std::chrono::system_clock::now();
645 auto seconds = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
646
647 double GammaL = Gamma * fMagneticField->GetTrackLength();
648 double C = exp(-GammaL) * BLHalfSquared(1, 1);
649
650 double prob = C * (reprob * reprob + improb * improb);
651 double proberr = 2 * C * TMath::Sqrt(reprob * reprob * rerr * rerr + improb * improb * imerr * imerr);
652
653 if (fDebug) {
654 std::cout << " ---- TRestAxionField::ComputeOffResonanceIntegral (QAWO) ----" << std::endl;
655 std::cout << "Gamma: " << Gamma << " mm-1" << std::endl;
656 std::cout << "q: " << q << "mm-1" << std::endl;
657 std::cout << "accuracy: " << accuracy << std::endl;
658 std::cout << "num_intervals: " << num_intervals << std::endl;
659 std::cout << "qawo_levels: " << qawo_levels << std::endl;
660 std::cout << " -------" << std::endl;
661 std::cout << "Probability: " << prob << std::endl;
662 std::cout << "Probability error: " << proberr << std::endl;
663 std::cout << "Computing time: " << seconds.count() << std::endl;
664 std::cout << " -------" << std::endl;
665 }
666
667 std::pair<Double_t, Double_t> sol = {prob, proberr};
668 return sol;
669}
670
684Double_t TRestAxionField::AxionAbsorptionProbability(Double_t ma, Double_t mg, Double_t absLength) {
685 Double_t cohLength = fLcoh * units("m"); // Default REST units are mm;
686
687 Double_t photonMass = mg;
688 if (mg == 0 && fBufferGas) photonMass = fBufferGas->GetPhotonMass(fEa);
689
690 if (fDebug) {
691 RESTDebug << "+--------------------------------------------------------------------------+"
692 << RESTendl;
693 RESTDebug << " TRestAxionField::AxionAbsorptionProbability. Parameter summary" << RESTendl;
694 RESTDebug << " Photon mass : " << photonMass << " eV" << RESTendl;
695 RESTDebug << " Axion mass : " << ma << " eV" << RESTendl;
696 RESTDebug << " Axion energy : " << fEa << " keV" << RESTendl;
697 RESTDebug << " Lcoh : " << fLcoh << " mm" << RESTendl;
698 RESTDebug << " Bmag : " << fBmag << " T" << RESTendl;
699 RESTDebug << "+--------------------------------------------------------------------------+"
700 << RESTendl;
701 }
702
703 if (ma == 0.0 && photonMass == 0.0) return BLHalfSquared(fBmag, fLcoh);
704
705 Double_t q = (ma * ma - photonMass * photonMass) / 2. / (fEa * units("eV"));
706 Double_t l = cohLength * REST_Physics::PhMeterIneV;
707 Double_t phi = q * l;
708
709 Double_t Gamma = absLength;
710 if (absLength == 0 && fBufferGas) Gamma = fBufferGas->GetPhotonAbsorptionLength(fEa); // cm-1
711 Double_t GammaL = Gamma * cohLength * units("cm") / units("m");
712
713 if (fDebug) {
714 RESTDebug << "+------------------------+" << RESTendl;
715 RESTDebug << " Intermediate calculations" << RESTendl;
716 RESTDebug << " q : " << q << " eV" << RESTendl;
717 RESTDebug << " l : " << l << " eV-1" << RESTendl;
718 RESTDebug << " phi : " << phi << RESTendl;
719 RESTDebug << "Gamma : " << Gamma << RESTendl;
720 RESTDebug << "GammaL : " << GammaL << RESTendl;
721 RESTDebug << "+------------------------+" << RESTendl;
722 }
723
724 Double_t MFactor = phi * phi + GammaL * GammaL / 4.0;
725 MFactor = 1.0 / MFactor;
726
727 if (fDebug) {
728 RESTDebug << "Mfactor : " << MFactor << RESTendl;
729 RESTDebug << "(BL/2)^2 : " << BLHalfSquared(fBmag, fLcoh) << RESTendl;
730 RESTDebug << "cos(phi) : " << cos(phi) << RESTendl;
731 RESTDebug << "Exp(-GammaL) : " << exp(-GammaL) << RESTendl;
732 }
733
734 double sol = (double)(MFactor * BLHalfSquared(fBmag, fLcoh) * GammaL);
735
736 if (fDebug) RESTDebug << "Axion-photon absorption probability : " << sol << RESTendl;
737
738 return sol;
739}
740
745Double_t TRestAxionField::AxionAbsorptionProbability(Double_t Bmag, Double_t Lcoh, Double_t Ea, Double_t ma,
746 Double_t mg, Double_t absLength) {
747 fBmag = Bmag;
748 fLcoh = Lcoh;
749 fEa = Ea;
750
751 return AxionAbsorptionProbability(ma, mg, absLength);
752}
753
767 Double_t maxMass = 10; // 10eV is the maximum mass (exit condition)
768
769 Double_t resonanceMass = 0;
770 if (fBufferGas) resonanceMass = fBufferGas->GetPhotonMass(fEa);
771
773 Double_t scanMass = resonanceMass;
774 Double_t Pmax = GammaTransmissionProbability(fEa, resonanceMass);
775 while (Pmax / 2 < GammaTransmissionProbability(fEa, scanMass)) {
776 scanMass += step;
777 if (scanMass > maxMass) {
778 RESTError << "TRestAxionField::GammaTransmissionProbability. Something went wrong when "
779 "calculating FWHM"
780 << RESTendl;
781 return maxMass;
782 }
783 }
784
785 Double_t fwhm = scanMass - resonanceMass;
786 if (fwhm <= 0) {
787 RESTError << "TRestAxionField::GammaTransmissionProbability. Problem calculating FWHM!" << RESTendl;
788 fwhm = step;
789 }
790 return 2 * fwhm;
791}
792
816std::vector<std::pair<Double_t, Double_t>> TRestAxionField::GetMassDensityScanning(std::string gasName,
817 double maMax,
818 double rampDown) {
819 std::vector<std::pair<Double_t, Double_t>> massDensityPairs;
820
821 // Storing the gas pointer, if there was one
822 TRestAxionBufferGas* previousGas = nullptr;
823 if (fBufferGas) {
824 previousGas = fBufferGas;
825 fBufferGas = nullptr;
826 }
827
828 // We are in vacuum now
829 double firstMass = GammaTransmissionFWHM() / 2;
830
832 gas.SetGasDensity(gasName, 0);
833 AssignBufferGas(&gas); // We are in gas now
834
835 Double_t ma = firstMass;
836 Double_t density = gas.GetDensityForMass(firstMass, fEa);
837
839 massDensityPairs.push_back(std::make_pair(ma, density));
840
841 while (ma < maMax) {
842 Double_t factor = TMath::Exp(-ma * rampDown) + 1;
843 gas.SetGasDensity(gasName, density);
844
845 ma += GammaTransmissionFWHM() / factor;
846 density = gas.GetDensityForMass(ma);
847
848 massDensityPairs.push_back(std::make_pair(ma, density));
849 }
850
851 // Recovering back the gas that was defined before calling this method
852 fBufferGas = previousGas;
853
854 return massDensityPairs;
855}
A metadata class to define the gas properties used in axion search calculations.
Double_t GetPhotonMass(double en)
It returns the equivalent photon mass (in eV) for the gas mixture at the given input energy expressed...
Double_t GetDensityForMass(double m_gamma, double en=4.2)
It returns the equivalent gas density for a given photon mass expressed in eV and a given axion energ...
void SetGasDensity(TString gasName, Double_t density)
It adds a new gas component to the mixture. If it already exists it will update its density.
Double_t GetPhotonAbsorptionLength(Double_t energy)
It returns the inverse of the absorption lenght, for the gas mixture, in cm-1, for the given energy i...
A basic class to define analytical axion-photon conversion calculations for axion helioscopes.
std::pair< Double_t, Double_t > GammaTransmissionFieldMapProbability(Double_t Ea, Double_t ma, Double_t accuracy=1.e-1, Int_t num_intervals=100, Int_t qawo_levels=20)
Performs the calculation of axion-photon conversion probability using directly equation (28) from J....
Double_t BL(Double_t Bmag, Double_t Lcoh)
Performs the calculation of (BL) factor in natural units.
Double_t AxionAbsorptionProbability(Double_t ma, Double_t mg=0, Double_t absLength=0)
Performs the calculation of axion-photon absorption probability using directly equation (18) from van...
void Initialize()
Initialization of TRestAxionField class.
static double Integrand(double x, void *params)
Integrand used for axion-photon probability integration.
void AssignBufferGas(TRestAxionBufferGas *buffGas)
It assigns a gas buffer medium to the calculation.
~TRestAxionField()
Default destructor.
Double_t BLHalfSquared(Double_t Bmag, Double_t Lcoh)
Performs the calculation of (BL/2)^2 factor in natural units.
Double_t fEa
The energy of the axion in keV.
std::vector< std::pair< Double_t, Double_t > > GetMassDensityScanning(std::string gasName="He", Double_t maMax=0.15, Double_t rampDown=5.0)
This method determines the proper densities to be used in an axion helioscope experiment in order to ...
std::pair< Double_t, Double_t > ComputeOffResonanceIntegral(Double_t q, Double_t Gamma, Double_t accuracy, Int_t num_intervals, Int_t qawo_levels)
Performs the calculation of axion-photon conversion probability using directly equation (28) from J....
Double_t GammaTransmissionProbability(Double_t Ea, Double_t ma, Double_t mg=0, Double_t absLength=0)
Performs the calculation of axion-photon conversion probability using directly equation (11) from van...
TRestAxionMagneticField * fMagneticField
A pointer to the magnetic field definition.
TRestAxionBufferGas * fBufferGas
A pointer to the buffer gas definition.
Double_t fBmag
The magnetic field in Teslas (used for constant field formulas)
Double_t fLcoh
The coherence lenght (in mm) where the magnetic field is defined (for constant field)
TRestAxionField()
Default constructor.
Double_t GammaTransmissionFWHM(Double_t step=0.00001)
Performs the calculation of the FWHM for the axion-photon conversion probability computed in TRestAxi...
std::pair< Double_t, Double_t > ComputeResonanceIntegral(Double_t Gamma, Double_t accuracy, Int_t num_intervals)
Performs the calculation of axion-photon conversion probability using directly equation (28) from J....
constexpr double lightSpeed
Speed of light in m/s.
Definition: TRestPhysics.h:41
constexpr double PhMeterIneV
A meter in eV.
Definition: TRestPhysics.h:52
constexpr double naturalElectron
Electron charge in natural units.
Definition: TRestPhysics.h:56