From a6864083c60e320a1695c6a7142ddd8d2a5993cd Mon Sep 17 00:00:00 2001 From: P-A Loizeau <p.-a.loizeau@gsi.de> Date: Wed, 11 Nov 2020 16:55:45 +0100 Subject: [PATCH] mCBM 2020: add explicitely the optional RICH mapping + remove 2019 macro --- macro/beamtime/mcbm2020/mcbm2019_reco.C | 149 --------------------- macro/beamtime/mcbm2020/mcbm_reco.C | 3 + macro/beamtime/mcbm2020/mcbm_reco_kronos.C | 3 + 3 files changed, 6 insertions(+), 149 deletions(-) delete mode 100644 macro/beamtime/mcbm2020/mcbm2019_reco.C diff --git a/macro/beamtime/mcbm2020/mcbm2019_reco.C b/macro/beamtime/mcbm2020/mcbm2019_reco.C deleted file mode 100644 index 7f45bd4e39..0000000000 --- a/macro/beamtime/mcbm2020/mcbm2019_reco.C +++ /dev/null @@ -1,149 +0,0 @@ -// -------------------------------------------------------------------------- -// -// Macro for reconstruction of mcbm data (2019) -// Only STS local reconstruction (cluster + hit finder) for the time being -// -// -// -// -------------------------------------------------------------------------- - - -void mcbm2019_reco( - Int_t nTimeslices = -1, - UInt_t uRunId = 0, - TString outDir = "data", - TString dataSet = "data/mcbm2019", // Data set for file names - Bool_t eventMode = kFALSE // Event-by-event mode -) { - - - // --- Logger settings ---------------------------------------------------- - TString logLevel = "INFO"; - TString logVerbosity = "LOW"; - // ------------------------------------------------------------------------ - - - // ----- Environment -------------------------------------------------- - TString myName = "mcbm2019_reco"; // this macro's name for screen output - TString srcDir = gSystem->Getenv("VMCWORKDIR"); // top source directory - // TString srcDir1 = gSystem->Getenv("SLURM_INDEX"); // ------------------------------------------------------------------------ - - - // ----- In- and output file names ------------------------------------ - TString runId = TString::Format("%03u", uRunId); - TString inFile = outDir + "/unp_mcbm_" + runId + ".root"; - if (eventMode) inFile = dataSet + ".event.raw.root"; - TString parFile = outDir + "/unp_mcbm_params_" + runId + ".root"; - TString outFile = dataSet + "_" + runId + ".rec.root"; - TString geoFile = dataSet + ".geo.root"; // to be created by a simulation run - // ------------------------------------------------------------------------ - - - // ----- Timer -------------------------------------------------------- - TStopwatch timer; - timer.Start(); - // ------------------------------------------------------------------------ - - - // ---- Debug option ------------------------------------------------- - gDebug = 0; - // ------------------------------------------------------------------------ - - - // ----- FairRunAna --------------------------------------------------- - FairRunAna* run = new FairRunAna(); - CbmStsFindHits* hit = new CbmStsFindHits(); - FairFileSource* inputSource = new FairFileSource(inFile); - run->SetSource(inputSource); - - run->SetOutputFile(outFile); - run->SetGenerateRunInfo(kTRUE); - run->SetGeomFile(geoFile); - - TString monitorFile {outFile}; - monitorFile.ReplaceAll("rec", "rec.monitor"); - FairMonitor::GetMonitor()->EnableMonitor(kTRUE, monitorFile); - // ----------------------------------------------------------------------- - - - // ----- Logger settings ---------------------------------------------- - FairLogger::GetLogger()->SetLogScreenLevel(logLevel.Data()); - FairLogger::GetLogger()->SetLogVerbosityLevel(logVerbosity.Data()); - // ------------------------------------------------------------------------ - - - // ----- Reconstruction tasks ----------------------------------------- - - - // ----- Local reconstruction in STS ---------------------------------- - CbmStsReco* stsReco = new CbmStsReco(); - run->AddTask(stsReco); - std::cout << "-I- : Added task " << stsReco->GetName() << std::endl; - // ------------------------------------------------------------------------ - - - // ----- Parameter database -------------------------------------------- - std::cout << std::endl << std::endl; - std::cout << "-I- " << myName << ": Set runtime DB" << std::endl; - FairRuntimeDb* rtdb = run->GetRuntimeDb(); - FairParRootFileIo* parIo1 = new FairParRootFileIo(); - FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo(); - parIo1->open(parFile.Data(), "UPDATE"); - rtdb->setFirstInput(parIo1); - // ------------------------------------------------------------------------ - - - // ----- Run initialisation ------------------------------------------- - std::cout << std::endl; - std::cout << "-I- " << myName << ": Initialise run" << std::endl; - run->Init(); - rtdb->setOutput(parIo1); - rtdb->saveOutput(); - rtdb->print(); - // ------------------------------------------------------------------------ - - - // ----- Start run ---------------------------------------------------- - std::cout << std::endl << std::endl; - std::cout << "-I- " << myName << ": Starting run" << std::endl; - run->Run(0, nTimeslices); - // ------------------------------------------------------------------------ - - - // ----- Finish ------------------------------------------------------- - timer.Stop(); - FairMonitor::GetMonitor()->Print(); - Double_t rtime = timer.RealTime(); - Double_t ctime = timer.CpuTime(); - std::cout << std::endl << std::endl; - std::cout << "Macro finished successfully." << std::endl; - std::cout << "Output file is " << outFile << std::endl; - std::cout << "Parameter file is " << parFile << std::endl; - std::cout << "Real time " << rtime << " s, CPU time " << ctime << " s" - << std::endl; - std::cout << std::endl; - std::cout << " Test passed" << std::endl; - std::cout << " All ok " << std::endl; - // ------------------------------------------------------------------------ - - - // ----- Resource monitoring ------------------------------------------ - // Extract the maximal used memory an add is as Dart measurement - // This line is filtered by CTest and the value send to CDash - FairSystemInfo sysInfo; - Float_t maxMemory = sysInfo.GetMaxMemory(); - std::cout << "<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">"; - std::cout << maxMemory; - std::cout << "</DartMeasurement>" << std::endl; - - Float_t cpuUsage = ctime / rtime; - std::cout << "<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">"; - std::cout << cpuUsage; - std::cout << "</DartMeasurement>" << std::endl; - // ------------------------------------------------------------------------ - - - // ----- Function needed for CTest runtime dependency ----------------- - // RemoveGeoManager(); - // ------------------------------------------------------------------------ -} diff --git a/macro/beamtime/mcbm2020/mcbm_reco.C b/macro/beamtime/mcbm2020/mcbm_reco.C index b9ef9b9dc2..a17c5cbde9 100644 --- a/macro/beamtime/mcbm2020/mcbm_reco.C +++ b/macro/beamtime/mcbm2020/mcbm_reco.C @@ -118,6 +118,9 @@ void mcbm_reco(Int_t runId = 812, Int_t nTimeslices = 0) { CbmRichMCbmHitProducer* hitProdRich = new CbmRichMCbmHitProducer(); hitProdRich->setToTLimits(23.7, 30.0); hitProdRich->applyToTCut(); + TString sRichMapFile = srcDir + + "/macro/rich/mcbm/beamtime/mRICH_Mapping_vert_20190318_elView.geo"; + hitProdRich->SetMappingFile( sRichMapFile.Data() ); run->AddTask(hitProdRich); // ------------------------------------------------------------------------ diff --git a/macro/beamtime/mcbm2020/mcbm_reco_kronos.C b/macro/beamtime/mcbm2020/mcbm_reco_kronos.C index ab222e0430..8d02262691 100644 --- a/macro/beamtime/mcbm2020/mcbm_reco_kronos.C +++ b/macro/beamtime/mcbm2020/mcbm_reco_kronos.C @@ -122,6 +122,9 @@ void mcbm_reco(Int_t runId = 812, Int_t nTimeslices = 0) { CbmRichMCbmHitProducer* hitProdRich = new CbmRichMCbmHitProducer(); hitProdRich->setToTLimits(23.7, 30.0); hitProdRich->applyToTCut(); + TString sRichMapFile = srcDir + + "/macro/rich/mcbm/beamtime/mRICH_Mapping_vert_20190318_elView.geo"; + hitProdRich->SetMappingFile( sRichMapFile.Data() ); run->AddTask(hitProdRich); // ------------------------------------------------------------------------ -- GitLab