Skip to content

Commit

Permalink
Make the generator target position changable
Browse files Browse the repository at this point in the history
  • Loading branch information
jovoy authored Feb 22, 2024
1 parent b3b279d commit 3458670
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/TRestAxionGeneratorProcess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ TRestEvent* TRestAxionGeneratorProcess::ProcessEvent(TRestEvent* evInput) {

/// The axion position must be displaced by the target size.
/// We always do this. It is independent of generator
/// The target is virtually placed at the (0,0,0).
/// The target is virtually placed at the (0,0,0) + TargetPosition since the
/// experiment is not focussed by the bore but by the whole experiment.
/// In my opinion the target should be either the optics, or the magnet end bore.
/// Then one should place the optics or the magnet end bore at the (0,0,0).
/// Then one should place the optics or the magnet end bore at the (0,0,0) + TargetPosition.
///
do {
x = 2 * (fRandom->Rndm() - 0.5);
Expand All @@ -178,7 +179,7 @@ TRestEvent* TRestAxionGeneratorProcess::ProcessEvent(TRestEvent* evInput) {

r = TMath::Sqrt(r);

axionPosition = axionPosition + TVector3(fTargetRadius * x, fTargetRadius * y, 0);
axionPosition = axionPosition + TVector3(fTargetRadius * x, fTargetRadius * y, 0) + fTargetPosition;

Double_t mass = fRandom->Uniform(fAxionMassRange.X(), fAxionMassRange.Y());

Expand Down

0 comments on commit 3458670

Please sign in to comment.