#include <math.h>
#include <time.h>
#include <string.h>
#include <iostream>
#include <fstream>
#include <TH1D.h>
#include <TH2D.h>
#include <TH3D.h>
#include <TFile.h>
#include <TTree.h>
#include <TRandom3.h>
#include "counter.h"
#include "functions2.h"
#include "distrib.h"
#include "collision.h"
Defines | |
#define | _VER_ 2.506 |
defined version of the code | |
Functions | |
Int_t | main (Int_t argc, char *argv[]) |
the main function of GLISSANDO 2 | |
Variables | |
Float_t | ver = _VER_ |
current version of the code | |
TRandom3 | raa |
ROOT random number generator. |
Int_t main | ( | Int_t | argc, | |
char * | argv[] | |||
) |
the main function of GLISSANDO 2
The main function of GLISSANDO 2 contains the basic structure of the Glauber Monte Carlo simulation, i.e., declarations and definitions of basic objects of the nucleus and collision classes, the main loop over events, evaluation of basic quantities, etc. It is meant to be taylored by the user to meet his needs. For speed of the execution, some switches of the code are controled by the preprocessor variables (_gauss_, _files_, _profile_, _weight_, _rapidity_).
(the units for all dimensionful quantities in GLISSANDO 2 are powers of fm)
start time
print basic info
print header
set the input file
process input parameters
set the ROOT output file
seed the ROOT random-number generator
reset counters used for some basic physical quantities
declare and initialize trees and histograms for storage of data
set the minimum wounding and binary-collision distances (hard-sphere profile) or the Gaussian wounding parameters (Gaussian profile)
echo basic parameters to the console
if(_files_) then initialize the nucleon distributions from external tables
declare nuclei A nad B
declare the collision
--- start the main loop over events
generate the distributions of nucleons in nuclei A and B
shift nuclei to the center-of-mass frame
rotate deformed nuclei by theta (zx plane) and phi (xy plane) angles The proper order of rotations is important. Opposite one (phi,theta) has no sense.
#(if_profile_) generate the histograms of one-body density in x-y and r-cos(theta) coordinate systems for nucleus A and the relative NN distance
generate the impact parameter b with the distribution proportional to b^2 in the range (BMAX, BMIN)
shift the coordinates of the nucleons in nucleus A such that the center of mass is at the point (b*NUMB/(NUMA+NUMB),0)
shift the coordinates of the nucleons in nucleus B such that the center of mass is at the point (-b*NUMA/(NUMA+NUMB),0)
collide the nuclei, create the sources (wounded nucleons, binary collisions) and RDS
if(_rapidity_) generate the rapidity distribution
if(_weight_) generate the histograms for the NN collision profiles
generate various 2-dim histograms with the distributions of sources
generate the fixed-axes Fourier moments
generate the variable-axes Fourier moments (up to 6-th moment)
get some basic properties of the event
fill the data in trees and histograms
if(FULL) write the full event info to the file (added for comparability reasons, takes a lot of space)
--- end of main loop over events
output of results
the total cross section and the equivalent hard-sphere radius
project out the marginal distribution in the radial variable (generate the radial Fourier profiles)
generate and write some histograms with physical quantities
if(_weight_) normalize to the wounding and the binary cross sections and write
if(_rapidity_) write rapidity distribution
closing ROOT file
write exit info
stop time and print stamp
argc | number of command line parameters |
argv | used for passing input and output file names first argument: <input.dat> second argument: <output.root> third argument: <nucl_A.dat> (only when _files_=1) fourth argument: <nucl_B.dat> (only when _files_=1) |