From 26943f6ea0535ee5eb8122d728943d0682399d4e Mon Sep 17 00:00:00 2001 From: Alexandru Bercuci <abercuci@niham.nipne.ro> Date: Sun, 1 May 2022 17:49:49 +0300 Subject: [PATCH] rename simulator for TRD-2D --- sim/detectors/trd/CMakeLists.txt | 2 +- sim/detectors/trd/CbmTrdDigitizer.cxx | 6 +-- ...rdModuleSimT.cxx => CbmTrdModuleSim2D.cxx} | 42 +++++++++---------- ...CbmTrdModuleSimT.h => CbmTrdModuleSim2D.h} | 20 ++++----- sim/detectors/trd/CbmTrdSimLinkDef.h | 2 +- 5 files changed, 36 insertions(+), 36 deletions(-) rename sim/detectors/trd/{CbmTrdModuleSimT.cxx => CbmTrdModuleSim2D.cxx} (95%) rename sim/detectors/trd/{CbmTrdModuleSimT.h => CbmTrdModuleSim2D.h} (90%) diff --git a/sim/detectors/trd/CMakeLists.txt b/sim/detectors/trd/CMakeLists.txt index 98b6685e22..129e5255bb 100644 --- a/sim/detectors/trd/CMakeLists.txt +++ b/sim/detectors/trd/CMakeLists.txt @@ -41,7 +41,7 @@ CbmTrd.cxx CbmTrdDigitizer.cxx CbmTrdModuleSim.cxx CbmTrdModuleSimR.cxx -CbmTrdModuleSimT.cxx +CbmTrdModuleSim2D.cxx CbmTrdTrianglePRF.cxx CbmTrdRawToDigiR.cxx CbmTrdCheckUtil.cxx diff --git a/sim/detectors/trd/CbmTrdDigitizer.cxx b/sim/detectors/trd/CbmTrdDigitizer.cxx index 60af952700..11d6c7919f 100644 --- a/sim/detectors/trd/CbmTrdDigitizer.cxx +++ b/sim/detectors/trd/CbmTrdDigitizer.cxx @@ -12,7 +12,7 @@ #include "CbmTrdGeoHandler.h" #include "CbmTrdModuleSim.h" #include "CbmTrdModuleSimR.h" -#include "CbmTrdModuleSimT.h" +#include "CbmTrdModuleSim2D.h" #include "CbmTrdPads.h" #include "CbmTrdParAsic.h" #include "CbmTrdParModDigi.h" @@ -308,7 +308,7 @@ CbmTrdModuleSim* CbmTrdDigitizer::AddModule(Int_t detId) if (moduleType == 10) SetUseFASP(kFALSE); else SetUseFASP(); - module = fModuleMap[moduleAddress] = new CbmTrdModuleSimT(moduleAddress, lyId, orientation, UseFASP()); + module = fModuleMap[moduleAddress] = new CbmTrdModuleSim2D(moduleAddress, lyId, orientation, UseFASP()); Int_t rType(-1); if ((rType = geoHandler.GetRadiatorType(path)) >= 0) { if (!fRadiator2D) { // strong TRD-2D entrance window @@ -337,7 +337,7 @@ CbmTrdModuleSim* CbmTrdDigitizer::AddModule(Int_t detId) } module->SetRadiator(fRadiator2D); } - //((CbmTrdModuleSimT*)module)->SetLabMeasurement(); + //((CbmTrdModuleSim2D*)module)->SetLabMeasurement(); } else { module = fModuleMap[moduleAddress] = new CbmTrdModuleSimR(moduleAddress, lyId, orientation); diff --git a/sim/detectors/trd/CbmTrdModuleSimT.cxx b/sim/detectors/trd/CbmTrdModuleSim2D.cxx similarity index 95% rename from sim/detectors/trd/CbmTrdModuleSimT.cxx rename to sim/detectors/trd/CbmTrdModuleSim2D.cxx index 53d9c63723..d84ee8d491 100644 --- a/sim/detectors/trd/CbmTrdModuleSimT.cxx +++ b/sim/detectors/trd/CbmTrdModuleSim2D.cxx @@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-3.0-only Authors: Florian Uhlig [committer], Alexandru Bercuci */ -#include "CbmTrdModuleSimT.h" +#include "CbmTrdModuleSim2D.h" #include "CbmDigitizeBase.h" #include "CbmMatch.h" @@ -41,7 +41,7 @@ using std::pair; using namespace std; //_________________________________________________________________________________ -CbmTrdModuleSimT::CbmTrdModuleSimT(Int_t mod, Int_t ly, Int_t rot, Bool_t FASP) +CbmTrdModuleSim2D::CbmTrdModuleSim2D(Int_t mod, Int_t ly, Int_t rot, Bool_t FASP) : CbmTrdModuleSim(mod, ly, rot) , fConfig(0) , fTriangleBinning(NULL) @@ -54,14 +54,14 @@ CbmTrdModuleSimT::CbmTrdModuleSimT(Int_t mod, Int_t ly, Int_t rot, Bool_t FASP) } //_________________________________________________________________________________ -CbmTrdModuleSimT::~CbmTrdModuleSimT() +CbmTrdModuleSim2D::~CbmTrdModuleSim2D() { if (fTriangleBinning) delete fTriangleBinning; if (fFASP) delete fFASP; } //_________________________________________________________________________________ -Bool_t CbmTrdModuleSimT::MakeDigi(CbmTrdPoint* point, Double_t time, Bool_t TR) +Bool_t CbmTrdModuleSim2D::MakeDigi(CbmTrdPoint* point, Double_t time, Bool_t TR) { /** Steering routine for building digits out of the TRD hit for the triangular pad geometry. @@ -72,7 +72,7 @@ Bool_t CbmTrdModuleSimT::MakeDigi(CbmTrdPoint* point, Double_t time, Bool_t TR) */ if (VERBOSE) { - printf("CbmTrdModuleSimT::MakeDigi @ T[ns] = ev[%10.2f]+hit[%5.2f] ...\n", time, point->GetTime()); + printf("CbmTrdModuleSim2D::MakeDigi @ T[ns] = ev[%10.2f]+hit[%5.2f] ...\n", time, point->GetTime()); point->Print(""); } Double_t gin[3] = {point->GetXIn(), point->GetYIn(), point->GetZIn()}, @@ -103,7 +103,7 @@ Bool_t CbmTrdModuleSimT::MakeDigi(CbmTrdPoint* point, Double_t time, Bool_t TR) ; //if (fRadiator) ELossTR = fRadiator->GetXray(mom)*1.e6; // keV } if (VERBOSE) { - printf("CbmTrdModuleSimT::MakeDigi for %s ...\n", (IsFeCalib() ? "55Fe" : "X-rays")); + printf("CbmTrdModuleSim2D::MakeDigi for %s ...\n", (IsFeCalib() ? "55Fe" : "X-rays")); if (ELossTR > 0) LOG(info) << " Ex " << ELossTR << " keV"; } } @@ -295,7 +295,7 @@ Bool_t CbmTrdModuleSimT::MakeDigi(CbmTrdPoint* point, Double_t time, Bool_t TR) } //_________________________________________________________________________________ -Bool_t CbmTrdModuleSimT::ScanPadPlane(const Double_t* point, Double_t DX, Double_t ELoss, Double_t toff) +Bool_t CbmTrdModuleSim2D::ScanPadPlane(const Double_t* point, Double_t DX, Double_t ELoss, Double_t toff) { /** The hit is expressed in local chamber coordinates, localized as follows: @@ -314,7 +314,7 @@ Bool_t CbmTrdModuleSimT::ScanPadPlane(const Double_t* point, Double_t DX, Double Int_t sec(-1), col(-1), row(-1); fDigiPar->GetPadInfo(point, sec, col, row); if (sec < 0 || col < 0 || row < 0) { - LOG(error) << "CbmTrdModuleSimT::ScanPadPlane: Hit to pad matching failed for [" << std::setprecision(5) << point[0] + LOG(error) << "CbmTrdModuleSim2D::ScanPadPlane: Hit to pad matching failed for [" << std::setprecision(5) << point[0] << ", " << std::setprecision(5) << point[1] << ", " << std::setprecision(5) << point[2] << "]."; return kFALSE; } @@ -328,7 +328,7 @@ Bool_t CbmTrdModuleSimT::ScanPadPlane(const Double_t* point, Double_t DX, Double // build binning if called for the first time. Don't care about sector information as Bucharest has only 1 type of pads if (!fTriangleBinning) fTriangleBinning = new CbmTrdTrianglePRF(fDigiPar->GetPadSizeX(1), fDigiPar->GetPadSizeY(1)); if (!fTriangleBinning->SetOrigin(dx, dy)) { - LOG(warn) << "CbmTrdModuleSimT::ScanPadPlane: Hit outside integration limits [" << std::setprecision(5) << dx + LOG(warn) << "CbmTrdModuleSim2D::ScanPadPlane: Hit outside integration limits [" << std::setprecision(5) << dx << ", " << std::setprecision(5) << dy << "]."; return kFALSE; } @@ -353,7 +353,7 @@ Bool_t CbmTrdModuleSimT::ScanPadPlane(const Double_t* point, Double_t DX, Double prf = fTriangleBinning->GetChargeFraction(); fTriangleBinning->GetCurrentPad(colOff, rowOff, up); if (colOff < 0 || colOff >= nc || rowOff < 0 || rowOff >= nr) { - printf("CbmTrdModuleSimT::ScanPadPlane: Bin outside mapped array : " + printf("CbmTrdModuleSim2D::ScanPadPlane: Bin outside mapped array : " "col[%d] row[%d]\n", colOff, rowOff); break; @@ -377,7 +377,7 @@ Bool_t CbmTrdModuleSimT::ScanPadPlane(const Double_t* point, Double_t DX, Double prf = fTriangleBinning->GetChargeFraction(); fTriangleBinning->GetCurrentPad(colOff, rowOff, up); if (colOff < 0 || colOff >= nc || rowOff < 0 || rowOff >= nr) { - printf("CbmTrdModuleSimT::ScanPadPlaneTriangleAB: Bin outside mapped " + printf("CbmTrdModuleSim2D::ScanPadPlaneTriangleAB: Bin outside mapped " "array : col[%d] row[%d]\n", colOff, rowOff); break; @@ -408,7 +408,7 @@ Bool_t CbmTrdModuleSimT::ScanPadPlane(const Double_t* point, Double_t DX, Double prf = fTriangleBinning->GetChargeFraction(); fTriangleBinning->GetCurrentPad(colOff, rowOff, up); if (colOff < 0 || colOff >= nc || rowOff < 0 || rowOff >= nr) { - printf("CbmTrdModuleSimT::ScanPadPlane: Bin outside mapped array : " + printf("CbmTrdModuleSim2D::ScanPadPlane: Bin outside mapped array : " "col[%d] row[%d]\n", colOff, rowOff); break; @@ -431,7 +431,7 @@ Bool_t CbmTrdModuleSimT::ScanPadPlane(const Double_t* point, Double_t DX, Double prf = fTriangleBinning->GetChargeFraction(); fTriangleBinning->GetCurrentPad(colOff, rowOff, up); if (colOff < 0 || colOff >= nc || rowOff < 0 || rowOff >= nr) { - printf("CbmTrdModuleSimT::ScanPadPlane: Bin outside mapped array : " + printf("CbmTrdModuleSim2D::ScanPadPlane: Bin outside mapped array : " "col[%d] row[%d]\n", colOff, rowOff); break; @@ -532,7 +532,7 @@ Bool_t CbmTrdModuleSimT::ScanPadPlane(const Double_t* point, Double_t DX, Double } //_______________________________________________________________________________________________ -void CbmTrdModuleSimT::AddDigi(Int_t address, Double_t* charge, Double_t time /*, Double_t fTR*/) +void CbmTrdModuleSim2D::AddDigi(Int_t address, Double_t* charge, Double_t time /*, Double_t fTR*/) { /** * Adding triangular digits to time slice buffer @@ -576,7 +576,7 @@ void CbmTrdModuleSimT::AddDigi(Int_t address, Double_t* charge, Double_t time /* } //_______________________________________________________________________________________________ -Int_t CbmTrdModuleSimT::FlushBuffer(ULong64_t time) +Int_t CbmTrdModuleSim2D::FlushBuffer(ULong64_t time) { /** Flush time sorted digi buffer until requested moment in time. If time limit not specified flush all digits. * Calculate timely interaction between digits which are produced either on different anode wires for the same particle or @@ -603,7 +603,7 @@ Int_t CbmTrdModuleSimT::FlushBuffer(ULong64_t time) fTimeOld = time; if (VERBOSE) - printf("CbmTrdModuleSimT::FlushBuffer(%llu) FASP start[%llu] end[%llu] " + printf("CbmTrdModuleSim2D::FlushBuffer(%llu) FASP start[%llu] end[%llu] " "closeTS[%c]\n", time, fFASP->GetStartTime(), fFASP->GetEndTime(), (closeTS ? 'y' : 'n')); @@ -713,7 +713,7 @@ Int_t CbmTrdModuleSimT::FlushBuffer(ULong64_t time) row = GetPadRowCol(localAddress, col); sec = fDigiPar->GetSector(row, srow); if (VERBOSE) - printf("CbmTrdModuleSimT::FlushBuffer : request ly[%d] mod[%d] " + printf("CbmTrdModuleSim2D::FlushBuffer : request ly[%d] mod[%d] " "sec[%d] srow[%d] col[%d]\n", fLayerId, CbmTrdAddress::GetModuleId(fModAddress), sec, srow, col); //address = CbmTrdAddress::GetAddress(fLayerId, CbmTrdAddress::GetModuleId(fModAddress), sec, srow, col); @@ -737,7 +737,7 @@ Int_t CbmTrdModuleSimT::FlushBuffer(ULong64_t time) it = fBuffer.erase(it); } if (VERBOSE) - printf("CbmTrdModuleSimT::FlushBuffer : write %d digis from %duns to " + printf("CbmTrdModuleSim2D::FlushBuffer : write %d digis from %duns to " "%duns. Digits still in buffer %d\n", n, TMath::Nint(timeMin), TMath::Nint(timeMax), nDigiLeft); fFASP->SetStartTime(newStartTime); @@ -749,7 +749,7 @@ Int_t CbmTrdModuleSimT::FlushBuffer(ULong64_t time) } //_______________________________________________________________________________________________ -void CbmTrdModuleSimT::DumpBuffer() const +void CbmTrdModuleSim2D::DumpBuffer() const { for (std::map<Int_t, std::vector<std::pair<CbmTrdDigi*, CbmMatch*>>>::const_iterator it = fBuffer.begin(); it != fBuffer.end(); it++) { @@ -765,7 +765,7 @@ void CbmTrdModuleSimT::DumpBuffer() const //_______________________________________________________________________________ -void CbmTrdModuleSimT::SetAsicPar(CbmTrdParSetAsic* p) +void CbmTrdModuleSim2D::SetAsicPar(CbmTrdParSetAsic* p) { /** Build local set of ASICs and perform initialization. Need a proper fDigiPar already defined. */ @@ -868,4 +868,4 @@ void CbmTrdModuleSimT::SetAsicPar(CbmTrdParSetAsic* p) // //fAsicPar->Print(); } -ClassImp(CbmTrdModuleSimT) +ClassImp(CbmTrdModuleSim2D) diff --git a/sim/detectors/trd/CbmTrdModuleSimT.h b/sim/detectors/trd/CbmTrdModuleSim2D.h similarity index 90% rename from sim/detectors/trd/CbmTrdModuleSimT.h rename to sim/detectors/trd/CbmTrdModuleSim2D.h index dbf03facf4..a70c3da509 100644 --- a/sim/detectors/trd/CbmTrdModuleSimT.h +++ b/sim/detectors/trd/CbmTrdModuleSim2D.h @@ -2,8 +2,8 @@ SPDX-License-Identifier: GPL-3.0-only Authors: Alexandru Bercuci, Florian Uhlig [committer] */ -#ifndef CBMTRDMODULESIMT_H -#define CBMTRDMODULESIMT_H +#ifndef CBMTRDMODULESIM2D_H +#define CBMTRDMODULESIM2D_H #include "CbmTrdModuleSim.h" @@ -11,7 +11,7 @@ class CbmTimeSlice; class CbmTrdFASP; class CbmTrdTrianglePRF; class CbmTrdParSetAsic; -/** @class CbmTrdModuleSimT +/** @class CbmTrdModuleSim2D ** @brief Simulation module implementation for TRD-2D physics and FEE ** @author Alex Bercuci <abercuci@niham.nipne.ro> ** @since 01.02.2019 @@ -22,9 +22,9 @@ class CbmTrdParSetAsic; ** output but also simulate laboratory set-ups (\sa SetLabMeasurement()) like ** 55Fe (\sa SetFeCalib()) or X-rays (\sa SetFeCalib(kFALSE)) **/ -class CbmTrdModuleSimT : public CbmTrdModuleSim { +class CbmTrdModuleSim2D : public CbmTrdModuleSim { public: - enum ECbmTrdModuleSimT + enum ECbmTrdModuleSim2D { kMeasurement = 0 ///< default simulate setup interactions, if set simulate laboratory measurement, see kLab , @@ -32,8 +32,8 @@ public: , kFEE ///< FEE simulator. Default FASP otherwise SPADIC }; - CbmTrdModuleSimT(Int_t mod, Int_t ly, Int_t rot, Bool_t FASP = kTRUE); - virtual ~CbmTrdModuleSimT(); + CbmTrdModuleSim2D(Int_t mod, Int_t ly, Int_t rot, Bool_t FASP = kTRUE); + virtual ~CbmTrdModuleSim2D(); Bool_t IsLabMeasurement() const { return TESTBIT(fConfig, kMeasurement); } Bool_t IsFeCalib() const { return TESTBIT(fConfig, kLab); } @@ -73,8 +73,8 @@ public: Bool_t UseFasp() const { return TESTBIT(fConfig, kFEE); } private: - CbmTrdModuleSimT(const CbmTrdModuleSimT& ref); - const CbmTrdModuleSimT& operator=(const CbmTrdModuleSimT& ref); + CbmTrdModuleSim2D(const CbmTrdModuleSim2D& ref); + const CbmTrdModuleSim2D& operator=(const CbmTrdModuleSim2D& ref); /** * \brief Build digits for the triangular pad geometry @@ -108,7 +108,7 @@ private: CbmTimeSlice* fTimeSlice; ///< link to CBM time slice ULong64_t fTimeOld; ///< time [ns] of the last event processed (check CbmDaq) - ClassDef(CbmTrdModuleSimT, 1) + ClassDef(CbmTrdModuleSim2D, 1) }; #endif diff --git a/sim/detectors/trd/CbmTrdSimLinkDef.h b/sim/detectors/trd/CbmTrdSimLinkDef.h index a2731b38d6..30187515b7 100644 --- a/sim/detectors/trd/CbmTrdSimLinkDef.h +++ b/sim/detectors/trd/CbmTrdSimLinkDef.h @@ -15,7 +15,7 @@ #pragma link C++ class CbmTrdDigitizer + ; #pragma link C++ class CbmTrdModuleSim + ; #pragma link C++ class CbmTrdModuleSimR + ; -#pragma link C++ class CbmTrdModuleSimT + ; +#pragma link C++ class CbmTrdModuleSim2D + ; #pragma link C++ class CbmTrdTrianglePRF + ; #pragma link C++ class CbmTrdRawToDigiR + ; #pragma link C++ class CbmTrdCheckUtil + ; -- GitLab