diff --git a/macro/run/run_unpack_tsa.C b/macro/run/run_unpack_tsa.C index a3feefa1b2e307c0411ca85b470f59cdab242539..afe3c100314468967e4a676c92a44adc090e4224 100644 --- a/macro/run/run_unpack_tsa.C +++ b/macro/run/run_unpack_tsa.C @@ -38,7 +38,7 @@ std::string defaultSetupName = "mcbm_beam_2021_07_surveyed"; void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid = 0, std::string setupName = defaultSetupName, std::int32_t nevents = -1, bool bBmoninTof = false, - std::string outpath = "data/") + std::string outpath = "data/", bool bIgnoreOverlapMs = true) { // ======================================================================== @@ -490,6 +490,15 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid // Enable full time sorting instead sorting per FLIM link unpack->SetTimeSorting(true); + if (bmonconfig) bmonconfig->SetDoIgnoreOverlappMs(bIgnoreOverlapMs); + if (stsconfig) stsconfig->SetDoIgnoreOverlappMs(bIgnoreOverlapMs); + if (muchconfig) muchconfig->SetDoIgnoreOverlappMs(bIgnoreOverlapMs); + if (trd1Dconfig) trd1Dconfig->SetDoIgnoreOverlappMs(bIgnoreOverlapMs); + if (trdfasp2dconfig) trdfasp2dconfig->SetDoIgnoreOverlappMs(bIgnoreOverlapMs); + if (tofconfig) tofconfig->SetDoIgnoreOverlappMs(bIgnoreOverlapMs); + if (richconfig) richconfig->SetDoIgnoreOverlappMs(bIgnoreOverlapMs); + if (psdconfig) psdconfig->SetDoIgnoreOverlappMs(bIgnoreOverlapMs); + if (bmonconfig) unpack->SetUnpackConfig(bmonconfig); if (stsconfig) unpack->SetUnpackConfig(stsconfig); if (muchconfig) unpack->SetUnpackConfig(muchconfig); @@ -787,8 +796,9 @@ std::shared_ptr<CbmTofUnpackMonitor> GetTofMonitor(std::string treefilename, boo } void run_unpack_tsa(std::string infile = "test.tsa", UInt_t runid = 0, std::string setupName = defaultSetupName, - std::int32_t nevents = -1, bool bBmoninTof = false, std::string outpath = "data/") + std::int32_t nevents = -1, bool bBmoninTof = false, std::string outpath = "data/", + bool bIgnoreOverlapMs = true) { std::vector<std::string> vInFile = {infile}; - return run_unpack_tsa(vInFile, runid, setupName, nevents, bBmoninTof, outpath); + return run_unpack_tsa(vInFile, runid, setupName, nevents, bBmoninTof, outpath, bIgnoreOverlapMs); } diff --git a/reco/base/CbmRecoUnpackAlgo.tmpl b/reco/base/CbmRecoUnpackAlgo.tmpl index 83c69c3f12bebbb9f88fe8724096a17488a5a2a4..f87f534bd0244252edaa13477b199dfe4e3697a3 100644 --- a/reco/base/CbmRecoUnpackAlgo.tmpl +++ b/reco/base/CbmRecoUnpackAlgo.tmpl @@ -428,7 +428,9 @@ public: // Set further parameters required by the explicit algorithm setDerivedTsParameters(itimeslice); + auto nrMsToLoop = fDoIgnoreOverlappMs ? fNrCoreMsPerTs : fNrMsPerTs; + LOG(debug)<< fName <<"::Unpack: nb MS used is " << nrMsToLoop; /// Loop over choosen microslices (all or core only) for (UInt_t imslice = 0; imslice < nrMsToLoop; imslice++) { diff --git a/reco/detectors/bmon/unpack/CbmBmonUnpackAlgo.h b/reco/detectors/bmon/unpack/CbmBmonUnpackAlgo.h index 34652d9be7277cf62d85ca5258fd29f6954bb9ba..fde40e84f0efec0a41959c28798dad1a9f737b87 100644 --- a/reco/detectors/bmon/unpack/CbmBmonUnpackAlgo.h +++ b/reco/detectors/bmon/unpack/CbmBmonUnpackAlgo.h @@ -83,6 +83,7 @@ public: setDerivedTsParameters(itimeslice); auto nrMsToLoop = fDoIgnoreOverlappMs ? fNrCoreMsPerTs : fNrMsPerTs; + LOG(debug) << fName << "::Unpack: nb MS used is " << nrMsToLoop; /// Loop over choosen microslices (all or core only) for (UInt_t imslice = 0; imslice < nrMsToLoop; imslice++) { @@ -160,7 +161,11 @@ public: * * @param value */ - void SetDoIgnoreOverlappMs(bool value = false) { fTofAlgo.SetDoIgnoreOverlappMs(value); } + void SetDoIgnoreOverlappMs(bool value = false) + { + fDoIgnoreOverlappMs = value; + fTofAlgo.SetDoIgnoreOverlappMs(value); + } /** @brief Set the optional output A vector @param vec */ void SetOptOutAVec(std::vector<CbmErrorMessage>* vec) { fTofAlgo.SetOptOutAVec(vec); } diff --git a/reco/detectors/trd/unpack/CbmTrdUnpackConfig.cxx b/reco/detectors/trd/unpack/CbmTrdUnpackConfig.cxx index 6bd5659913b8e5aecf8708acaf4839b2a80fa100..8b74e08ca7e921839694c12858bffabcf155b22d 100644 --- a/reco/detectors/trd/unpack/CbmTrdUnpackConfig.cxx +++ b/reco/detectors/trd/unpack/CbmTrdUnpackConfig.cxx @@ -46,6 +46,10 @@ void CbmTrdUnpackConfig::SetAlgo() if (fDoLog) LOG(info) << fName << "::SetAlgo - SetSystemTimeOffset"; algo->SetSystemTimeOffset(fSystemTimeOffset); + // Set the flag controlling the overlap ignore + if (fDoLog) LOG(info) << fName << "::SetAlgo - SetDoIgnoreOverlappMs"; + algo->SetDoIgnoreOverlappMs(fDoIgnoreOverlappMs); + // Set the global system time offset if (fDoLog) LOG(info) << fName << "::SetAlgo - SetElinkTimeOffsetMap"; algo->SetElinkTimeOffsetMap(fElinkTimeOffsetMap);