SMASH ROOT output is a fast and disk-space efficient, but not human-readable output. It is a custom format making information about the SMASH calculation accessible with ROOT, mostly mirroring the information of the OSCAR output formats. This output is distinct from the standarized HepMC output that is also available in a ROOT format and more widely adopted.
SMASH ROOT output files can be viewed using ROOT's TBrowser. One can also access them using ROOT functions. The full memory structure of the ROOT files can be found here: http://root.cern.ch/root/html/TFile.html. We only describe the logical structure of the SMASH ROOT output. Knowing the logical structure is enough to read and write ROOT files, be able to view them in TBrowser, or write a ROOT macro to analyze them.
Producing ROOT output requires ROOT installed (see http://root.cern.ch).
Depending on configuration (see Output), SMASH can produce two ROOT files per run: Particles.root and Collisions.root. These files contain a TTree called particles and a TTree called collisions, respectively. The particles tree contains information about the parameters of the run (such as the number of testparticles and event number), information relating to individual particles (such as their position or charge), and information about bulk observables in the system (kinetic energy, mean field energy, and total energy). The collisions tree contains information about each collision, such as number of incoming and outgoing particles. It also has the full information about the incoming and outgoing\ particles of each collision.
In case that the ROOT format is used for dilepton output (see Dileption output), the ROOT file is called Dileptons.root and only contains a collisions tree with all the dilepton decays.
Output is divided into ROOT entries (output blocks). In a ROOT entry, information is stored in TBranches, where every physical quantity corresponds to a separate TBranch. One entry (output block) in the particles TTree is comprised of:
All particles in a ROOT entry (output block) are at the same time and in the same event. The maximal number of particles in one entry is limited to
tcounter and ev.Each ROOT entry (output block) contains TBranches with overall information about the event and the output block:
ev is event number ens is ensemble number tcounter is number of the output block in a given event npart is number of particles in the block test_p is number of testparticles per particle modus_l is modus length current_t is time associated with the output block, in fm impact_b is the impact parameter of the event empty_event indicates whether the projectile did not interact with the targetThen, each ROOT entry (output block) contains information about all particles in the block. Particle characteristics such as position or charge are stored in arrays which belong to separate TBranches. There are TBranches containing arrays with information on the following quantities:
id is unique integer identifier of the particle pdgcode is PDG id charge is the electric charge formation_time is particle formation time time_last_collision is time of the last collision p0, px, py, pz are components of particle 4-momentum t, x, y, z are components of particle 4-positionFinally, each ROOT entry (output block) contains information about some of the bulk properties of the system:
E_kinetic_tot is total kinetic energy in the system E_fields_tot is total mean field energy * test_p E_tot is the sum of E_kinetic_tot and E_fields_totIn case of extended output (see extended output) more fields are added. Their description is the same that in case of OSCAR format, see extended OSCAR format.
formation_time and time_last_collision in the standard (not extended) output.If "Collisions:" section is present in the config file, then in addition to a file Particles.root with particles TTree, another file Collisions.root is created. Collisions.root contains information about each collision, written as one leaf. Similarly to Particles.root, this includes global information about the event:
and information about particles participating in a collision:
where all arrays are now of dimension nin+nout = npart. Beyond these, Collisions.root contains a few additional fields:
nin is the number of incoming particles in the reaction, nout is the number of outgoing particles in the reaction, wgt is an action weight, whose meaning depends on the type of action: for collisions it is the total cross section, for decays it is the total decay width, and for dilepton decays it is the shining weight, par_wgt is partial weight of the collision.Currently writing initial and final configurations to collisions tree is not supported.
See also Collision output in box modus.
Here is an example of a basic ROOT macro to read the ROOT output of SMASH:
To execute this macro:
To generate a ROOT macro for a more involved analysis:
This creates analysis.h and analysis.C, the latter of which provides an example of a basic loop over entries. The user can modify the Loop() function and build a more complicated analysis. The following is an example of a macro using an array of histograms to obtain the radial momentum distribution for each of the entries in the Particles.root:
To quickly view a ROOT file from the command line:
Viewing a ROOT file can be also done in a TBrowser:
For more examples of extracting info from .root file see root.cern.ch