Skip to content
Snippets Groups Projects
Commit 9b458c6a authored by Administrator's avatar Administrator
Browse files

Fix mcbm_hadron_analysis macro

Define the much parameter file name properly in case of mcbm geometry.
parent 3c9137a6
Branches master
No related tags found
No related merge requests found
......@@ -37,26 +37,32 @@ void mcbm_hadron_analysis(Int_t nEvents = 10, TString setupName = "mcbm_beam_202
parInput1->open(ParFile.Data());
rtdb->setFirstInput(parInput1);
// ------ Geometry setup ------------------------------------------------
std::cout << '\n';
TString setupFile = srcDir + "/geometry/setup/setup_" + setupName + ".C";
TString setupFunct = "setup_";
setupFunct = setupFunct + setupName + "()";
std::cout << "-I- Loading macro " << setupFile << '\n';
gROOT->LoadMacro(setupFile);
gROOT->ProcessLine(setupFunct);
// ----- Load the geometry setup -------------------------------------
std::cout << std::endl;
// std::cout << "-I- " << myName << ": Loading setup " << setup << std::endl;
CbmSetup* setup = CbmSetup::Instance();
// setup->RemoveModule(ECbmModuleId::kTrd);
setup->LoadSetup(setupName);
TString geoTag;
// ------------------------------------------------------------------------
// ----- MuCh digi parameters initialization --------------------------------------
if (setup->IsActive(ECbmModuleId::kMuch)) {
// Parameter file name
TString geoTag;
setup->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";
if (muchFlag) {
std::cout << geoTag << std::endl;
parFile = parFile + "/parameters/much/much_" + geoTag + "_digi_sector.root";
std::cout << "Using parameter file " << parFile << std::endl;
}
else {
std::cout << geoTag(0, 4) << std::endl;
parFile = parFile + "/parameters/much/much_" + geoTag(0, 4) + "_digi_sector.root";
std::cout << "Using parameter file " << parFile << std::endl;
}
// Initialization of the geometry scheme
auto muchGeoScheme = CbmMuchGeoScheme::Instance();
......
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