Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d83cd2b
Add support for CaloTower L1 Scouting with data format, blocks, masks…
RoccoA97 Mar 11, 2025
e786cd0
Include new collection L1Scouting FastJet and producer
RoccoA97 Mar 12, 2025
c4f70d5
Fix wrong calo tower word masks
RoccoA97 Mar 12, 2025
158489d
Added tests for calo towers
Mar 19, 2025
94004b7
Fixed L1 scouting OrbitCollection constructor
Apr 25, 2025
cb130de
updated CaloTowerMinSDSID and an argument in L1Scout file tests
tj710 May 15, 2025
bd06f05
removed include of depreciated edm::span
tj710 May 16, 2025
731ffef
applied code format rules and fixed typo
tj710 May 16, 2025
22074e8
few fixes in the test code
tj710 May 16, 2025
2326a2f
test script updates
tj710 Jul 9, 2025
d4e42b9
code formatter
tj710 Jul 10, 2025
aa8f51b
removed cases of 'using namespace'
tj710 Jan 15, 2026
757444f
replaced std::cout use with LogDebug(L1Scout)
tj710 Jan 16, 2026
6d1ab52
moved nConst and area variables definition for clarity
tj710 Jan 16, 2026
bacf191
Merge branch 'master' into rebased
tj710 Jan 16, 2026
7217549
code formatting
tj710 Jan 16, 2026
697ccac
added mass to fastjet class
tj710 Jan 19, 2026
f19a5bf
changed calo tower variables from int to int16_t
tj710 Jan 19, 2026
0aaa7c4
swapped order of eta and phi in unpacker constants to match firmware
tj710 Jan 20, 2026
035eb2d
replaced all uint16_t with int16_t in L1ScoutingCaloTower
tj710 Jan 20, 2026
8ad1596
moved position of mass in L1ScoutingFastJet class
tj710 Jan 20, 2026
bfce20e
fixed erBits mask
tj710 Jan 21, 2026
3efe757
namespace fix -rename calol2 to calol1 which is more appropriate
tj710 Feb 2, 2026
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
37 changes: 37 additions & 0 deletions DataFormats/L1Scouting/interface/L1ScoutingCaloTower.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#ifndef DataFormats_L1Scouting_L1ScoutingCaloTower_h
#define DataFormats_L1Scouting_L1ScoutingCaloTower_h

#include "DataFormats/L1Scouting/interface/OrbitCollection.h"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of int16_t, this file should now include

#include <cstdint>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Do you know why the compiler does not complain about this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. I guess it's because OrbitCollection.h (which is also included) happens to include itself cstdint.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should I still add it to this file, or is it not needed? Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally the best practice is for every header and source file to #include the headers that it needs rather than rely on transitive #includes. E.g. hypothetically changing OrbitCollection.h to not #include <cstdint> would result in compilation failures here.

namespace l1ScoutingRun3 {

class CaloTower {
public:
CaloTower() : hwEt_(0), erBits_(0), miscBits_(0), hwEta_(0), hwPhi_(0) {}

CaloTower(int hwEt, int erBits, int miscBits, int hwPhi, int hwEta) : hwEt_(hwEt), erBits_(erBits), miscBits_(miscBits), hwEta_(hwEta), hwPhi_(hwPhi) {}

void setHwEt(int hwEt) { hwEt_ = hwEt; }
void setErBits(int erBits) { erBits_ = erBits; }
void setMiscBits(int miscBits) { miscBits_ = miscBits; }
void setHwEta(int hwEta) { hwEta_ = hwEta; }
void setHwPhi(int hwPhi) { hwPhi_ = hwPhi; }

int hwEt() const { return hwEt_; }
int erBits() const { return erBits_; }
int miscBits() const { return miscBits_; }
int hwEta() const { return hwEta_; }
int hwPhi() const { return hwPhi_; }

private:
int hwEt_;
int erBits_;
int miscBits_;
int hwEta_;
int hwPhi_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every variable in this data format is 32 bits (in most cases), but it looks like the values used to fill these in the unpacker are known to be smaller (for example, phi is 8 bits, iiuc). I'm wondering if using smaller types in this data format could lead to a smaller event size. Was that checked ? (or is it irrelevant because compression deals very effectively with all the extra zeros in this case ?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to int16_t

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, regarding this choice on data types I do not know for sure what the best/recommended approach is (mine was really just a question on whether this was studied in some way). Before moving forward, let me ask for feedback from a Core-Sw expert.

@makortel, would you have any suggestions (or, are there any guidelines) on this ? (e.g. use (unsigned) int unless there is a proven gain, or use (u)intX_t if the value is known to be X-bits long, or else)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, if a quantity fits in 16 or 8 bits, using 16- or 8-bit integer instead of 32-bit integer will use less memory and storage (also after compression).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks for the clarification, Matti.

};

typedef OrbitCollection<CaloTower> CaloTowerOrbitCollection;

} // namespace l1ScoutingRun3
#endif // DataFormats_L1Scouting_L1ScoutingCaloTower_h
37 changes: 37 additions & 0 deletions DataFormats/L1Scouting/interface/L1ScoutingFastJet.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#ifndef DataFormats_L1Scouting_L1ScoutingFastJet_h
#define DataFormats_L1Scouting_L1ScoutingFastJet_h

#include "DataFormats/L1Scouting/interface/OrbitCollection.h"

namespace l1ScoutingRun3 {

class FastJet {
public:
FastJet() : et_(0), eta_(0), phi_(0), nConst_(0), area_(0) {}

FastJet(float et, float eta, float phi, int nConst, float area) : et_(et), eta_(eta), phi_(phi), nConst_(nConst), area_(area) {}

void setEt(float et) { et_ = et; }
void setEta(float eta) { eta_ = eta; }
void setPhi(float phi) { phi_ = phi; }
void setNConst(int nConst) { nConst_ = nConst; }
void setArea(float area) { area_ = area; }

float et() const { return et_; }
float eta() const { return eta_; }
float phi() const { return phi_; }
int nConst() const { return nConst_; }
float area() const { return area_; }

private:
float et_;
float eta_;
float phi_;
int nConst_;
float area_;
};

typedef OrbitCollection<FastJet> FastJetOrbitCollection;

} // namespace l1ScoutingRun3
#endif // DataFormats_L1Scouting_L1ScoutingFastJet_h
2 changes: 1 addition & 1 deletion DataFormats/L1Scouting/interface/OrbitCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class OrbitCollection {
// The method fillAndClear will be used, meaning that, after copying the objects,
// orbitBuffer's vectors will be cleared.
OrbitCollection(std::vector<std::vector<T>>& orbitBuffer, unsigned nObjects = 0)
: bxOffsets_(orbitBufferSize_ + 1, 0), data_(nObjects) {
: bxOffsets_(orbitBufferSize_ + 1, 0), data_() {
fillAndClear(orbitBuffer, nObjects);
}

Expand Down
2 changes: 2 additions & 0 deletions DataFormats/L1Scouting/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
#include "DataFormats/L1Scouting/interface/L1ScoutingMuon.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingCalo.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingBMTFStub.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingCaloTower.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingFastJet.h"
22 changes: 18 additions & 4 deletions DataFormats/L1Scouting/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,55 @@

<class name="l1ScoutingRun3::CaloObject"/>

<class name="l1ScoutingRun3::CaloTower" ClassVersion="3">
<version ClassVersion="3" checksum="3212859997"/>
</class>

<class name="l1ScoutingRun3::EGamma" ClassVersion="3">
<version ClassVersion="3" checksum="1578240696"/>
</class>

<class name="l1ScoutingRun3::FastJet" ClassVersion="3">
<version ClassVersion="3" checksum="94077694"/>
</class>

<class name="l1ScoutingRun3::Jet" ClassVersion="3">
<version ClassVersion="3" checksum="1391509699"/>
</class>

<class name="l1ScoutingRun3::Muon" ClassVersion="3">
<version ClassVersion="3" checksum="3886315831"/>
</class>

<class name="l1ScoutingRun3::Tau" ClassVersion="3">
<version ClassVersion="3" checksum="2889952120"/>
</class>

<class name="std::vector<l1ScoutingRun3::BMTFStub>"/>
<class name="std::vector<l1ScoutingRun3::BxSums>"/>
<class name="std::vector<l1ScoutingRun3::CaloTower>"/>
<class name="std::vector<l1ScoutingRun3::EGamma>"/>
<class name="std::vector<l1ScoutingRun3::FastJet>"/>
<class name="std::vector<l1ScoutingRun3::Jet>"/>
<class name="std::vector<l1ScoutingRun3::Muon>"/>
<class name="std::vector<l1ScoutingRun3::Tau>"/>

<class name="l1ScoutingRun3::BMTFStubOrbitCollection"/>
<class name="l1ScoutingRun3::BxSumsOrbitCollection"/>
<class name="l1ScoutingRun3::CaloTowerOrbitCollection"/>
<class name="l1ScoutingRun3::EGammaOrbitCollection"/>
<class name="l1ScoutingRun3::FastJetOrbitCollection"/>
<class name="l1ScoutingRun3::JetOrbitCollection"/>
<class name="l1ScoutingRun3::MuonOrbitCollection"/>
<class name="l1ScoutingRun3::TauOrbitCollection"/>

<class name="edm::Wrapper<l1ScoutingRun3::BMTFStubOrbitCollection>"/>
<class name="edm::Wrapper<l1ScoutingRun3::BxSumsOrbitCollection>"/>
<class name="edm::Wrapper<l1ScoutingRun3::CaloTowerOrbitCollection>"/>
<class name="edm::Wrapper<l1ScoutingRun3::EGammaOrbitCollection>"/>
<class name="edm::Wrapper<l1ScoutingRun3::FastJetOrbitCollection>"/>
<class name="edm::Wrapper<l1ScoutingRun3::JetOrbitCollection>"/>
<class name="edm::Wrapper<l1ScoutingRun3::MuonOrbitCollection>"/>
<class name="edm::Wrapper<l1ScoutingRun3::TauOrbitCollection>"/>

</lcgdict>
11 changes: 9 additions & 2 deletions DataFormats/L1Scouting/test/TestL1ScoutingFormat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,21 @@ cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$file" || die "Fail
oldFiles="testL1Scouting_v3_v3_v3_v3_v3_14_0_0_split_99.root testL1Scouting_v3_v3_v3_v3_v3_14_0_0_split_0.root"
for file in $oldFiles; do
inputfile=$(edmFileInPath DataFormats/L1Scouting/data/$file) || die "Failure edmFileInPath DataFormats/L1Scouting/data/$file" $?
cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 0 || die "Failed to read old file $file" $?
cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 0 --caloTowerVersion 0 || die "Failed to read old file $file" $?
done

# added BMTF input stubs data format
oldFiles="testL1Scouting_v3_v3_v3_v3_v3_v3_14_1_0_pre5_split_99.root testL1Scouting_v3_v3_v3_v3_v3_v3_14_1_0_pre5_split_0.root"
for file in $oldFiles; do
inputfile=$(edmFileInPath DataFormats/L1Scouting/data/$file) || die "Failure edmFileInPath DataFormats/L1Scouting/data/$file" $?
cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 3 || die "Failed to read old file $file" $?
cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 3 --caloTowerVersion 0 || die "Failed to read old file $file" $?
done

# added Calo tower data format
oldFiles="testL1Scouting_v3_v3_v3_v3_v3_v3_v3_15_0_1_split_99.root testL1Scouting_v3_v3_v3_v3_v3_v3_v3_15_0_1_split_0.root"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this supposed to work?
Does it need a new file to be stored in https://github.com/cms-data/DataFormats-L1Scouting ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Marco. Yes, it needs a new file in cms-data, is that repo managed or can I just commit to it? Thanks a lot.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Thomas, you need to open a PR to that repo introducing the new file, then the two PRs can be tested together.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for file in $oldFiles; do
inputfile=$(edmFileInPath DataFormats/L1Scouting/data/$file) || die "Failure edmFileInPath DataFormats/L1Scouting/data/$file" $?
cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 3 --caloTowerVersion 3 || die "Failed to read old file $file" $?
done

exit 0
50 changes: 49 additions & 1 deletion DataFormats/L1Scouting/test/TestReadL1Scouting.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "DataFormats/L1Scouting/interface/L1ScoutingBMTFStub.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingMuon.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingCalo.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingCaloTower.h"
#include "DataFormats/L1Scouting/interface/OrbitCollection.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
Expand Down Expand Up @@ -33,6 +34,8 @@ namespace edmtest {
void analyzeTaus(edm::Event const& iEvent) const;
void analyzeBxSums(edm::Event const& iEvent) const;
void analyzeBmtfStubs(edm::Event const& iEvent) const;
void analyzeCaloTowers(edm::Event const& iEvent) const;


void throwWithMessageFromConstructor(const char*) const;
void throwWithMessage(const char*) const;
Expand All @@ -57,6 +60,10 @@ namespace edmtest {
const int bmtfStubClassVersion_;
const std::vector<int> expectedBmtfStubValues_;
const edm::EDGetTokenT<OrbitCollection<l1ScoutingRun3::BMTFStub>> bmtfStubToken_;

const int caloTowerClassVersion_;
const std::vector<int> expectedCaloTowerValues_;
const edm::EDGetTokenT<OrbitCollection<l1ScoutingRun3::CaloTower>> caloTowerToken_;
};

TestReadL1Scouting::TestReadL1Scouting(edm::ParameterSet const& iPSet)
Expand All @@ -73,7 +80,11 @@ namespace edmtest {
bxSumsToken_(consumes(iPSet.getParameter<edm::InputTag>("bxSumsTag"))),
bmtfStubClassVersion_(iPSet.getParameter<int>("bmtfStubClassVersion")),
expectedBmtfStubValues_(iPSet.getParameter<std::vector<int>>("expectedBmtfStubValues")),
bmtfStubToken_(consumes(iPSet.getParameter<edm::InputTag>("bmtfStubTag"))) {
bmtfStubToken_(consumes(iPSet.getParameter<edm::InputTag>("bmtfStubTag"))),
caloTowerClassVersion_(iPSet.getParameter<int>("caloTowerClassVersion")),
expectedCaloTowerValues_(iPSet.getParameter<std::vector<int>>("expectedCaloTowerValues")),
caloTowerToken_(consumes(iPSet.getParameter<edm::InputTag>("caloTowerTag"))) {

if (bxValues_.size() != 2) {
throwWithMessageFromConstructor("bxValues must have 2 elements and it does not");
}
Expand All @@ -95,6 +106,9 @@ namespace edmtest {
if (expectedBmtfStubValues_.size() != 2) {
throwWithMessageFromConstructor("bmtfStubValues_ must have 2 elements and it does not");
}
if (expectedCaloTowerValues_.size() != 2) {
throwWithMessageFromConstructor("caloTowerValues_ must have 2 elements and it does not");
}
}

void TestReadL1Scouting::analyze(edm::StreamID, edm::Event const& iEvent, edm::EventSetup const&) const {
Expand All @@ -104,6 +118,8 @@ namespace edmtest {
analyzeTaus(iEvent);
analyzeBxSums(iEvent);
analyzeBmtfStubs(iEvent);
analyzeCaloTowers(iEvent);

}

void TestReadL1Scouting::analyzeMuons(edm::Event const& iEvent) const {
Expand Down Expand Up @@ -360,6 +376,35 @@ namespace edmtest {
}
}
}
void TestReadL1Scouting::analyzeCaloTowers(edm::Event const& iEvent) const {
auto const& caloTowersCollection = iEvent.get(caloTowersToken_);

for (const unsigned& bx : bxValues_) {
unsigned nCaloTowers = caloTowers.getBxSize(bx);
if (nCaloTowers != expectedCaloTowerValues_.size()) {
throwWithMessage("analyzeCaloTower, caloTowers do not have the expected bx size");
}

const auto& caloTowers = caloTowersCollection.bxIterator(bx);
for (unsigned i = 0; i < nCaloTowers; i++) {
if (caloTowers[i].hwEt() != expectedCaloTowerValues_[i]) {
throwWithMessage("analyzeCaloTowers, hwEt does not match the expected value");
}
if (caloTowers[i].erBits() != expectedCaloTowerValues_[i]) {
throwWithMessage("analyzeCaloTowers, erBits does not match the expected value");
}
if (caloTowers[i].miscBits() != expectedCaloTowerValues_[i]) {
throwWithMessage("analyzeCaloTowers, miscBits does not match the expected value");
}
if (caloTowers[i].hwEta() != expectedCaloTowerValues_[i]) {
throwWithMessage("analyzeCaloTowers, hwEta does not match the expected value");
}
if (caloTowers[i].hwPhi() != expectedCaloTowerValues_[i]) {
throwWithMessage("analyzeCaloTowers, hwPhi does not match the expected value");
}
}
}
}

void TestReadL1Scouting::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
Expand All @@ -377,6 +422,9 @@ namespace edmtest {
desc.add<int>("bmtfStubClassVersion");
desc.add<std::vector<int>>("expectedBmtfStubValues");
desc.add<edm::InputTag>("bmtfStubTag");
desc.add<int>("caloTowerClassVersion");
desc.add<std::vector<int>>("expectedCaloTowerValues");
desc.add<edm::InputTag>("CaloTowerTag");

descriptions.addDefault(desc);
}
Expand Down
32 changes: 31 additions & 1 deletion DataFormats/L1Scouting/test/TestWriteL1Scouting.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "DataFormats/L1Scouting/interface/L1ScoutingBMTFStub.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingMuon.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingCalo.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingCaloTower.h"
#include "DataFormats/L1Scouting/interface/OrbitCollection.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
Expand Down Expand Up @@ -31,6 +32,7 @@ namespace edmtest {
void produceTaus(edm::Event& iEvent) const;
void produceBxSums(edm::Event& iEvent) const;
void produceBmtfStubs(edm::Event& iEvent) const;
void produceCaloTowers(edm::Event& iEvent) const;

void throwWithMessage(const char*) const;

Expand All @@ -53,6 +55,9 @@ namespace edmtest {

const std::vector<int> bmtfStubsValues_;
const edm::EDPutTokenT<OrbitCollection<l1ScoutingRun3::BMTFStub>> bmtfStubsPutToken_;

const std::vector<int> caloTowersValues_;
const edm::EDPutTokenT<OrbitCollection<l1ScoutingRun3::CaloTower>> caloTowersPutToken_;
};

TestWriteL1Scouting::TestWriteL1Scouting(edm::ParameterSet const& iPSet)
Expand All @@ -68,7 +73,9 @@ namespace edmtest {
bxSumsValues_(iPSet.getParameter<std::vector<int>>("bxSumsValues")),
bxSumsPutToken_(produces()),
bmtfStubsValues_(iPSet.getParameter<std::vector<int>>("bmtfStubValues")),
bmtfStubsPutToken_(produces()) {
bmtfStubsPutToken_(produces())
caloTowersValues_(iPSet.getParameter<std::vector<int>>("caloTowersValues")),
caloTowersPutToken_(produces()) {
if (bxValues_.size() != 2) {
throwWithMessage("bxValues must have 2 elements and it does not");
}
Expand All @@ -90,6 +97,9 @@ namespace edmtest {
if (bmtfStubsValues_.size() != 2) {
throwWithMessage("bmtfStubsValues_ must have 2 elements and it does not");
}
if (caloTowersValues_.size() != 2) {
throwWithMessage("caloTowersValues_ must have 2 elements and it does not");
}
}

void TestWriteL1Scouting::produce(edm::StreamID, edm::Event& iEvent, edm::EventSetup const&) const {
Expand All @@ -99,6 +109,8 @@ namespace edmtest {
produceTaus(iEvent);
produceBxSums(iEvent);
produceBmtfStubs(iEvent);
produceCaloTowers(iEvent);

}

void TestWriteL1Scouting::produceMuons(edm::Event& iEvent) const {
Expand Down Expand Up @@ -198,6 +210,22 @@ namespace edmtest {
iEvent.put(bmtfStubsPutToken_, std::move(stubs));
}

void TestWriteL1Scouting::produceCaloTowers(edm::Event& iEvent) const {
std::unique_ptr<l1ScoutingRun3::CaloTowerOrbitCollection> caloTowers(new l1ScoutingRun3::CaloTowerOrbitCollection);

std::vector<std::vector<l1ScoutingRun3::CaloTower>> orbitBufferCaloTowers(3565);
int nCaloTowers = 0;
for (const unsigned& bx : bxValues_) {
for (const int& val : caloTowerValues_) {
orbitBufferCaloTowers[bx].emplace_back(val, val, val, val);
nCaloTowers++;
}
}

caloTowers->fillAndClear(orbitBufferCaloTowers, nCaloTowers);
iEvent.put(caloTowersPutToken_, std::move(caloTowers));
}

void TestWriteL1Scouting::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<std::vector<unsigned int>>("bxValues");
Expand All @@ -207,6 +235,8 @@ namespace edmtest {
desc.add<std::vector<int>>("tauValues");
desc.add<std::vector<int>>("bxSumsValues");
desc.add<std::vector<int>>("bmtfStubValues");
desc.add<std::vector<int>>("caloTowerValues");

descriptions.addDefault(desc);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
tauValues = cms.vint32(11, 12),
bxSumsValues = cms.vint32(13),
bmtfStubValues = cms.vint32(1, 2),
caloTowerStubValues = cms.vint32(14, 15),

)

process.out = cms.OutputModule("PoolOutputModule",
Expand Down
7 changes: 6 additions & 1 deletion DataFormats/L1Scouting/test/read_L1Scouting_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

parser.add_argument("--inputFile", type=str, help="Input file name (default: testL1Scouting.root)", default="testL1Scouting.root")
parser.add_argument("--bmtfStubVersion", type=int, help="track data format version (default: 3)", default=3)
parser.add_argument("--caloTowerVersion", type=int, help="track data format version (default: 3)", default=3)

args = parser.parse_args()

process = cms.Process("READ")
Expand All @@ -29,7 +31,10 @@
expectedBxSumsValues = cms.vint32(13),
bmtfStubClassVersion = cms.int32(args.bmtfStubVersion),
bmtfStubTag = cms.InputTag("l1ScoutingTestProducer", "", "PROD"),
expectedBmtfStubValues = cms.vint32(1, 2)
expectedBmtfStubValues = cms.vint32(1, 2),
caloTowerClassVersion = cms.int32(args.bmtfStubVersion),
caloTowerTag = cms.InputTag("l1ScoutingTestProducer", "", "PROD"),
expectedCaloTowerValues = cms.vint32(14, 15)
)

process.out = cms.OutputModule("PoolOutputModule",
Expand Down
Loading