Heavy ion Analysis Libriares
|
Example of code for running HBT analysis
First part of code is a function that creates two cuts (on pt and eta), then these cuts are added. Later the cut monitor is created. Cut monitor contains the pt on X-axis, and eta on Y-axis.
Second part is creation of analysis manager. This is a class that contains all tasks used for analysis. AnalysisManager is also responsible for reading/writing files. Below there is a code that create simple AnalysisManager. This manager read HalOTF::Source - this is an "on the fly source" that generates data during analysis. There are different types of sources (e.g. for root files). The source of data and path/name of the output file is set.
The lines below are just creating a histogram with distrubution of pt and rapidity, this histogram will be used for generation of data on the fly. The last line is enable high verbose of code (you can comment out this line).
Then we have to create a reader. Reader is a first task in analysis. This task convert data in source that can be in any form into data format that base on Hal::Event. This is required by framework. Because we are using "on the fly data" we have to provide the plot that contains the distribution of particles, we also set the PDG code of generated particles and number of particles per event. At the end we have to add reader to analysis manager.
Line below create basic HBT analysis class, and set the type of analysis - by setting the correlation function. In this case the correlation function is calculated as a function of Kt, for each Kt bin the Spherical Harmonics function is calculated up to L=2, the SH function have 100 bins from 0 to 0.5 GeV/c. SH frame is PRF.
Then we have to setup the weight algorithm - this algorithm is needed for MC data to include correlations (MC data usually does not cotain correlations so we have to add them by using weight algorithm. In last line the cuts are added.
OTF data does not provide freezout information. So we have to set the freezoug generator. In principle to generate freezouts we need "freezout generator" and "source model". "Source model" generates the coordinates in laboratory frame, the "Freezout generator" boos them to given frame (in this case PRF).
At the end we are setting the format for our hbt task. Then our HBT task is configured.
We now have to call Init function - this function checks if settings of our analysis are good. The Run method perform simulation in this case from event 0 to event 2000.