Skip to content
Snippets Groups Projects
Commit 70f419a3 authored by Alexandru Bercuci's avatar Alexandru Bercuci
Browse files

modify histo naming, explicit variable naming

parent 983048ac
No related branches found
No related tags found
No related merge requests found
......@@ -93,7 +93,7 @@ public:
}
virtual uint32_t GetChannelMask() const;
virtual bool IsChannelMasked(int ch) const;
Int_t GetPadAddress(Int_t ich) const { return 0.5 * GetChannelAddress(ich); }
int GetPadAddress(Int_t ich) const { return int(0.5 * GetChannelAddress(ich)); }
Double_t GetSizeX() const { return fgSizeX; }
Double_t GetSizeY() const { return fgSizeY; }
Double_t GetSizeZ() const { return fgSizeZ; }
......
......@@ -136,7 +136,7 @@ void CbmTrdUnpackFaspMonitor::MapMaskedChannels(const CbmTrdParSetAsic* par)
}
for (int ich(0); ich < NFASPCH; ich++) {
const CbmTrdParFaspChannel* faspCh = fasp->GetChannel(ich);
int pad = fasp->GetChannelAddress(ich) / 2, row = pad / ncol, col = pad % ncol;
int pad = fasp->GetPadAddress(ich), row = pad / ncol, col = pad % ncol;
if (faspCh->IsMasked()) histo->Fill(col + (faspCh->HasPairingR() ? 1 : -1) * 0.25, row);
}
}
......@@ -151,7 +151,7 @@ void CbmTrdUnpackFaspMonitor::addParam(uint32_t madd, const CbmTrdParSetAsic* as
return;
}
std::vector<int32_t> padToFaspMapping(NFASPMOD * NFASPCH, -1);
std::vector<int32_t> chToFaspMapping(NFASPMOD * NFASPCH, -1);
std::vector<Int_t> add;
asics->GetAsicAddresses(&add);
for (auto afasp : add) {
......@@ -159,11 +159,11 @@ void CbmTrdUnpackFaspMonitor::addParam(uint32_t madd, const CbmTrdParSetAsic* as
int faspid(afasp % 1000), ich(faspid * 100);
for (auto ach : fasp->GetChannelAddresses()) {
padToFaspMapping[ach] = ich;
chToFaspMapping[ach] = ich;
ich++;
}
}
std::get<0>((*moduleDef).second) = padToFaspMapping;
std::get<0>((*moduleDef).second) = chToFaspMapping;
}
//_________________________________________________________________________
......@@ -192,7 +192,7 @@ void CbmTrdUnpackFaspMonitor::createHisto(eDigiHistos kHisto)
auto nrows = std::get<2>(moduleDef.second);
auto nchs = nrows * ncols;
histoname = "Fasp_" + getTypeName(kHisto) + "_" + getHistoName(kHisto);
histoname = getTypeName(kHisto) + getHistoName(kHisto) + "Fasp";
switch (kHisto) {
case eDigiHistos::kMap:
newhisto = std::make_shared<TH2I>(histoname.data(), Form("%s %d", histoname.data(), modId), 2 * ncols, -0.5,
......@@ -203,6 +203,7 @@ void CbmTrdUnpackFaspMonitor::createHisto(eDigiHistos kHisto)
break;
case eDigiHistos::kMap_St:
histoname = getTypeName(kHisto) + "MaskFasp";
newhisto = std::make_shared<TH2I>(histoname.data(), Form("%s %d", histoname.data(), modId), 2 * ncols, -0.5,
(ncols - 0.5), nrows, -0.5, (nrows - 0.5));
newhisto->SetXTitle("COL (pad)");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment