Read me added workflow

This commit is contained in:
james szalkie 2026-07-22 11:05:41 -04:00
parent ff2171c2f1
commit 304cf2b7e3

View File

@ -73,3 +73,26 @@ tree2 contains post-energy loss calculations (subject to change)
- `ClassTransfer` (`SetA`, `SetIncidentEnergyAngle`, `Seta`, `Setb`, `SetExA`, `SetExB`, `CalReactionConstant`, `Event`) - `ClassTransfer` (`SetA`, `SetIncidentEnergyAngle`, `Seta`, `Setb`, `SetExA`, `SetExB`, `CalReactionConstant`, `Event`)
- `ClassAnasen` / `SX3` / `PW` (`FindWireID`, `FindSX3Pos`, `GetHitInfo`, `CalTrack`, `CalTrack2`, `GetTrackTheta`, `GetTrackPhi`, `GetZ0`, `GetHitPosWithSigma`, `GetID`, etc.) - `ClassAnasen` / `SX3` / `PW` (`FindWireID`, `FindSX3Pos`, `GetHitInfo`, `CalTrack`, `CalTrack2`, `GetTrackTheta`, `GetTrackPhi`, `GetZ0`, `GetHitPosWithSigma`, `GetID`, etc.)
- Optional: change excitation lists, vertex spread, and sigma values to mimic different beam/target conditions. - Optional: change excitation lists, vertex spread, and sigma values to mimic different beam/target conditions.
## Example Workflow
- Say you want to do a beam of Al27 through standard pressure gas.
- If using the random energy scan route, determine the depth your beam travels in the detector, and set the appropriate window in the .cpp file in <<vertexZRange>>.
- If you want to track it's energy loss through the detector, create a lookup table with PCEnergyAnalysis.py in the helium and import it using <<elossbeam>>. When making the table, set the initial energy of the beam as the 'max energy' of the table.
To take into account things like the kapton window and other materials, make lookup tables for them and map their energy loss through them one after another, and use the final energy from that as the maximum beam energy.
- For there you need to run a simulation for each reaction you want to measure. Declare their components in the transfer.Set(A,a,b,B). A is your beam, a is the helium target, b is your proton, alpha, deuterium, etc, and B is the daughter nuclei.
- Run 'make AnasenMS' in the build directory and let it compile. From there, run the excecutable './AnasenMS'. The simulation will run and automatically load all the data into the root file 'SimAnasen1.root'. This is the file that gets read into PCEnergyAnalysis.py.
- Once the simulation is complete, start the analysis script. Do not start it while the simulation is still running, or you will miss data. The simulation will automatically open the file SimAnasen1.root, and with that you can run 'make_plots'. If it's proton data, it will assume that automatically, but if it is alpha data, you need to pass 'alpha' as an additional argument.
- If you have two reactions to analyze, you can use 'dual_plotter'. Renaming them 'SimAnasenProton.root' and 'SimAnasenAlpha.root' will allow you to run the function with no additional arguments. However, for any other names or additional reactions, you will need to add the file names manually as additional arguments. The program assumes them to be in the Armory directory, so if they are in a subfile, include the subfile in the argument.
- Plots and histograms will automatically get saved to the ELoss folder. By default reactions are on tree1, and are sorted by particle
- Tree2 is used for secondary decay channels, and simulating double-proton decays. The secondary decay data is stored in tree2. Dual plotter will combine trees automatically, but make_plots assumes to use tree1. This can be switched using set_tree in the program, and then running make_plots
- Secondary reactions can be turned off and on with a boolean <<enableSequentialDecay>>
- Fill in relevant data about the decay in the lines following
- Additional features include terminal energy loss calculations using initial energy, final energy and distance travelled. Using two of these three there are three different functions to find the third variable. For range, use energy_distance, declare the particle, medium, the initial energy, and set final energy to 0. This will give you the range of the given particle.