Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Totem T2 mapping, fix bug in VFAT footprint check, and implement suggestions from PR #41777 #41859

Merged
merged 2 commits into from
Jun 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion CalibPPS/ESProducers/plugins/TotemDAQMappingESSourceXML.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "FWCore/Framework/interface/ModuleFactory.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/Framework/interface/ESProducer.h"
#include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
#include "FWCore/Framework/interface/ESProducts.h"
Expand Down Expand Up @@ -85,6 +87,8 @@ class TotemDAQMappingESSourceXML : public edm::ESProducer, public edm::EventSetu
TotemDAQMappingESSourceXML(const edm::ParameterSet &);
~TotemDAQMappingESSourceXML() override;

static void fillDescriptions(edm::ConfigurationDescriptions &);

edm::ESProducts<std::unique_ptr<TotemDAQMapping>, std::unique_ptr<TotemAnalysisMask>> produce(const TotemReadoutRcd &);

private:
Expand Down Expand Up @@ -276,7 +280,7 @@ TotemDAQMappingESSourceXML::TotemDAQMappingESSourceXML(const edm::ParameterSet &
: verbosity(conf.getUntrackedParameter<unsigned int>("verbosity", 0)),
subSystemName(conf.getUntrackedParameter<string>("subSystem")),
sampicSubDetId(conf.getParameter<unsigned int>("sampicSubDetId")),
packedPayload(conf.getUntrackedParameter<bool>("multipleChannelsPerPayload", false)),
packedPayload(conf.getParameter<bool>("multipleChannelsPerPayload")),
currentBlock(0),
currentBlockValid(false) {
for (const auto &it : conf.getParameter<vector<ParameterSet>>("configuration")) {
Expand Down Expand Up @@ -1060,4 +1064,34 @@ void TotemDAQMappingESSourceXML::GetChannels(xercesc::DOMNode *n, set<unsigned c

//----------------------------------------------------------------------------------------------------

void TotemDAQMappingESSourceXML::fillDescriptions(edm::ConfigurationDescriptions &descriptions) {
// totemDAQMappingESSourceXML
edm::ParameterSetDescription desc;
desc.addUntracked<unsigned int>("verbosity", 0);
desc.addUntracked<std::string>("subSystem", "")->setComment("set it to: TrackingStrip, ...");
desc.add<unsigned int>("sampicSubDetId");
desc.add<bool>("multipleChannelsPerPayload", false);
{
edm::ParameterSetDescription vpsd1;
vpsd1.add<edm::EventRange>("validityRange", edm::EventRange(1, 0, 1, 1, 0, 0));
vpsd1.add<std::vector<std::string>>("mappingFileNames", {});
vpsd1.add<std::vector<std::string>>("maskFileNames", {});
std::vector<edm::ParameterSet> temp1;
temp1.reserve(1);
{
edm::ParameterSet temp2;
temp2.addParameter<edm::EventRange>("validityRange", edm::EventRange(1, 0, 1, 1, 0, 0));
temp2.addParameter<std::vector<std::string>>("mappingFileNames", {});
temp2.addParameter<std::vector<std::string>>("maskFileNames", {});
temp1.push_back(temp2);
}
desc.addVPSet("configuration", vpsd1, temp1)->setComment("validityRange, mappingFileNames and maskFileNames");
}
descriptions.add("totemDAQMappingESSourceXML", desc);
// or use the following to generate the label from the module's C++ type
//descriptions.addWithDefaultLabel(desc);
}

//----------------------------------------------------------------------------------------------------

DEFINE_FWK_EVENTSETUP_SOURCE(TotemDAQMappingESSourceXML);
17 changes: 0 additions & 17 deletions CalibPPS/ESProducers/python/totemDAQMappingESSourceXML_cfi.py

This file was deleted.

14 changes: 7 additions & 7 deletions CalibPPS/ESProducers/python/totemT2DAQMapping_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

totemDAQMappingESSourceXML = _xml.clone(
subSystem = "TotemT2",
multipleChannelsPerPayload = cms.untracked.bool(False),
configuration = cms.VPSet(
#initial dummy diamond map copy
#old v2.1 T2 firmware test file
cms.PSet(
validityRange = cms.EventRange("1:min - 364982:max"),
mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_totem_nt2_2021.xml"),
validityRange = cms.EventRange("1:min - 368022:max"),
mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_totem_nt2_2023.xml"),
maskFileNames = cms.vstring()
),
#T2 firmware test files
#final T2 mapping test files
cms.PSet(
validityRange = cms.EventRange("364983:min - 999999999:max"),
mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_totem_nt2_2023.xml"),
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),
multipleChannelsPerPayload = True,
)
103 changes: 103 additions & 0 deletions CondFormats/PPSObjects/xml/mapping_totem_nt2_2023_final.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<!-- This mapping is a preliminary real T2 mapping, still to be updated and validated
and made unique in each arm. -->
<top>
<arm id="0"> <!-- sector 45, CMS negative z -->
<nt2_plane id="0">
<nt2_tile id="0" hwId="0x20" FEDId="577" GOHId="1" IdxInFiber="0" pay="0"/>
<nt2_tile id="1" hwId="0x21" FEDId="577" GOHId="1" IdxInFiber="0" pay="1"/>
<nt2_tile id="2" hwId="0x22" FEDId="577" GOHId="1" IdxInFiber="1" pay="0"/>
<nt2_tile id="3" hwId="0x23" FEDId="577" GOHId="1" IdxInFiber="1" pay="1"/>
</nt2_plane>
<nt2_plane id="1">
<nt2_tile id="0" hwId="0x24" FEDId="577" GOHId="1" IdxInFiber="2" pay="0"/>
<nt2_tile id="1" hwId="0x25" FEDId="577" GOHId="1" IdxInFiber="2" pay="1"/>
<nt2_tile id="2" hwId="0x26" FEDId="577" GOHId="1" IdxInFiber="3" pay="0"/>
<nt2_tile id="3" hwId="0x27" FEDId="577" GOHId="1" IdxInFiber="3" pay="1"/>
</nt2_plane>
<nt2_plane id="2">
<nt2_tile id="0" hwId="0x28" FEDId="577" GOHId="1" IdxInFiber="4" pay="0"/>
<nt2_tile id="1" hwId="0x29" FEDId="577" GOHId="1" IdxInFiber="4" pay="1"/>
<nt2_tile id="2" hwId="0x2A" FEDId="577" GOHId="1" IdxInFiber="5" pay="0"/>
<nt2_tile id="3" hwId="0x2B" FEDId="577" GOHId="1" IdxInFiber="5" pay="1"/>
</nt2_plane>
<nt2_plane id="3">
<nt2_tile id="0" hwId="0x2C" FEDId="577" GOHId="1" IdxInFiber="6" pay="0"/>
<nt2_tile id="1" hwId="0x2D" FEDId="577" GOHId="1" IdxInFiber="6" pay="1"/>
<nt2_tile id="2" hwId="0x2E" FEDId="577" GOHId="1" IdxInFiber="7" pay="0"/>
<nt2_tile id="3" hwId="0x2F" FEDId="577" GOHId="1" IdxInFiber="7" pay="1"/>
</nt2_plane>
<nt2_plane id="4">
<nt2_tile id="0" hwId="0x30" FEDId="577" GOHId="1" IdxInFiber="8" pay="0"/>
<nt2_tile id="1" hwId="0x31" FEDId="577" GOHId="1" IdxInFiber="8" pay="1"/>
<nt2_tile id="2" hwId="0x32" FEDId="577" GOHId="1" IdxInFiber="9" pay="0"/>
<nt2_tile id="3" hwId="0x33" FEDId="577" GOHId="1" IdxInFiber="9" pay="1"/>
</nt2_plane>
<nt2_plane id="5">
<nt2_tile id="0" hwId="0x34" FEDId="577" GOHId="1" IdxInFiber="10" pay="0"/>
<nt2_tile id="1" hwId="0x35" FEDId="577" GOHId="1" IdxInFiber="10" pay="1"/>
<nt2_tile id="2" hwId="0x36" FEDId="577" GOHId="1" IdxInFiber="11" pay="0"/>
<nt2_tile id="3" hwId="0x37" FEDId="577" GOHId="1" IdxInFiber="11" pay="1"/>
</nt2_plane>
<nt2_plane id="6">
<nt2_tile id="0" hwId="0x38" FEDId="577" GOHId="1" IdxInFiber="12" pay="0"/>
<nt2_tile id="1" hwId="0x39" FEDId="577" GOHId="1" IdxInFiber="12" pay="1"/>
<nt2_tile id="2" hwId="0x3A" FEDId="577" GOHId="1" IdxInFiber="13" pay="0"/>
<nt2_tile id="3" hwId="0x3B" FEDId="577" GOHId="1" IdxInFiber="13" pay="1"/>
</nt2_plane>
<nt2_plane id="7">
<nt2_tile id="0" hwId="0x3C" FEDId="577" GOHId="1" IdxInFiber="14" pay="0"/>
<nt2_tile id="1" hwId="0x3D" FEDId="577" GOHId="1" IdxInFiber="14" pay="1"/>
<nt2_tile id="2" hwId="0x3E" FEDId="577" GOHId="1" IdxInFiber="15" pay="0"/>
<nt2_tile id="3" hwId="0x3F" FEDId="577" GOHId="1" IdxInFiber="15" pay="1"/>
</nt2_plane>
</arm>
<arm id="1"> <!-- sector 56, CMS positive z -->
<nt2_plane id="0">
<nt2_tile id="0" hwId="0x120" FEDId="577" GOHId="0" IdxInFiber="0" pay="0"/>
<nt2_tile id="1" hwId="0x121" FEDId="577" GOHId="0" IdxInFiber="0" pay="1"/>
<nt2_tile id="2" hwId="0x122" FEDId="577" GOHId="0" IdxInFiber="1" pay="0"/>
<nt2_tile id="3" hwId="0x123" FEDId="577" GOHId="0" IdxInFiber="1" pay="1"/>
</nt2_plane>
<nt2_plane id="1">
<nt2_tile id="0" hwId="0x124" FEDId="577" GOHId="0" IdxInFiber="2" pay="0"/>
<nt2_tile id="1" hwId="0x125" FEDId="577" GOHId="0" IdxInFiber="2" pay="1"/>
<nt2_tile id="2" hwId="0x126" FEDId="577" GOHId="0" IdxInFiber="3" pay="0"/>
<nt2_tile id="3" hwId="0x127" FEDId="577" GOHId="0" IdxInFiber="3" pay="1"/>
</nt2_plane>
<nt2_plane id="2">
<nt2_tile id="0" hwId="0x128" FEDId="577" GOHId="0" IdxInFiber="4" pay="0"/>
<nt2_tile id="1" hwId="0x129" FEDId="577" GOHId="0" IdxInFiber="4" pay="1"/>
<nt2_tile id="2" hwId="0x12A" FEDId="577" GOHId="0" IdxInFiber="5" pay="0"/>
<nt2_tile id="3" hwId="0x12B" FEDId="577" GOHId="0" IdxInFiber="5" pay="1"/>
</nt2_plane>
<nt2_plane id="3">
<nt2_tile id="0" hwId="0x12C" FEDId="577" GOHId="0" IdxInFiber="6" pay="0"/>
<nt2_tile id="1" hwId="0x12D" FEDId="577" GOHId="0" IdxInFiber="6" pay="1"/>
<nt2_tile id="2" hwId="0x12E" FEDId="577" GOHId="0" IdxInFiber="7" pay="0"/>
<nt2_tile id="3" hwId="0x12F" FEDId="577" GOHId="0" IdxInFiber="7" pay="1"/>
</nt2_plane>
<nt2_plane id="4">
<nt2_tile id="0" hwId="0x130" FEDId="577" GOHId="0" IdxInFiber="8" pay="0"/>
<nt2_tile id="1" hwId="0x131" FEDId="577" GOHId="0" IdxInFiber="8" pay="1"/>
<nt2_tile id="2" hwId="0x132" FEDId="577" GOHId="0" IdxInFiber="9" pay="0"/>
<nt2_tile id="3" hwId="0x133" FEDId="577" GOHId="0" IdxInFiber="9" pay="1"/>
</nt2_plane>
<nt2_plane id="5">
<nt2_tile id="0" hwId="0x134" FEDId="577" GOHId="0" IdxInFiber="10" pay="0"/>
<nt2_tile id="1" hwId="0x135" FEDId="577" GOHId="0" IdxInFiber="10" pay="1"/>
<nt2_tile id="2" hwId="0x136" FEDId="577" GOHId="0" IdxInFiber="11" pay="0"/>
<nt2_tile id="3" hwId="0x137" FEDId="577" GOHId="0" IdxInFiber="11" pay="1"/>
</nt2_plane>
<nt2_plane id="6">
<nt2_tile id="0" hwId="0x138" FEDId="577" GOHId="0" IdxInFiber="12" pay="0"/>
<nt2_tile id="1" hwId="0x139" FEDId="577" GOHId="0" IdxInFiber="12" pay="1"/>
<nt2_tile id="2" hwId="0x13A" FEDId="577" GOHId="0" IdxInFiber="13" pay="0"/>
<nt2_tile id="3" hwId="0x13B" FEDId="577" GOHId="0" IdxInFiber="13" pay="1"/>
</nt2_plane>
<nt2_plane id="7">
<nt2_tile id="0" hwId="0x13C" FEDId="577" GOHId="0" IdxInFiber="14" pay="0"/>
<nt2_tile id="1" hwId="0x13D" FEDId="577" GOHId="0" IdxInFiber="14" pay="1"/>
<nt2_tile id="2" hwId="0x13E" FEDId="577" GOHId="0" IdxInFiber="15" pay="0"/>
<nt2_tile id="3" hwId="0x13F" FEDId="577" GOHId="0" IdxInFiber="15" pay="1"/>
</nt2_plane>
</arm>
Loading