16#ifndef ALICEO2_GLOBTRACKING_CALIBTOF_
17#define ALICEO2_GLOBTRACKING_CALIBTOF_
23#include <TStopwatch.h>
33#include "TGraphErrors.h"
41namespace globaltracking
64 void run(
int flag,
int sector = -1);
114 Int_t mDebugMode = 0;
116 float mNsigmaFractionProblematicCut = 5;
117 float mNsigmaSigmaProblematicCut = 5;
119 void fillLHCphaseCalibInput(std::vector<o2::dataformats::CalibInfoTOFshort>* calibinfotof);
120 void doLHCPhaseCalib();
121 void fillChannelCalibInput(std::vector<o2::dataformats::CalibInfoTOFshort>* calibinfotof,
float offset,
int ipad, TH1F* histo, std::vector<o2::dataformats::CalibInfoTOFshort>* calibTimePad);
122 void fillChannelTimeSlewingCalib(
float offset,
int ipad, TH2F* histo, std::vector<o2::dataformats::CalibInfoTOFshort>* calibTimePad);
123 float doChannelCalibration(
int ipad, TH1F* histo,
TF1*
func);
124 void resetChannelLevelHistos(TH1F* histoOffset[
NPADSPERSTEP], TH2F* histoTimeSlewing, std::vector<o2::dataformats::CalibInfoTOFshort>* calibTimePad[
NPADSPERSTEP]);
127 TH2F* mHistoLHCphase =
nullptr;
128 TH2F* mHistoChTimeSlewingAll;
130 TH1D* mProjTimeSlewingTemp;
132 void attachInputTrees();
133 bool loadTOFCollectedCalibInfo(TTree* localTree,
int& currententry,
int increment = 1);
139 bool mInitDone =
false;
140 bool mFillCCDB =
false;
141 std::string mCCDBpath =
"http://alice-ccdb.cern.ch";
147 TTree* mTreeCollectedCalibInfoTOF =
nullptr;
149 TTree* mOutputTree =
nullptr;
151 std::string mCollectedCalibInfoTOFBranchName =
"TOFCollectedCalibInfo";
152 std::string mOutputBranchName =
"TOFCalibParam";
162 TF1* mFuncLHCphase =
nullptr;
164 int mMinTimestamp = 0;
167 int mMaxTimestamp = 1;
170 CalibTOFapi mCalibTOFapi;
Class to store the output of the matching to TOF for calibration (no channel info,...
Class to store the output of the matching to TOF for calibration.
Class to use TOF calibration (decalibration, calibration)
Class to store the output of the matching to TOF for calibration.
Class for time synchronization of RawReader instances.
float getNsigmaFractionProblematicCut() const
static constexpr int NPADSPERSTEP
TH2F * getLHCphaseHisto()
Int_t FitPeak(TF1 *fitFunc, TH1 *h, Float_t startSigma, Float_t nSigmaMin, Float_t nSigmaMax, const char *debuginfo="", TH2 *hdbg=nullptr)
Int_t getDebugMode() const
std::string getCCDBpath() const
void setNsigmaSigmaProblematicCut(float value)
void setOutputTree(TTree *tr)
set input branch names for the input from the tree
const std::string & getCollectedCalibInfoTOFBranchName() const
void setMinTimestamp(int minTimestamp)
void merge(const char *name)
void setInputTreeTOFCollectedCalibInfo(TTree *tree)
set output tree to write calibration objects
TH2F * getChTimeSlewingHistoAll()
TGraphErrors * processSlewing(TH2F *histo, Bool_t forceZero, TF1 *fitFunc)
void setCCDBpath(const std::string path)
void run(int flag, int sector=-1)
void init()
set tree/chain containing TOF calib info
void setFillCCDB(bool flag)
~CalibTOF()
calibrate using the provided input
void setMaxTimestamp(int maxTimestamp)
static constexpr int NSTRIPSPERSTEP
void fillOutput(int flag=kLHCphase|kChannelOffset|kChannelTimeSlewing)
perform all initializations
const std::string & getOutputBranchName() const
print settings
void setDebugMode(Int_t flag=kTRUE)
float getNsigmaSigmaProblematicCut() const
void setCollectedCalibInfoTOFBranchName(const std::string &nm)
void flagProblematics()
problematics are flagged with negative values for frationUnderPeak: -100 empty channels,...
static constexpr int NSTEPSPERSECTOR
void setNsigmaFractionProblematicCut(float value)
void setOutputBranchName(const std::string &nm)
get input branch names for the input from the tree
TOF geo parameters (only statics)
static constexpr Int_t NPADS
static constexpr int NCHANNELS
GLuint const GLchar * name
GLsizei const GLfloat * value
GLsizei const GLchar *const * path
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))