From 5d2fa48ddae18a992ad08cb4eb538d256de44037 Mon Sep 17 00:00:00 2001 From: "s.zharko@gsi.de" <s.zharko@gsi.de> Date: Wed, 3 Aug 2022 00:54:38 +0200 Subject: [PATCH] L1: removed setter for MuCh digitization parameters file from CbmL1 --- macro/mcbm/mcbm_reco.C | 8 +++----- macro/mcbm/mcbm_reco_event.C | 6 ------ reco/L1/CbmL1.h | 39 +++++++++++++++++------------------- 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/macro/mcbm/mcbm_reco.C b/macro/mcbm/mcbm_reco.C index 3f32f1a41d..f67bc7f87f 100644 --- a/macro/mcbm/mcbm_reco.C +++ b/macro/mcbm/mcbm_reco.C @@ -233,6 +233,9 @@ void mcbm_reco(Int_t nEvents = 10, TString dataset = "data/test", TString sEvBui 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* muchHitGem = new CbmMuchFindHitsGem(parFile.Data(), muchFlag); @@ -455,11 +458,6 @@ void mcbm_reco(Int_t nEvents = 10, TString dataset = "data/test", TString sEvBui Int_t muchFlag = 0; if (geoTag.Contains("mcbm")) muchFlag = 1; - TString parFile = gSystem->Getenv("VMCWORKDIR"); - parFile = parFile + "/parameters/much/much_" + geoTag(0, 4) + "_digi_sector.root"; - std::cout << "L1: Using parameter file " << parFile << std::endl; - l1->SetMuchPar(parFile); - TString parFile2 = gSystem->Getenv("VMCWORKDIR"); parFile2 = parFile2 + "/parameters/much/much_matbudget_" + geoTag + ".root "; std::cout << "Using material budget file " << parFile2 << std::endl; diff --git a/macro/mcbm/mcbm_reco_event.C b/macro/mcbm/mcbm_reco_event.C index 7a22303142..3193307344 100644 --- a/macro/mcbm/mcbm_reco_event.C +++ b/macro/mcbm/mcbm_reco_event.C @@ -406,12 +406,6 @@ void mcbm_reco_event(Int_t nEvents = 10, TString dataset = "data/test", Int_t muchFlag = 0; if (geoTag.Contains("mcbm")) muchFlag = 1; - TString parFile = gSystem->Getenv("VMCWORKDIR"); - // parFile = parFile + "/parameters/much/much_" + geoTag(0, 4) + "_digi_sector.root"; - parFile = parFile + "/parameters/much/much_" + geoTag + "_digi_sector.root"; - std::cout << "L1: Using parameter file " << parFile << std::endl; - l1->SetMuchPar(parFile); - TString parFile2 = gSystem->Getenv("VMCWORKDIR"); parFile2 = parFile2 + "/parameters/much/much_matbudget_" + geoTag + ".root "; std::cout << "Using material budget file " << parFile2 << std::endl; diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index 226f237258..6c31a012a1 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -1,6 +1,6 @@ -/* Copyright (C) 2006-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt +/* Copyright (C) 2006-2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt SPDX-License-Identifier: GPL-3.0-only - Authors: Ivan Kisel, Sergey Gorbunov, Maksym Zyzak, Valentina Akishina, Igor Kulakov, Denis Bertini [committer] */ + Authors: Ivan Kisel, Sergey Gorbunov, Maksym Zyzak, Valentina Akishina, Igor Kulakov, Denis Bertini [committer], Sergei Zharko */ /* *==================================================================== @@ -263,7 +263,6 @@ public: void SetExtrapolateToTheEndOfSTS(bool b) { fExtrapolateToTheEndOfSTS = b; } void SetLegacyEventMode(bool b) { fLegacyEventMode = b; } - void SetMuchPar(TString fileName) { fsMuchDigiFile = fileName; } // TODO: Remove! (S.Zharko) void SetUseHitErrors(bool value) { fUseHitErrors = value; } void SetMissingHits(bool value) { fMissingHits = value; } void SetStsOnlyMode() { fTrackingMode = L1Algo::TrackingMode::kSts; } @@ -398,28 +397,25 @@ public: L1Algo* fpAlgo = nullptr; ///< Pointer to the L1 track finder algorithm L1InitManager* fpInitManager = nullptr; ///< Pointer to the initialization manager for the L1 algorithm - - TString fsMuchDigiFile {}; ///< TODO: REMOVE - bool fUseHitErrors = true; ///< - bool fMissingHits = false; + bool fUseHitErrors = true; ///< + 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 fvFileEvent {}; ///< Map of fileID to eventId L1Vector<CbmL1Track> fvRecoTracks = {"CbmL1::fvRecoTracks"}; ///< Reconstructed tracks container private: - static CbmL1* fpInstance; + static CbmL1* fpInstance; ///< Instance of CbmL1 - L1AlgoInputData* fpData {nullptr}; + L1AlgoInputData* fpData = nullptr; ///< Pointer to the L1 tacking algorithm input object - int nMvdPoints {0}; + int nMvdPoints = 0; // TODO: Should be removed (S.Zharko) - L1Vector<CbmL1MCPoint> fvMCPoints = {"CbmL1::fvMCPoints"}; ///< Container of MC points - L1Vector<int> fvMCPointIndexesTs {"CbmL1::fvMCPointIndexesTs"}; ///< Indexes of MC points in TS + L1Vector<CbmL1MCPoint> fvMCPoints = {"CbmL1::fvMCPoints"}; ///< Container of MC points + L1Vector<int> fvMCPointIndexesTs = {"CbmL1::fvMCPointIndexesTs"}; ///< Indexes of MC points in TS int fNStations = 0; ///< number of total active detector stations int fNMvdStations = 0; ///< number of active MVD stations @@ -436,17 +432,18 @@ private: int fNTofStationsGeom = 0; ///< number of TOF stations; - Int_t fPerformance {0}; // 0 - w\o perf. 1 - L1-Efficiency definition. 2 - QA-Eff.definition - double fTrackingTime {0.}; // time of track finding + Int_t fPerformance = 0; ///< performance mode: 0 - w\o perf. 1 - L1-Efficiency definition. 2 - QA-Eff.definition + double fTrackingTime = 0.; ///< time of track finding procedure - int fSTAPDataMode {0}; // way to work with file for standalone package. - // 0 (off) , 1 (write), 2 (read data and work only with it), 3 (debug - write and read) + /// Option to work with file for standalone package (currently does not work) + /// 0 (off) , 1 (write), 2 (read data and work only with it), 3 (debug - write and read) + int fSTAPDataMode = 0; TString fSTAPDataDir {}; - Int_t fTrackingLevel {2}; // currently not used - Double_t fMomentumCutOff {0.1}; // currently not used - Bool_t fGhostSuppression {true}; // currently not used + Int_t fTrackingLevel = 2; // currently not used + Double_t fMomentumCutOff = 0.1; // currently not used + Bool_t fGhostSuppression = true; // currently not used /// TODO: change to bool Int_t fStsUseMcHit = -1; ///< if STS data should be processed @@ -462,7 +459,7 @@ private: // ** Raw input data ** - CbmTimeSlice* fTimeSlice {nullptr}; + CbmTimeSlice* fTimeSlice = nullptr; ///< Pointer to the TS object // Reconstructed hits input TClonesArray* fpMvdHits = nullptr; ///< Array of MVD hits ("MvdHit") -- GitLab