diff --git a/core/detectors/tof/CbmTofTrackingInterface.cxx b/core/detectors/tof/CbmTofTrackingInterface.cxx index cbb3c55691a6224638d0993f8ba2d435d81b30a1..871f8d7c9e08997e4fe1eeb10f62e4594e702ad6 100644 --- a/core/detectors/tof/CbmTofTrackingInterface.cxx +++ b/core/detectors/tof/CbmTofTrackingInterface.cxx @@ -60,19 +60,8 @@ InitStatus CbmTofTrackingInterface::Init() int station = fDigiBdfPar->GetTrackingStation(iSmType, iSm, iRpc); auto* channelInfo = dynamic_cast<CbmTofCell*>(fDigiPar->GetCell(iAddr)); if (nullptr == channelInfo) { break; } - - float z = channelInfo->GetZ(); - float x = channelInfo->GetX(); - //float y = channelInfo->GetY(); - if (station < 0) { continue; } - - // NOTE: the hack for fixing stations hits in "mcbm_beam_2021_07_surveyed" - if (fIfMissingHits) { - if ((x > 20.) && (z > 270.) && (station == 1)) { station = 2; } - if (z > 400) { continue; } - } - fTofStationZ[station] += z; + fTofStationZ[station] += channelInfo->GetZ(); nTofStationModules[station] += 1; } } @@ -117,13 +106,3 @@ void CbmTofTrackingInterface::SetParContainers() } runtimeDb->initContainers(FairRunAna::Instance()->GetRunId()); } - -//------------------------------------------------------------------------------------------------------------------------------------- -// -void CbmTofTrackingInterface::FixHitsStationsMismatch() -{ - LOG(warn) << "CbmTofTrackingInterface::FixHitsStationsMismatch was invoked (please, be sure that you are running " - << "the mcbm_beam_2021_07_surveyed setup at the moment)"; - fIfMissingHits = true; - this->ReInit(); -} diff --git a/core/detectors/tof/CbmTofTrackingInterface.h b/core/detectors/tof/CbmTofTrackingInterface.h index 3d50fad01e7661ff7cb8005d94e1746d54e60ce3..662f4f52d8308bde17c57f5ff1a25edd93425643 100644 --- a/core/detectors/tof/CbmTofTrackingInterface.h +++ b/core/detectors/tof/CbmTofTrackingInterface.h @@ -83,12 +83,6 @@ public: { int iSt = fDigiBdfPar->GetTrackingStation(CbmTofAddress::GetSmType(address), CbmTofAddress::GetSmId(address), CbmTofAddress::GetRpcId(address)); - // NOTE: Implement, when the "mcbm_beam_2021_07_surveyed" parameters will be fixed - // TODO: Invesitgate problem in mcbm_beam_2021_07_surveyed - if (fIfMissingHits) { - auto* channelInfo = static_cast<CbmTofCell*>(fDigiPar->GetCell(address)); - if (channelInfo->GetX() > 20. && channelInfo->GetZ() > 270. && 1 == iSt) { iSt = 2; } - } return iSt; } @@ -123,13 +117,6 @@ public: CbmTofTrackingInterface& operator=(const CbmTofTrackingInterface&) = delete; CbmTofTrackingInterface& operator=(CbmTofTrackingInterface&&) = delete; - // This is a temporary hack for incorrect parameters at "mcbm_beam_2021_07_surveyed" setup. In the TOF parameters - // file there is a mismatch in indeces of tracking stations of hits. At the moment, we introduced a method, which - // runs CbmTofTrackingInterface::ReInit and recalculates z-component positions for this particular case. The method - // should be invoked inside CbmL1::Init() function ONLY for the "mcbm_beam_2021_07_surveyed" setup until the - // corresponding parameter file is not fixed. - void FixHitsStationsMismatch(); - private: static CbmTofTrackingInterface* fpInstance; ///< Instance of the class @@ -138,8 +125,6 @@ private: std::vector<float> fTofStationZ {}; ///< ToF stations position z-component [cm] - bool fIfMissingHits {false}; ///< Temporary flag, which is used to fix hits stations indexes mismatch - ClassDef(CbmTofTrackingInterface, 0); }; diff --git a/macro/beamtime/mcbm2021/mcbm_event_reco.C b/macro/beamtime/mcbm2021/mcbm_event_reco.C index 0950dacd3d84190225252f690fc2c37c110b6639..a8933241005d68db9c9d6b2b3c3e9289df2ecc41 100644 --- a/macro/beamtime/mcbm2021/mcbm_event_reco.C +++ b/macro/beamtime/mcbm2021/mcbm_event_reco.C @@ -809,7 +809,6 @@ Bool_t mcbm_event_reco(UInt_t uRunId = 1588, // run->AddTask(kalman); // CbmL1* l1 = new CbmL1(); // l1->SetMcbmMode(); - // if (strcmp(geoSetupTag.data(), "mcbm_beam_2021_07_surveyed") == 0) l1->SetMissingHits(1); // // // --- Material budget file names // TString mvdGeoTag; diff --git a/macro/beamtime/mcbm2022/mcbm_digievent_reco.C b/macro/beamtime/mcbm2022/mcbm_digievent_reco.C index 5a2260af0c60caa00ecff8e0e038d0e9c54da16c..c4651259ea16729156e4878366647198051c1cc2 100644 --- a/macro/beamtime/mcbm2022/mcbm_digievent_reco.C +++ b/macro/beamtime/mcbm2022/mcbm_digievent_reco.C @@ -475,7 +475,6 @@ Bool_t mcbm_digievent_reco(UInt_t uRunId = 2365, CbmL1* l1 = new CbmL1(); l1->SetMcbmMode(); - // if (strcmp(geoSetupTag.data(), "mcbm_beam_2021_07_surveyed") == 0) l1->SetMissingHits(1); // --- Material budget file names TString mvdGeoTag; diff --git a/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C b/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C index 469aa44b8e158b80ddf1b0615b801b96c25ad5c5..4f9d5d534fb33cc0c537bc0eda636b43414b940b 100644 --- a/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C +++ b/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C @@ -601,8 +601,6 @@ Bool_t mcbm_event_reco_L1(UInt_t uRunId = 2570, CbmL1* l1 = new CbmL1(); l1->SetMcbmMode(); - // if (strcmp(geoSetupTag.data(), "mcbm_beam_2021_07_surveyed") == 0) l1->SetMissingHits(1); - // --- Material budget file names TString mvdGeoTag; if (geoSetup->GetGeoTag(ECbmModuleId::kMvd, mvdGeoTag)) { diff --git a/macro/beamtime/mcbm2022/mcbm_reco.C b/macro/beamtime/mcbm2022/mcbm_reco.C index 89eb5e276fa63d14280c2c82eadfc8c9f3cef108..88b58f490e108703a43224dec20e685c258eed8e 100644 --- a/macro/beamtime/mcbm2022/mcbm_reco.C +++ b/macro/beamtime/mcbm2022/mcbm_reco.C @@ -526,7 +526,6 @@ Bool_t mcbm_reco(UInt_t uRunId = 2391, CbmL1* l1 = new CbmL1("L1", 0); // <= Disable verbose mode l1->SetMcbmMode(); - // if (strcmp(geoSetupTag.data(), "mcbm_beam_2021_07_surveyed") == 0) l1->SetMissingHits(1); /// PAL, 08/02/2023: Is the following comment still valid with the current master? // Workaround to get it running: diff --git a/macro/mcbm/mcbm_reco_event.C b/macro/mcbm/mcbm_reco_event.C index a7e041b2fbfa9aa0c18e709255ff845049cb8924..bbee100434ed091a533f34c11e5e79f450302895 100644 --- a/macro/mcbm/mcbm_reco_event.C +++ b/macro/mcbm/mcbm_reco_event.C @@ -385,7 +385,6 @@ void mcbm_reco_event(Int_t nEvents = 10, TString dataset = "data/test", l1->SetMcbmMode(); // User configuration example for CA: //l1->SetConfigUser(srcDir + "/macro/L1/configs/ca_params_user_example.yaml"); - if (strcmp(setupName, "mcbm_beam_2021_07_surveyed") == 0) l1->SetMissingHits(1); run->AddTask(l1); CbmL1GlobalTrackFinder* globalTrackFinder = new CbmL1GlobalTrackFinder(); diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 3facfc53eadcd29499ffe5f2464c3af53d51e245..8e31e77d08c8f2e74a37c0de5a31e58b33da6c96 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -370,10 +370,6 @@ InitStatus CbmL1::Init() fNMuchStationsGeom = fInitManager.GetNstationsGeometry(L1DetectorID::kMuch); fNTofStationsGeom = fInitManager.GetNstationsGeometry(L1DetectorID::kTof); fNStationsGeom = fInitManager.GetNstationsGeometry(); - - // TODO: SZh 15.08.2023: This particular hack is related only to the mcbm_beam_2021_07_surveyed setup. - // Shell we still support it? - if (fMissingHits) { CbmTofTrackingInterface::Instance()->FixHitsStationsMismatch(); } } // Parameters initialization, based on the FairRunAna chain else { @@ -406,10 +402,6 @@ InitStatus CbmL1::Init() auto trdInterface = CbmTrdTrackingInterface::Instance(); auto tofInterface = CbmTofTrackingInterface::Instance(); - // NOTE: hack for "mcbm_beam_2021_07_surveyed" to account for a mismactch in the station - // indeces of hits in TOF - if (fMissingHits) { tofInterface->FixHitsStationsMismatch(); } - fNMvdStationsGeom = (fUseMVD) ? mvdInterface->GetNtrackingStations() : 0; fNStsStationsGeom = (fUseSTS) ? stsInterface->GetNtrackingStations() : 0; fNMuchStationsGeom = (fUseMUCH) ? muchInterface->GetNtrackingStations() : 0; @@ -567,9 +559,6 @@ InitStatus CbmL1::Init() if (L1Algo::TrackingMode::kGlobal == fTrackingMode) { stationInfo.SetTimeInfo(false); } stationInfo.SetTrackingStatus(true); - if (iSt == 1 && L1Algo::TrackingMode::kMcbm == fTrackingMode && fMissingHits) { - stationInfo.SetTrackingStatus(false); - } if (fvmDisabledStationIDs[L1DetectorID::kTrd].find(iSt) != fvmDisabledStationIDs[L1DetectorID::kTrd].cend()) { stationInfo.SetTrackingStatus(false); } @@ -637,11 +626,7 @@ InitStatus CbmL1::Init() // Re-organize the the relation between CbmL1 and L1Algo. I belive, we don't need a global pointer to the L1Algo // instance. fpAlgo = &gAlgo; - - // FIXME: SZh 22.08.2023: - // We need to remove the fMissingHits flag. It corresponds to a particular setup in mCBM, which we probably - // should not support anymore. - fpAlgo->Init(fTrackingMode, fMissingHits); + fpAlgo->Init(fTrackingMode); // // ** Send formed parameters object to L1Algo instance ** diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index 9b05cd88f7f87e6d03b12214929518d6b73203d4..0eb834827ca58a32e9e5cd28f9fc17954c4118f1 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -253,7 +253,6 @@ public: } void SetExtrapolateToTheEndOfSTS(bool b) { fExtrapolateToTheEndOfSTS = b; } - void SetMissingHits(bool value) { fMissingHits = value; } void SetStsOnlyMode() { fTrackingMode = L1Algo::TrackingMode::kSts; } void SetMcbmMode() { fTrackingMode = L1Algo::TrackingMode::kMcbm; } void SetGlobalMode() { fTrackingMode = L1Algo::TrackingMode::kGlobal; } @@ -475,8 +474,6 @@ public: L1Algo* fpAlgo = nullptr; ///< Pointer to the L1 track finder algorithm - bool fMissingHits = false; ///< Turns on several ad-hock settings for "mcbm_beam_2021_07_surveyed.100ev" setup - L1Algo::TrackingMode fTrackingMode = L1Algo::TrackingMode::kSts; ///< Tracking mode: kSts, kMcbm or kGlobal DFSET fvSelectedMcEvents {}; ///< Set of selected MC events with fileID and eventId diff --git a/reco/L1/L1Algo/L1Algo.cxx b/reco/L1/L1Algo/L1Algo.cxx index 771967bccf471cb774b25e65db90610d639de609..fba7db9add78ff0d7c9f46496b31d4cb82e3824e 100644 --- a/reco/L1/L1Algo/L1Algo.cxx +++ b/reco/L1/L1Algo/L1Algo.cxx @@ -66,7 +66,7 @@ void L1Algo::SetNThreads(unsigned int n) } -void L1Algo::Init(const TrackingMode mode, const bool MissingHits) +void L1Algo::Init(const TrackingMode mode) { for (int iProc = 0; iProc < 4; iProc++) { for (int i = 0; i < 8; i++) { @@ -80,7 +80,6 @@ void L1Algo::Init(const TrackingMode mode, const bool MissingHits) } fTrackingMode = mode; - fMissingHits = MissingHits; } void L1Algo::Finish() { ca::tools::Debugger::Instance().Write(); } diff --git a/reco/L1/L1Algo/L1Algo.h b/reco/L1/L1Algo/L1Algo.h index e6aaaeb63bed12f4b0836a1d8d95049f6491adbf..a44de8a34cdbe6302711e05cd699bb34f2c59362 100644 --- a/reco/L1/L1Algo/L1Algo.h +++ b/reco/L1/L1Algo/L1Algo.h @@ -350,7 +350,7 @@ public: kMcbm }; - void Init(const TrackingMode mode, const bool MissingHits); + void Init(const TrackingMode mode); void Finish(); @@ -463,7 +463,6 @@ public: // L1Vector<int> fStripToTrack1B {"L1Algo::fStripToTrackB"}; // back strip to track pointers int fNThreads {0}; - bool fMissingHits {0}; ///< TODO ??? TrackingMode fTrackingMode {kSts}; fvec EventTime[L1Constants::size::kMaxNthreads][L1Constants::size::kMaxNthreads] {{0}}; diff --git a/reco/L1/L1Algo/L1CaTrackFinderSlice.cxx b/reco/L1/L1Algo/L1CaTrackFinderSlice.cxx index 6d98f36807888e878ca8312f738dbfcf57618185..e521b76627d776d3b83399d80e2f4b6de69bddea 100644 --- a/reco/L1/L1Algo/L1CaTrackFinderSlice.cxx +++ b/reco/L1/L1Algo/L1CaTrackFinderSlice.cxx @@ -1597,7 +1597,7 @@ void L1Algo::CaTrackFinderSlice() for (L1HitIndex_t ih = 0; ih < fSliceHitIds[iS].size(); ++ih) { const L1Hit& h = fInputData.GetHit(fSliceHitIds[iS][ih]); - fscal dt = sqrt(h.dt2); + fscal dt = sqrt(h.dt2); if (fMaxDx[iS] < h.dx) { fMaxDx[iS] = h.dx; } if (fMaxDy[iS] < h.dy) { fMaxDy[iS] = h.dy; } @@ -1861,29 +1861,24 @@ void L1Algo::CaTrackFinderSlice() CreatePortionOfTriplets( // input istal, istal + 1, istal + 2, T_1, fld_1, hitsl_1, n_2, i1_2, hitsm_2); - if (fpCurrentIteration->GetJumpedFlag() || (fMissingHits)) { + if (fpCurrentIteration->GetJumpedFlag()) { // All iterations are "jump"! Tindex nG_2; hitsmG_2.clear(); i1G_2.clear(); - if ((fMissingHits && ((istal == 0) || (istal == 1))) || !fMissingHits) { - CreatePortionOfDoublets( // input - istal, istal + 2, ip, fSingletPortionSize[istal][ip], - // output - TG_1, fldG_1, hitslG_1, nG_2, i1G_2, hitsmG_2); - } - if ((fMissingHits && (istal == 0)) || !fMissingHits) { - CreatePortionOfTriplets( // input - istal, istal + 1, istal + 3, T_1, fld_1, hitsl_1, + CreatePortionOfDoublets( // input + istal, istal + 2, ip, fSingletPortionSize[istal][ip], + // output + TG_1, fldG_1, hitslG_1, nG_2, i1G_2, hitsmG_2); - n_2, i1_2, hitsm_2); - } + CreatePortionOfTriplets( // input + istal, istal + 1, istal + 3, T_1, fld_1, hitsl_1, - if ((fMissingHits && (istal == 1)) || !fMissingHits) { - CreatePortionOfTriplets( // input - istal, istal + 2, istal + 3, TG_1, fldG_1, hitslG_1, nG_2, i1G_2, hitsmG_2); - } + n_2, i1_2, hitsm_2); + + CreatePortionOfTriplets( // input + istal, istal + 2, istal + 3, TG_1, fldG_1, hitslG_1, nG_2, i1G_2, hitsmG_2); } } // }