38 LOGP(warning,
"calling denormalize() before filling");
43 const int nROC =
row < 63 ?
int(sector) :
int(sector) + 36;
44 const int rocRow =
row < 63 ?
row :
row - 63;
46 const float pad = cluster.getPad();
50 if ((nROC < mapper.getNumberOfIROCs())) {
51 if (position >= mapper.getPadsInIROC()) {
52 LOG(error) <<
"IROC out of range: pad position " << position <<
"\tROC " << nROC <<
"\tIROC has " << mapper.getPadsInIROC() <<
" pads";
56 if (position >= mapper.getPadsInOROC()) {
57 LOG(error) <<
"OROC out of range: pad position " << position <<
"\tROC " << nROC <<
"\tOROC has " << mapper.getPadsInOROC() <<
" pads";
62 const auto qMax = cluster.getQmax();
63 const auto qTot = cluster.getQtot();
64 const auto sigmaPad = cluster.getSigmaPad();
65 const auto sigmaTime = cluster.getSigmaTime();
66 const auto timeBin = cluster.getTime();
94 LOGP(warning,
"calling denormalize() before filling");
118 mSigmaTime /= mNClusters;
119 mSigmaPad /= mNClusters;
120 mTimeBin /= mNClusters;
122 mIsNormalized =
true;
128 if (!mIsNormalized) {
134 mSigmaTime *= mNClusters;
135 mSigmaPad *= mNClusters;
136 mTimeBin *= mNClusters;
138 mIsNormalized =
false;
151 mIsNormalized =
false;
158 const bool isThisNormalized = mIsNormalized;
159 const bool isOtherNormalized =
clusters.mIsNormalized;
161 if (isThisNormalized) {
164 if (isOtherNormalized) {
175 if (isThisNormalized) {
178 if (isOtherNormalized) {
186 if (
filename.find(
".root") != std::string::npos) {
191 const std::string canvasFile =
filename +
"_canvas.root";
192 auto f = std::unique_ptr<TFile>(TFile::Open(canvasFile.c_str(),
"recreate"));
203 const std::string calPadFile =
filename +
".root";
204 auto f = std::unique_ptr<TFile>(TFile::Open(calPadFile.c_str(),
"recreate"));
206 f->WriteObject(&mNClusters, mNClusters.
getName().data());
207 f->WriteObject(&mQMax, mQMax.
getName().data());
208 f->WriteObject(&mQTot, mQTot.
getName().data());
209 f->WriteObject(&mSigmaTime, mSigmaTime.
getName().data());
210 f->WriteObject(&mSigmaPad, mSigmaPad.
getName().data());
211 f->WriteObject(&mTimeBin, mTimeBin.
getName().data());
217 const std::string calPadFile =
filename +
".root";
218 auto f = std::unique_ptr<TFile>(TFile::Open(calPadFile.c_str(),
"recreate"));
219 f->WriteObject(
this,
"ClusterQC");
Class of a TPC cluster in TPC-native coordinates (row, time)
ClassImp(o2::tpc::qc::Clusters)
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="")
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
std::string to_string(gsl::span< T, Size > span)
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