Skip to content
Snippets Groups Projects
Commit 3c9137a6 authored by Administrator's avatar Administrator
Browse files

Fix weekly tests

Correct file names in kfparticle test.
Add correct much initilization in kfparticle and mcbm hadron analysis
tests.
parent fe31d7c3
No related branches found
No related tags found
1 merge request!1990Fix weekly tests
Pipeline #32266 passed
......@@ -42,8 +42,8 @@ void kf_kfparticle(Int_t nEvents = 2, const TString setupName = "sis100_electron
// ----- In- and output file names ------------------------------------
TString mcFile = dataset + ".tra.root";
TString parFile = dataset + ".par.root";
TString rawFile = dataset + ".raw.root";
TString recFile = dataset + ".reco.root";
TString rawFile = dataset + ".event.raw.root";
TString recFile = dataset + ".rec.root";
TString outFile = dataset + ".phys.root";
TString effFile = dataset + ".Efficiency_KFParticleFinder.txt";
TString histoFile = dataset + ".KFParticleFinder.root";
......@@ -51,19 +51,10 @@ void kf_kfparticle(Int_t nEvents = 2, const TString setupName = "sis100_electron
// ----- Load the geometry setup -------------------------------------
std::cout << std::endl;
TString setupFile = srcDir + "/geometry/setup/setup_" + setupName + ".C";
TString setupFunct = "setup_";
setupFunct = setupFunct + setupName + "()";
std::cout << "-I- " << macroName << ": Loading macro " << setupFile << std::endl;
gROOT->LoadMacro(setupFile);
gROOT->ProcessLine(setupFunct);
// std::cout << "-I- " << myName << ": Loading setup " << setup << std::endl;
CbmSetup* setup = CbmSetup::Instance();
setup->LoadSetup(setupName);
TString geoTag;
// You can modify the pre-defined setup by using
// CbmSetup::Instance()->RemoveModule(ESystemId) or
// CbmSetup::Instance()->SetModule(ESystemId, const char*, Bool_t) or
// CbmSetup::Instance()->SetActive(ESystemId, Bool_t)
// See the class documentation of CbmSetup.
// ------------------------------------------------------------------------
// ----- Check if the simulation and reconstruction are complited ---------
......@@ -149,6 +140,23 @@ void kf_kfparticle(Int_t nEvents = 2, const TString setupName = "sis100_electron
l1->SetStsMaterialBudgetFileName(stsMatBudgetFileName.Data());
}
run->AddTask(l1);
// ----- MuCh digi parameters initialization --------------------------------------
if (setup->IsActive(ECbmModuleId::kMuch)) {
// Parameter file name
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";
// Initialization of the geometry scheme
auto muchGeoScheme = CbmMuchGeoScheme::Instance();
if (!muchGeoScheme->IsInitialized()) {
muchGeoScheme->Init(parFile, muchFlag);
}
}
// --------------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ----- PID for KF Particle Finder ---------------------------------------
......
......@@ -48,6 +48,22 @@ void mcbm_hadron_analysis(Int_t nEvents = 10, TString setupName = "mcbm_beam_202
CbmSetup* setup = CbmSetup::Instance();
// setup->RemoveModule(ECbmModuleId::kTrd);
// ------------------------------------------------------------------------
// ----- 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";
// Initialization of the geometry scheme
auto muchGeoScheme = CbmMuchGeoScheme::Instance();
if (!muchGeoScheme->IsInitialized()) {
muchGeoScheme->Init(parFile, muchFlag);
}
}
/*
CbmMCDataManager* mcManager = new CbmMCDataManager("MCDataManager", 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment