MIP calibration
In order to have a first calibration of each cell/tile within the calorimeter to the same physical level, a MIP (minimum ionizing particle) calibration needs to be performed. This ideally is done using cosmic or beam muons. On average a muon will leave the same amount of energy in each tile. However, these values are not discrete but rather follow a Landau-Gauss distribution, where the maximum of that distribution reflects the "MIP"-scale. By estimating the MIP scale on a channel by channel basis, small differences in the response of the SiPM, coupling of the Tile to the SiPM, losses ... can be corrected for and a uniform response for each tile can be reached. Using the mip scale also data among different readout systems can be compared as each of them afterwards can be expressed in mip/tile energy for instance.
CAEN data
Transferring the pedestal calibrations to a different run
The extraction of the MIP scale is a somewhat iterative process, as it get easier the cleaner your sample is, meaning if the pedestal (with its additional noise) is very close to the actual MIP peak its getting more difficult to fit the MIP-peak correctly in an automated fashion. Thus ideally the pedestal calibration (where it is & how wide it is) are taken from dedicated runs which have no other signals in them. As described in the section Pedestal extraction. The corresponding calibration obtained like that can then be applied to the muon or cosmics run as follows:
The calibration file obtained from a different run PedestalCalib_$RUNNR1.root
is being applied to the input file raw_$RUNNR2.root.
As before the data is then copied in full to a separate output file (rawPed_$RUNNR2.root
) together with the calib-object from the provided calibration file. To check the correct application of the file several QA plots are produced.
The calibration object can be printed to an external text file using the option -a
, which will write the calib-object to a file with the same name as defined in -o
, but ending in _calib.txt.
It is also possible to overwrite the calibration which is being loaded from PedestalCalib_$RUNNR1.root
by adding the option -A $EXTCALIB.txt
and providing a text file of that name in the same format as the output of the -a
option.
During the transfer of the pedestal calibrations it is also possible to either evaluate the bad channels or apply an external bad channel map.
An example of such a bad channel map and its format can be found here
The various BC flags are encoded as follows:
0
: bad1
: always lower mip2
: sometimes lower mip3
: good
All channels not listed in the BC map will be assumed to be good and the calib-object created accordingly. Please read what is written printed as info in the shell during execution this is normally useful and will give you an idea whether things are running correctly. If a bad channel map was supposed to be calculated or has been provided the following plot will be created.
The option -e
allows you to force the executable to draw more plots for your information, like the individual spectra of each channel per layer.
The original data per tile & event will not be modified in this process, it is a true copy process. The corresponding routine being executed can be found here:
bool Analyses::CorrectPedestal(void)
in Analyses.cc.
If your muon runs were for instance done with multiple positions of the beam and you plan to apply the same pedestals to them you can simply hadd
the raw files and afterwards run the calibration transfer, i.e.:
Estimation of MIP scale for a single run
Step 1
The estimation of the mip scale can be an iterative process, the first step towards a correct mip-calibration object can be executed as follows:
This should ideally be done on using a $rawPedWBC_$RUNNR.root
file which already contains the flagging for the bad channels in order to reduce the amount of time fitting channels which are dead or not fully working. In addition to the defined output file it also produces a rather extensive histogram output file, named as usual by the same name ending in _hists.root.
The option -s
is the primary trigger to start the estimation of the mip-scale for each cell. It is implemented in:
bool Analyses::GetScaling(void)
in Analyses.cc.
This function processes the full event tree twice and tries to fit the MIP peak in two different versions. In the first iteration over the data for each cell a histogram is filled for both HG and LG without any kind of trigger selection correcting the ADC values for their respective pedestal values.
Afterwards a Landau-Gauss-function is fit to every HG-spectrum and if the fit succeeds a first value for the maximum of the Landau-Gauss as well as its width is stored in the calibration object which is read from the input file. Should the fit fail for instance because the pedestal (noise) peak is too large or too close, no values are stored in the calib-objects. Overview plots showing the respective values during the first iteration are also generated
In addition the linear relation between the LG & HG is evaluated and its slope stored in the calibration objects.
In the second part of the routine the data tree is processed once more now knowing for a significant fraction of the tiles how LG and HG are related as well as what the average MIP position ought to be.
Using this information local trigger primitives are being calculated. Taking into account the signals in n
layers before and after the current cell (same row & column, different layer). The basis for the trigger primitive calculation can be found here:
double CalculateLocalMuonTrigg(Calib, TRandom3*, int, int, double)
in Event.cc
It combines the information based on the ADC value in the HG (low energy) and LG (high energy) and forming a combined average signal of n*2
tiles in a row. The tile under investigation is then flagged as local muon triggered tile if facMin*avMIP < ADC HG < facMax*avMIP
. A rather loose selection is done in this step as potentially the avMIP
is still biased, if not all channels could be fit reliably in the first iteration. For the 2024 data the respective factors are:
This suppresses the pedestal peak by a rather large amount and allows for a more stable fitting of the mip-peaks for the correspondingly selected tile-events. While leaving the mip-signal region largely undisturbed.
The evaluated trigger primitives are stored in the new output for event and tile, allowing to reevalulate the trigger in subsequent iterations with stricter seletion criteria.
The corresponding HG and LG spectra for the locally muon triggered events are then fitted again with a Landau-Gauss function and if successful the corresponding calibration values are updated.
As the selection of the triggers is rather course still the fits might still not perfectly describe the mip-signal region. This particularly applies for tiles which the beam wasn't directly pointing at (edges). The same monitoring plots for the fit parameters are created in the 2nd iteration as well and the equivalent LG plots as well.
The respective fitting routines for the Landau-Gauss functions can be found in
in TileSpecta.cc.
Step 2
The second step relies on the output objects of Step 1 (which include the trigger primitives for each cell). It can be started as follows:
This file again will copy each time the original data tree from rawPedAndMuonWBC_$RUNNR.root
and updates the calib objects which are provided in the same file, writing the original data tree and new calib object to rawPedAndMuonWBCImp_$RUNNR.root
.
It follows the same procedure as the second part of step 1, basing trigger selection criteria on the inputed calib objects and their respective average mip scale, however the minimum and maximum factors for the trigger selection are significantly tightened. For the 2024 data the respective factors are:
This allows for a significantly better noise suppression and thus easier fitting.
The detailed implementation can be found in:
bool Analyses::GetImprovedScaling(void)
in Analyses.cc.
The step 2 can be repeated as often as necessary on the output created in the previous iteration of step 2, until the fitting converges for a maximum of cells. To ease this judgement the following lines can be found in the shell output:
Indicating the average mip values for HG and LG before and after the current iteration as well as the calibratable channels. If the before and after are close enough it can be assumed that the fitting cannot be improved without manual intervention.
Otherwise a very similar set of plots is produced as for the second part of Step 1, which should be looked at in detail to ensure good quality of fits.
September 2023 data
No scripts have been created yet.
October 2023 data
No scripts have been created yet.
August 2024 data
The primary script for the muon calibration of this data set is as for the pedestal runCalibration_2024.sh
, in order to obtain the calibrations for a specific scan the following commands need to be executed in order. The next command should only be executed if the outputs of the previous step have been checked.
Please have a look which options for the 2nd argument are available to select different data sets.
Last updated