diff --git a/macro/beamtime/mcbm2022/mcbm_digievent_reco.C b/macro/beamtime/mcbm2022/mcbm_digievent_reco.C index 1fd5200de6d032790c27616ac10d1b8e1b6ad6b2..b404b52458e8922b79043567e08a756f06aebe22 100644 --- a/macro/beamtime/mcbm2022/mcbm_digievent_reco.C +++ b/macro/beamtime/mcbm2022/mcbm_digievent_reco.C @@ -474,7 +474,6 @@ Bool_t mcbm_digievent_reco(UInt_t uRunId = 2365, run->AddTask(kalman); CbmL1* l1 = new CbmL1(); - l1->SetLegacyEventMode(1); l1->SetMcbmMode(); // if (strcmp(geoSetupTag.data(), "mcbm_beam_2021_07_surveyed") == 0) l1->SetMissingHits(1); diff --git a/macro/beamtime/mcbm2022/mcbm_event_reco.C b/macro/beamtime/mcbm2022/mcbm_event_reco.C index 547cdd856356772f33e4051fcfcd87b1908e6413..bc684474d85e6000904614a0ccd5900d56a4b496 100644 --- a/macro/beamtime/mcbm2022/mcbm_event_reco.C +++ b/macro/beamtime/mcbm2022/mcbm_event_reco.C @@ -850,7 +850,6 @@ Bool_t mcbm_event_reco(UInt_t uRunId = 2391, run->AddTask(kalman); CbmL1* l1 = new CbmL1(); - l1->SetLegacyEventMode(1); l1->SetMcbmMode(); // --- Material budget file names diff --git a/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C b/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C index 4d90c4acc73666feb8411a008fe6e08096e06eae..169b1fd751526cd223fbc4cd23771873b294a71d 100644 --- a/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C +++ b/macro/beamtime/mcbm2022/mcbm_event_reco_L1.C @@ -560,7 +560,6 @@ Bool_t mcbm_event_reco_L1(UInt_t uRunId = 2391, run->AddTask(kalman); CbmL1* l1 = new CbmL1(); - l1->SetLegacyEventMode(1); l1->SetMcbmMode(); // if (strcmp(geoSetupTag.data(), "mcbm_beam_2021_07_surveyed") == 0) l1->SetMissingHits(1); diff --git a/macro/beamtime/mcbm2022/mcbm_reco.C b/macro/beamtime/mcbm2022/mcbm_reco.C index 81b2303318f93a59b09b81a48ba809dbfc3a465a..4f128847f65c1ec691b858c73b5bc6bcd2e44bc5 100644 --- a/macro/beamtime/mcbm2022/mcbm_reco.C +++ b/macro/beamtime/mcbm2022/mcbm_reco.C @@ -197,6 +197,10 @@ Bool_t mcbm_reco(UInt_t uRunId = 2391, // ----- FairRunAna --------------------------------------------------- FairRunAna* run = new FairRunAna(); FairFileSource* inputSource = new FairFileSource(inFile); + if ("" != sUnpFile) { + LOG(info) << "Adding unpacked digis file to input: " << sUnpFile; + inputSource->AddFriend(sUnpFile); + } run->SetSource(inputSource); FairRootFileSink* outputSink = new FairRootFileSink(outFile); @@ -267,7 +271,6 @@ Bool_t mcbm_reco(UInt_t uRunId = 2391, << "\n Exiting"; return kFALSE; } - inputSource->AddFriend(sUnpFile); } // ------------------------------------------------------------------------ @@ -478,13 +481,18 @@ Bool_t mcbm_reco(UInt_t uRunId = 2391, // === L1 === // ========================================================================= if (bL1) { + if ("" == sUnpFile) { + LOG(error) << "To run with L1, an unpack file full name also has to be provided to get a CbmTimeSlice object." + << "\n Exiting"; + return kFALSE; + } + run->AddTask(new CbmTrackingDetectorInterfaceInit()); CbmKF* kalman = new CbmKF(); run->AddTask(kalman); CbmL1* l1 = new CbmL1("L1", 0); // <= Disable verbose mode - l1->SetLegacyEventMode(1); l1->SetMcbmMode(); // if (strcmp(geoSetupTag.data(), "mcbm_beam_2021_07_surveyed") == 0) l1->SetMissingHits(1); diff --git a/reco/steer/CbmRecoUnpack.cxx b/reco/steer/CbmRecoUnpack.cxx index d913b4652ef94da1d0747da34cd43fab6f92215e..b62a7e6daaafa59c5f726da788525a753dcfc609 100644 --- a/reco/steer/CbmRecoUnpack.cxx +++ b/reco/steer/CbmRecoUnpack.cxx @@ -11,6 +11,7 @@ #include "CbmRecoUnpack.h" #include "CbmRecoUnpackConfig.tmpl" +#include "CbmTimeSlice.h" #include "CbmTrdDigi.h" #include "CbmTsEventHeader.h" @@ -71,6 +72,9 @@ Bool_t CbmRecoUnpack::Init() << "CbmRecoUnpack::Init() no CbmTsEventHeader was added to the run. Without it, we can not store the UTC of the " "Timeslices correctly. Hence, this causes a fatal. Please add it in the steering macro to the Run."; + fTimeSlice = new CbmTimeSlice(0., 1.28e8 + 1.28e6); // FIXME: hardcoded TS length + overlap of mCBM 2022 becnhmark + ioman->Register("TimeSlice.", "DAQ", fTimeSlice, kTRUE); + // --- Psd if (fPsdConfig) { fPsdConfig->InitOutput(); @@ -362,6 +366,7 @@ void CbmRecoUnpack::Reset() { // Reset the event header for a new timeslice fCbmTsEventHeader->Reset(); + fTimeSlice->Reset(0., 1.28e8 + 1.28e6); // FIXME: hardcoded TS length + overlap of mCBM 2022 becnhmark // Reset the unpackers for a new timeslice, e.g. clear the output vectors @@ -399,6 +404,8 @@ void CbmRecoUnpack::Unpack(unique_ptr<Timeslice> ts) fCbmTsEventHeader->SetTsIndex(ts->index()); fCbmTsEventHeader->SetTsStartTime(ts->start_time()); + fTimeSlice->SetStartTime(ts->start_time()); + uint64_t nComponents = ts->num_components(); // if (fDoDebugPrints) LOG(info) << "Unpack: TS index " << ts->index() << " components " << nComponents; LOG(info) << "Unpack: TS index " << ts->index() << " components " << nComponents; diff --git a/reco/steer/CbmRecoUnpack.h b/reco/steer/CbmRecoUnpack.h index a49798972ec932e9de3575b7e0b8d910cefbdacf..1bf685058677d1a4ac5a8f7bbc6e9bb401457d42 100644 --- a/reco/steer/CbmRecoUnpack.h +++ b/reco/steer/CbmRecoUnpack.h @@ -41,6 +41,7 @@ #include <utility> #include <vector> +class CbmTimeSlice; class TH1; class TStopwatch; @@ -403,6 +404,9 @@ private: } // ---------------------------------------------------------------------------- + /** @brief CbmTimeslice object, mostly redundant with the TsEventHeader, needed by L1 to switch timeslice mode **/ + CbmTimeSlice* fTimeSlice; //! Current time slice + /** @brief Configuration of the Much unpacker. Provides the configured algorithm */ std::shared_ptr<CbmMuchUnpackConfig> fMuchConfig = nullptr; //!