Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 11, 2024
1 parent 3e8052f commit d279801
Showing 1 changed file with 29 additions and 28 deletions.
57 changes: 29 additions & 28 deletions macros/REST_Axion_FieldIntegrationTests.C
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,33 @@
//*** Author: Javier Galan
//*******************************************************************************************************

int REST_Axion_FieldIntegrationTests(Double_t sX = 10, Double_t sY = 10, Double_t sZ = 50, Double_t dm = 0.01, Double_t tolerance = 0.1, Double_t Ea = 4.2 ){

/// Setting up magnetic field and track to evaluate
TRestAxionMagneticField magneticField("fields.rml", "babyIAXO_HD");

for( size_t n = 0; n < magneticField.GetNumberOfVolumes(); n++ )
magneticField.ReMap( n, TVector3(sX,sY,sZ) );
magneticField.SetTrack( TVector3(-110,-110,-11000), TVector3(0.01,0.01,1));
magneticField.PrintMetadata();

/// Setting up the gas
TRestAxionBufferGas* gas = new TRestAxionBufferGas();
gas->SetGasDensity( "He", 3.267069078540181e-10);
gas->PrintMetadata();
Double_t ma = gas->GetPhotonMass(Ea);

/// Setting up the axion-field and assign gas and magnetic field.
TRestAxionField* ax = new TRestAxionField();
ax->AssignBufferGas(gas);
ax->AssignMagneticField(&magneticField);
ax->SetAxionEnergy(Ea);

/// Enable debugging mode in axion-field
ax->SetDebug(true);

std::pair<double,double> prob = ax->GammaTransmissionFieldMapProbability( Ea, ma - dm, tolerance, 100, 25 );

return 0;
int REST_Axion_FieldIntegrationTests(Double_t sX = 10, Double_t sY = 10, Double_t sZ = 50, Double_t dm = 0.01,
Double_t tolerance = 0.1, Double_t Ea = 4.2) {
/// Setting up magnetic field and track to evaluate
TRestAxionMagneticField magneticField("fields.rml", "babyIAXO_HD");

for (size_t n = 0; n < magneticField.GetNumberOfVolumes(); n++)
magneticField.ReMap(n, TVector3(sX, sY, sZ));
magneticField.SetTrack(TVector3(-110, -110, -11000), TVector3(0.01, 0.01, 1));
magneticField.PrintMetadata();

/// Setting up the gas
TRestAxionBufferGas* gas = new TRestAxionBufferGas();
gas->SetGasDensity("He", 3.267069078540181e-10);
gas->PrintMetadata();
Double_t ma = gas->GetPhotonMass(Ea);

/// Setting up the axion-field and assign gas and magnetic field.
TRestAxionField* ax = new TRestAxionField();
ax->AssignBufferGas(gas);
ax->AssignMagneticField(&magneticField);
ax->SetAxionEnergy(Ea);

/// Enable debugging mode in axion-field
ax->SetDebug(true);

std::pair<double, double> prob =
ax->GammaTransmissionFieldMapProbability(Ea, ma - dm, tolerance, 100, 25);

return 0;
}

0 comments on commit d279801

Please sign in to comment.