Skip to content
Snippets Groups Projects
Commit 7f0a07bc authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

Reco: Apply Steps and Detectors flag.

parent 2d9fec27
No related branches found
No related tags found
1 merge request!1233Reco: Apply Steps and Detectors flag.
Pipeline #23171 passed
...@@ -69,9 +69,9 @@ Options::Options(int argc, char** argv) ...@@ -69,9 +69,9 @@ Options::Options(int argc, char** argv)
"write log messages to file") "write log messages to file")
("output,o", po::value(&fOutputTypes)->multitoken()->default_value({RecoData::Hit})->value_name("<types>"), ("output,o", po::value(&fOutputTypes)->multitoken()->default_value({RecoData::Hit})->value_name("<types>"),
"comma seperated list of reconstruction output types (hit, digi, ...)") "comma seperated list of reconstruction output types (hit, digi, ...)")
("steps", po::value(&fRecoSteps)->multitoken()->default_value({Step::LocalReco})->value_name("<steps>"), ("steps", po::value(&fRecoSteps)->multitoken()->default_value({Step::Unpack, Step::LocalReco})->value_name("<steps>"),
"comma seperated list of reconstruction steps (upack, digitrigger, localreco, ...)") "comma seperated list of reconstruction steps (upack, digitrigger, localreco, ...)")
("systems,s", po::value(&fDetectors)->multitoken()->default_value({fles::Subsystem::STS})->value_name("<detectors>"), ("systems,s", po::value(&fDetectors)->multitoken()->default_value({fles::Subsystem::STS, fles::Subsystem::TOF, fles::Subsystem::BMON})->value_name("<detectors>"),
"comma seperated list of detectors to process (sts, mvd, ...)") "comma seperated list of detectors to process (sts, mvd, ...)")
("num-ts,n", po::value(&fNumTimeslices)->default_value(-1)->value_name("<num>"), ("num-ts,n", po::value(&fNumTimeslices)->default_value(-1)->value_name("<num>"),
"Stop after <num> timeslices (-1 = all)") "Stop after <num> timeslices (-1 = all)")
......
...@@ -27,6 +27,8 @@ void Reco::Validate(const Options& opts) ...@@ -27,6 +27,8 @@ void Reco::Validate(const Options& opts)
for (auto detector : opts.Detectors()) { for (auto detector : opts.Detectors()) {
switch (detector) { switch (detector) {
case fles::Subsystem::STS: break; case fles::Subsystem::STS: break;
case fles::Subsystem::TOF: break;
case fles::Subsystem::BMON: break;
default: throw std::runtime_error(fmt::format("Unsupported system: {}", ToString(detector))); default: throw std::runtime_error(fmt::format("Unsupported system: {}", ToString(detector)));
} }
} }
...@@ -85,15 +87,19 @@ void Reco::Run(const fles::Timeslice& ts) ...@@ -85,15 +87,19 @@ void Reco::Run(const fles::Timeslice& ts)
xpu::set<cbm::algo::Params>(Params()); xpu::set<cbm::algo::Params>(Params());
std::vector<CbmStsDigi> digis; std::vector<CbmStsDigi> digis;
switch (Params().sts.unpackMode) {
case RecoParams::UnpackMode::XPU: if (Opts().HasStep(Step::Unpack)) {
// digis = fUnpackXpu.Exec(ts); switch (Params().sts.unpackMode) {
throw std::runtime_error("XPU unpacker currently not implemented"); case RecoParams::UnpackMode::XPU:
break; // digis = fUnpackXpu.Exec(ts);
default: throw std::runtime_error("XPU unpacker currently not implemented");
case RecoParams::UnpackMode::CPU: digis = fUnpack.Run(ts).first.fData.fSts.fDigis; break; break;
default:
case RecoParams::UnpackMode::CPU: digis = fUnpack.Run(ts).first.fData.fSts.fDigis; break;
}
} }
fStsHitFinder(digis);
if (Opts().HasStep(Step::LocalReco) && Opts().HasDetector(fles::Subsystem::STS)) fStsHitFinder(digis);
xpu::timings ts_times = xpu::pop_timer(); xpu::timings ts_times = xpu::pop_timer();
......
...@@ -7,15 +7,8 @@ using namespace cbm::algo; ...@@ -7,15 +7,8 @@ using namespace cbm::algo;
void UnpackChain::Init() void UnpackChain::Init()
{ {
// Disable walk correction for now. 2022 data crashes unpacker with hardcoded 2021 params.
fUnpack.SetApplyWalkCorrection(true); fUnpack.SetApplyWalkCorrection(true);
fUnpack.Init(std::vector<fles::Subsystem> { fUnpack.Init(Opts().Detectors());
fles::Subsystem::STS,
// fles::Subsystem::MUCH,
fles::Subsystem::TOF, fles::Subsystem::BMON,
// fles::Subsystem::TRD,
// fles::Subsystem::TRD2D,
});
} }
Unpack::resultType UnpackChain::Run(const fles::Timeslice& timeslice) Unpack::resultType UnpackChain::Run(const fles::Timeslice& timeslice)
......
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