From f6823b198b826508545b52a94c2397ec964fffe7 Mon Sep 17 00:00:00 2001 From: Fredrik Date: Sat, 27 May 2023 16:58:19 +0200 Subject: [PATCH] Update the Totem T2 mapping, data format, and DQM functionality, from PR #41785 --- .../python/totemT2DAQMapping_cff.py | 12 +- .../xml/mapping_totem_nt2_2023_final.xml | 103 ++++++++++++++++++ DQM/CTPPS/plugins/TotemT2DQMSource.cc | 84 +++++++++++--- DQM/CTPPS/python/ctppsDQM_cff.py | 3 + DQM/CTPPS/python/totemT2DQMSource_cfi.py | 2 +- DQM/CTPPS/test/totemt2_dqm_test_cfg.py | 6 +- DQM/CTPPS/test/totemt2_dqm_test_common_cfg.py | 75 +++++++++++++ DQM/CTPPS/test/totemt2_dqm_test_nino_cfg.py | 80 ++++++++++++++ DataFormats/TotemReco/interface/TotemT2Digi.h | 5 +- DataFormats/TotemReco/src/TotemT2Digi.cc | 4 +- DataFormats/TotemReco/src/classes_def.xml | 3 +- .../interface/RawToDigiConverter.h | 27 +++-- .../interface/TotemT2VFATFrame.h | 5 + .../CTPPSRawToDigi/interface/VFATFrame.h | 11 ++ .../python/ctppsRawToDigi_cff.py | 16 ++- .../CTPPSRawToDigi/python/totemT2Digis_cfi.py | 10 +- .../python/totemTimingRawToDigi_cfi.py | 33 +++--- .../python/totemVFATRawToDigi_cfi.py | 13 ++- .../CTPPSRawToDigi/src/RawDataUnpacker.cc | 1 + .../CTPPSRawToDigi/src/RawToDigiConverter.cc | 32 ++++-- EventFilter/CTPPSRawToDigi/src/VFATFrame.cc | 46 ++++++++ .../python/RecoCTPPS_EventContent_cff.py | 6 + RecoPPS/Configuration/python/recoCTPPS_cff.py | 2 + .../python/totemT2LocalReconstruction_cff.py | 13 +++ RecoPPS/Local/test/totemT2NewDigi_reco_cfg.py | 14 +-- 25 files changed, 522 insertions(+), 84 deletions(-) create mode 100644 CondFormats/PPSObjects/xml/mapping_totem_nt2_2023_final.xml create mode 100644 DQM/CTPPS/test/totemt2_dqm_test_common_cfg.py create mode 100644 DQM/CTPPS/test/totemt2_dqm_test_nino_cfg.py create mode 100644 RecoPPS/Local/python/totemT2LocalReconstruction_cff.py diff --git a/CalibPPS/ESProducers/python/totemT2DAQMapping_cff.py b/CalibPPS/ESProducers/python/totemT2DAQMapping_cff.py index c7ff2e5fd1a33..87af872c0367e 100644 --- a/CalibPPS/ESProducers/python/totemT2DAQMapping_cff.py +++ b/CalibPPS/ESProducers/python/totemT2DAQMapping_cff.py @@ -4,7 +4,7 @@ totemDAQMappingESSourceXML = _xml.clone( subSystem = "TotemT2", - multipleChannelsPerPayload = cms.untracked.bool(False), + multipleChannelsPerPayload = cms.untracked.bool(True), configuration = cms.VPSet( #initial dummy diamond map copy cms.PSet( @@ -12,11 +12,17 @@ mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_totem_nt2_2021.xml"), maskFileNames = cms.vstring() ), - #T2 firmware test files + #old v2.1 T2 firmware test file cms.PSet( - validityRange = cms.EventRange("364983:min - 999999999:max"), + validityRange = cms.EventRange("364983:min - 368022:max"), mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_totem_nt2_2023.xml"), maskFileNames = cms.vstring() + ), + #final T2 mapping test files + cms.PSet( + validityRange = cms.EventRange("368023:min - 999999999:max"), + mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_totem_nt2_2023_final.xml"), + maskFileNames = cms.vstring() ) ), sampicSubDetId = cms.uint32(6), diff --git a/CondFormats/PPSObjects/xml/mapping_totem_nt2_2023_final.xml b/CondFormats/PPSObjects/xml/mapping_totem_nt2_2023_final.xml new file mode 100644 index 0000000000000..64a6a4367f85f --- /dev/null +++ b/CondFormats/PPSObjects/xml/mapping_totem_nt2_2023_final.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DQM/CTPPS/plugins/TotemT2DQMSource.cc b/DQM/CTPPS/plugins/TotemT2DQMSource.cc index a76e4d2728e71..89027e82f585a 100644 --- a/DQM/CTPPS/plugins/TotemT2DQMSource.cc +++ b/DQM/CTPPS/plugins/TotemT2DQMSource.cc @@ -44,9 +44,10 @@ class TotemT2DQMSource : public DQMEDAnalyzer { void clearTriggerBitset(); bool areChannelsTriggered(const TotemT2DetId&); void bookErrorFlagsHistogram(DQMStore::IBooker&); - void fillErrorFlagsHistogram(const TotemT2Digi&); + void fillErrorFlagsHistogram(const TotemT2Digi&, const TotemT2DetId&); void fillEdges(const TotemT2Digi&, const TotemT2DetId&); void fillToT(const TotemT2RecHit&, const TotemT2DetId&); + void fillFlags(const TotemT2Digi&, const TotemT2DetId&); const edm::ESGetToken geometryToken_; const edm::EDGetTokenT> digiToken_; @@ -55,7 +56,9 @@ class TotemT2DQMSource : public DQMEDAnalyzer { std::unique_ptr segm_; static constexpr double T2_BIN_WIDTH_NS_ = 25. / 4; - MonitorElement* HPTDCErrorFlags_2D_ = nullptr; + MonitorElement* totemT2ErrorFlags_2D_ = nullptr; + + enum evFlag{t2TE=0, t2LE, t2MT, t2ML}; const unsigned int nbinsx_, nbinsy_; const unsigned int windowsNum_; @@ -68,7 +71,7 @@ class TotemT2DQMSource : public DQMEDAnalyzer { std::bitset<(TotemT2DetId::maxPlane + 1) * (TotemT2DetId::maxChannel + 1)> hitTilesArray; static const unsigned int MINIMAL_TRIGGER = 3; - MonitorElement *leadingEdge = nullptr, *trailingEdge = nullptr, *timeOverTreshold = nullptr; + MonitorElement *leadingEdge = nullptr, *trailingEdge = nullptr, *timeOverTreshold = nullptr, *eventFlags = nullptr; SectorPlots() = default; SectorPlots( @@ -78,6 +81,7 @@ class TotemT2DQMSource : public DQMEDAnalyzer { struct PlanePlots { MonitorElement* digisMultiplicity = nullptr; MonitorElement* rechitMultiplicity = nullptr; + MonitorElement* eventFlagsPl = nullptr; PlanePlots() = default; PlanePlots(DQMStore::IBooker& ibooker, unsigned int id, unsigned int nbinsx, unsigned int nbinsy); @@ -86,6 +90,7 @@ class TotemT2DQMSource : public DQMEDAnalyzer { MonitorElement* leadingEdgeCh = nullptr; MonitorElement* trailingEdgeCh = nullptr; MonitorElement* timeOverTresholdCh = nullptr; + MonitorElement* eventFlagsCh = nullptr; ChannelPlots() = default; ChannelPlots(DQMStore::IBooker& ibooker, unsigned int id, unsigned int windowsNum); @@ -124,7 +129,14 @@ TotemT2DQMSource::SectorPlots::SectorPlots( "trailing edge", title + " trailing edge (DIGIs); trailing edge (ns)", 25 * windowsNum, 0, 25 * windowsNum); timeOverTreshold = ibooker.book1D( - "time over threshold", title + " time over threshold (rechit);time over threshold (ns)", 250, -25, 100); + "time over threshold", title + " time over threshold (rechit);time over threshold (ns)", 500, -50, 200); + + eventFlags = ibooker.book1D( + "event flags", title + " event flags (digi);Event flags (TE/LE valid, TE/LE multiple)", 4, -0.5, 3.5); + + for (unsigned short flag_index = 1; flag_index <= 4; ++flag_index) + eventFlags->setBinLabel(flag_index, "Flag " + std::to_string(flag_index)); + } TotemT2DQMSource::PlanePlots::PlanePlots(DQMStore::IBooker& ibooker, @@ -152,6 +164,12 @@ TotemT2DQMSource::PlanePlots::PlanePlots(DQMStore::IBooker& ibooker, nbinsy, -0.5, double(nbinsy) - 0.5); + + eventFlagsPl = ibooker.book1D( + "event flags", title + " event flags (digi);Event flags (TE/LE valid, TE/LE multiple)", 4, -0.5, 3.5); + + for (unsigned short flag_index = 1; flag_index <= 4; ++flag_index) + eventFlagsPl->setBinLabel(flag_index, "Flag " + std::to_string(flag_index)); } TotemT2DQMSource::ChannelPlots::ChannelPlots(DQMStore::IBooker& ibooker, unsigned int id, unsigned int windowsNum) { @@ -166,7 +184,13 @@ TotemT2DQMSource::ChannelPlots::ChannelPlots(DQMStore::IBooker& ibooker, unsigne "trailing edge", title + " trailing edge (DIGIs); trailing edge (ns)", 25 * windowsNum, 0, 25 * windowsNum); timeOverTresholdCh = ibooker.book1D( - "time over threshold", title + " time over threshold (rechit);time over threshold (ns)", 250, -25, 100); + "time over threshold", title + " time over threshold (rechit);time over threshold (ns)", 500, -50, 200); + + eventFlagsCh = ibooker.book1D( + "event flags", title + " event flags (digi);Event flags (TE/LE valid, TE/LE multiple)", 4, -0.5, 3.5); + + for (unsigned short flag_index = 1; flag_index <= 4; ++flag_index) + eventFlagsCh->setBinLabel(flag_index, "Flag " + std::to_string(flag_index)); } TotemT2DQMSource::TotemT2DQMSource(const edm::ParameterSet& iConfig) @@ -212,8 +236,9 @@ void TotemT2DQMSource::analyze(const edm::Event& iEvent, const edm::EventSetup& for (const auto& digi : ds_digis) { segm_->fill(planePlots_[planeId].digisMultiplicity->getTH2D(), detid); fillTriggerBitset(detid); - fillErrorFlagsHistogram(digi); + fillErrorFlagsHistogram(digi, detid); fillEdges(digi, detid); + fillFlags(digi, detid); } } @@ -285,18 +310,21 @@ bool TotemT2DQMSource::areChannelsTriggered(const TotemT2DetId& detid) { } void TotemT2DQMSource::bookErrorFlagsHistogram(DQMStore::IBooker& ibooker) { - HPTDCErrorFlags_2D_ = ibooker.book2D("HPTDC Errors", " HPTDC Errors?", 8, -0.5, 7.5, 2, -0.5, 1.5); - for (unsigned short error_index = 1; error_index <= 8; ++error_index) - HPTDCErrorFlags_2D_->setBinLabel(error_index, "Flag " + std::to_string(error_index)); + totemT2ErrorFlags_2D_ = ibooker.book2D("nt2 readout flags", " nt2 readout flags", 4, -0.5, 3.5, 2, -0.5, 1.5); + for (unsigned short error_index = 1; error_index <= 4; ++error_index) + totemT2ErrorFlags_2D_->setBinLabel(error_index, "Flag " + std::to_string(error_index)); int tmpIndex = 0; - HPTDCErrorFlags_2D_->setBinLabel(++tmpIndex, "some id 0", /* axis */ 2); - HPTDCErrorFlags_2D_->setBinLabel(++tmpIndex, "some id 1", /* axis */ 2); + totemT2ErrorFlags_2D_->setBinLabel(++tmpIndex, "arm 4-5", /* axis */ 2); + totemT2ErrorFlags_2D_->setBinLabel(++tmpIndex, "arm 5-6", /* axis */ 2); } -void TotemT2DQMSource::fillErrorFlagsHistogram(const TotemT2Digi& digi) { - // placeholder for error hitogram filling - (void)digi; +void TotemT2DQMSource::fillErrorFlagsHistogram(const TotemT2Digi& digi, const TotemT2DetId& detid) { + // readout flags histogram filling + for (unsigned int i = 0; i < 4; i++) { + if (digi.getStatus() & (1 << i)) + totemT2ErrorFlags_2D_->Fill(i+0.0,detid.arm()+0.0); + } } void TotemT2DQMSource::fillEdges(const TotemT2Digi& digi, const TotemT2DetId& detid) { @@ -313,4 +341,32 @@ void TotemT2DQMSource::fillToT(const TotemT2RecHit& rechit, const TotemT2DetId& channelPlots_[detid].timeOverTresholdCh->Fill(rechit.toT()); } +void TotemT2DQMSource::fillFlags(const TotemT2Digi& digi, const TotemT2DetId& detid) { + const TotemT2DetId secId(detid.armId()); + const TotemT2DetId planeId(detid.planeId()); + if (digi.hasTE()) { + sectorPlots_[secId].eventFlags->Fill(t2TE+0.0); + planePlots_[planeId].eventFlagsPl->Fill(t2TE+0.0); + channelPlots_[detid].eventFlagsCh->Fill(t2TE+0.0); + } + + if (digi.hasLE()) { + sectorPlots_[secId].eventFlags->Fill(t2LE+0.0); + planePlots_[planeId].eventFlagsPl->Fill(t2LE+0.0); + channelPlots_[detid].eventFlagsCh->Fill(t2LE+0.0); + } + + if (digi.hasManyTE()) { + sectorPlots_[secId].eventFlags->Fill(t2MT+0.0); + planePlots_[planeId].eventFlagsPl->Fill(t2MT+0.0); + channelPlots_[detid].eventFlagsCh->Fill(t2MT+0.0); + } + + if (digi.hasManyLE()) { + sectorPlots_[secId].eventFlags->Fill(t2ML+0.0); + planePlots_[planeId].eventFlagsPl->Fill(t2ML+0.0); + channelPlots_[detid].eventFlagsCh->Fill(t2ML+0.0); + } +} + DEFINE_FWK_MODULE(TotemT2DQMSource); diff --git a/DQM/CTPPS/python/ctppsDQM_cff.py b/DQM/CTPPS/python/ctppsDQM_cff.py index 58c83de4ba182..a3c1898a1f32c 100644 --- a/DQM/CTPPS/python/ctppsDQM_cff.py +++ b/DQM/CTPPS/python/ctppsDQM_cff.py @@ -11,6 +11,8 @@ from DQM.CTPPS.totemTimingDQMSource_cfi import * +from DQM.CTPPS.totemT2DQMSource_cfi import * + from DQM.CTPPS.ctppsPixelDQMSource_cfi import * from DQM.CTPPS.elasticPlotDQMSource_cfi import * @@ -42,6 +44,7 @@ + diamondSampicDQMSourceOnline + ctppsCommonDQMSourceOnline + elasticPlotDQMSource + + totemT2DQMSource ) _ctppsDQMCalibrationHarvest = cms.Sequence( diff --git a/DQM/CTPPS/python/totemT2DQMSource_cfi.py b/DQM/CTPPS/python/totemT2DQMSource_cfi.py index 001b9c7d509bb..952c472e9738d 100644 --- a/DQM/CTPPS/python/totemT2DQMSource_cfi.py +++ b/DQM/CTPPS/python/totemT2DQMSource_cfi.py @@ -6,7 +6,7 @@ rechitsTag = cms.InputTag('totemT2RecHits'), nbinsx = cms.uint32(25), nbinsy = cms.uint32(25), - windowsNum = cms.uint32(4), + windowsNum = cms.uint32(8), perLSsaving = cms.untracked.bool(False), #driven by DQMServices/Core/python/DQMStore_cfi.py ) diff --git a/DQM/CTPPS/test/totemt2_dqm_test_cfg.py b/DQM/CTPPS/test/totemt2_dqm_test_cfg.py index ac80aea04182a..dc08bf5c6d030 100644 --- a/DQM/CTPPS/test/totemt2_dqm_test_cfg.py +++ b/DQM/CTPPS/test/totemt2_dqm_test_cfg.py @@ -50,9 +50,9 @@ process.totemDAQMappingESSourceXML_TotemT2.verbosity = 0 process.totemT2Digis.RawUnpacking.verbosity = 0 process.totemT2Digis.RawToDigi.verbosity = 0 -process.totemT2Digis.RawToDigi.useOlderT2TestFile = cms.untracked.uint32(1) -process.totemT2Digis.RawToDigi.printUnknownFrameSummary = 0 -process.totemT2Digis.RawToDigi.printErrorSummary = 0 +process.totemT2Digis.RawToDigi.useOlderT2TestFile = True +process.totemT2Digis.RawToDigi.printUnknownFrameSummary = False +process.totemT2Digis.RawToDigi.printErrorSummary = False process.totemDAQMappingESSourceXML_TotemT2.multipleChannelsPerPayload = True process.path = cms.Path( diff --git a/DQM/CTPPS/test/totemt2_dqm_test_common_cfg.py b/DQM/CTPPS/test/totemt2_dqm_test_common_cfg.py new file mode 100644 index 0000000000000..66af8d76dd40e --- /dev/null +++ b/DQM/CTPPS/test/totemt2_dqm_test_common_cfg.py @@ -0,0 +1,75 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Run3_cff import Run3 + +# needed to have ctppsDQMCalibrationSource properly working +from Configuration.Eras.Modifier_ctpps_cff import ctpps + +process = cms.Process('RECODQM', Run3) + +# minimum of logs +process.MessageLogger = cms.Service("MessageLogger", + statistics = cms.untracked.vstring(), + destinations = cms.untracked.vstring('cerr'), + cerr = cms.untracked.PSet( + threshold = cms.untracked.string('WARNING') + ) +) + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +# load DQM framework +process.load("DQM.Integration.config.environment_cfi") +process.dqmEnv.subSystemFolder = "CTPPS" +process.dqmEnv.eventInfoFolder = "EventInfo" +process.dqmSaver.path = "" +process.dqmSaver.tag = "CTPPS" + +# raw data source +#alignment run without T2, TimingDiamond and TrackingStrip not affected by PR changes +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring( + '/store/data/Run2023A/HLTPhysics/RAW/v1/000/366/192/00000/f277ee80-e88b-41e8-b1ba-6c18af119fbc.root' + ) +) + + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(8000) +) + +# raw-to-digi conversion +process.load("EventFilter.CTPPSRawToDigi.ctppsRawToDigi_cff") + +# global tag - conditions for P5 cluster +process.load("DQM.Integration.config.FrontierCondition_GT_cfi") + +#from Configuration.AlCa.GlobalTag import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, '130X_dataRun3_HLT_v2', '') + +# local T2 reconstruction chain with standard settings +process.load("RecoPPS.Configuration.recoCTPPS_cff") + +# CTPPS DQM modules +process.load("DQM.CTPPS.ctppsDQM_cff") + +process.path = cms.Path( + process.ctppsRawToDigi * + process.recoCTPPS * + process.ctppsDQMCalibrationSource * + process.ctppsDQMCalibrationHarvest +) + +process.end_path = cms.EndPath( + process.dqmEnv + + process.dqmSaver +) + +process.schedule = cms.Schedule( + process.path, + process.end_path +) diff --git a/DQM/CTPPS/test/totemt2_dqm_test_nino_cfg.py b/DQM/CTPPS/test/totemt2_dqm_test_nino_cfg.py new file mode 100644 index 0000000000000..c2f7c8379353a --- /dev/null +++ b/DQM/CTPPS/test/totemt2_dqm_test_nino_cfg.py @@ -0,0 +1,80 @@ +import FWCore.ParameterSet.Config as cms +import string + +from Configuration.Eras.Era_Run3_cff import Run3 + +process = cms.Process('RECODQM', Run3) + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(6000) ) +process.verbosity = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +# minimum of logs +process.MessageLogger = cms.Service("MessageLogger", + statistics = cms.untracked.vstring(), + destinations = cms.untracked.vstring('cerr'), + cerr = cms.untracked.PSet( + threshold = cms.untracked.string('WARNING') + ) +) + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +# load DQM framework +process.load("DQM.Integration.config.environment_cfi") +process.dqmEnv.subSystemFolder = "CTPPS" +process.dqmEnv.eventInfoFolder = "EventInfo" +process.dqmSaver.path = "" +process.dqmSaver.tag = "CTPPS" +# raw data source +process.source = cms.Source("NewEventStreamFileReader", + fileNames = cms.untracked.vstring( +# '/store/t0streamer/Minidaq/A/000/368/023/run368023_ls0001_streamA_StorageManager.dat', + 'file:/eos/cms/store/t0streamer/Minidaq/A/000/368/080/run368080_ls0001_streamA_StorageManager.dat', + 'file:/eos/cms/store/t0streamer/Minidaq/A/000/368/080/run368080_ls0002_streamA_StorageManager.dat', +# '/store/t0streamer/Minidaq/A/000/368/081/run368081_ls0001_streamA_StorageManager.dat', +# '/store/t0streamer/Minidaq/A/000/368/081/run368081_ls0002_streamA_StorageManager.dat', +# '/store/t0streamer/Minidaq/A/000/368/082/run368082_ls0001_streamA_StorageManager.dat', +# '/store/t0streamer/Minidaq/A/000/368/082/run368082_ls0002_streamA_StorageManager.dat', +# '/store/group/dpg_ctpps/comm_ctpps/TotemT2/RecoTest/run364983_ls0001_streamA_StorageManager.dat', + ) +) + +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, '130X_dataRun3_HLT_v2', '') + +#Raw-to-digi +process.load('EventFilter.CTPPSRawToDigi.ctppsRawToDigi_cff') + +# local RP reconstruction chain with standard settings +process.load("RecoPPS.Configuration.recoCTPPS_cff") + +# CTPPS DQM modules +process.load("DQM.CTPPS.ctppsDQM_cff") +process.totemDAQMappingESSourceXML_TotemT2.verbosity = 0 +process.totemT2Digis.RawUnpacking.verbosity = 0 +process.totemT2Digis.RawToDigi.verbosity = 0 +process.totemT2Digis.RawToDigi.testCRC = 1 +process.totemT2Digis.RawToDigi.useOlderT2TestFile = False +process.totemT2Digis.RawToDigi.printUnknownFrameSummary = True +process.totemT2Digis.RawToDigi.printErrorSummary = True + +process.path = cms.Path( + process.ctppsRawToDigi * + process.totemT2Digis * + process.totemT2RecHits * + process.totemT2DQMSource +) + +process.end_path = cms.EndPath( + process.dqmEnv + + process.dqmSaver +) + +process.schedule = cms.Schedule( + process.path, + process.end_path +) diff --git a/DataFormats/TotemReco/interface/TotemT2Digi.h b/DataFormats/TotemReco/interface/TotemT2Digi.h index 2a5450c08446a..23eeb788eee87 100644 --- a/DataFormats/TotemReco/interface/TotemT2Digi.h +++ b/DataFormats/TotemReco/interface/TotemT2Digi.h @@ -12,12 +12,13 @@ class TotemT2Digi { public: TotemT2Digi() = default; - TotemT2Digi(unsigned short id, unsigned char marker, unsigned short le, unsigned short te); + TotemT2Digi(unsigned short id, unsigned char marker, unsigned short le, unsigned short te, unsigned char status); void setLeadingEdge(unsigned short le) { lead_edge_ = le; } unsigned short leadingEdge() const { return lead_edge_; } void setTrailingEdge(unsigned short te) { trail_edge_ = te; } unsigned short trailingEdge() const { return trail_edge_; } + unsigned char getStatus() const { return status_ & 0xF; } bool hasLE() const { return marker_ & 0x1; } bool hasTE() const { return marker_ & 0x2; } bool hasManyLE() const { return marker_ & 0x4; } @@ -32,6 +33,8 @@ class TotemT2Digi { unsigned short lead_edge_{0}; /// Trailing edge time unsigned short trail_edge_{0}; + /// Header status flags + unsigned char status_{0}; }; bool operator<(const TotemT2Digi& lhs, const TotemT2Digi& rhs); diff --git a/DataFormats/TotemReco/src/TotemT2Digi.cc b/DataFormats/TotemReco/src/TotemT2Digi.cc index 6d8e5cffd2efd..204d74cd716fa 100644 --- a/DataFormats/TotemReco/src/TotemT2Digi.cc +++ b/DataFormats/TotemReco/src/TotemT2Digi.cc @@ -1,7 +1,7 @@ #include "DataFormats/TotemReco/interface/TotemT2Digi.h" -TotemT2Digi::TotemT2Digi(unsigned short id, unsigned char marker, unsigned short le, unsigned short te) - : id_(id), marker_(marker), lead_edge_(le), trail_edge_(te) {} +TotemT2Digi::TotemT2Digi(unsigned short id, unsigned char marker, unsigned short le, unsigned short te, unsigned char status) + : id_(id), marker_(marker), lead_edge_(le), trail_edge_(te), status_(status) {} bool operator<(const TotemT2Digi& lhs, const TotemT2Digi& rhs) { if (lhs.leadingEdge() < rhs.leadingEdge()) diff --git a/DataFormats/TotemReco/src/classes_def.xml b/DataFormats/TotemReco/src/classes_def.xml index 7df18e6c92ba4..2f35479c49d5f 100644 --- a/DataFormats/TotemReco/src/classes_def.xml +++ b/DataFormats/TotemReco/src/classes_def.xml @@ -1,5 +1,6 @@ - + + diff --git a/EventFilter/CTPPSRawToDigi/interface/RawToDigiConverter.h b/EventFilter/CTPPSRawToDigi/interface/RawToDigiConverter.h index c1c8f3c1d5b0b..6738ac3f98d35 100644 --- a/EventFilter/CTPPSRawToDigi/interface/RawToDigiConverter.h +++ b/EventFilter/CTPPSRawToDigi/interface/RawToDigiConverter.h @@ -69,29 +69,28 @@ class RawToDigiConverter { TotemVFATStatus status; }; - unsigned char verbosity; + const unsigned char verbosity; - unsigned int olderTotemT2FileTest; //Test file with T2 frame ver 2.1 - - unsigned int printErrorSummary; - unsigned int printUnknownFrameSummary; + const bool printErrorSummary; + const bool printUnknownFrameSummary; enum TestFlag { tfNoTest, tfWarn, tfErr }; /// flags for which tests to run - unsigned int testFootprint; - unsigned int testCRC; - unsigned int testID; - unsigned int testECRaw; - unsigned int testECDAQ; - unsigned int testECMostFrequent; - unsigned int testBCMostFrequent; + const unsigned int testFootprint; + const unsigned int testCRC; + const unsigned int testID; + const unsigned int testECMostFrequent; + const unsigned int testBCMostFrequent; /// the minimal required number of frames to determine the most frequent counter value - unsigned int EC_min, BC_min; + const unsigned int EC_min, BC_min; /// the minimal required (relative) occupancy of the most frequent counter value to be accepted - double EC_fraction, BC_fraction; + const double EC_fraction, BC_fraction; + + //Test file with two 8-bit hwID fields + const bool olderTotemT2FileTest; /// error summaries std::map > errorSummary; diff --git a/EventFilter/CTPPSRawToDigi/interface/TotemT2VFATFrame.h b/EventFilter/CTPPSRawToDigi/interface/TotemT2VFATFrame.h index 84fa5ca984be8..505a03e5becb6 100644 --- a/EventFilter/CTPPSRawToDigi/interface/TotemT2VFATFrame.h +++ b/EventFilter/CTPPSRawToDigi/interface/TotemT2VFATFrame.h @@ -36,6 +36,11 @@ namespace totem::nt2::vfat { return frame.getData()[header_offset + 1 + num_words_per_channel * ch_id] & 0x1f; } + /// retrieve the header status flags + inline uint8_t statusMarker(const VFATFrame& frame) { + return (frame.getData()[header_offset - 1] >> 8)& 0xf; + } + /// retrieve the HW identifier for this channel, in firmware >2.1 inline uint16_t newChannelId(const VFATFrame& frame, size_t ch_id) { return frame.getData()[header_offset + 0 + num_words_per_channel * ch_id] & 0xffff; diff --git a/EventFilter/CTPPSRawToDigi/interface/VFATFrame.h b/EventFilter/CTPPSRawToDigi/interface/VFATFrame.h index 96decce9d1bf6..b17b256efd275 100644 --- a/EventFilter/CTPPSRawToDigi/interface/VFATFrame.h +++ b/EventFilter/CTPPSRawToDigi/interface/VFATFrame.h @@ -54,6 +54,9 @@ class VFATFrame { /// Returns the CRC. VFATFrame::word getCRC() const { return data[0]; } + /// Returns the CRC, for non-reversed TOTEM T2. + VFATFrame::word getCRCT2() const { return data[11]; } + /// Sets presence flags. void setPresenceFlags(uint8_t v) { presenceFlags = v; } @@ -85,11 +88,19 @@ class VFATFrame { /// Returns false if any of the groups (in BC, EC and ID words) is present but wrong. bool checkFootprint() const; + /// Checks the fixed bits in the frame, for the TOTEM T2 non-inverse word ordering. + /// Returns false if any of the groups (in BC, EC and ID words) is present but wrong. + bool checkFootprintT2() const; + /// Checks the validity of frame (CRC and daqErrorFlags). /// Returns false if daqErrorFlags is non-zero. /// Returns false if the CRC is present and invalid. virtual bool checkCRC() const; + /// Checks the validity of Totem T2 non-reversed CRC. + /// Returns false if the CRC is present and invalid. + virtual bool checkCRCT2() const; + /// Checks if channel number 'channel' was active. /// Returns positive number if it was active, 0 otherwise. virtual bool channelActive(unsigned char channel) const { diff --git a/EventFilter/CTPPSRawToDigi/python/ctppsRawToDigi_cff.py b/EventFilter/CTPPSRawToDigi/python/ctppsRawToDigi_cff.py index 1e5b35027f1ed..b521b5d697a3c 100644 --- a/EventFilter/CTPPSRawToDigi/python/ctppsRawToDigi_cff.py +++ b/EventFilter/CTPPSRawToDigi/python/ctppsRawToDigi_cff.py @@ -52,8 +52,8 @@ # various error/warning/info output may be enabled with these flags # totemRPRawToDigi.RawUnpacking.verbosity = 1 # totemRPRawToDigi.RawToDigi.verbosity = 1 # or higher number for more output -# totemRPRawToDigi.RawToDigi.printErrorSummary = 1 -# totemRPRawToDigi.RawToDigi.printUnknownFrameSummary = 1 +# totemRPRawToDigi.RawToDigi.printErrorSummary = True +# totemRPRawToDigi.RawToDigi.printUnknownFrameSummary = True # ---------- diamonds ---------- totemDAQMappingESSourceXML_TimingDiamond = cms.ESSource("TotemDAQMappingESSourceXML", @@ -102,7 +102,7 @@ ) from EventFilter.CTPPSRawToDigi.ctppsDiamondRawToDigi_cfi import ctppsDiamondRawToDigi -ctppsDiamondRawToDigi.rawDataTag = cms.InputTag("rawDataCollector") +ctppsDiamondRawToDigi.rawDataTag = "rawDataCollector" # ---------- Totem Timing ---------- totemDAQMappingESSourceXML_TotemTiming = cms.ESSource("TotemDAQMappingESSourceXML", @@ -132,16 +132,16 @@ ) from EventFilter.CTPPSRawToDigi.totemTimingRawToDigi_cfi import totemTimingRawToDigi -totemTimingRawToDigi.rawDataTag = cms.InputTag("rawDataCollector") +totemTimingRawToDigi.rawDataTag = "rawDataCollector" # ---------- Totem nT2 ---------- from CalibPPS.ESProducers.totemT2DAQMapping_cff import totemDAQMappingESSourceXML as totemDAQMappingESSourceXML_TotemT2 from EventFilter.CTPPSRawToDigi.totemT2Digis_cfi import totemT2Digis -totemT2Digis.rawDataTag = cms.InputTag("rawDataCollector") +totemT2Digis.rawDataTag = "rawDataCollector" # ---------- pixels ---------- from EventFilter.CTPPSRawToDigi.ctppsPixelDigis_cfi import ctppsPixelDigis -ctppsPixelDigis.inputLabel = cms.InputTag("rawDataCollector") +ctppsPixelDigis.inputLabel = "rawDataCollector" from Configuration.Eras.Modifier_ctpps_2016_cff import ctpps_2016 from Configuration.Eras.Modifier_ctpps_2017_cff import ctpps_2017 @@ -149,6 +149,10 @@ (ctpps_2016 | ctpps_2017 | ctpps_2018).toModify(ctppsPixelDigis, isRun3 = False ) (ctpps_2016 | ctpps_2017 | ctpps_2018).toModify(totemDAQMappingESSourceXML_TotemTiming, sampicSubDetId = 6) +# The Totem T2 mapping was expanded with a 2-channel unpacker in PR #41472, changing the xml format causing this module to not accept +# the 2021 dummy mapping copied from diamonds if this parameter is turned on +(ctpps_2016 | ctpps_2017 | ctpps_2018).toModify(totemDAQMappingESSourceXML_TotemT2, multipleChannelsPerPayload = False) + # raw-to-digi task and sequence ctppsRawToDigiTask = cms.Task( totemRPRawToDigi, diff --git a/EventFilter/CTPPSRawToDigi/python/totemT2Digis_cfi.py b/EventFilter/CTPPSRawToDigi/python/totemT2Digis_cfi.py index 58a085d5964b0..2ca895ad79791 100644 --- a/EventFilter/CTPPSRawToDigi/python/totemT2Digis_cfi.py +++ b/EventFilter/CTPPSRawToDigi/python/totemT2Digis_cfi.py @@ -3,10 +3,12 @@ from EventFilter.CTPPSRawToDigi.totemVFATRawToDigi_cfi import totemVFATRawToDigi totemT2Digis = totemVFATRawToDigi.clone( - subSystem = cms.string('TotemT2'), + subSystem = 'TotemT2', RawToDigi = totemVFATRawToDigi.RawToDigi.clone( - testID = cms.uint32(0), #Some ID mismatch in test sample - testCRC = cms.uint32(0), # no need to test CRC for diamond frames - testECMostFrequent = cms.uint32(0) # show error in the DQM and then DAQ is sending resync, no need to test in the unpacker + testID = 0, #Some ID mismatch in test sample + testCRC = 0, # no need to test CRC for diamond frames + testECMostFrequent = 0, # show error in the DQM and then DAQ is sending resync, no need to test in the unpacker + testBCMostFrequent = 0, # no need to test in the unpacker, footprint test is enough + useOlderT2TestFile = False # March '23 version with two 8-bit ID fields ) ) diff --git a/EventFilter/CTPPSRawToDigi/python/totemTimingRawToDigi_cfi.py b/EventFilter/CTPPSRawToDigi/python/totemTimingRawToDigi_cfi.py index 86a1457ad6fc0..6a08f1a3f7293 100644 --- a/EventFilter/CTPPSRawToDigi/python/totemTimingRawToDigi_cfi.py +++ b/EventFilter/CTPPSRawToDigi/python/totemTimingRawToDigi_cfi.py @@ -9,24 +9,27 @@ totemTimingRawToDigi = totemVFATRawToDigi.clone( subSystem = 'TotemTiming', - fedIds = cms.vuint32(586, 587), #as declared in DataFormats/FEDRawData/interface/FEDNumbering.h + fedIds = [586, 587], #as declared in DataFormats/FEDRawData/interface/FEDNumbering.h - RawToDigi = cms.PSet( - verbosity = cms.untracked.uint32(0), + RawToDigi = dict( + verbosity = 0, - # disable all the checks - testFootprint = cms.uint32(0), - testCRC = cms.uint32(0), - testID = cms.uint32(0), # compare the ID from data and mapping - testECMostFrequent = cms.uint32(0), # compare frame's EC with the most frequent value in the event - testBCMostFrequent = cms.uint32(0), # compare frame's BC with the most frequent value in the event - - # if non-zero, prints a per-VFAT error summary at the end of the job - printErrorSummary = cms.untracked.uint32(0), + # disable all the checks + testFootprint = 0, + testCRC = 0, + testID = 0, # compare the ID from data and mapping + testECMostFrequent = 0, # compare frame's EC with the most frequent value in the event + testBCMostFrequent = 0, # compare frame's BC with the most frequent value in the event + + # tracked parameter for Totem T2 + useOlderT2TestFile = False, + + # if true, prints a per-VFAT error summary at the end of the job + printErrorSummary = False, - # if non-zero, prints a summary of frames found in data, but not in the mapping - printUnknownFrameSummary = cms.untracked.uint32(0) - ) + # if true, prints a summary of frames found in data, but not in the mapping + printUnknownFrameSummary = False + ) ) # for Run 2 backward compatibility diff --git a/EventFilter/CTPPSRawToDigi/python/totemVFATRawToDigi_cfi.py b/EventFilter/CTPPSRawToDigi/python/totemVFATRawToDigi_cfi.py index c9f7ab11433f8..70a2e8321e255 100644 --- a/EventFilter/CTPPSRawToDigi/python/totemVFATRawToDigi_cfi.py +++ b/EventFilter/CTPPSRawToDigi/python/totemVFATRawToDigi_cfi.py @@ -38,11 +38,14 @@ # the most frequent counter value is accepted provided its relative occupancy is higher than this fraction EC_fraction = cms.untracked.double(0.6), BC_fraction = cms.untracked.double(0.6), + + # if true, tread hwID field as two separate 8-bit fields instead of one 16-bit + useOlderT2TestFile = cms.bool(False), + + # prints a per-VFAT error summary at the end of the job + printErrorSummary = cms.untracked.bool(False), - # if non-zero, prints a per-VFAT error summary at the end of the job - printErrorSummary = cms.untracked.uint32(0), - - # if non-zero, prints a summary of frames found in data, but not in the mapping - printUnknownFrameSummary = cms.untracked.uint32(0), + # prints a summary of frames found in data, but not in the mapping + printUnknownFrameSummary = cms.untracked.bool(False), ) ) diff --git a/EventFilter/CTPPSRawToDigi/src/RawDataUnpacker.cc b/EventFilter/CTPPSRawToDigi/src/RawDataUnpacker.cc index 12b2c794b6fc4..f8e6752f87a1f 100644 --- a/EventFilter/CTPPSRawToDigi/src/RawDataUnpacker.cc +++ b/EventFilter/CTPPSRawToDigi/src/RawDataUnpacker.cc @@ -459,6 +459,7 @@ int RawDataUnpacker::processOptoRxFrameSampic(const word *buf, // save frame to output frame.setPresenceFlags(1); if ((optoRxId >= FEDNumbering::MINTotemT2FEDID && optoRxId <= FEDNumbering::MAXTotemT2FEDID)) { + frame.setPresenceFlags(15); // check three VFAT signature digits, CRC present if (verbosity > 0) edm::LogWarning("Totem") << "T2 Frame Positions created: " << fp2a << "/" << fp2b << std::endl; diff --git a/EventFilter/CTPPSRawToDigi/src/RawToDigiConverter.cc b/EventFilter/CTPPSRawToDigi/src/RawToDigiConverter.cc index 4ed3dba9bb1e6..3eaa9f05799a8 100644 --- a/EventFilter/CTPPSRawToDigi/src/RawToDigiConverter.cc +++ b/EventFilter/CTPPSRawToDigi/src/RawToDigiConverter.cc @@ -25,9 +25,12 @@ using namespace edm; RawToDigiConverter::RawToDigiConverter(const edm::ParameterSet &conf) : verbosity(conf.getUntrackedParameter("verbosity", 0)), - olderTotemT2FileTest(conf.getUntrackedParameter("useOlderT2TestFile", 0)), - printErrorSummary(conf.getUntrackedParameter("printErrorSummary", 1)), - printUnknownFrameSummary(conf.getUntrackedParameter("printUnknownFrameSummary", 1)), + printErrorSummary(conf.existsAs("printErrorSummary", false) + ? conf.getUntrackedParameter("printErrorSummary") + : true), + printUnknownFrameSummary(conf.existsAs("printUnknownFrameSummary", false) + ? conf.getUntrackedParameter("printUnknownFrameSummary") + : true), testFootprint(conf.getParameter("testFootprint")), testCRC(conf.getParameter("testCRC")), @@ -39,7 +42,11 @@ RawToDigiConverter::RawToDigiConverter(const edm::ParameterSet &conf) BC_min(conf.getUntrackedParameter("BC_min", 10)), EC_fraction(conf.getUntrackedParameter("EC_fraction", 0.6)), - BC_fraction(conf.getUntrackedParameter("BC_fraction", 0.6)) {} + BC_fraction(conf.getUntrackedParameter("BC_fraction", 0.6)), + + olderTotemT2FileTest(conf.existsAs("useOlderT2TestFile", true) + ? conf.getParameter("useOlderT2TestFile") + : false) {} void RawToDigiConverter::runCommon(const VFATFrameCollection &input, const TotemDAQMapping &mapping, @@ -80,8 +87,13 @@ void RawToDigiConverter::runCommon(const VFATFrameCollection &input, record.status.setNumberOfClustersSpecified(record.frame->isNumberOfClustersPresent()); record.status.setNumberOfClusters(record.frame->getNumberOfClusters()); + // check for T2 payload bits + int rawT2=fr.Position().getRawPosition(); + bool isT2Frame=(rawT2 >> 18); + // check footprint - if (testFootprint != tfNoTest && !record.frame->checkFootprint()) { + if (((!isT2Frame) && testFootprint != tfNoTest && !record.frame->checkFootprint()) || + (isT2Frame && testFootprint != tfNoTest && !record.frame->checkFootprintT2())) { problemsPresent = true; if (verbosity > 0) @@ -94,7 +106,8 @@ void RawToDigiConverter::runCommon(const VFATFrameCollection &input, } // check CRC - if (testCRC != tfNoTest && !record.frame->checkCRC()) { + if (((!isT2Frame) && (testCRC != tfNoTest && !record.frame->checkCRC())) || + (isT2Frame && testCRC != tfNoTest && !record.frame->checkCRCT2())) { problemsPresent = true; if (verbosity > 0) @@ -123,6 +136,8 @@ void RawToDigiConverter::runCommon(const VFATFrameCollection &input, if (verbosity > 0 && problemsPresent) { string message = (stopProcessing) ? "(and will be dropped)" : "(but will be used though)"; if (verbosity > 2) { + if (isT2Frame && verbosity > 3) + record.frame->PrintT2(); ees << " Frame at " << fr.Position() << " seems corrupted " << message << ":" << endl; ees << fes.rdbuf(); } else @@ -396,7 +411,7 @@ void RawToDigiConverter::run(const VFATFrameCollection &coll, int goodT2 = 0; int foundT2 = 0; const int T2shiftOld = - (olderTotemT2FileTest > 0 ? 8 : 0); //Run on TOTEM T2 test file (ver 2.1) or final T2 data ver 2.2 + (olderTotemT2FileTest ? 8 : 0); //Run on TOTEM T2 test file (ver 2.1) or final T2 data ver 2.3 // second loop over data for (auto &p : records) { @@ -431,7 +446,8 @@ void RawToDigiConverter::run(const VFATFrameCollection &coll, .emplace_back(hw_id, totem::nt2::vfat::channelMarker(*record.frame, frame_id), totem::nt2::vfat::leadingEdgeTime(*record.frame, frame_id), - totem::nt2::vfat::trailingEdgeTime(*record.frame, frame_id)); + totem::nt2::vfat::trailingEdgeTime(*record.frame, frame_id), + totem::nt2::vfat::statusMarker(*record.frame)); foundT2++; } else { if (verbosity > 2) diff --git a/EventFilter/CTPPSRawToDigi/src/VFATFrame.cc b/EventFilter/CTPPSRawToDigi/src/VFATFrame.cc index 36fbf224cbf01..7890234d64097 100644 --- a/EventFilter/CTPPSRawToDigi/src/VFATFrame.cc +++ b/EventFilter/CTPPSRawToDigi/src/VFATFrame.cc @@ -59,6 +59,19 @@ bool VFATFrame::checkFootprint() const { return true; } +bool VFATFrame::checkFootprintT2() const { + if (isIDPresent() && (data[2] & 0xF000) != 0xE000) + return false; + + if (isECPresent() && (data[1] & 0xF000) != 0xC000) + return false; + + if (isBCPresent() && (data[0] & 0xF000) != 0xA000) + return false; + + return true; +} + bool VFATFrame::checkCRC() const { // check DAQ error flags if (daqErrorFlags != 0) @@ -77,6 +90,20 @@ bool VFATFrame::checkCRC() const { return (crc_fin == data[0]); } +bool VFATFrame::checkCRCT2() const { + // return true if CRC not present + if (!isCRCPresent()) + return true; + + // compare CRC + word crc_fin = 0xffff; + + for (int i = 0; i < 11; i++) + crc_fin = calculateCRC(crc_fin, data[i]); + + return (crc_fin == data[11]); +} + VFATFrame::word VFATFrame::calculateCRC(VFATFrame::word crc_in, VFATFrame::word dato) { word v = 0x0001; word mask = 0x0001; @@ -164,6 +191,25 @@ void VFATFrame::PrintT2(bool binary) const { printf("\n"); } } else { + // print right CRC + word crc_fin = 0xffff; + + for (int i = 0; i < 11; i++) + crc_fin = calculateCRC(crc_fin, data[i]); + + printf("CRC = %04x ", + getCRCT2()); + + if (checkCRCT2()) + printf("( OK), footprint "); + else + printf("(FAIL, right = %04x), footprint ", crc_fin); + + if (checkFootprintT2()) + printf(" OK"); + else + printf("FAIL"); + printf("Frame = %04x|%04x|%04x|", data[0], data[1], data[2]); for (int i = 3; i < 11; i++) printf("%04x", data[i]); diff --git a/RecoPPS/Configuration/python/RecoCTPPS_EventContent_cff.py b/RecoPPS/Configuration/python/RecoCTPPS_EventContent_cff.py index 309437919c3ae..5f2566403d039 100644 --- a/RecoPPS/Configuration/python/RecoCTPPS_EventContent_cff.py +++ b/RecoPPS/Configuration/python/RecoCTPPS_EventContent_cff.py @@ -14,6 +14,12 @@ 'keep TotemRPUVPatternedmDetSetVector_totemRPUVPatternFinder_*_*', 'keep TotemRPLocalTrackedmDetSetVector_totemRPLocalTrackFitter_*_*', + # totem T2 + 'keep TotemFEDInfos_totemT2Digis_*_*', + 'keep TotemT2DigiedmNewDetSetVector_totemT2Digis_*_*', + 'keep TotemVFATStatusedmDetSetVector_totemT2Digis_*_*', + 'keep TotemT2RecHitedmNewDetSetVector_totemT2RecHits_*_*', + # timing diamonds 'keep TotemFEDInfos_ctppsDiamondRawToDigi_*_*', 'keep CTPPSDiamondDigiedmDetSetVector_ctppsDiamondRawToDigi_*_*', diff --git a/RecoPPS/Configuration/python/recoCTPPS_cff.py b/RecoPPS/Configuration/python/recoCTPPS_cff.py index 1f036f35c1e38..2c769029fd723 100644 --- a/RecoPPS/Configuration/python/recoCTPPS_cff.py +++ b/RecoPPS/Configuration/python/recoCTPPS_cff.py @@ -1,6 +1,7 @@ import FWCore.ParameterSet.Config as cms from RecoPPS.Local.totemRPLocalReconstruction_cff import * +from RecoPPS.Local.totemT2LocalReconstruction_cff import * from RecoPPS.Local.ctppsDiamondLocalReconstruction_cff import * from RecoPPS.Local.totemTimingLocalReconstruction_cff import * from RecoPPS.Local.ctppsPixelLocalReconstruction_cff import * @@ -14,6 +15,7 @@ recoCTPPSTask = cms.Task( totemRPLocalReconstructionTask , + totemT2LocalReconstructionTask , ctppsDiamondLocalReconstructionTask , diamondSampicLocalReconstructionTask , ctppsPixelLocalReconstructionTask , diff --git a/RecoPPS/Local/python/totemT2LocalReconstruction_cff.py b/RecoPPS/Local/python/totemT2LocalReconstruction_cff.py new file mode 100644 index 0000000000000..a8cf0823b205b --- /dev/null +++ b/RecoPPS/Local/python/totemT2LocalReconstruction_cff.py @@ -0,0 +1,13 @@ +import FWCore.ParameterSet.Config as cms + +# reco hit production +from RecoPPS.Local.totemT2RecHits_cfi import * + +# T2 geometry seems not to be uploaded to CondDB, here we load XML version, which produces `TotemGeometryRcd`, consumed only by T2 code. +from Geometry.ForwardCommonData.totemT22021V2XML_cfi import * +from Geometry.ForwardGeometry.totemGeometryESModule_cfi import * + +totemT2LocalReconstructionTask = cms.Task( + totemT2RecHits +) +totemT2LocalReconstruction = cms.Sequence(totemT2LocalReconstructionTask) diff --git a/RecoPPS/Local/test/totemT2NewDigi_reco_cfg.py b/RecoPPS/Local/test/totemT2NewDigi_reco_cfg.py index 84de085f5cb5f..7e9731ce99017 100644 --- a/RecoPPS/Local/test/totemT2NewDigi_reco_cfg.py +++ b/RecoPPS/Local/test/totemT2NewDigi_reco_cfg.py @@ -32,13 +32,13 @@ process.load('CalibPPS.ESProducers.totemT2DAQMapping_cff') process.load('EventFilter.CTPPSRawToDigi.totemT2Digis_cfi') process.totemT2Digis.rawDataTag = cms.InputTag("rawDataCollector") -process.totemDAQMappingESSourceXML.verbosity = cms.untracked.uint32(1) -process.totemT2Digis.RawUnpacking.verbosity = cms.untracked.uint32(1) -process.totemT2Digis.RawToDigi.verbosity = cms.untracked.uint32(3) -process.totemT2Digis.RawToDigi.useOlderT2TestFile = cms.untracked.uint32(1) -process.totemT2Digis.RawToDigi.printUnknownFrameSummary = cms.untracked.uint32(3) -process.totemT2Digis.RawToDigi.printErrorSummary = cms.untracked.uint32(3) -process.totemDAQMappingESSourceXML.multipleChannelsPerPayload = cms.untracked.bool(True) +process.totemDAQMappingESSourceXML.verbosity = 1 +process.totemT2Digis.RawUnpacking.verbosity = 1 +process.totemT2Digis.RawToDigi.verbosity = 3 +process.totemT2Digis.RawToDigi.useOlderT2TestFile = True +process.totemT2Digis.RawToDigi.printUnknownFrameSummary = True +process.totemT2Digis.RawToDigi.printErrorSummary = True +process.totemDAQMappingESSourceXML.multipleChannelsPerPayload = True # rechits production process.load('Geometry.ForwardCommonData.totemT22021V2XML_cfi')