From 5b1b01659bcce0b8de6351670d11f8831cbac4d4 Mon Sep 17 00:00:00 2001 From: "s.zharko@gsi.de" <s.zharko@gsi.de> Date: Mon, 13 Jun 2022 17:36:21 +0200 Subject: [PATCH] L1: CbmMuchTrackerIF added --- macro/run/run_reco.C | 28 ++- reco/KF/CbmKF.cxx | 94 ++++---- reco/L1/CMakeLists.txt | 2 + reco/L1/CbmL1.cxx | 315 +++++++++++++-------------- reco/L1/CbmMuchTrackerIF.cxx | 190 ++++++++++++++++ reco/L1/CbmMuchTrackerIF.h | 138 ++++++++++++ reco/L1/CbmMvdTrackerIF.cxx | 21 +- reco/L1/CbmMvdTrackerIF.h | 52 +++-- reco/L1/CbmStsTrackerIF.cxx | 2 +- reco/L1/CbmStsTrackerIF.h | 30 +-- reco/L1/CbmTrackerDetInitializer.cxx | 26 ++- reco/L1/CbmTrackerDetInitializer.h | 14 +- reco/L1/L1Algo/L1Algo.cxx | 10 - reco/L1/L1Algo/L1CATrackFinder.cxx | 1 - reco/L1/L1Algo/L1MaterialInfo.cxx | 6 +- reco/L1/L1Algo/L1Parameters.cxx | 7 +- reco/L1/L1Algo/L1Station.cxx | 8 +- reco/L1/L1LinkDef.h | 1 + reco/L1/L1TrackerInterfaceBase.h | 2 +- 19 files changed, 646 insertions(+), 301 deletions(-) create mode 100644 reco/L1/CbmMuchTrackerIF.cxx create mode 100644 reco/L1/CbmMuchTrackerIF.h diff --git a/macro/run/run_reco.C b/macro/run/run_reco.C index fb53fe2101..8b4368d692 100644 --- a/macro/run/run_reco.C +++ b/macro/run/run_reco.C @@ -261,9 +261,10 @@ void run_reco(TString input = "", Int_t nTimeSlices = -1, Int_t firstTimeSlice = // ------------------------------------------------------------------------ + + // ----- Local reconstruction in MVD ---------------------------------- if (useMvd) { - CbmMvdClusterfinder* mvdCluster = new CbmMvdClusterfinder("MVD Cluster Finder", 0, 0); run->AddTask(mvdCluster); std::cout << "-I- : Added task " << mvdCluster->GetName() << std::endl; @@ -306,6 +307,12 @@ void run_reco(TString input = "", Int_t nTimeSlices = -1, Int_t firstTimeSlice = parFile += "/parameters/much/much_" + geoTag(0, 4) + "_digi_sector.root"; std::cout << "Using parameter file " << parFile << std::endl; + // --- Initialization of the digi scheme + auto muchGeoScheme = CbmMuchGeoScheme::Instance(); + if (!muchGeoScheme->IsInitialized()) { + muchGeoScheme->Init(parFile, muchFlag); + } + // --- Hit finder for GEMs FairTask* muchReco = new CbmMuchFindHitsGem(parFile.Data(), muchFlag); run->AddTask(muchReco); @@ -366,17 +373,14 @@ void run_reco(TString input = "", Int_t nTimeSlices = -1, Int_t firstTimeSlice = // ----- Track finding in STS (+ MVD) -------------------------------- if (useMvd || useSts) { - CbmKF* kalman = new CbmKF(); - run->AddTask(kalman); + // Geometry interface initializer for tracker + auto trackerIF = new CbmTrackerDetInitializer(); - // Initialize tracker detector interfaces used in CbmL1 - run->AddTask(new CbmTrackerDetInitializer()); - - CbmL1* l1 = 0; - if (debugWithMC) { l1 = new CbmL1("L1", 2, 3); } - else { - l1 = new CbmL1("L1", 0); - } + // Kalman filter + auto kalman = new CbmKF(); + + // L1 tracking + auto l1 = (debugWithMC) ? new CbmL1("L1", 2, 3) : new CbmL1("L1", 0); // --- Material budget file names TString mvdGeoTag; @@ -394,6 +398,8 @@ void run_reco(TString input = "", Int_t nTimeSlices = -1, Int_t firstTimeSlice = l1->SetStsMaterialBudgetFileName(parFile.Data()); } + run->AddTask(trackerIF); + run->AddTask(kalman); run->AddTask(l1); std::cout << "-I- " << myName << ": Added task " << l1->GetName() << std::endl; diff --git a/reco/KF/CbmKF.cxx b/reco/KF/CbmKF.cxx index 0e00c9de1c..2f7bd12116 100644 --- a/reco/KF/CbmKF.cxx +++ b/reco/KF/CbmKF.cxx @@ -9,10 +9,9 @@ #include "CbmKFFieldMath.h" #include "CbmKFHit.h" #include "CbmKFMath.h" -#include "CbmMvdDetector.h" -#include "CbmMvdStationPar.h" -#include "CbmStsSetup.h" -#include "CbmStsStation.h" +#include "CbmTrackerDetInitializer.h" +#include "CbmMvdTrackerIF.h" +#include "CbmStsTrackerIF.h" #include "FairBaseParSet.h" #include "FairField.h" @@ -81,6 +80,11 @@ CbmKF::CbmKF(const char* name, Int_t iVerbose) , fMaterialID2IndexMap() { if (!fInstance) fInstance = this; + + if (!CbmTrackerDetInitializer::Instance()) { + LOG(fatal) << "CbmL1: CbmTrackerDetInitializer instance was not found. Please, add it as a task to your reco macro before the KF and L1 tasks:\n" + << "\033[1;30mrun->AddTask(new CbmTrackerDetInitializer());\033[0m"; + } } CbmKF::~CbmKF() { fInstance = 0; } @@ -97,9 +101,6 @@ InitStatus CbmKF::ReInit() { return Init(); } InitStatus CbmKF::Init() { - if (!CbmStsSetup::Instance()->IsInit()) //TODO remove initialisation when the problem will be resolved globaly - CbmStsSetup::Instance()->Init(); - fMagneticField = 0; vMvdMaterial.clear(); @@ -143,39 +144,35 @@ InitStatus CbmKF::Init() digiMan->Init(); Bool_t useMVD = CbmDigiManager::IsPresent(ECbmModuleId::kMvd); if (useMVD) { - CbmMvdDetector* mvdDetector = CbmMvdDetector::Instance(); - if (mvdDetector) { - CbmMvdStationPar* mvdStationPar = mvdDetector->GetParameterFile(); - assert(mvdStationPar); - - if (fVerbose) cout << "KALMAN FILTER : === READ MVD MATERIAL ===" << endl; - - int NStations = mvdStationPar->GetStationCount(); - - for (Int_t ist = 0; ist < NStations; ist++) { - CbmKFTube tube; - - tube.ID = 1101 + ist; - // tube.F = 1.; - tube.z = mvdStationPar->GetZPosition(ist); - tube.dz = mvdStationPar->GetZThickness(ist); - // TODO: verify the thickness of MVD stations - tube.RadLength = tube.dz / (10. * mvdStationPar->GetZRadThickness(ist)); - tube.r = std::min(mvdStationPar->GetBeamHeight(ist), mvdStationPar->GetBeamWidth(ist)); - tube.R = std::max(mvdStationPar->GetHeight(ist), mvdStationPar->GetWidth(ist)); - tube.rr = tube.r * tube.r; - tube.RR = tube.R * tube.R; - tube.ZThickness = tube.dz; - tube.ZReference = tube.z; - - vMvdMaterial.push_back(tube); - MvdStationIDMap.insert(pair<Int_t, Int_t>(tube.ID, ist)); - - if (fVerbose) - cout << " Mvd material ( id, z, dz, r, R, RadL, dz/RadL )= ( " << tube.ID << ", " << tube.z << ", " << tube.dz - << ", " << tube.r << ", " << tube.R << ", " << tube.RadLength << ", " << tube.dz / tube.RadLength << " )" - << endl; - } + auto mvdInterface = CbmMvdTrackerIF::Instance(); + + if (fVerbose) cout << "KALMAN FILTER : === READ MVD MATERIAL ===" << endl; + + int NStations = mvdInterface->GetNtrackingStations(); + + for (Int_t ist = 0; ist < NStations; ist++) { + CbmKFTube tube; + + tube.ID = 1101 + ist; + // tube.F = 1.; + tube.z = mvdInterface->GetZ(ist); + tube.dz = mvdInterface->GetThickness(ist); + // TODO: verify the thickness of MVD stations + tube.RadLength = mvdInterface->GetRadLength(ist); + tube.r = mvdInterface->GetRmin(ist); + tube.R = mvdInterface->GetRmax(ist); + tube.rr = tube.r * tube.r; + tube.RR = tube.R * tube.R; + tube.ZThickness = tube.dz; + tube.ZReference = tube.z; + + vMvdMaterial.push_back(tube); + MvdStationIDMap.insert(pair<Int_t, Int_t>(tube.ID, ist)); + + if (fVerbose) + cout << " Mvd material ( id, z, dz, r, R, RadL, dz/RadL )= ( " << tube.ID << ", " << tube.z << ", " << tube.dz + << ", " << tube.r << ", " << tube.R << ", " << tube.RadLength << ", " << tube.dz / tube.RadLength << " )" + << endl; } } @@ -184,22 +181,19 @@ InitStatus CbmKF::Init() if (fVerbose) cout << "KALMAN FILTER : === READ STS MATERIAL ===" << endl; - int NStations = CbmStsSetup::Instance()->GetNofDaughters(); + auto stsInterface = CbmStsTrackerIF::Instance(); + int NStations = stsInterface->GetNtrackingStations(); for (Int_t ist = 0; ist < NStations; ist++) { - CbmStsStation* station = CbmStsSetup::Instance()->GetStation(ist); - - if (!station) continue; - CbmKFTube tube; tube.ID = 1000 + ist; tube.F = 1.; - tube.z = station->GetZ(); - tube.dz = station->GetSensorD(); - tube.RadLength = station->GetRadLength(); - tube.r = 0; - tube.R = station->GetYmax() < station->GetXmax() ? station->GetXmax() : station->GetYmax(); + tube.z = stsInterface->GetZ(ist); + tube.dz = stsInterface->GetThickness(ist); + tube.RadLength = stsInterface->GetRadLength(ist); + tube.r = stsInterface->GetRmin(ist); + tube.R = stsInterface->GetRmax(ist); tube.rr = tube.r * tube.r; tube.RR = tube.R * tube.R; tube.ZThickness = tube.dz; diff --git a/reco/L1/CMakeLists.txt b/reco/L1/CMakeLists.txt index 925198d644..57d905c8fe 100644 --- a/reco/L1/CMakeLists.txt +++ b/reco/L1/CMakeLists.txt @@ -112,6 +112,7 @@ CbmL1TrackMerger.cxx CbmL1TofMerger.cxx CbmStsTrackerIF.cxx # TMP: Should be placed to the detector directory! CbmMvdTrackerIF.cxx # TMP: Should be placed to the detector directory! +CbmMuchTrackerIF.cxx # TMP: Should be placed to the detector directory! CbmTrackerDetInitializer.cxx L1AlgoInputData.cxx OffLineInterface/CbmL1RichENNRingFinder.cxx @@ -177,6 +178,7 @@ CbmL1TrdHit.h L1TrackerInterfaceBase.h # TMP: Should be placed to the detector directory! CbmStsTrackerIF.h # TMP: Should be placed to the detector directory! CbmMvdTrackerIF.h # TMP: Should be placed to the detector directory! +CbmMuchTrackerIF.h # TMP: Should be placed to the detector directory! CbmTrackerDetInitializer.h CbmL1TrdTracklet4.h CbmL1TrdTracklet.h diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 1c1a77072d..a70ed82e20 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -28,9 +28,10 @@ #include "CbmMuchModuleGem.h" #include "CbmMuchPad.h" #include "CbmMuchStation.h" -#include "CbmSetup.h" // TODO: To be replaced to the CbmStsTrackerIF !! (S.Zharko) +#include "CbmSetup.h" #include "CbmMvdTrackerIF.h" #include "CbmStsTrackerIF.h" +#include "CbmMuchTrackerIF.h" #include <boost/filesystem.hpp> // TODO: include of CbmSetup.h creates problems on Mac @@ -109,7 +110,8 @@ CbmL1::CbmL1( if (!fpInitManager) { fpInitManager = algo_static.GetInitManager(); } if (!CbmTrackerDetInitializer::Instance()) { - LOG(fatal) << "CbmL1: CbmTrackerDetInitializer instance was not found. Please, add it as a task to your reco macro"; + LOG(fatal) << "CbmL1: CbmTrackerDetInitializer instance was not found. Please, add it as a task to your reco macro before the KF and L1 task:\n" + << "\033[1;30mrun->AddTask(new CbmTrackerDetInitializer());\033[0m"; } } @@ -368,10 +370,9 @@ InitStatus CbmL1::Init() ** Field initialization ** **************************/ - auto fieldGetterFcn = [](const double(&inPos)[3], double(&outB)[3]) { + fpInitManager->SetFieldFunction([](const double(&inPos)[3], double(&outB)[3]) { CbmKF::Instance()->GetMagneticField()->GetFieldValue(inPos, outB); - }; - fpInitManager->SetFieldFunction(fieldGetterFcn); + }); /*************************** ** Target initialization ** @@ -410,29 +411,19 @@ InitStatus CbmL1::Init() ** Counting numbers of stations for different detector subsystems ** *********************************************************************/ - CbmMuchGeoScheme* fGeoScheme = CbmMuchGeoScheme::Instance(); + //CbmMuchGeoScheme* fGeoScheme = CbmMuchGeoScheme::Instance(); /*** MuCh ***/ - if (fUseMUCH) { - /// Save old global file and folder pointer to avoid messing with FairRoot - TFile* oldFile = gFile; - TDirectory* oldDir = gDirectory; - - TFile* file = new TFile(fMuchDigiFile, "READ"); - LOG_IF(fatal, !file) << "Could not open file " << fMuchDigiFile; - TObjArray* stations = file->Get<TObjArray>("stations"); - LOG_IF(fatal, !stations) << "No TObjArray stations in file " << fMuchDigiFile; - fGeoScheme->Init(stations, 0); - for (int iStation = 0; iStation < fGeoScheme->GetNStations(); iStation++) { - const CbmMuchStation* station = fGeoScheme->GetStation(iStation); - int nLayers = station->GetNLayers(); - NMuchStationsGeom += nLayers; - } - - /// Restore old global file and folder pointer to avoid messing with FairRoot - gFile = oldFile; - gDirectory = oldDir; - } + //if (fUseMUCH) { + // /// Save old global file and folder pointer to avoid messing with FairRoot + // fGeoScheme->Init(fMuchDigiFile, 0); + // for (int iStation = 0; iStation < fGeoScheme->GetNStations(); iStation++) { + // const CbmMuchStation* station = fGeoScheme->GetStation(iStation); + // int nLayers = station->GetNLayers(); + // NMuchStationsGeom += nLayers; + // std::cout << "\033[1;31mMUCH: station " << iStation << " layer\033[0m\n"; + // } + //} /*** TRD ***/ if (fUseTRD) { @@ -491,9 +482,11 @@ InitStatus CbmL1::Init() /*** MVD and STS ***/ auto mvdInterface = CbmMvdTrackerIF::Instance(); auto stsInterface = CbmStsTrackerIF::Instance(); + auto muchInterface = CbmMuchTrackerIF::Instance(); - NMvdStationsGeom = (fUseMVD) ? mvdInterface->GetNstations() : 0; - NStsStationsGeom = (fUseSTS) ? stsInterface->GetNstations() : 0; + NMvdStationsGeom = (fUseMVD) ? mvdInterface->GetNtrackingStations() : 0; + NStsStationsGeom = (fUseSTS) ? stsInterface->GetNtrackingStations() : 0; + NMuchStationsGeom = (fUseMUCH) ? muchInterface->GetNtrackingStations() : 0; NStationGeom = NMvdStationsGeom + NStsStationsGeom + NMuchStationsGeom + NTrdStationsGeom + NTOFStationGeom; // Provide crosscheck number of stations for the fpInitManagera @@ -561,150 +554,154 @@ InitStatus CbmL1::Init() ***************************************/ /*** MVD stations info ***/ - for (int iSt = 0; iSt < NMvdStationsGeom; ++iSt) { // NOTE: example using in-stack defined objects - auto stationInfo = L1BaseStationInfo(L1DetectorID::kMvd, iSt); - stationInfo.SetStationType(1); // MVD - stationInfo.SetTimeInfo(mvdInterface->IsTimeInfoProvided(iSt)); - stationInfo.SetTimeResolution(mvdInterface->GetTimeResolution(iSt)); - stationInfo.SetFieldStatus(fTrackingMode == L1Algo::TrackingMode::kMcbm ? 0 : 1); - stationInfo.SetZ(mvdInterface->GetZ(iSt)); - stationInfo.SetXmax(mvdInterface->GetXmax(iSt)); - stationInfo.SetYmax(mvdInterface->GetYmax(iSt)); - stationInfo.SetRmin(mvdInterface->GetRmin(iSt)); - stationInfo.SetRmax(mvdInterface->GetRmax(iSt)); - stationInfo.SetMaterialSimple(mvdInterface->GetThickness(iSt), mvdInterface->GetRadLength(iSt)); - stationInfo.SetMaterialMap(std::move(materialTableMvd[iSt]), correctionMvd); - // TODO: The CA TF result is dependent from type of geometry settings. Should be understood (S.Zharko) - stationInfo.SetFrontBackStripsGeometry( - (fscal) mvdInterface->GetStripsStereoAngleFront(iSt), - (fscal) mvdInterface->GetStripsSpatialRmsFront(iSt), - (fscal) mvdInterface->GetStripsStereoAngleBack(iSt), - (fscal) mvdInterface->GetStripsSpatialRmsBack(iSt) - ); - stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); - fpInitManager->AddStation(stationInfo); - LOG(info) << "- MVD station " << iSt << " at z = " << stationInfo.GetZdouble(); + if (fUseMVD) { + for (int iSt = 0; iSt < NMvdStationsGeom; ++iSt) { + auto stationInfo = L1BaseStationInfo(L1DetectorID::kMvd, iSt); + stationInfo.SetStationType(1); // MVD + stationInfo.SetTimeInfo(mvdInterface->IsTimeInfoProvided(iSt)); + stationInfo.SetTimeResolution(mvdInterface->GetTimeResolution(iSt)); + stationInfo.SetFieldStatus(fTrackingMode == L1Algo::TrackingMode::kMcbm ? 0 : 1); + stationInfo.SetZ(mvdInterface->GetZ(iSt)); + stationInfo.SetXmax(mvdInterface->GetXmax(iSt)); + stationInfo.SetYmax(mvdInterface->GetYmax(iSt)); + stationInfo.SetRmin(mvdInterface->GetRmin(iSt)); + stationInfo.SetRmax(mvdInterface->GetRmax(iSt)); + stationInfo.SetMaterialSimple(mvdInterface->GetThickness(iSt), mvdInterface->GetRadLength(iSt)); + stationInfo.SetMaterialMap(std::move(materialTableMvd[iSt]), correctionMvd); + // TODO: The CA TF result is dependent from type of geometry settings. Should be understood (S.Zharko) + stationInfo.SetFrontBackStripsGeometry( + (fscal) mvdInterface->GetStripsStereoAngleFront(iSt), + (fscal) mvdInterface->GetStripsSpatialRmsFront(iSt), + (fscal) mvdInterface->GetStripsStereoAngleBack(iSt), + (fscal) mvdInterface->GetStripsSpatialRmsBack(iSt) + ); + stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); + fpInitManager->AddStation(stationInfo); + LOG(info) << "- MVD station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm"; + } } - /*** STS stations info ***/ - for (int iSt = 0; iSt < NStsStationsGeom; ++iSt) { // NOTE: example using smart pointers - auto stationInfo = L1BaseStationInfo(L1DetectorID::kSts, iSt); - stationInfo.SetStationType(0); // STS - stationInfo.SetTimeInfo(stsInterface->IsTimeInfoProvided(iSt)); - stationInfo.SetTimeResolution(stsInterface->GetTimeResolution(iSt)); - stationInfo.SetFieldStatus(L1Algo::TrackingMode::kMcbm == fTrackingMode? 0 : 1); - stationInfo.SetZ(stsInterface->GetZ(iSt)); - stationInfo.SetXmax(stsInterface->GetXmax(iSt)); - stationInfo.SetYmax(stsInterface->GetYmax(iSt)); - stationInfo.SetRmin(stsInterface->GetRmin(iSt)); - stationInfo.SetRmax(stsInterface->GetRmax(iSt)); - stationInfo.SetMaterialSimple(stsInterface->GetThickness(iSt), stsInterface->GetRadLength(iSt)); - stationInfo.SetMaterialMap(std::move(materialTableSts[iSt]), correctionSts); - // TODO: The CA TF result is dependent from type of geometry settings. Should be understood (S.Zharko) - stationInfo.SetFrontBackStripsGeometry( - (fscal) stsInterface->GetStripsStereoAngleFront(iSt), - (fscal) stsInterface->GetStripsSpatialRmsFront(iSt), - (fscal) stsInterface->GetStripsStereoAngleBack(iSt), - (fscal) stsInterface->GetStripsSpatialRmsBack(iSt) - ); - stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); - fpInitManager->AddStation(stationInfo); - LOG(info) << "- STS station " << iSt << " at z = " << stationInfo.GetZdouble(); + if (fUseSTS) { + for (int iSt = 0; iSt < NStsStationsGeom; ++iSt) { + auto stationInfo = L1BaseStationInfo(L1DetectorID::kSts, iSt); + stationInfo.SetStationType(0); // STS + stationInfo.SetTimeInfo(stsInterface->IsTimeInfoProvided(iSt)); + stationInfo.SetTimeResolution(stsInterface->GetTimeResolution(iSt)); + stationInfo.SetFieldStatus(L1Algo::TrackingMode::kMcbm == fTrackingMode? 0 : 1); + stationInfo.SetZ(stsInterface->GetZ(iSt)); + stationInfo.SetXmax(stsInterface->GetXmax(iSt)); + stationInfo.SetYmax(stsInterface->GetYmax(iSt)); + stationInfo.SetRmin(stsInterface->GetRmin(iSt)); + stationInfo.SetRmax(stsInterface->GetRmax(iSt)); + stationInfo.SetMaterialSimple(stsInterface->GetThickness(iSt), stsInterface->GetRadLength(iSt)); + stationInfo.SetMaterialMap(std::move(materialTableSts[iSt]), correctionSts); + // TODO: The CA TF result is dependent from type of geometry settings. Should be understood (S.Zharko) + stationInfo.SetFrontBackStripsGeometry( + (fscal) stsInterface->GetStripsStereoAngleFront(iSt), + (fscal) stsInterface->GetStripsSpatialRmsFront(iSt), + (fscal) stsInterface->GetStripsStereoAngleBack(iSt), + (fscal) stsInterface->GetStripsSpatialRmsBack(iSt) + ); + stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); + fpInitManager->AddStation(stationInfo); + LOG(info) << "- STS station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm"; + } } /*** MuCh stations info ***/ - for (int iSt = 0; iSt < NMuchStationsGeom; ++iSt) { - int muchStationID = iSt / 3; - int muchLayerID = iSt % 3; - CbmMuchStation* station = (CbmMuchStation*) fGeoScheme->GetStation(muchStationID); - CbmMuchLayer* layer = station->GetLayer(muchLayerID); - - auto stationInfo = L1BaseStationInfo(L1DetectorID::kMuch, iSt); - stationInfo.SetStationType(2); - stationInfo.SetTimeInfo(1); - stationInfo.SetTimeResolution(3.9); - stationInfo.SetFieldStatus(0); - stationInfo.SetZ(layer->GetZ()); - auto thickness = layer->GetDz(); - auto radLength = 0.; // Why 0??? (S.Zharko) - stationInfo.SetMaterialSimple(thickness, radLength); - stationInfo.SetMaterialMap(std::move(materialTableMuch[iSt]), correctionMuch); - stationInfo.SetXmax(100.); - stationInfo.SetYmax(100.); - stationInfo.SetRmin(10.); - stationInfo.SetRmax(100.); - fscal muchFrontPhi = 0; - fscal muchBackPhi = TMath::Pi() / 2.; - fscal muchFrontSigma = 0.35; - fscal muchBackSigma = 0.35; - stationInfo.SetFrontBackStripsGeometry(muchFrontPhi, muchFrontSigma, muchBackPhi, muchBackSigma); - stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); - fpInitManager->AddStation(stationInfo); - LOG(info) << "- MuCh station " << iSt << " at z = " << stationInfo.GetZdouble(); + if (fUseMUCH) { + for (int iSt = 0; iSt < NMuchStationsGeom; ++iSt) { + auto stationInfo = L1BaseStationInfo(L1DetectorID::kSts, iSt); + stationInfo.SetStationType(2); // MuCh + stationInfo.SetTimeInfo(muchInterface->IsTimeInfoProvided(iSt)); + stationInfo.SetTimeResolution(muchInterface->GetTimeResolution(iSt)); + stationInfo.SetFieldStatus(L1Algo::TrackingMode::kMcbm == fTrackingMode? 0 : 1); + stationInfo.SetZ(muchInterface->GetZ(iSt)); + stationInfo.SetXmax(muchInterface->GetXmax(iSt)); + stationInfo.SetYmax(muchInterface->GetYmax(iSt)); + stationInfo.SetRmin(muchInterface->GetRmin(iSt)); + stationInfo.SetRmax(muchInterface->GetRmax(iSt)); + stationInfo.SetMaterialSimple(muchInterface->GetThickness(iSt), muchInterface->GetRadLength(iSt)); + stationInfo.SetMaterialMap(std::move(materialTableMuch[iSt]), correctionMuch); + // TODO: The CA TF result is dependent from type of geometry settings. Should be understood (S.Zharko) + stationInfo.SetFrontBackStripsGeometry( + (fscal) muchInterface->GetStripsStereoAngleFront(iSt), + (fscal) muchInterface->GetStripsSpatialRmsFront(iSt), + (fscal) muchInterface->GetStripsStereoAngleBack(iSt), + (fscal) muchInterface->GetStripsSpatialRmsBack(iSt) + ); + stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); + fpInitManager->AddStation(stationInfo); + LOG(info) << "- MuCh station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm"; + } } /*** TRD stations info ***/ - for (int iSt = 0; iSt < NTrdStationsGeom; ++iSt) { - int trdModuleID = fTrdDigiPar->GetModuleId(iSt); - CbmTrdParModDigi* module = (CbmTrdParModDigi*) fTrdDigiPar->GetModulePar(trdModuleID); - auto stationInfo = L1BaseStationInfo(L1DetectorID::kTrd, iSt); - int stationType = (iSt == 1 || iSt == 3) ? 6 : 3; // Is used somewhere?? - stationInfo.SetStationType(stationType); - stationInfo.SetTimeInfo(1); - stationInfo.SetTimeResolution(10.); - stationInfo.SetFieldStatus(0); - stationInfo.SetZ(module->GetZ()); - auto thickness = 2. * module->GetSizeZ(); - auto radLength = 1.6; - stationInfo.SetMaterialSimple(thickness, radLength); - stationInfo.SetMaterialMap(std::move(materialTableTrd[iSt]), correctionTrd); - stationInfo.SetXmax(module->GetSizeX()); - stationInfo.SetYmax(module->GetSizeY()); - stationInfo.SetRmin(0.); - stationInfo.SetRmax(2. * module->GetSizeX()); // TODO: Why multiplied with 2.? - fscal trdFrontPhi = 0; - fscal trdBackPhi = TMath::Pi() / 2.; - fscal trdFrontSigma = 0.15; - fscal trdBackSigma = 0.15; - if (L1Algo::TrackingMode::kGlobal == fTrackingMode) { //SGtrd2D!! - trdFrontSigma = 1.1; - trdBackSigma = 1.1; - stationInfo.SetTimeResolution(1.e10); - } - stationInfo.SetFrontBackStripsGeometry(trdFrontPhi, trdFrontSigma, trdBackPhi, trdBackSigma); - stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); - if (iSt == 1 && L1Algo::TrackingMode::kMcbm == fTrackingMode && fMissingHits) { - stationInfo.SetTrackingStatus(false); + if (fUseTRD) { + for (int iSt = 0; iSt < NTrdStationsGeom; ++iSt) { + int trdModuleID = fTrdDigiPar->GetModuleId(iSt); + CbmTrdParModDigi* module = (CbmTrdParModDigi*) fTrdDigiPar->GetModulePar(trdModuleID); + auto stationInfo = L1BaseStationInfo(L1DetectorID::kTrd, iSt); + int stationType = (iSt == 1 || iSt == 3) ? 6 : 3; // Is used somewhere?? + stationInfo.SetStationType(stationType); + stationInfo.SetTimeInfo(1); + stationInfo.SetTimeResolution(10.); + stationInfo.SetFieldStatus(0); + stationInfo.SetZ(module->GetZ()); + auto thickness = 2. * module->GetSizeZ(); + auto radLength = 1.6; + stationInfo.SetMaterialSimple(thickness, radLength); + stationInfo.SetMaterialMap(std::move(materialTableTrd[iSt]), correctionTrd); + stationInfo.SetXmax(module->GetSizeX()); + stationInfo.SetYmax(module->GetSizeY()); + stationInfo.SetRmin(0.); + stationInfo.SetRmax(2. * module->GetSizeX()); // TODO: Why multiplied with 2.? + fscal trdFrontPhi = 0; + fscal trdBackPhi = TMath::Pi() / 2.; + fscal trdFrontSigma = 0.15; + fscal trdBackSigma = 0.15; + if (L1Algo::TrackingMode::kGlobal == fTrackingMode) { //SGtrd2D!! + trdFrontSigma = 1.1; + trdBackSigma = 1.1; + stationInfo.SetTimeResolution(1.e10); + } + stationInfo.SetFrontBackStripsGeometry(trdFrontPhi, trdFrontSigma, trdBackPhi, trdBackSigma); + stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); + if (iSt == 1 && L1Algo::TrackingMode::kMcbm == fTrackingMode && fMissingHits) { + stationInfo.SetTrackingStatus(false); + } + fpInitManager->AddStation(stationInfo); + LOG(info) << "- TRD station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm"; } - fpInitManager->AddStation(stationInfo); - LOG(info) << "- TRD station " << iSt << " at z = " << stationInfo.GetZdouble(); } /*** TOF stations info ***/ - for (int iSt = 0; iSt < NTOFStationGeom; ++iSt) { - auto stationInfo = L1BaseStationInfo(L1DetectorID::kTof, iSt); - stationInfo.SetStationType(4); - stationInfo.SetTimeInfo(1); - stationInfo.SetTimeResolution(0.075); - stationInfo.SetFieldStatus(0); - stationInfo.SetZ(TofStationZ[iSt]); - auto thickness = 10.; - auto radLength = 2.; - stationInfo.SetMaterialSimple(thickness, radLength); - stationInfo.SetMaterialMap(std::move(materialTableTof[iSt]), correctionTof); - stationInfo.SetXmax(20.); - stationInfo.SetYmax(20.); - stationInfo.SetRmin(0.); - stationInfo.SetRmax(150.); - fscal tofFrontPhi = 0; - fscal tofBackPhi = TMath::Pi() / 2.; - fscal tofFrontSigma = 0.42; - fscal tofBackSigma = 0.23; - stationInfo.SetFrontBackStripsGeometry(tofFrontPhi, tofFrontSigma, tofBackPhi, tofBackSigma); - stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); - fpInitManager->AddStation(stationInfo); - LOG(info) << "- TOF station " << iSt << " at z = " << stationInfo.GetZdouble(); + if (fUseTOF) { + for (int iSt = 0; iSt < NTOFStationGeom; ++iSt) { + auto stationInfo = L1BaseStationInfo(L1DetectorID::kTof, iSt); + stationInfo.SetStationType(4); + stationInfo.SetTimeInfo(1); + stationInfo.SetTimeResolution(0.075); + stationInfo.SetFieldStatus(0); + stationInfo.SetZ(TofStationZ[iSt]); + auto thickness = 10.; + auto radLength = 2.; + stationInfo.SetMaterialSimple(thickness, radLength); + stationInfo.SetMaterialMap(std::move(materialTableTof[iSt]), correctionTof); + stationInfo.SetXmax(20.); + stationInfo.SetYmax(20.); + stationInfo.SetRmin(0.); + stationInfo.SetRmax(150.); + fscal tofFrontPhi = 0; + fscal tofBackPhi = TMath::Pi() / 2.; + fscal tofFrontSigma = 0.42; + fscal tofBackSigma = 0.23; + stationInfo.SetFrontBackStripsGeometry(tofFrontPhi, tofFrontSigma, tofBackPhi, tofBackSigma); + stationInfo.SetTrackingStatus(target.z < stationInfo.GetZdouble() ? true : false); + fpInitManager->AddStation(stationInfo); + LOG(info) << "- TOF station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm"; + } } /**************************************** diff --git a/reco/L1/CbmMuchTrackerIF.cxx b/reco/L1/CbmMuchTrackerIF.cxx new file mode 100644 index 0000000000..d605c605c0 --- /dev/null +++ b/reco/L1/CbmMuchTrackerIF.cxx @@ -0,0 +1,190 @@ +/* Copyright (C) 2016-2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt + SPDX-License-Identifier: GPL-3.0-only + Authors: Sergey Gorbunov, Sergei Zharko [committer] */ + +/*************************************************************************************************** + * @file CbmMuchTrackerIF.cxx + * @brief Input data and parameters interface from STS subsystem used in L1 tracker (definition) + * @since 31.05.2022 + * @author S.Zharko <s.zharko@gsi.de> + ***************************************************************************************************/ + +#include "CbmMuchTrackerIF.h" +#include "CbmMuchGeoScheme.h" +#include "CbmMuchModuleGem.h" +#include "CbmMuchPad.h" +#include "CbmMuchStation.h" +#include "FairDetector.h" +#include "FairRunAna.h" +#include <FairLogger.h> +#include "TMath.h" +#include "TFile.h" + +ClassImp(CbmMuchTrackerIF) + +CbmMuchTrackerIF* CbmMuchTrackerIF::fpInstance = nullptr; + +//------------------------------------------------------------------------------------------------------------------------------------- +// +CbmMuchTrackerIF::CbmMuchTrackerIF() : FairTask("CbmMuchTrackerIF") +{ + if (!fpInstance) { fpInstance = this; } +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +CbmMuchTrackerIF::~CbmMuchTrackerIF() +{ + if (fpInstance == this) { fpInstance = nullptr; } +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetTimeResolution(int /*stationId*/) const { return 3.9; } + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetZ(int stationId) const +{ + return fGeoScheme->GetStation(GetMuchStationId(stationId))->GetLayer(GetMuchLayerId(stationId))->GetZ(); +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetXmax(int /*stationId*/) const +{ + return 100.; +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetYmax(int /*stationId*/) const +{ + return 100.; +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetRmin(int /*stationId*/) const +{ + return 10.; +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetRmax(int /*stationId*/) const +{ + return 100.; +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +int CbmMuchTrackerIF::GetNtrackingStations() const +{ + // NOTE: For MuCh detector subsystem, a MuCh layer is assigned as a tracking station! Thus, we here separate names for MuCh stations: + // iMuchSt, muchStationId and for the tracking stations - iSt, stationId + int nStations = 0; + for (int iMuchSt = 0; iMuchSt < fGeoScheme->GetNStations(); ++iMuchSt) { + nStations += fGeoScheme->GetStation(iMuchSt)->GetNLayers(); + } + return nStations; +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetThickness(int stationId) const +{ + return fGeoScheme->GetStation(GetMuchStationId(stationId))->GetLayer(GetMuchLayerId(stationId))->GetDz(); +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetRadLength(int /*stationId*/) const +{ + return 0; // TODO: Replace with correct value +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetStripsStereoAngleFront(int /*stationId*/) const +{ + return 0.; +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetStripsStereoAngleBack(int /*stationId*/) const +{ + return TMath::Pi() / 2.; +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetStripsSpatialRmsFront(int /*stationId*/) const +{ + return 0.35; +} + + +//------------------------------------------------------------------------------------------------------------------------------------- +// +double CbmMuchTrackerIF::GetStripsSpatialRmsBack(int /*stationId*/) const +{ + return 0.35; +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +bool CbmMuchTrackerIF::IsTimeInfoProvided(int /*stationId*/) const { return true; } + + +//------------------------------------------------------------------------------------------------------------------------------------- +// +InitStatus CbmMuchTrackerIF::Init() +{ + LOG(info) << "\033[1;33mCALL CbmMuchTrackerIF::Init()\033[0m"; + + fGeoScheme = CbmMuchGeoScheme::Instance(); + if (!fGeoScheme) { + LOG(fatal) << "CbmMuchTrackerIF::Init: CbmMuchGeoScheme instance is nullptr"; + } + + // Check initialization of the MuCh digi parameters file + if (!fGeoScheme->IsInitialized()) { + LOG(fatal) << "CbmMuchTrackerIF::Init: MuCh digi parameters were not intialized\n" + << "\033[4;1;32mNOTE\033[0m: For the MuCh digi parameters initialization one can place the following " + << "code to the reconstruction macro:\n" + << "\n\tif (CbmSetup::Instance()->IsActive(ECbmModuleId::kMuch)) {" + << "\n\t // Parameter file name" + << "\n\t TString geoTag;" + << "\n\t geo->GetGeoTag(ECbmModuleId::kMuch, geoTag);" + << "\n\t Int_t muchFlag = (geoTag.Contains(\"mcbm\") ? 1 : 0);" + << "\n\t TString parFile = gSystem->Getenv(\"VMCWORKDIR\");" + << "\n\t parFile += \"/parameters/much/much_\" + geoTag(0, 4) + \"_digi_sector.root\";" + << "\n\t" + << "\n\t // Initialization of the geometry scheme" + << "\n\t auto muchGeoScheme = CbmMuchGeoScheme::Instance();" + << "\n\t if (!muchGeoScheme->IsInitialized()) { muchGeoScheme->Init(parFile, muchFlag); }" + << "\n\t}"; + } + + return kSUCCESS; +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +InitStatus CbmMuchTrackerIF::ReInit() +{ + LOG(info) << "\033[1;33mCALL CbmMuchTrackerIF::ReInit()\033[0m"; + this->SetParContainers(); + return Init(); +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// +void CbmMuchTrackerIF::SetParContainers() +{ +} + +//------------------------------------------------------------------------------------------------------------------------------------- +// diff --git a/reco/L1/CbmMuchTrackerIF.h b/reco/L1/CbmMuchTrackerIF.h new file mode 100644 index 0000000000..d593aacc7f --- /dev/null +++ b/reco/L1/CbmMuchTrackerIF.h @@ -0,0 +1,138 @@ +/* Copyright (C) 2016-2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt + SPDX-License-Identifier: GPL-3.0-only + Authors: Sergey Gorbunov, Sergei Zharko [committer] */ + +/*************************************************************************************************** + * @file CbmMuchTrackerIF.h + * @brief Input data and parameters interface from MVD subsystem used in L1 tracker (declaration) + * @since 31.05.2022 + * @author S.Zharko <s.zharko@gsi.de> + ***************************************************************************************************/ + +#ifndef CbmMuchTrackerIF_h +#define CbmMuchTrackerIF_h 1 + +#include "L1TrackerInterfaceBase.h" +#include "FairTask.h" + +#include <iostream> +#include <vector> +#include "TString.h" + +class CbmMuchGeoScheme; + +/// Class CbmMuchTrackerIF is a CbmL1 subtask, which provides necessary methods for L1 tracker +/// to access the geometry and dataflow settings. +/// +/// NOTE: For MuCh one tracking station is a MuCh layer! +/// +class CbmMuchTrackerIF: public FairTask, public L1TrackerInterfaceBase { +public: + /// Default constructor + CbmMuchTrackerIF(); + + /// Destructor + ~CbmMuchTrackerIF(); + + /// FairTask: Init method + InitStatus Init(); + + /// FairTask: ReInit method + InitStatus ReInit(); + + /// Gets pointer to the instance of the CbmMuchTrackerIF + static CbmMuchTrackerIF* Instance() { return fpInstance; } + + /// Gets actual number of tracking stations, provided by the current geometry setup + int GetNtrackingStations() const; + + /// Gets time resolution for a station + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Time resolution [ns] + double GetTimeResolution(int stationId) const; + + /// Gets z component of the station position + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Z position of station [cm] + double GetZ(int stationId) const; + + /// Gets max size of a station along the X-axis + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Size of station along the X-axis [cm] + double GetXmax(int stationId) const; + + /// Gets max size of a station along the Y-axis + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Size of station along the Y-axis [cm] + double GetYmax(int stationId) const; + + /// Gets size of inner radius of station + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Size of station inner radius [cm] + double GetRmin(int stationId) const; + + /// Gets size of outer radius of station + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Size of station outer radius [cm] + double GetRmax(int stationId) const; + + /// Gets station thickness along the Z-axis + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Station thickness [cm] + double GetThickness(int stationId) const; + + /// Gets station radiation length + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Radiation length [cm] + double GetRadLength(int stationId) const; + + /// Gets front strips stereo angle + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Absolute stereo angle for front strips [rad] + double GetStripsStereoAngleFront(int stationId) const; + + /// Gets back strips stereo angle + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Absolute stereo angle for back strips [rad] + double GetStripsStereoAngleBack(int stationId) const; + + /// Gets spatial resolution (RMS) for front strips + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Spatial resolution (RMS) for front strips [cm] + double GetStripsSpatialRmsFront(int stationId) const; + + /// Gets spatial resolution (RMS) for back strips + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Spatial resolution (RMS) for front strips [cm] + double GetStripsSpatialRmsBack(int stationId) const; + + /// Check if station provides time measurements + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \return Flag: true - station provides time measurements, false - station does not provide time measurements + bool IsTimeInfoProvided(int stationId) const; + + /// FairTask: sets parameter containers up + void SetParContainers(); + + /// Copy and move constructers and assign operators are prohibited + CbmMuchTrackerIF(const CbmMuchTrackerIF&) = delete; + CbmMuchTrackerIF(CbmMuchTrackerIF&&) = delete; + CbmMuchTrackerIF& operator=(const CbmMuchTrackerIF&) = delete; + CbmMuchTrackerIF& operator=(CbmMuchTrackerIF&&) = delete; + +private: + /// Calculates MuCh station ID from tracker station ID + __attribute__((always_inline)) int GetMuchStationId(int stationId) const { return stationId / 3; } + + /// Calculates MuCh layer ID from tracker station ID + __attribute__((always_inline)) int GetMuchLayerId(int stationId) const { return stationId % 3; } + + + static CbmMuchTrackerIF* fpInstance; ///< Instance of the class + + CbmMuchGeoScheme* fGeoScheme {nullptr}; ///< MuCh geometry scheme instance + + ClassDef(CbmMuchTrackerIF, 0); +}; + +#endif // CbmMuchTrackerIF diff --git a/reco/L1/CbmMvdTrackerIF.cxx b/reco/L1/CbmMvdTrackerIF.cxx index 9a855edbb0..c5602e3bf5 100644 --- a/reco/L1/CbmMvdTrackerIF.cxx +++ b/reco/L1/CbmMvdTrackerIF.cxx @@ -10,8 +10,6 @@ ***************************************************************************************************/ #include "CbmMvdTrackerIF.h" -#include "CbmKF.h" -#include "CbmKFMaterial.h" // for CbmKFTube #include "CbmMvdDetector.h" #include "CbmMvdStationPar.h" #include "FairDetector.h" @@ -46,40 +44,40 @@ double CbmMvdTrackerIF::GetTimeResolution(int /*stationId*/) const { return 1000 // double CbmMvdTrackerIF::GetZ(int stationId) const { - return (fMvdMaterial->at(stationId)).z; + return fMvdStationPar->GetZPosition(stationId); } //------------------------------------------------------------------------------------------------------------------------------------- // double CbmMvdTrackerIF::GetXmax(int stationId) const { - return (fMvdMaterial->at(stationId)).R; + return this->GetRmax(stationId); } //------------------------------------------------------------------------------------------------------------------------------------- // double CbmMvdTrackerIF::GetYmax(int stationId) const { - return (fMvdMaterial->at(stationId)).R; + return this->GetRmax(stationId); } //------------------------------------------------------------------------------------------------------------------------------------- // double CbmMvdTrackerIF::GetRmin(int stationId) const { - return (fMvdMaterial->at(stationId)).r; + return std::min(fMvdStationPar->GetBeamHeight(stationId), fMvdStationPar->GetBeamWidth(stationId)); } //------------------------------------------------------------------------------------------------------------------------------------- // double CbmMvdTrackerIF::GetRmax(int stationId) const { - return (fMvdMaterial->at(stationId)).R; + return std::max(fMvdStationPar->GetHeight(stationId), fMvdStationPar->GetWidth(stationId)); } //------------------------------------------------------------------------------------------------------------------------------------- // -int CbmMvdTrackerIF::GetNstations() const +int CbmMvdTrackerIF::GetNtrackingStations() const { return fMvdStationPar->GetStationCount(); } @@ -88,14 +86,15 @@ int CbmMvdTrackerIF::GetNstations() const // double CbmMvdTrackerIF::GetThickness(int stationId) const { - return (fMvdMaterial->at(stationId)).dz; + return fMvdStationPar->GetZThickness(stationId); } //------------------------------------------------------------------------------------------------------------------------------------- // double CbmMvdTrackerIF::GetRadLength(int stationId) const { - return (fMvdMaterial->at(stationId)).RadLength; + // NOTE: Taken from CbmKF::Init() (S.Zharko) + return fMvdStationPar->GetZThickness(stationId) / (10. * fMvdStationPar->GetZRadThickness(stationId)); } //------------------------------------------------------------------------------------------------------------------------------------- @@ -138,10 +137,8 @@ InitStatus CbmMvdTrackerIF::Init() { LOG(info) << "\033[1;33mCALL CbmMvdTrackerIF::Init()\033[0m"; - fMvdMaterial = &(CbmKF::Instance()->vMvdMaterial); fMvdStationPar = CbmMvdDetector::Instance()->GetParameterFile(); - if (!fMvdMaterial) { return kFATAL; } if (!fMvdStationPar) { return kFATAL; } return kSUCCESS; diff --git a/reco/L1/CbmMvdTrackerIF.h b/reco/L1/CbmMvdTrackerIF.h index 327297579d..3b2e31f6c0 100644 --- a/reco/L1/CbmMvdTrackerIF.h +++ b/reco/L1/CbmMvdTrackerIF.h @@ -21,7 +21,6 @@ class CbmMvdDetector; class CbmMvdStationPar; -class CbmKFTube; /// Class CbmMvdTrackerIF is a CbmL1 subtask, which provides necessary methods for L1 tracker /// to access the geometry and dataflow settings. @@ -43,71 +42,71 @@ public: /// Gets pointer to the instance of the CbmMvdTrackerIF static CbmMvdTrackerIF* Instance() { return fpInstance; } - /// Gets actual number of stations, provided by the current geometry setup - int GetNstations() const; + /// Gets actual number of tracking stations, provided by the current geometry setup + int GetNtrackingStations() const; - /// Gets time resolution for a station - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// Gets time resolution for a tracking station + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Time resolution [ns] double GetTimeResolution(int stationId) const; - /// Gets z component of the station position - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// Gets z component of the tracking station position + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Z position of station [cm] double GetZ(int stationId) const; - /// Gets max size of a station along the X-axis - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// Gets max size of a tracking station along the X-axis + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Size of station along the X-axis [cm] double GetXmax(int stationId) const; - /// Gets max size of a station along the Y-axis - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// Gets max size of a tracking station along the Y-axis + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Size of station along the Y-axis [cm] double GetYmax(int stationId) const; - /// Gets size of inner radius of station - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// Gets size of inner radius of a tracking station + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Size of station inner radius [cm] double GetRmin(int stationId) const; - /// Gets size of outer radius of station - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// Gets size of outer radius of a tracking station + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Size of station outer radius [cm] double GetRmax(int stationId) const; - /// Gets station thickness along the Z-axis - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// Gets the tracking station thickness along the Z-axis + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Station thickness [cm] double GetThickness(int stationId) const; - /// Gets station radiation length - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// Gets the tracking station radiation length + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Radiation length [cm] double GetRadLength(int stationId) const; /// Gets front strips stereo angle - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Absolute stereo angle for front strips [rad] double GetStripsStereoAngleFront(int stationId) const; /// Gets back strips stereo angle - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Absolute stereo angle for back strips [rad] double GetStripsStereoAngleBack(int stationId) const; /// Gets spatial resolution (RMS) for front strips - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Spatial resolution (RMS) for front strips [cm] double GetStripsSpatialRmsFront(int stationId) const; /// Gets spatial resolution (RMS) for back strips - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Spatial resolution (RMS) for front strips [cm] double GetStripsSpatialRmsBack(int stationId) const; - /// Check if station provides time measurements - /// \param stationId Station ID in the setup + /// Check if the detector provides time measurements + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Flag: true - station provides time measurements, false - station does not provide time measurements bool IsTimeInfoProvided(int stationId) const; @@ -123,8 +122,7 @@ public: private: static CbmMvdTrackerIF* fpInstance; ///< Instance of the class - const std::vector<CbmKFTube> * fMvdMaterial {nullptr}; ///< Pointer to the MVD vector of CbmKFTube objects (owner: CbmKF) - const CbmMvdStationPar * fMvdStationPar {nullptr}; ///< Pointer to the Mvd station parameters file + const CbmMvdStationPar* fMvdStationPar {nullptr}; ///< Pointer to the Mvd station parameters ClassDef(CbmMvdTrackerIF, 0); }; diff --git a/reco/L1/CbmStsTrackerIF.cxx b/reco/L1/CbmStsTrackerIF.cxx index 61120a4a1f..9b8b8f4929 100644 --- a/reco/L1/CbmStsTrackerIF.cxx +++ b/reco/L1/CbmStsTrackerIF.cxx @@ -73,7 +73,7 @@ double CbmStsTrackerIF::GetRmax(int stationId) const //------------------------------------------------------------------------------------------------------------------------------------- // -int CbmStsTrackerIF::GetNstations() const +int CbmStsTrackerIF::GetNtrackingStations() const { return CbmStsSetup::Instance()->GetNofStations(); } diff --git a/reco/L1/CbmStsTrackerIF.h b/reco/L1/CbmStsTrackerIF.h index 21d44e0a23..183ac40a60 100644 --- a/reco/L1/CbmStsTrackerIF.h +++ b/reco/L1/CbmStsTrackerIF.h @@ -42,71 +42,71 @@ public: /// Gets pointer to the instance of the CbmStsTrackerIF class static CbmStsTrackerIF* Instance() { return fpInstance; } - /// Gets actual number of stations, provided by the current geometry setup - int GetNstations() const; + /// Gets actual number of the tracking stations, provided by the current geometry setup + int GetNtrackingStations() const; /// Gets time resolution for a station - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Time resolution [ns] double GetTimeResolution(int stationId) const; /// Gets z component of the station position - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Z position of station [cm] double GetZ(int stationId) const; /// Gets max size of a station along the X-axis - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Size of station along the X-axis [cm] double GetXmax(int stationId) const; /// Gets max size of a station along the Y-axis - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Size of station along the Y-axis [cm] double GetYmax(int stationId) const; /// Gets size of inner radius of station - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Size of station inner radius [cm] double GetRmin(int stationId) const; /// Gets size of outer radius of station - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Size of station outer radius [cm] double GetRmax(int stationId) const; /// Gets station thickness along the Z-axis - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Station thickness [cm] double GetThickness(int stationId) const; /// Gets station radiation length - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Radiation length [cm] double GetRadLength(int stationId) const; /// Gets front strips stereo angle - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Absolute stereo angle for front strips [rad] double GetStripsStereoAngleFront(int stationId) const; /// Gets back strips stereo angle - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Absolute stereo angle for back strips [rad] double GetStripsStereoAngleBack(int stationId) const; /// Gets spatial resolution (RMS) for front strips - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Spatial resolution (RMS) for front strips [cm] double GetStripsSpatialRmsFront(int stationId) const; /// Gets spatial resolution (RMS) for back strips - /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Spatial resolution (RMS) for front strips [cm] double GetStripsSpatialRmsBack(int stationId) const; /// Check if station provides time measurements - /// \param stationId Station ID in the setup + /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Flag: true - station provides time measurements, false - station does not provide time measurements bool IsTimeInfoProvided(int stationId) const; diff --git a/reco/L1/CbmTrackerDetInitializer.cxx b/reco/L1/CbmTrackerDetInitializer.cxx index 404de9049b..ec138b0432 100644 --- a/reco/L1/CbmTrackerDetInitializer.cxx +++ b/reco/L1/CbmTrackerDetInitializer.cxx @@ -10,9 +10,11 @@ ***************************************************************************************************/ #include "FairTask.h" -#include "CbmTrackerDetInitializer.h" -#include "CbmStsTrackerIF.h" +#include "CbmMuchTrackerIF.h" #include "CbmMvdTrackerIF.h" +#include "CbmSetup.h" +#include "CbmStsTrackerIF.h" +#include "CbmTrackerDetInitializer.h" #include <FairLogger.h> ClassImp(CbmTrackerDetInitializer) @@ -21,14 +23,28 @@ CbmTrackerDetInitializer* CbmTrackerDetInitializer::fpInstance = nullptr; //------------------------------------------------------------------------------------------------------------------------------------- // -CbmTrackerDetInitializer::CbmTrackerDetInitializer(): FairTask("CbmTrackerDetInitializer") +CbmTrackerDetInitializer::CbmTrackerDetInitializer() +: FairTask("CbmTrackerDetInitializer") { if (!fpInstance) { fpInstance = this; + /** Check presence of the desired detectors **/ + bool useMvd = CbmSetup::Instance()->IsActive(ECbmModuleId::kMvd); + bool useSts = CbmSetup::Instance()->IsActive(ECbmModuleId::kSts); + bool useMuch = CbmSetup::Instance()->IsActive(ECbmModuleId::kMuch); + bool useTrd = CbmSetup::Instance()->IsActive(ECbmModuleId::kTrd); + bool useTof = CbmSetup::Instance()->IsActive(ECbmModuleId::kTof); + + /** Invoke the detector interfaces **/ + if (useMvd) { fpMvdTrackerIF = new CbmMvdTrackerIF(); } + if (useSts) { fpStsTrackerIF = new CbmStsTrackerIF(); } + if (useMuch) { fpMuchTrackerIF = new CbmMuchTrackerIF(); } + /** Add subtasks - tracker detector interfaces **/ - this->Add(new CbmMvdTrackerIF()); - this->Add(new CbmStsTrackerIF()); + if (useMvd) { this->Add(fpMvdTrackerIF); } + if (useSts) { this->Add(fpStsTrackerIF); } + if (useMuch) { this->Add(fpMuchTrackerIF); } } } diff --git a/reco/L1/CbmTrackerDetInitializer.h b/reco/L1/CbmTrackerDetInitializer.h index 5af2af4715..0758482e17 100644 --- a/reco/L1/CbmTrackerDetInitializer.h +++ b/reco/L1/CbmTrackerDetInitializer.h @@ -13,6 +13,9 @@ #define CbmTrackerDetInitializer_h 1 class FairTask; +class CbmMvdTrackerIF; +class CbmStsTrackerIF; +class CbmMuchTrackerIF; /// Class CbmTrackerDetInitializer implements a task for the tracking detector interfaces initialization. /// The tracking detector interfaces are added as subtasks. The CbmTrackerDetInitializer class instance is to @@ -20,7 +23,7 @@ class FairTask; /// class CbmTrackerDetInitializer: public FairTask { public: - /// Default constructor: only STS is initialized (TODO: try delete) + /// Default constructor (only sts and mvd will be initialized) CbmTrackerDetInitializer(); /// Destructor @@ -35,9 +38,18 @@ public: CbmTrackerDetInitializer& operator=(const CbmTrackerDetInitializer&) = delete; CbmTrackerDetInitializer& operator=(CbmTrackerDetInitializer&&) = delete; + // Accessors for the tracker interfaces + CbmMvdTrackerIF* GetMvdTrackerIF() { return fpMvdTrackerIF; } + CbmStsTrackerIF* GetStsTrackerIF() { return fpStsTrackerIF; } + CbmMuchTrackerIF* GetMuchTrackerIF() { return fpMuchTrackerIF; } + private: static CbmTrackerDetInitializer* fpInstance; ///< Instance of the class + CbmMvdTrackerIF* fpMvdTrackerIF {nullptr}; ///< Instance of the MVD tracker interface + CbmStsTrackerIF* fpStsTrackerIF {nullptr}; ///< Instance of the STS tracker interface + CbmMuchTrackerIF* fpMuchTrackerIF {nullptr}; ///< Instance of the MuCh tracker interface + ClassDef(CbmTrackerDetInitializer, 0); }; diff --git a/reco/L1/L1Algo/L1Algo.cxx b/reco/L1/L1Algo/L1Algo.cxx index d6dae01fa9..6a65627387 100644 --- a/reco/L1/L1Algo/L1Algo.cxx +++ b/reco/L1/L1Algo/L1Algo.cxx @@ -87,17 +87,7 @@ void L1Algo::Init(const bool UseHitErrors, const TrackingMode mode, const bool M if (fTrackingMode == kMcbm) { fNfieldStations = -1; } - // Final init checks (the function provides purity of fields initialization and turns on the last bit of - // the L1ObjectInitController): - //fInitManager.CheckInit(); // NOTE: after passing this frontier L1Algo is (will be) accounted as initialized - - // Print out the bits of the init manager - //LOG(info) << "InitManager " << fInitManager.GetInitController().ToString(); - - LOG(info) << "\033[1;34m ------ Parameters (before) -------------------------------------------------------------------\033[0m"; - LOG(info) << fParameters.ToString(); fInitManager.TransferParametersContainer(fParameters); - LOG(info) << "\033[1;34m ------ Parameters (after) --------------------------------------------------------------------\033[0m"; LOG(info) << fParameters.ToString(); // Get number of station diff --git a/reco/L1/L1Algo/L1CATrackFinder.cxx b/reco/L1/L1Algo/L1CATrackFinder.cxx index 6ab9234f03..fb617e1822 100644 --- a/reco/L1/L1Algo/L1CATrackFinder.cxx +++ b/reco/L1/L1Algo/L1CATrackFinder.cxx @@ -1783,7 +1783,6 @@ void L1Algo::CATrackFinder() isec = 0; // TODO: temporary! (S.Zharko) for (const auto& caIteration : fParameters.GetCAIterations()) // all finder { - std::cout << "CA Track Finder Iteration!!" << isec << '\n'; //if (fTrackingMode == kMcbm) { // if (isec > 3) { continue; } //} diff --git a/reco/L1/L1Algo/L1MaterialInfo.cxx b/reco/L1/L1Algo/L1MaterialInfo.cxx index 915c367311..6aeee7c8f1 100644 --- a/reco/L1/L1Algo/L1MaterialInfo.cxx +++ b/reco/L1/L1Algo/L1MaterialInfo.cxx @@ -39,13 +39,13 @@ void L1MaterialInfo::CheckConsistency() const L1Utils::CheckSimdVectorEquality(logRadThick, "L1MaterialInfo::logRadThick"); /* (ii) Checks for physical sence: thick and RL must be larger then 0. */ - if (thick[0] < fscal(0.) || L1Utils::CmpFloats(thick[0], fscal(0.))) { + if (thick[0] < fscal(0.)) { std::stringstream aStream; aStream <<"L1MaterialInfo: illegal value for station thickness: (" << thick[0] << ", positive value expected) [cm]"; throw std::logic_error(aStream.str()); } - if (RL[0] < fscal(0.) || L1Utils::CmpFloats(RL[0], fscal(0.))) { + if (RL[0] < fscal(0.)) { std::stringstream aStream; aStream <<"L1MaterialInfo: illegal value for station radiation length: (" << RL[0] << ", positive value expected) [cm]"; throw std::logic_error(aStream.str()); @@ -174,7 +174,7 @@ void L1Material::SetBins(int nBins, float stationSize) throw std::logic_error(aStream.str()); } - if (stationSize < 0 || L1Utils::CmpFloats(stationSize, 0.f)) { + if (stationSize < 0) { std::stringstream aStream; aStream << "L1Material: object cannot be initialized with non-positive stationStation = " << stationSize << " [cm]"; throw std::logic_error(aStream.str()); diff --git a/reco/L1/L1Algo/L1Parameters.cxx b/reco/L1/L1Algo/L1Parameters.cxx index 8f395aedc6..1fd9d863d2 100644 --- a/reco/L1/L1Algo/L1Parameters.cxx +++ b/reco/L1/L1Algo/L1Parameters.cxx @@ -208,6 +208,9 @@ std::string L1Parameters::ToString(int verbosity, int indentLevel) const constexpr char indentChar = '\t'; std::string indent(indentLevel, indentChar); aStream << '\n'; + aStream << indent << "--------------------------------------------------------------------------------\n"; + aStream << indent << " L1 parameters list\n"; + aStream << indent << "--------------------------------------------------------------------------------\n"; aStream << indent << "COMPILE TIME CONSTANTS:\n"; aStream << indent << indentChar << "Bits to code one station: " <<L1Constants::size::kStationBits << '\n'; aStream << indent << indentChar << "Bits to code one thread: " <<L1Constants::size::kThreadBits << '\n'; @@ -227,7 +230,7 @@ std::string L1Parameters::ToString(int verbosity, int indentLevel) const aStream << indent << indentChar << "TARGET:\n"; aStream << indent << indentChar << indentChar << "Position:\n"; for (int dim = 0; dim < 3 /*nDimensions*/; ++dim ) { - aStream << indent << indentChar << indentChar << indentChar << char(120 + dim) << " = " << fTargetPos[dim][0] << " [cm]\n"; + aStream << indent << indentChar << indentChar << indentChar << char(120 + dim) << " = " << fTargetPos[dim][0] << " cm\n"; } aStream << indent << indentChar << "NUMBER OF STATIONS:\n"; @@ -253,6 +256,6 @@ std::string L1Parameters::ToString(int verbosity, int indentLevel) const for (int idx = 0; idx < *(fNstationsActive.end() - 1); ++idx) { aStream << indent << indentChar << indentChar << fStations[idx].ToString(verbosity) << '\n'; } - + aStream << indent << "--------------------------------------------------------------------------------\n"; return aStream.str(); } diff --git a/reco/L1/L1Algo/L1Station.cxx b/reco/L1/L1Algo/L1Station.cxx index 3d242286fe..354ada7e2b 100644 --- a/reco/L1/L1Algo/L1Station.cxx +++ b/reco/L1/L1Algo/L1Station.cxx @@ -66,7 +66,7 @@ void L1Station::CheckConsistency() const if (dt[0] < 0) { std::stringstream msg; msg << "L1Station: " << this->ToString() << " has incorrect time resolution value: " - << "dt = " << Rmin[0] << " [ns], Rmax = " << Rmax[0] << " [cm] (0 <= Rmin < Rmax expected)"; + << "dt = " << dt[0] << " ns (expected positive)"; throw std::logic_error(msg.str()); } @@ -74,7 +74,9 @@ void L1Station::CheckConsistency() const * Check consistency of other members */ - materialInfo.CheckConsistency(); + //materialInfo.CheckConsistency(); + // TODO: Temporarily switched off, because Much has RL = 0, which is actually incorrect, but really is not used. + // One should provide average radiation length values for each Much layer (S.Zharko) fieldSlice.CheckConsistency(); frontInfo.CheckConsistency(); backInfo.CheckConsistency(); @@ -99,7 +101,7 @@ std::string L1Station::ToString(int verbosityLevel, int indentLevel) const // TODO: probably we can have verbosity level and address for each underlying object (S.Zharko) } if (verbosityLevel == 0) { - aStream << "L1Station at z = " << z[0] << " [cm]" ; + aStream << "L1Station at z = " << z[0] << " cm" ; } else { aStream << '\n' << indent << "Address: " << this << '\n'; diff --git a/reco/L1/L1LinkDef.h b/reco/L1/L1LinkDef.h index 0c93d9b192..fe09c1a7ce 100644 --- a/reco/L1/L1LinkDef.h +++ b/reco/L1/L1LinkDef.h @@ -33,5 +33,6 @@ #pragma link C++ class CbmTrackerDetInitializer + ; #pragma link C++ class CbmMvdTrackerIF + ; #pragma link C++ class CbmStsTrackerIF + ; +#pragma link C++ class CbmMuchTrackerIF + ; #endif diff --git a/reco/L1/L1TrackerInterfaceBase.h b/reco/L1/L1TrackerInterfaceBase.h index f8b64f3ffd..17a3938674 100644 --- a/reco/L1/L1TrackerInterfaceBase.h +++ b/reco/L1/L1TrackerInterfaceBase.h @@ -20,7 +20,7 @@ public: virtual ~L1TrackerInterfaceBase() {} /// Gets actual number of stations, provided by the current geometry setup - virtual int GetNstations() const = 0; + virtual int GetNtrackingStations() const = 0; /// Gets time resolution for a station /// \param stationId Station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) -- GitLab