From 54d91638f3aa027e66254a4d81d7a049d3bf59da Mon Sep 17 00:00:00 2001 From: Adrian Meyer-Ahrens <a_meye37@uni-muenster.de> Date: Thu, 15 Sep 2022 11:27:24 +0200 Subject: [PATCH] Fix remaining unused variables for trd related files --- core/detectors/trd/CbmTrdRadiator.cxx | 14 +++++++------- sim/detectors/trd/CbmTrdModuleSimR.cxx | 5 ----- sim/detectors/trd/CbmTrdRawToDigiR.cxx | 4 ++-- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/core/detectors/trd/CbmTrdRadiator.cxx b/core/detectors/trd/CbmTrdRadiator.cxx index acf493dcb3..b05fbb338c 100644 --- a/core/detectors/trd/CbmTrdRadiator.cxx +++ b/core/detectors/trd/CbmTrdRadiator.cxx @@ -13,7 +13,7 @@ #include <Logger.h> // for Logger, LOG -#include <TDirectory.h> // for TDirectory +#include <TDirectory.h> // for TDirectory #include <TFile.h> // for TFile, gFile #include <TGeoManager.h> // for TGeoManager, gGeoManager #include <TH1.h> // for TH1D @@ -700,7 +700,7 @@ Int_t CbmTrdRadiator::TRspectrum() SetSigma(1); - Float_t stemp = 0; + //Float_t stemp = 0; // Loop over energy // stemp is the total energy of all created photons @@ -739,7 +739,7 @@ Int_t CbmTrdRadiator::TRspectrum() // save the result fSpectrum->SetBinContent(iBin + 1, wn); // compute the integral - stemp += wn; + //stemp += wn; } // <nTR> (binsize corr.) @@ -765,7 +765,7 @@ Int_t CbmTrdRadiator::WinTRspectrum() SetSigma(2); - Float_t stemp = 0; + //Float_t stemp = 0; for (Int_t iBin = 0; iBin < fSpNBins; iBin++) { Float_t sp = 0; @@ -779,7 +779,7 @@ Int_t CbmTrdRadiator::WinTRspectrum() fWinSpectrum->SetBinContent(iBin + 1, wn); - stemp += wn; + //stemp += wn; } //fnTRprod = stemp * fSpBinWidth; @@ -799,7 +799,7 @@ Int_t CbmTrdRadiator::DetTRspectrum() // SetSigma(3); - Float_t stemp = 0; + //Float_t stemp = 0; Float_t stemp2 = 0; for (Int_t iBin = 0; iBin < fSpNBins; iBin++) { @@ -810,7 +810,7 @@ Int_t CbmTrdRadiator::DetTRspectrum() Float_t wn = sp * conv; fDetSpectrum->SetBinContent(iBin + 1, wn); - stemp += wn; + //stemp += wn; // absorbed spectrum Float_t conv2 = 1 - TMath::Exp(-fSigmaDet[iBin]); diff --git a/sim/detectors/trd/CbmTrdModuleSimR.cxx b/sim/detectors/trd/CbmTrdModuleSimR.cxx index dd86d07ae4..cfb1e3547f 100644 --- a/sim/detectors/trd/CbmTrdModuleSimR.cxx +++ b/sim/detectors/trd/CbmTrdModuleSimR.cxx @@ -1364,7 +1364,6 @@ void CbmTrdModuleSimR::ScanPadPlane(const Double_t* local_point, Double_t reldri if (fnScanRowConst > 0) maxRow = fnScanRowConst; Int_t startRow(rowId - maxRow / 2); - Double_t sum = 0; Int_t secRow(-1), targCol(-1), targRow(-1), targSec(-1), address(-1), fnRow(fDigiPar->GetNofRows()), fnCol(fDigiPar->GetNofColumns()); @@ -1404,8 +1403,6 @@ void CbmTrdModuleSimR::ScanPadPlane(const Double_t* local_point, Double_t reldri chargeFraction = CalcPRF((iCol - columnId) * W - displacement_x, W, h) * CalcPRF((iRow - rowId) * H - displacement_y, H, h); - sum += chargeFraction; - ch = chargeFraction * clusterELoss; tr = chargeFraction * clusterELossTR; @@ -1450,7 +1447,6 @@ void CbmTrdModuleSimR::ScanPadPlane(const Double_t* local_point, Double_t reldri chargeFraction = CalcPRF(((iCol - collow) - columnId) * W - displacement_x, W, h) * CalcPRF((iRow - rowId) * H - displacement_y, H, h); - sum += chargeFraction; ch = chargeFraction * clusterELoss; tr = chargeFraction * clusterELossTR; @@ -1523,7 +1519,6 @@ void CbmTrdModuleSimR::ScanPadPlane(const Double_t* local_point, Double_t reldri chargeFraction = CalcPRF(((iCol + colhigh) - columnId) * W - displacement_x, W, h) * CalcPRF((iRow - rowId) * H - displacement_y, H, h); - sum += chargeFraction; ch = chargeFraction * clusterELoss; tr = chargeFraction * clusterELossTR; diff --git a/sim/detectors/trd/CbmTrdRawToDigiR.cxx b/sim/detectors/trd/CbmTrdRawToDigiR.cxx index 6aaa07f7f0..cce707eafb 100644 --- a/sim/detectors/trd/CbmTrdRawToDigiR.cxx +++ b/sim/detectors/trd/CbmTrdRawToDigiR.cxx @@ -474,9 +474,9 @@ Double_t CbmTrdRawToDigiR::GetCharge(std::vector<Int_t> samples, Int_t shift) for (size_t i = 0; i < fSampleMask.size(); i++) { samplesum += samples[fSampleMask[i]]; } - if (shift > -1) charge = fElookupSmall[shift][samples[fMaxBin]]; + if (shift > -1) charge = fElookupSmall[shift][samplesum]; else - charge = fElookupSmall[fElookupAsym[samples[fMaxBin]][samples[fMinBin]][samples[fHighBin]]][samples[fMaxBin]]; + charge = fElookupSmall[fElookupAsym[samples[fMaxBin]][samples[fMinBin]][samples[fHighBin]]][samplesum]; } else { return 0.; -- GitLab