How to run the analysis macros

The analysis proceeds in 2 step:

The Raw Data Processing:

    1.) Non zero-suppressed raw data are processed to obtain TPhHits . The hits contain position information (x/y/z coordinates in cm) and calibrated energy loss information (dE/dx per pad in GeV).

The hits are written as TPhEvents to a root file. Each event has two data containers: one for Hits and one for HitArrays. To run the macro: start phat and call the ProcessRaw.C macro like:

>cd PhatMacros

>phat

root [1] .x ProcessRaw.C("/mydatadir/run012.dat",12,10000,0)

The first parameter is the data file name with path, the second gives the run number, the third parameter is the number of events to process (should be larger than 500) and the fourth parameter is the number of events to skip.

The macro produces two output files:

The Event Processing

One simple example for further processing is myevent_anal.C .

Using TPhHits (which are stored in the TPhEvent structure) tracks are reconstructed: as a first step hits on adjacent pads (the signal is shared between two pads) are merged. After hit-merging the TrackFinder is called and tracks are reconstructed.

The macro fills all hits, which are associated to tracks in histograms . The signals are calibrated, normalized to  300um detector thickness and calculated in keV. Finally a Landau Convoluted with a Gauss is fitted to the signal distribution.

The macros uses the data file name hard-coded - so be sure to change it to the proper file name.

root [2] .x myevent_anal.C

The Event Display

The event display works very similar like the event analysis. It displays a particular event with the detector geometry and the reconstructed track (if any). It open a canvas and displays the event (if you select X3D for display in the canvas pull-down menu) you get a very nive view which you can rotate to see the event from different angles). The same story: the file name is hard-coded in the macro...

root [3] .x event_display(5)

the parameter gives the event to display.