Skip to content

MikhailBashkanov/EdGenA2

 
 

Repository files navigation

EdGenA2 Event Generator

This code is for an Event Generator for the A2 collaboration. It uses the ROOT (root.cern.ch) PhaseSpace generator has basis and See http://www2.ph.ed.ac.uk/~lzana/Documents/zana_haspect_genova2014.pdf for a quick presentation on this code.

Prerequisites

  • CERN ROOT (tested at now with version ROOT 5.34/09
  • git
  • cmake

Install

This version is running correctly on ifarm.jlab.org. The version of cmake there is too old, so, just use /work/halla/parity/disk2/zana/Cmake/cmake-2.8.8/bin/cmake rather than the default cmake.

  • cd EdGenA2 (go to the EdGenA2 directory)
  • mkdir build
  • cd build
  • cmake ../ ( at jlab /work/halla/parity/disk2/zana/Cmake/cmake-2.8.8/bin/cmake ../ )
  • make

Running

  • cd EdGenA2/output (go to the output directory)
  • A table with particle properties is in this directory (from PDG) eg_pdg_table.txt :Modify it if you need it. An example of how to add particles to this table are written at the end of the file. At now the information used are just the mass, the charge of the particle and the lifetime (if the particle has vertex in your reaction diagram for this MonteCarlo.
  • A template is in input.dat (input_test.dat it is just for my developments at now), and modify the file to fit your reaction
  • In input.dat one can specify the input spetrum (for example for CLAS photon beam). The input spectrum file is written in a txt files format with raw that represent for each bin E_min, E_max, Counts (Does not need to be normalize, the code is going to normalize it if need it). The bin size do not need to be the same for each bin. An example is written in the output directory as energy.txt
  • ./EdGenA2 -h will give you the options
  • ./EdGenA2 -i input.dat -o output.root (Change input.dat or output.root (need to be a *.root) to your desired input and output file format

Input file

  • nevt: 20000; NUMBER OF EVENTS TO GENERATE
  • nprint: 1000; NUMBER OF EVENTS TO HAVE A PRINTOUT (FOR DEBUGGING)
  • model: 2; MODELS AVAILABLE (SEE BOTTOM FOR DIFFERENT OPTIONS)
  • ifile: energy.txt; INPUT FILE SPECTRUM FOR BEAM (NEEDED FOR OPTION MODEL = 2)
  • beam: 22; BEAM PARTICLE ID
  • en: 11.0 GeV; BEAM ENERGY (NEEDED FOR OPTION MODEL = 1)
  • tg_Z: 1; TARGET Z
  • tg_N: 1; TARGET N
  • tg_mass 1.876 GeV; TARGET MASS
  • length: 40 cm; LENGTH TARGET
  • ras_x: 0.2 cm; BEAM PROFILE (GAUSSIAN SIGMA IN THE X DIRECTION)
  • ras_y: 0.2 cm; BEAM PROFILE (GAUSSIAN SIGMA IN THE Y DIRECTION)
  • b_s_cosx:0.001 cm; BEAM PROFILE DIRECTION (GAUSSIAN SIGMA IN THE cosX DIRECTION)
  • b_s_cosy:0.001 cm; BEAM PROFILE DIRECTION (GAUSSIAN SIGMA IN THE cosY DIRECTION)
  • theta: 1.57,3.14 rad; THETA CUT (AT NOW IS AN HARD CUT ON THE SIMULATED DATA->WILL REDUCE FINAL COUNT
  • offset: 0.12,0.14,1.1 cm; OFFSET TARGET (X,Y,Z)
  • npart: 5; NUMBER OF PARTICLE INVOLVED IN THE INTERACTION (EXCLUDING BEAM AND TARGET)
  • pid: 11,2212,113,211,-211; PARTICLE ID OF THE PARTICLE SPECIFIED WITH npart
  • nvertex: 2; NUMBER OF VERTEXES IN THE INTERACTION
  • vertex: 0,3; ORIGIN OF THE VERTEX (0 STANDS FOR BEAM+TARGET),PARTICLE GOING OUT OF VERTEX (READ IN SEQUENCE FROM pid
  • v_type: 1,1.0; TYPE OF VERTEX (AT NOW JUST OPTION 1, IN THE FUTURE DIFFERENT CROSS SECTION CAN BE APPLIED AT EACH VERTEX)
  • vertex: 3,2; ORIGIN OF VERTEX (3 IN THIS CASE IS PARTICLE WITH pid=113), PARTICLE GOING OUT OF VERTEX
  • v_type: 1,1.0; SAME AS BEFORE
  • output: 2; OUTPUT FORMAT (SEE BELOW FOR OPTIONS)
  • END

Models

  • 1 Phase Space Single Energy (for example e-)
  • 2 Phase Space Energy Spectrum (for example gamma)
  • 3 Cross Section (sorry, not yet)

output

  • 1 ROOT only
  • 2 ROOT + A2 SIM format

About

Edinburgh Phase Space Generator for A2 collaboration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 83.7%
  • CMake 9.6%
  • C 6.7%