Online Monitoring and reconstruction for AHCAL Test Beam Campaign at CERN2015

This page is a branch of the main AHCALTestBeamCERN2015 page.


Online raw monitoring

For the online monitoring of the raw data (with no reconstruction or mapping) we use the text files from the labview. The labview pc harddrive is mounted in the monitoring PC.

in calice@flcahcallab06:~/Desktop$
sshfs calice@ DAQ_PC/ -oauto_cache,reconnect,allow_others

To start it, we first need to modify the steering file to point to the proper folder (Pions, Muons, etc...). We found this file in:


The line to modify is:

WORK_DIR= /home/calice/Desktop/DAQ_PC/CERN_SPS_August_2015/Muons/120GeV

To start the program:

cd /home/calice/Desktop/Raw_Monitor/flchcalonline/MultLayer_test

Then the AHCAL EPT Online Monitor MODE 0 window pop-up.

1) Go to tab Options

2) Click Search.

Raw onlinemonitor search

3) A list of runs should appear, chose the one you are interested and clic Load.

To check the T0 events:

1) go to Tab single channel

2) Look for the T0 channel (for example chip 201, channel 29)

3) Clic on the Hit Bit option.

4) Click on Get Plot. The histograms are updated while the file is read but you need to click again the Get Plot button.

To study a new run you need to open again the program.

The number of events that will be reconstructed offline can be estimated by counting the number of events in the ADC histograms (excluding the zeros) of the T0 channels.

Raw onlinemonitor t0channel

Reconstruction and Calibration

It make uses of LCIO files from the EUDAQ. For that we need to mount the EUDAQ Pc into the Monitoring Pc. Both of them are connected locally.

in calice@flcahcallab06:~/Desktop$
sshfs calice@ EUDAQ_PC/ -oauto_cache,reconnect,allow_others

== To execute the Online Monitor ===


You can download the latest version of the quasi-online monitor software here :

The dependencies and installation procedure is available in a readme file for each package.

Testbeam Monitoring

The programs are in


We reconstruct and apply the available calibrations to the raw events:

QtReco (reconstruction):

1. Run it by doing



2. Edit the steering file in the folder /home/calice/Desktop/AHCAL-Reconstruction/xml (steering.xml)

Run number

(need to be edited for each new Run)

3. Then Press Configure -> Check if the lcio file is found.

4. Then Press Start, it will run the reco and the analysis.

5. Wait until it finishes. It should show Analysis Module : destroyed

Now we are ready to show the plots or event displays.

Online monitor for events after reconstruction


It is in:


1. Run it by doing


/!\ QtReco-interface must be opened!


2. Click on connect then enter the Run number. /!\ Check that it says connected.

3. Then choose what plots you want to look at. /!\ Careful when analysing the plots! Mis-calibrations!

Important (and implemented) distributions

Several distributions are available after analysis :


In this section, T0 Plots are shown. 3 differents types of plots : Correlation within a layer, Difference of T0s within a layer and Correlation of a T0 channel to the others. If everything is fine, a linear (more or less as TDC is not calibrated) correlation should be visible as shown on the plots below.

T0 Correlation T0 Difference T0 Sum

Hit Multiplicity

NHits Profile NHits Per Layer


Energy Sum Energy Per Layer

Shower profile, beam profile

Muons +120 GeV, tungsten absorber


Pions +50 GeV, tungsten absorber


Electrons +20 GeV, tungsten absorber



You can see some reference hitmaps from August 2015 data taking period.

For Muons, +120 GeV, tungsten absorber.

Hit Map Muon 120 GeV, tungsten absorber

For Pions +50 GeV, tungsten absorber.

Hit Map Pion 50 GeV, tungsten absorber

For Electrons +20 GeV, tungsten absorber.

Hit Map electron 20 GeV, tungsten absorber

Calibration procedure

The QtReco program make use of the Marlin framework and the calice processors in order to reconstruct the raw data (hardware information) to physics data. The reconstruction is done in several steps and need to have access to the database containing mapping of the detector and calibration constants for each channel (gain, Pedestal, MIP).

/!\ The calice database is not accessible from outside the DESY network, so for CERN, a local database needs to be setup or slcio made.

The latter option is chosen and also the database slcio file are in  ~/Desktop/TB_Soft/Local_db/ . The database setup and making of slcio file is rather difficult so it is reserved for experts (contact Eldwan ( ) or Lan ( )).

The reconstruction is done in 4 steps :

This is done for each hits in each events.

Calice Database

Database constants (Local)

If you are at DESY, you can directly connect to the database no need to have local files. (Same steering part of GeoCondition Processor as offline reconstruction)

<processor name="GeoConditions" type="ConditionsProcessor">
<parameter name="DBInit" type="string" value=""/>
<parameter name="DBCondHandler" type="StringVec">
        Ahc2ModuleDescription        /cd_calice_cernSPS2015/TestbeamJuly2015/ModuleDescription               HEAD
        Ahc2ModuleConnection         /cd_calice_cernSPS2015/TestbeamJuly2015/ModuleConnection                HEAD
        Ahc2ModuleLocationReference  /cd_calice_cernSPS2015/TestbeamJuly2015/ModuleLocationReference         HEAD
        Ahc2DetectorTransformation   /cd_calice_cernSPS2015/TestbeamJuly2015/DetectorTransformation          HEAD
        Ahc2HardwareConnection       /cd_calice_cernSPS2015/TestbeamJuly2015/Ahc2HardwareConnection          HEAD
        E4DPedestal                  /cd_calice_cernSPS2015/TestbeamJuly2015/Pedestal                        ahc2_pedestal_007
        E4DGainConstants             /cd_calice_cernSPS2015/TestbeamJuly2015/gain_constants                  ahc2_gain_constants_004
        E4DGainSlopes                /cd_calice_cernSPS2015/TestbeamJuly2015/gain_slopes                     ahc2_gain_slopes_003
        E4DMipConstants              /cd_calice_cernSPS2015/TestbeamJuly2015/mip_constants                   ahc2_mip_constants_005
        E4DMipSlopes                 /cd_calice_cernSPS2015/TestbeamJuly2015/mip_slopes                      ahc2_mip_slopes_003
        E4DDeadCellMap               /cd_calice_cernSPS2015/TestbeamJuly2015/DeadCellMap                     ahc2_DeadCells_008
        E4DSaturationParameters      /cd_calice_cernSPS2015/TestbeamJuly2015/SaturationParameters            ahc2_Sat_001
        E4DIntercalibration          /cd_calice_cernSPS2015/TestbeamJuly2015/Intercalibration                ahc2_IC_001

In case you are outside DESY, the connection is restricted to specific IP addresses. To avoid this problem, local database files can be specified instead. First to create a database file, you need the package lccd ( Inside the lccd folder, create a folder build. Then go inside and type :

cmake $ILCSOFT/ILCSoft.cmake ..
make install

It will compile the package.

To create a local file, you have to do :

./build/bin/createdbfile <dbfolder> <tag>

This will then create a slcio file condDB_<Collection>_<tag>_<querytime>.slcio

To make use of theses file locally then you need to specify in the reconstruction steering file : This specify the name of the output collection, the path of the slcio file and the name of the collection inside the file.

<processor name="GeoConditions" type="ConditionsProcessor">
<parameter name="DBFileHandler" type="StringVec">
        Ahc2ModuleDescription       <filepath> ModuleDescription
        Ahc2ModuleConnection        <filepath> ModuleConnection
        Ahc2ModuleLocationReference <filepath> ModuleLocationReference
        Ahc2DetectorTransformation  <filepath> DetectorTransformation
        Ahc2HardwareConnection      <filepath> Ahc2HardwareConnection    
        E4DPedestal                 <filepath> Pedestal                        
        E4DGainConstants            <filepath> gain_constants                  
        E4DGainSlopes               <filepath> gain_slopes                    
        E4DMipConstants             <filepath> mip_constants                   
        E4DMipSlopes                <filepath> mip_slopes                      
        E4DDeadCellMap              <filepath> DeadCellMap                     
        E4DSaturationParameters     <filepath> SaturationParameters            
        E4DIntercalibration         <filepath> Intercalibration                

Event display

After applying the reconstruction and the corrections, we also can have a look on the aspect of the events in our detector. Actually, we can do it in parallel to the reconstruction, since it reads the events in the slcio file created by the QtReco program. For that we use a schematic 3D view of our detector that allows us to nicely and very intuitively discern the structure of the beam (content of pions, muons, electrons, etc), the position of the tracks, etc.

To execute the event display go in :

./start_Event Run_XXXXXX.slcio

The program has a tool to make screenshots. This is found in the "tools" tab and do screenshots in tga format.

Some standard event display are shown in the following pictures.

Electron (-) candidates (10 GeV, steel absorber)

electronCandidate 10GeV steel

Muon (-) candidate ( steel absorber)

muonCandidate steel

Pion (-) candidate (50 GeV, steel absorber)

pionCandidate 50GeV steel

Pion (+) candidates (50 GeV, tungsten absorber)

pionCandidates 50GeV tungsten

Electron (+) candidates (20 GeV, tungsten absorber)

ElectronCandidates 20GeV tungsten

To make these nice sets of eventdisplays, we can use a few set of "Jiri's" commands:

1) Convert to png, since the saved pictures in the eventdisplay use the tga format

ls *.tga|parallel convert {} ~

2) Create the set, by appending individual pictures:

convert \( glced-1.png glced-2.png +append \) \( glced-3.png glced-4.png +append \) -append test.png

(for 2x2)

convert \( glced-1.png glced-2.png glced-3.png +append +append \) \( glced-4.png glced-5.png glced-6.png +append +append \) \( glced-7.png glced-8.png glced-9.png \) -append -append r30079_pick_of_9events.png

(for 3x3)


AHCALTestBeamCERN2015/Monitoring (last edited 2016-07-25 17:19:25 by EldwanBrianne)