Commit 47e6429d authored by Administrator's avatar Administrator Committed by Florian Uhlig
Browse files

Remove defined but unused variables

These variables are defined and actually used in a sense. The value of the
variable is at least changed/updated once but the value of the variable is not
in any case. Normally it is save to remove all occurence of the variable.
On the other side this behaviour means that there were some code changes, so
the code around the commented lines should be checked carefully if it makes
sense and if it is still meeded.
parent 0f1a82c3
......@@ -40,7 +40,7 @@ void CbmPsdModulesConverter::ProcessData(CbmEvent* event)
psd_modules_->ClearChannels();
CbmPsdHit* hit {nullptr};
Float_t psd_energy {0.};
// Float_t psd_energy {0.}; // FU, 22.06.22
auto* data_header = AnalysisTree::TaskManager::GetInstance()->GetDataHeader();
auto* config = AnalysisTree::TaskManager::GetInstance()->GetConfig();
......@@ -66,7 +66,7 @@ void CbmPsdModulesConverter::ProcessData(CbmEvent* event)
auto& module = psd_modules_->Channel(hit->GetModuleID() - 1);
module.SetNumber(i + 1);
module.SetSignal(hit->GetEdep());
psd_energy += hit->GetEdep();
// psd_energy += hit->GetEdep(); // FU, 22.06.22
}
}
......
......@@ -1141,9 +1141,9 @@ Bool_t CbmMcbm2018MonitorMuch::DoUnpack(const fles::Timeslice& ts, size_t compon
std::vector<Bool_t> vbCopyOnAnyAsicMs(fuNbFebs, kFALSE);
std::vector<Bool_t> vbCopySameAdcOnAnyAsicMs(fuNbFebs, kFALSE);
std::vector<Bool_t> vbFlagOnAnyAsicMs(fuNbFebs, kFALSE);
Bool_t bCopyOnAnyMs = kFALSE;
Bool_t bCopySameAdcOnAnyMs = kFALSE;
Bool_t bFlagOnAnyMs = kFALSE;
// Bool_t bCopyOnAnyMs = kFALSE; // FU, 22.06.22
// Bool_t bCopySameAdcOnAnyMs = kFALSE; // FU, 22.06.22
// Bool_t bFlagOnAnyMs = kFALSE; // FU, 22.06.22
for (UInt_t uAsic = 0; uAsic < fuNbStsXyters; uAsic++) {
UInt_t uFebIdx = uAsic / fUnpackParMuch->GetNbAsicsPerFeb();
UInt_t uAsicInFeb = uAsic % fUnpackParMuch->GetNbAsicsPerFeb();
......@@ -1161,9 +1161,9 @@ Bool_t CbmMcbm2018MonitorMuch::DoUnpack(const fles::Timeslice& ts, size_t compon
vbCopySameAdcOnAnyAsicMs[uFebIdx] = vbCopySameAdcOnAnyAsicMs[uFebIdx] || bHitCopySameAdcInThisMs[uAsic];
vbFlagOnAnyAsicMs[uFebIdx] = vbFlagOnAnyAsicMs[uFebIdx] || bFlagOnInThisMs[uAsic];
bCopyOnAnyMs |= bHitCopyInThisMs[uAsic];
bCopySameAdcOnAnyMs |= bHitCopySameAdcInThisMs[uAsic];
bFlagOnAnyMs |= bFlagOnInThisMs[uAsic];
// bCopyOnAnyMs |= bHitCopyInThisMs[uAsic]; // FU, 22.06.22
// bCopySameAdcOnAnyMs |= bHitCopySameAdcInThisMs[uAsic]; // FU, 22.06.22
// bFlagOnAnyMs |= bFlagOnInThisMs[uAsic]; // FU, 22.06.22
} // for( UInt_t uAsic = 0; uAsic < fuNbStsXyters; uAsic++)
for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
......
......@@ -1514,9 +1514,9 @@ Bool_t CbmMcbm2018MonitorSts::DoUnpack(const fles::Timeslice& ts, size_t compone
std::vector<Bool_t> vbCopyOnAnyAsicMs(fuNbFebs, kFALSE);
std::vector<Bool_t> vbCopySameAdcOnAnyAsicMs(fuNbFebs, kFALSE);
std::vector<Bool_t> vbFlagOnAnyAsicMs(fuNbFebs, kFALSE);
Bool_t bCopyOnAnyMs = kFALSE;
Bool_t bCopySameAdcOnAnyMs = kFALSE;
Bool_t bFlagOnAnyMs = kFALSE;
// Bool_t bCopyOnAnyMs = kFALSE; // FU, 22.06.22
// Bool_t bCopySameAdcOnAnyMs = kFALSE; // FU, 22.06.22
// Bool_t bFlagOnAnyMs = kFALSE; // FU, 22.06.22
for (UInt_t uAsic = 0; uAsic < fuNbStsXyters; uAsic++) {
UInt_t uFebIdx = uAsic / fUnpackParSts->GetNbAsicsPerFeb();
UInt_t uAsicInFeb = uAsic % fUnpackParSts->GetNbAsicsPerFeb();
......@@ -1534,9 +1534,9 @@ Bool_t CbmMcbm2018MonitorSts::DoUnpack(const fles::Timeslice& ts, size_t compone
vbCopySameAdcOnAnyAsicMs[uFebIdx] = vbCopySameAdcOnAnyAsicMs[uFebIdx] || bHitCopySameAdcInThisMs[uAsic];
vbFlagOnAnyAsicMs[uFebIdx] = vbFlagOnAnyAsicMs[uFebIdx] || bFlagOnInThisMs[uAsic];
bCopyOnAnyMs |= bHitCopyInThisMs[uAsic];
bCopySameAdcOnAnyMs |= bHitCopySameAdcInThisMs[uAsic];
bFlagOnAnyMs |= bFlagOnInThisMs[uAsic];
// bCopyOnAnyMs |= bHitCopyInThisMs[uAsic]; // FU, 22.06.22
// bCopySameAdcOnAnyMs |= bHitCopySameAdcInThisMs[uAsic]; // FU, 22.06.22
// bFlagOnAnyMs |= bFlagOnInThisMs[uAsic]; // FU, 22.06.22
} // for( UInt_t uAsic = 0; uAsic < fuNbStsXyters; uAsic++)
for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
......
......@@ -526,7 +526,8 @@ void CbmMuchFindHitsGem::ExecClusteringPeaks(CbmMuchCluster* cluster, Int_t iClu
void CbmMuchFindHitsGem::CreateHits(CbmMuchCluster* cluster, Int_t iCluster, CbmEvent* event)
{
Int_t nDigis = cluster->GetNofDigis();
Double_t sumq = 0, sumx = 0, sumy = 0, sumt = 0, sumdx2 = 0, sumdy2 = 0, sumdxy2 = 0, sumdt2 = 0;
// Double_t sumq = 0, sumx = 0, sumy = 0, sumt = 0, sumdx2 = 0, sumdy2 = 0, sumdxy2 = 0, sumdt2 = 0; // FU, 22.06.22
Double_t sumq = 0, sumx = 0, sumy = 0, sumdx2 = 0, sumdy2 = 0, sumdxy2 = 0, sumdt2 = 0;
Double_t q = 0, x = 0, y = 0, t = 0, z = 0, dx = 0, dy = 0, dxy = 0, dt = 0;
Double_t nX = 0, nY = 0, nZ = 0;
Int_t address = 0;
......@@ -588,7 +589,7 @@ void CbmMuchFindHitsGem::CreateHits(CbmMuchCluster* cluster, Int_t iCluster, Cbm
sumq += q;
sumx += q * x;
sumy += q * y;
sumt += q * t;
// sumt += q * t; // FU, 22.06.22
sumdx2 += q * q * dx * dx;
sumdy2 += q * q * dy * dy;
sumdxy2 += q * q * dxy * dxy;
......
......@@ -549,7 +549,7 @@ void CbmRichMCbmQaRichOnly::DrawRing(CbmRichRing* ring, bool full)
center->Draw();
double hitZ = 0;
// double hitZ = 0; // FU, 22.06.22
uint nofDrawHits = 0;
// Draw hits
......@@ -565,11 +565,11 @@ void CbmRichMCbmQaRichOnly::DrawRing(CbmRichRing* ring, bool full)
else {
hitDr->SetFillColor(kBlue);
}
hitZ += hit->GetZ();
// hitZ += hit->GetZ(); // FU, 22.06.22
nofDrawHits++;
hitDr->Draw();
}
hitZ /= nofDrawHits;
// hitZ /= nofDrawHits; // FU, 22.06.22
//Draw information
......
......@@ -1777,13 +1777,13 @@ Bool_t CbmTofCosmicClusterizer::FillHistos()
}
}
Double_t TotSum = 0.;
// Double_t TotSum = 0.; // FU, 22.06.22
for (Int_t iLink = 0; iLink < digiMatch->GetNofLinks(); iLink++) { // loop over digis
CbmLink L0 = digiMatch->GetLink(iLink); //vDigish.at(ivDigInd);
Int_t iDigInd0 = L0.GetIndex();
if (iDigInd0 < fTofCalDigisColl->GetEntriesFast()) {
CbmTofDigi* pDig0 = (CbmTofDigi*) (fTofCalDigisColl->At(iDigInd0));
TotSum += pDig0->GetTot();
// CbmTofDigi* pDig0 = (CbmTofDigi*) (fTofCalDigisColl->At(iDigInd0)); // FU, 22.06.22
// TotSum += pDig0->GetTot(); // FU, 22.06.22
}
}
Double_t dMeanTimeSquared = 0.;
......
......@@ -671,11 +671,11 @@ void CbmTrdCalibTracker::ResolutionQa()
return;
}
double x = p->GetX(); // take the "In" point since the time is stored only for this point
// double x = p->GetX(); // take the "In" point since the time is stored only for this point // FU, 22.06.22
double y = p->GetY();
double z = p->GetZ();
double t = t0 + p->GetTime();
double px = p->GetPx();
// double px = p->GetPx(); // FU, 22.06.22
double py = p->GetPy();
double pz = p->GetPz();
......@@ -684,7 +684,7 @@ void CbmTrdCalibTracker::ResolutionQa()
// transport the particle from the MC point to the hit Z
double dz = hit->GetZ() - z;
x += dz * px / pz;
// x += dz * px / pz; // FU, 22.06.22
y += dz * py / pz;
// get particle mass
......
......@@ -217,7 +217,7 @@ void CbmRecoQa::record(std::string decName, int decNum)
for (int j = 0; j < nEnt; j++) {
float bestWeight = 0.f;
float totalWeight = 0.f;
// float totalWeight = 0.f; // FU, 22.06.22
// int iMCPoint = -1; (FU) unused
CbmLink link;
......@@ -254,7 +254,7 @@ void CbmRecoQa::record(std::string decName, int decNum)
for (int iLink = 0; iLink < curr_match.GetNofLinks(); iLink++) {
float tmpweight = curr_match.GetLink(iLink).GetWeight();
totalWeight += tmpweight;
// totalWeight += tmpweight; // FU, 22.06.22
//LOG(info) << " Match Link Nr.: " << iLink;
if (tmpweight > bestWeight) {
bestWeight = tmpweight;
......@@ -369,7 +369,7 @@ void CbmRecoQa::record(std::string decName, int decNum)
for (int j = 0; j < nEnt; j++) {
float bestWeight = 0.f;
float totalWeight = 0.f;
// float totalWeight = 0.f; // FU, 22.06.22
int iMC = -1;
CbmLink link;
......@@ -378,7 +378,7 @@ void CbmRecoQa::record(std::string decName, int decNum)
for (int iLink = 0; iLink < curr_match->GetNofLinks(); iLink++) {
float tmpweight = curr_match->GetLink(iLink).GetWeight();
totalWeight += tmpweight;
// totalWeight += tmpweight; // FU, 22.06.22
//LOG(info) << " Match Link Nr.: " << iLink;
if (tmpweight > bestWeight) {
bestWeight = tmpweight;
......
......@@ -248,7 +248,7 @@ int CbmMuchDigitizerQa::InitChannelPadInfo()
printf("---------------------------------------------------------\n");
}
Int_t nTotSectors = 0;
// Int_t nTotSectors = 0; // FU, 22.06.22
Int_t nTotChannels = 0;
for (Int_t iStation = 0; iStation < fNstations; iStation++) {
Int_t nChannels = 0;
......@@ -293,7 +293,7 @@ int CbmMuchDigitizerQa::InitChannelPadInfo()
if (fPadMinLy > padMinLy) fPadMinLy = padMinLy;
if (fPadMaxLx < padMaxLx) fPadMaxLx = padMaxLx;
if (fPadMaxLy < padMaxLy) fPadMaxLy = padMaxLy;
nTotSectors += nSectors;
// nTotSectors += nSectors; // FU, 22.06.22
nTotChannels += nChannels;
if (fVerbose > 2) {
......
......@@ -1615,7 +1615,6 @@ void CbmTrdModuleSimR::SetAsicPar(CbmTrdParSetAsic* /*p*/)
Int_t gCol[3] = {16, 8, 4}; // re-ordering on the feb -> same mapping for normal and super
Double_t xAsic = 0; // x position of Asic
Double_t yAsic = 0; // y position of Asic
Int_t rowId(0), isecId(0), irowId(0), iAsic(0);
for (Int_t s = 0; s < fDigiPar->GetNofSectors(); s++) {
for (Int_t r = 0; r < fDigiPar->GetNofRowsInSector(s); r++) {
......
......@@ -470,9 +470,9 @@ Double_t CbmTrdRawToDigiR::GetCharge(std::vector<Int_t> samples, Int_t shift)
charge = fElookupSmall[fElookupAsym[samples[fMaxBin]][samples[fMinBin]][samples[fHighBin]]][samples[fMaxBin]];
}
if (fLookUp == 2) {
Int_t samplesum = 0;
// Int_t samplesum = 0; // FU, 22.06.22
for (size_t i = 0; i < fSampleMask.size(); i++) {
samplesum += samples[fSampleMask[i]];
// samplesum += samples[fSampleMask[i]]; // FU, 22.06.22
}
if (shift > -1) charge = fElookupSmall[shift][samplesum];
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment