17#include <TDirectory.h>
31 if (opt.debugOutput ==
true) {
35 if (mConfig ==
nullptr) {
36 LOG(fatal) <<
"o2::zdc::BaselineCalib: missing configuration object";
41 mModuleConfig->
print();
60 LOG(info) <<
"BaselineCalib::process(" <<
data <<
")";
62 printf(
"Data to be added\n");
72 printf(
"Before adding\n");
91 LOGF(info,
"Finalizing BaselineCalibData object");
99 double bmin = mConfig->
cutLow[ic];
100 double bmax = mConfig->
cutHigh[ic];
103 if (bval >= bmin && bval <= bmax) {
108 if (nsum > 0 && mConfig->
min_e[ic]) {
109 float ave =
sum / nsum;
111 LOGF(info,
"Baseline %s %g events and cuts (%g:%g): %f",
ChannelNames[ic].
data(), nsum, bmin, bmax, ave);
115 if (mParam ==
nullptr) {
116 LOGF(warn,
"Baseline %s %g events and cuts (%g:%g): CANNOT UPDATE AND MISSING OLD VALUE",
ChannelNames[ic].
data(), nsum, bmin, bmax);
117 mParamUpd.
setCalib(ic, -std::numeric_limits<float>::infinity(),
false);
120 LOGF(warn,
"Baseline %s %g events and cuts (%g:%g): %f NOT UPDATED",
ChannelNames[ic].
data(), nsum, bmin, bmax,
val);
132 std::map<std::string, std::string> md;
133 md[
"config"] = mConfig->
desc;
136 if (starting >= 10000) {
137 starting = starting - 10000;
143 LOGF(info,
"Validity: %llu:%llu", starting, stopping);
145 if (mSaveDebugHistos) {
146 LOG(info) <<
"Saving debug histograms";
ZDC calibration common parameters.
std::vector< double > sum
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by factor
static std::string generateFileName(const std::string &inp)
void setStartValidityTimestamp(long start)
void setFileName(const std::string &nm)
void setPath(const std::string &path)
void setEndValidityTimestamp(long end)
void setObjectType(const std::string &tp)
void setMetaData(const std::map< std::string, std::string > &md)
static const CalibParamZDC & Instance()
void setSaveDebugHistos()
int process(const o2::zdc::BaselineCalibSummaryData *data)
int saveDebugHistos(const std::string fn="ZDCBaselineCalib.root")
const std::string CCDBPathBaselineCalib
constexpr int BaselineMin
constexpr int BaselineRange
constexpr std::string_view ChannelNames[]
static std::string getClassName(const T &obj)
get the class name of the object
std::array< uint32_t, NW > mData
2^16 bins
int cutHigh[NChannels]
Baseline cut low.
uint32_t min_e[NChannels]
Baseline cut high.
std::string desc
Minimum entries to compute baseline.
int saveDebugHistos(const std::string fn, float factor)
uint64_t mCTimeEnd
Time of processed time frame.
BaselineCalibChData mHisto[NChannels]
Overflow at least one ZDC channel.
float getCalib(uint32_t ich) const
void setCalib(uint32_t ich, float val, bool ismodified=true)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"