Skip to content

Commit d36acca

Browse files
authored
Merge pull request #73 from rest-for-physics/jgalan_add_warning
TRestAxionFieldPropagationProcess. Added SetWarning
2 parents 34b68ec + 8ce34a7 commit d36acca

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/TRestAxionFieldPropagationProcess.cxx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ TRestEvent* TRestAxionFieldPropagationProcess::ProcessEvent(TRestEvent* evInput)
197197
Double_t transmission = 1;
198198
Double_t fieldAverage = 0;
199199
if (trackBounds.size() == 2) {
200+
RESTDebug << "-- Track bounds" << RESTendl;
201+
RESTDebug << "X1:" << trackBounds[0].X() << " Y1: " << trackBounds[0].Y()
202+
<< " Z1: " << trackBounds[0].Z() << RESTendl;
203+
RESTDebug << "X2:" << trackBounds[1].X() << " Y2: " << trackBounds[1].Y()
204+
<< " Z2: " << trackBounds[1].Z() << RESTendl;
200205
std::vector<Double_t> bProfile = fMagneticField->GetTransversalComponentAlongPath(
201206
trackBounds[0], trackBounds[1], fIntegrationStep);
202207

@@ -214,8 +219,16 @@ TRestEvent* TRestAxionFieldPropagationProcess::ProcessEvent(TRestEvent* evInput)
214219
Double_t GammaL = Gamma * lCoh * units("cm");
215220
transmission = exp(-GammaL);
216221
}
222+
} else {
223+
SetWarning("TRestAxionFieldPropagationProcess. Track does not cross the field volume!", false);
217224
}
218225

226+
RESTDebug << " --- Process observables: " << RESTendl;
227+
RESTDebug << "Field average: " << fieldAverage << " T" << RESTendl;
228+
RESTDebug << "Probability: " << prob << " T" << RESTendl;
229+
RESTDebug << "Coherence length: " << lCoh << " mm" << RESTendl;
230+
RESTDebug << "Transmission: " << transmission << " mm" << RESTendl;
231+
219232
SetObservableValue("fieldAverage", fieldAverage);
220233
SetObservableValue("probability", prob);
221234
SetObservableValue("coherenceLength", lCoh);

0 commit comments

Comments
 (0)