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 5958268 commit 1cb4cb2
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions pipeline/ray-tracing/axion-field/Validate.C
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,30 @@ Int_t Validate(Double_t prob = 2.34295e-21) {
return 3;
}

/* We do not add the field average observable anymore at TRestAxionFieldPropagationProcess
* We would need to create a new process that does this, since it is computationally
* not negligible
*
run->GetAnalysisTree()->Draw("axionPhoton_fieldAverage", "axionPhoton_fieldAverage");
/* We do not add the field average observable anymore at TRestAxionFieldPropagationProcess
* We would need to create a new process that does this, since it is computationally
* not negligible
*
run->GetAnalysisTree()->Draw("axionPhoton_fieldAverage", "axionPhoton_fieldAverage");
TH1D* h2 = (TH1D*)run->GetAnalysisTree()->GetHistogram();
if (h2 == nullptr) {
std::cout << "Problems generating field average histogram" << std::endl;
return 4;
}
TH1D* h2 = (TH1D*)run->GetAnalysisTree()->GetHistogram();
if (h2 == nullptr) {
std::cout << "Problems generating field average histogram" << std::endl;
return 4;
}
Double_t field = h2->Integral() / run->GetEntries();
std::cout << "Average magnetic field: " << field << " T" << std::endl;
std::cout << "Expected field: " << fieldAverage << std::endl;
std::cout << "Tolerance: " << fieldTolerance << std::endl;
std::cout << "Low : " << fieldAverage - fieldTolerance << " high: " << fieldAverage + fieldTolerance
<< std::endl;
Double_t field = h2->Integral() / run->GetEntries();
std::cout << "Average magnetic field: " << field << " T" << std::endl;
std::cout << "Expected field: " << fieldAverage << std::endl;
std::cout << "Tolerance: " << fieldTolerance << std::endl;
std::cout << "Low : " << fieldAverage - fieldTolerance << " high: " << fieldAverage + fieldTolerance
<< std::endl;
if (field < fieldAverage - fieldTolerance || field > fieldAverage + fieldTolerance) {
std::cout << "Wrong average field!" << std::endl;
return 5;
}
*/
if (field < fieldAverage - fieldTolerance || field > fieldAverage + fieldTolerance) {
std::cout << "Wrong average field!" << std::endl;
return 5;
}
*/

delete run;

Expand Down

0 comments on commit 1cb4cb2

Please sign in to comment.