Commit 67b5f68b authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'beamWaisteConvention' into 'master'

Adjust beam waist treatment to standard convention

See merge request allpix-squared/allpix-squared!1039
parents 30cb9013 a16843b8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ The following authors, in alphabetical order, have developed or contributed to A
* Bogdan-Mihail Blidaru, Heidelberg University, [mblidaru](https://gitlab.cern.ch/mblidaru)
* Marco Bomben, Université de Paris, [mbomben](https://gitlab.cern.ch/mbomben)
* Koen van den Brandt, Nikhef, [kvandenb](https://gitlab.cern.ch/kvandenb)
* Ben Bruers, DESY, [bbrueers](https://gitlab.cern.ch/bbrueers)
* Carsten Daniel Burgard, DESY, [cburgard](https://gitlab.cern.ch/cburgard)
* Maximilian Felix Caspar, DESY, [mcaspar](https://gitlab.cern.ch/mcaspar)
* Liejian Chen, Institute of High Energy Physics Beijing, [chenlj](https://github.com/chenlj)
@@ -49,6 +50,7 @@ The following authors, in alphabetical order, have developed or contributed to A
* Andre Sailer, CERN, [sailer](https://gitlab.cern.ch/sailer)
* Tasneem Saleem, Synchrotron SOLEIL, [TasneemSaleem](https://github.com/TasneemSaleem)
* Arka Santra, Weizman Institute, [asantra](https://gitlab.cern.ch/asantra)
* Christian Scharf, HU Berlin, [cscharf](https://gitlab.cern.ch/cscharf)
* Enrico Jr. Schioppa, Unisalento and INFN Lecce, [schioppa](https://gitlab.cern.ch/schioppa)
* Sebastian Schmidt, FAU Erlangen, [schmidtseb](https://github.com/schmidtseb)
* Sanchit Sharma, Kansas State University, [SanchitKratos](https://github.com/SanchitKratos)
+4 −2
Original line number Diff line number Diff line
@@ -450,8 +450,10 @@ std::pair<ROOT::Math::XYZPoint, ROOT::Math::XYZVector> DepositionLaserModule::ge
    // Lambda to generate a smearing vector
    auto beam_pos_smearing = [&](auto size) {
        auto [v1, v2] = orthogonal_pair(beam_direction_);
        double dx = allpix::normal_distribution<double>(0, size)(event->getRandomEngine());
        double dy = allpix::normal_distribution<double>(0, size)(event->getRandomEngine());

        // Beam waist is equal to 2*sigma
        double dx = allpix::normal_distribution<double>(0, size / 2.)(event->getRandomEngine());
        double dy = allpix::normal_distribution<double>(0, size / 2.)(event->getRandomEngine());
        return v1 * dx + v2 * dy;
    };

+3 −1
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ For a `cylindrical` beam, all tracks are parallel to the set beam direction.
For a `converging` beam, track directions would have isotropic distribution (but with a limit on a max angle between the
track and the set beam direction).

The transversal width of the Gaussian beam is defined by the beam waist $`w_0`$, which describes the minimal beam width. The beam width in turn is defined as the distance between the point of maximum intensity and the point where the intensity drops to $`\frac{1}{e^2}`$. For a Gaussian-distributed intensity, the intensity drops to $`\frac{1}{e^2}`$, if $`x=2\sigma`$, see the probability distribution function of the normal distribution. The beam waist therefore equals $`2\sigma`$.

**NB**: convention on global time zero for this module contradicts the general convention of the Allpix Squared.
For this module, global t=0 is chosen in such a way that the mean value of temporal distribution is *always* positioned at
*4 standard deviations*  w.r.t. the global t=0.
@@ -63,7 +65,7 @@ and temporal distribution.
* `source_position`: a 3D position vector.
* `beam_direction`: a 3D direction vector.
* `beam_geometry`: either `cylindrical` or `converging`
* `beam_waist`: standard deviation of transversal beam intensity distribution at focus. Defaults to 20 um.
* `beam_waist`: parametrises the transversal width of the beam by the beam waist $`w_0=2\sigma`$ described above. Defaults to 20 um.
* `focal_distance`: needs to be specified for `converging` beam. This distance is *as it would be in air*. In silicon, beam
  shape will effectively stretch along its direction due to refraction and the actual focus will be further away from the
  source.