
///\file "exoticphysics/channeling/ch2/.README.txt"
///\brief Example ch2 README page

/*! \page Examplech2 Example ch2

\author Alexei Sytov, Gianfranco Paternò - INFN Ferrara Division (Italy) \n
 sytov@fe.infn.it, paterno@fe.infn.it

\section ch2_s1 INTRODUCTION
Example ch2 is an enhanced version of ch1, providing the user with the full functionality of
both the G4ChannelingFastSimModel and G4BaierKatkov, with parameters set up via a macro,
in order to simulate the physics of channeling and channeling radiation/coherent bremsstrahlung.

The example can be exploited for a wide range of cases to study coherent effects in
a straight, bent or periodically bent crystal (crystalline undulator). Channeling
physics in ch2 is active for protons, ions, muons, pions, electrons and their antiparticles.
Any other charged particle can also be activated.

\section ch2_s2 DESCRIPTION
The setup of the example ch2 is identical to ch1. As ch1, this example includes a bent crystal
and a detector positioned behind it. Like ch1, it is based on the experiments on
channeling [1] and channeling radiation [2] in a bent crystal, carried out at
Mainz Mikrotron MAMI with 855 MeV electrons. The experimental validation of
G4ChannelingFastSimModel is described in [3].

However, since ch2 parameters are fully set up in the macro run.mac, this example
is quite flexible and can be easily adapted for entirely different cases.

A description of all the available options is provided in run.mac.
It includes crystal and detector geometry, activation flags for
G4ChannelingFastSimModel and G4BaierKatkov and various options. 

The example also provides detailed descriptions of various options for 
G4ChannelingFastSimModel and G4BaierKatkov, which can adjust model parameters 
depending on the specific case (see ConstructSDandField in DetectorConstruction).

The front surface of the crystal is placed at z=0 (with z as the beam direction), 
while the front position of the detector can be set up via run.mac.

The output is recorded into the file results.root as a set of root ntuples.
These ntuples include:
-# crystal: particles recorded at the crystal entrance,
-# detector: all particles (except photons) recorded at the detector entrance,
-# detector_photons: photons recorded at the detector entrance.

The format of every ntuple includes the following 10 variables (columns):

"eventID", "volume", "x", "y", "angle_x", "angle_y", "Ekin", "particle", "particleID", "parentID"

The variables represent:
-# the event number within the run (column 0),
-# the volume, either the crystal or the detector (column 1),
-# the coordinate (x,y) and the angles (x'=dx/dz, y'=dy/dz) of the impinging particles (columns 2-6),
-# the kinetic energy of the particle (column 7),
-# the particle name (column 8),
-# the particle ID (column 9),
-# the parent ID of the particle (column 10).

To visualize these data, one should either open results.root using root TBrowser or use the python script analysis_ch2.py.

\section ch1_s3 REFERENCES

-# A. Mazzolari et al. <a href="https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.112.135503">Phys. Rev. Lett. 112, 135503 (2014).</a>
-# L. Bandiera et al. <a href="https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.115.025504">Phys. Rev. Lett. 115, 025504 (2015).</a>
-# A. Sytov et al. <a href="https://link.springer.com/article/10.1007/s40042-023-00834-6"> Journal of the Korean Physical Society 83, 132–139 (2023).</a>

*/
