40 LOGP(warning,
"calling denormalize() before filling");
45 const int nROC =
row < 63 ?
int(sector) :
int(sector) + 36;
46 const int rocRow =
row < 63 ?
row :
row - 63;
48 const float pad = cluster.getPad();
52 if ((nROC < mapper.getNumberOfIROCs())) {
53 if (position >= mapper.getPadsInIROC()) {
54 LOG(error) <<
"IROC out of range: pad position " << position <<
"\tROC " << nROC <<
"\tIROC has " << mapper.getPadsInIROC() <<
" pads";
58 if (position >= mapper.getPadsInOROC()) {
59 LOG(error) <<
"OROC out of range: pad position " << position <<
"\tROC " << nROC <<
"\tOROC has " << mapper.getPadsInOROC() <<
" pads";
64 const auto qMax = cluster.getQmax();
65 const auto qTot = cluster.getQtot();
66 const auto sigmaPad = cluster.getSigmaPad();
67 const auto sigmaTime = cluster.getSigmaTime();
68 const auto timeBin = cluster.getTime();
96 LOGP(warning,
"calling denormalize() before filling");
120 mSigmaTime /= mNClusters;
121 mSigmaPad /= mNClusters;
122 mTimeBin /= mNClusters;
124 mIsNormalized =
true;
130 if (!mIsNormalized) {
136 mSigmaTime *= mNClusters;
137 mSigmaPad *= mNClusters;
138 mTimeBin *= mNClusters;
140 mIsNormalized =
false;
153 mIsNormalized =
false;
167 const bool isThisNormalized = mIsNormalized;
168 const bool isOtherNormalized =
clusters.mIsNormalized;
170 if (isThisNormalized) {
173 if (isOtherNormalized) {
184 if (isThisNormalized) {
187 if (isOtherNormalized) {
195 if (
filename.find(
".root") != std::string::npos) {
200 const std::string canvasFile =
filename +
"_canvas.root";
201 auto f = std::unique_ptr<TFile>(TFile::Open(canvasFile.c_str(),
"recreate"));
212 const std::string calPadFile =
filename +
".root";
213 auto f = std::unique_ptr<TFile>(TFile::Open(calPadFile.c_str(),
"recreate"));
215 f->WriteObject(&mNClusters, mNClusters.
getName().data());
216 f->WriteObject(&mQMax, mQMax.
getName().data());
217 f->WriteObject(&mQTot, mQTot.
getName().data());
218 f->WriteObject(&mSigmaTime, mSigmaTime.
getName().data());
219 f->WriteObject(&mSigmaPad, mSigmaPad.
getName().data());
220 f->WriteObject(&mTimeBin, mTimeBin.
getName().data());
226 const std::string calPadFile =
filename +
".root";
227 auto f = std::unique_ptr<TFile>(TFile::Open(calPadFile.c_str(),
"recreate"));
228 f->WriteObject(
this,
"ClusterQC");
Class of a TPC cluster in TPC-native coordinates (row, time)
ClassImp(o2::tpc::qc::Clusters)
Header to collect LHC related constants.
Definition of the parameter class for the detector electronics.
const Sector sector() const
void setValue(const size_t channel, const T &value)
PadSubset getPadSubset() const
int getPadSubsetNumber() const
const T getValue(const size_t channel) const
const CalType & getCalArray(size_t position) const
void setValue(const int sec, const int globalPadInSector, const T &value)
const T getValue(const int sec, const int globalPadInSector) const
const std::string & getName() const
static Mapper & instance(const std::string mappingDir="")
CalPad getOccupancy(int nHBFPerTF=32)
void fillADCValue(int cru, int rowInSector, int padInRow, int timeBin, float adcValue)
void merge(Clusters &clusters)
void dumpToFile(std::string filename, int type=0)
GLint GLint GLsizei GLint GLenum GLenum type
constexpr int LHCMaxBunches
std::string to_string(gsl::span< T, Size > span)
static constexpr int TIMEBININBC
static TCanvas * draw(const CalDet< T > &calDet, int nbins1D=300, float xMin1D=0, float xMax1D=0, TCanvas *outputCanvas=nullptr)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Cluster > clusters