Skip to content
Snippets Groups Projects
Commit a3d8b5c8 authored by Sergei Zharko's avatar Sergei Zharko
Browse files

macro/much/run_ana.C: added MuCh digi parameters initialization

parent e4abba4c
No related branches found
No related tags found
1 merge request!849L1: Interfaces updates
Pipeline #17681 failed
......@@ -58,12 +58,13 @@ InitStatus CbmMuchTrackingInterface::Init()
// Check initialization of the MuCh digi parameters file
if (!fGeoScheme->IsInitialized()) {
LOG(fatal) << "CbmMuchTrackingInterface::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"
<< "\033[4;1;32mNOTE\033[0m: For the MuCh digi parameters initialization please place the following "
<< "code your macro:\n"
<< "\n\t// ----- MuCh digi parameters initialization --------------------------------------"
<< "\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 CbmSetup::Instance()->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\";"
......@@ -71,7 +72,8 @@ InitStatus CbmMuchTrackingInterface::Init()
<< "\n\t // Initialization of the geometry scheme"
<< "\n\t auto muchGeoScheme = CbmMuchGeoScheme::Instance();"
<< "\n\t if (!muchGeoScheme->IsInitialized()) { muchGeoScheme->Init(parFile, muchFlag); }"
<< "\n\t}";
<< "\n\t}"
<< "\n\t// --------------------------------------------------------------------------------";
}
return kSUCCESS;
......
......@@ -49,6 +49,19 @@ void run_ana(Int_t nEvents = 1000, TString dataSet = "muons", TString setup = "s
// ------------------------------------------------------------------------
if (CbmSetup::Instance()->IsActive(ECbmModuleId::kMuch)) {
// Parameter file name
TString geoTag;
CbmSetup::Instance()->GetGeoTag(ECbmModuleId::kMuch, geoTag);
Int_t muchFlag = (geoTag.Contains("mcbm") ? 1 : 0);
TString parFile = gSystem->Getenv("VMCWORKDIR");
parFile += "/parameters/much/much_" + geoTag(0, 4) + "_digi_sector.root";
// Initialization of the geometry scheme
auto muchGeoScheme = CbmMuchGeoScheme::Instance();
if (!muchGeoScheme->IsInitialized()) { muchGeoScheme->Init(parFile, muchFlag); }
}
run->AddTask(new CbmTrackingDetectorInterfaceInit());
CbmKF* kf = new CbmKF();
run->AddTask(kf);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment