Project
Loading...
Searching...
No Matches
EMCALCalibParams.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
17
18#ifndef EMCAL_CALIB_INIT_PARAMS_H_
19#define EMCAL_CALIB_INIT_PARAMS_H_
20
23
24namespace o2
25{
26namespace emcal
27{
28
29// class containing the parameters to trigger the calibrations
30struct EMCALCalibParams : public o2::conf::ConfigurableParamHelper<EMCALCalibParams> {
31
32 // parameters for bad channel calibration
33 unsigned int minNEvents_bc = 1e7;
34 unsigned int minNEntries_bc = 1e6;
36 bool useScaledHisto_bc = true;
37 bool enableTestMode_bc = false;
38 int nBinsEnergyAxis_bc = 1000;
41 int nBinsTimeAxis_bc = 1000;
42 float rangeTimeAxisLow_bc = -500;
45 float sigmaTime_bc = 5;
48 unsigned int slotLength_bc = 0;
52 float minCellEnergy_bc = 0.1;
53 float fractionEvents_bc = 1.;
54 size_t nThreads_bc = 4;
55 float fracMaskSMFully_bc = 0.5;
56 float fracMaskFECFully_bc = 0.9;
57
58 // parameters for time calibration
59 unsigned int minNEvents_tc = 1e7;
60 unsigned int minNEntries_tc = 1e6;
62 float minCellEnergy_tc = 0.5;
63 int minTimeForFit_tc = -300;
64 int maxTimeForFit_tc = 300;
66 int nBinsTimeAxis_tc = 1500;
69 float lowGainOffset_tc = 8.8;
70 unsigned int slotLength_tc = 0;
73 float fractionEvents_tc = 1.;
74 size_t nThreads_tc = 2;
75
76 // common parameters
77 std::string calibType = "time";
78 std::string localRootFilePath = "";
79 bool enableFastCalib = false;
80 bool enableTimeProfiling = false;
83 long endTimeMargin = 2592000000;
84 std::string selectedClassMasks = "C0TVX-B-NOPF-EMC";
85 int bcShiftCTP = 0;
86 std::string filePathSave = "./emc_calib";
87 bool requireSameFill = false;
88 bool requireSameRunType = true;
89 int tsDiffMax = 48;
90 unsigned int minNEventsSaveSlot = 100000;
92
93 // Parameters for pedestal calibration
94 short maxPedestalRMS = 10;
95
96 // old parameters. Keep them for a bit (can be deleted after september 5th) as otherwise ccdb and o2 version might not be in synch
97 unsigned int minNEvents = 1e7;
98 unsigned int minNEntries = 1e6;
99 bool useNEventsForCalib = true;
101 bool enableTestMode = false;
103 unsigned int slotLength = 0;
104 bool UpdateAtEndOfRunOnly = false;
105 int minTimeForFit = -300;
106 int maxTimeForFit = 300;
108
109 O2ParamDef(EMCALCalibParams, "EMCALCalibParams");
110};
111
112} // namespace emcal
113
114namespace framework
115{
116template <typename T>
117struct is_messageable;
118template <>
119struct is_messageable<o2::emcal::EMCALCalibParams> : std::true_type {
120};
121} // namespace framework
122
123} // namespace o2
124
125#endif /*EMCAL_CALIB_INIT_PARAMS_H_ */
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
float rangeTimeAxisLow_bc
minimum value of time for histogram range
float minCellEnergy_bc
minimum cell energy considered for filling the histograms for bad channel calib. Should speedup the f...
unsigned int minNEventsSaveSlot
minimum amount a slot has to have in order to be taken into accoutn in finalize slot....
int tsDiffMax
if loading calib objects from previous run, limit time between the object being stored and loaded aga...
float fracMaskSMFully_bc
fraction of bad+dead channel for a SM to be fully masked
int restrictFitRangeToMax
window around the largest entry within the minTimeForFit in which the fit is performed in ns
int minTimeForFit_tc
minimum cell time considered for the time calibration in ns
std::string selectedClassMasks
name of EMCal min. bias trigger that is used for calibration
bool enableTestMode
enable test mode for calibration
std::string localRootFilePath
path to local root file in order to store the calibration histograms (off by default,...
bool enableTestMode_bc
enable test mode for calibration
int restrictFitRangeToMax_tc
window around the largest entry within the minTimeForFit in which the fit is performed in ns
bool useTimeInfoForCalib_bc
weather to use the timing information as a criterion in the bad channel analysis
float minCellEnergyTime_bc
minimum energy needed to fill the time histogram
float rangeTimeAxisHigh_bc
maximum value of time for histogram range
unsigned int minNEntries_tc
minimum number of entries to trigger the calibration
short maxPedestalRMS
Maximum value for RMS for pedestals (has to be tuned)
std::string calibType
type of calibration to run
unsigned int slotLength_bc
Lenght of the slot before calibration is triggered. If set to 0 calibration is triggered when hasEnou...
bool UpdateAtEndOfRunOnly_tc
switch to enable trigger of calibration only at end of run
float fractionEvents_bc
fraction of events used in bad channel calibration
float minCellEnergyForTimeCalib
minimum cell energy to enter the time calibration (typical minimum seed energy for clusters),...
int nBinsEnergyAxis_bc
number of bins for boost histogram energy axis
unsigned int minNEntries
minimum number of entries to trigger the calibration
bool setSavedSlotAllowed_EMC
if true, saving and loading of calibrations from last run and for next run is enabled
bool setSavedSlotAllowedSOR_EMC
if true, stored calibrations from last run can be loaded in the next run (if false,...
bool useNEventsForCalib_bc
use the minimum number of events to trigger the calibration
unsigned int slotLength
Lenght of the slot before calibration is triggered. If set to 0 calibration is triggered when hasEnou...
bool useNEventsForCalib_tc
use the minimum number of events to trigger the calibration
bool enableFastCalib
switch to enable fast calibration. Instead of filling boost histograms, mean and sigma of cells is ca...
float sigmaTimePostTrigg_bc
sigma value for the upper cut on the fraction of cells in the post-trigger region
int nBinsTimeAxis_tc
number of bins used for the time calibration
int nBinsTimeAxis_bc
number of bins for boost histogram time axis
float fractionEvents_tc
fraction of events used in time calibration
int minValueTimeAxis_tc
minimum value of the time axis in the time calibration
unsigned int minNEntries_bc
minimum number of entries to trigger the calibration
size_t nThreads_tc
number of threads used for the time calinration for filling the histograms
unsigned int slotLength_tc
Lenght of the slot before calibration is triggered. If set to 0 calibration is triggered when hasEnou...
int maxTimeForFit
maximum cell time considered for the time calibration in ns
unsigned int minNEvents_tc
minimum number of events to trigger the calibration
float minNHitsForNHitCut
mean number of hits per cell that is needed to cut on the mean number of hits. Needed for high energy...
bool enableTimeProfiling
enable to log how much time is spent in the run function in the calibrator spec. Needed for speed tes...
std::string filePathSave
path where calibration histograms are stored at EOR to save them for the next run
bool UpdateAtEndOfRunOnly_bc
switch to enable trigger of calibration only at end of run
bool useScaledHistoForBadChannelMap
use the scaled histogram for the bad channel map
long endTimeMargin
set end TS to 30 days after slot ends (1000 * 60 * 60 * 24 * 30)
bool useScaledHisto_bc
use the scaled histogram for the bad channel map
bool useNEventsForCalib
use the minimum number of events to trigger the calibration
float fracMaskFECFully_bc
fraction of bad+dead channel for a FEC to be fully masked
int minTimeForFit
minimum cell time considered for the time calibration in ns
unsigned int minNEvents_bc
minimum number of events to trigger the calibration
int bcShiftCTP
bc shift of CTP digits to align them with EMC bc in case they are misaligned
bool requireSameFill
if loading calib objects from previous run, require it to be in the same fill as the current one
float lowGainOffset_tc
Offset between high gain and low gain in ns. This is needed since the low gain calib will not be poss...
O2ParamDef(EMCALCalibParams, "EMCALCalibParams")
float maxValueEnergyAxis_bc
maximum value for boost histogram energy axis (minimum is always 0)
float sigmaTimePreTrigg_bc
sigma value for the upper cut on the fraction of cells in the pre-trigger region
size_t nThreads_bc
number of threads used for the bad channel calinration for filling the histograms
bool useStaticStartTimeSlot
if set to true, allows to use the start timestamp set manually. This is important if data from a prev...
bool UpdateAtEndOfRunOnly
switch to enable trigger of calibration only at end of run
float maxAllowedDeviationFromMax
maximum deviation allowed between the estimated maximum of the fit and the true maximum from the dist...
unsigned int minNEvents
minimum number of events to trigger the calibration
bool requireSameRunType
if loading calib objects from previous run, require it to be the same run type
int maxTimeForFit_tc
maximum cell time considered for the time calibration in ns
float sigmaTime_bc
sigma value for the upper cut on the time-variance distribution
float minNHitsForMeanEnergyCut
mean number of hits per cell that is needed to cut on the mean energy per hit. Needed for high energy...
int maxValueTimeAxis_tc
maximum value of the time axis in the time calibration
float minCellEnergy_tc
minimum cell energy to enter the time calibration (typical minimum seed energy for clusters),...