Skip to content

Commit 2ebea7a

Browse files
authored
Merge pull request cms-sw#42643 from gpetruc/multiboard_correlator_master
L1T Phase-2 Correlator Layer 1 updates for Multiboard tests
2 parents 3e8ad29 + 308ac75 commit 2ebea7a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1093
-372
lines changed

L1Trigger/Phase2L1ParticleFlow/interface/L1TCorrelatorLayer1PatternFileWriter.h

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define L1Trigger_Phase2L1ParticleFlow_L1TCorrelatorLayer1PatternFileWriter_h
33

44
#include "FWCore/ParameterSet/interface/ParameterSet.h"
5+
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
56
#include "L1Trigger/DemonstratorTools/interface/BoardDataWriter.h"
67
#include "L1Trigger/DemonstratorTools/interface/utilities.h"
78

@@ -12,24 +13,27 @@ class L1TCorrelatorLayer1PatternFileWriter {
1213
L1TCorrelatorLayer1PatternFileWriter(const edm::ParameterSet& iConfig, const l1ct::Event& eventTemplate);
1314
~L1TCorrelatorLayer1PatternFileWriter();
1415

16+
static edm::ParameterSetDescription getParameterSetDescription();
17+
1518
void write(const l1ct::Event& event);
1619
void flush();
1720

1821
private:
1922
enum class Partition { Barrel, HGCal, HGCalNoTk, HF };
2023

2124
Partition partition_;
22-
const unsigned int tmuxFactor_ = 6; // not really configurable in current architecture
25+
const unsigned int tmuxFactor_;
2326
bool writeInputs_, writeOutputs_;
2427
std::map<l1t::demo::LinkId, std::vector<size_t>> channelIdsInput_, channelIdsOutput_;
2528
std::map<std::string, l1t::demo::ChannelSpec> channelSpecsInput_, channelSpecsOutput_;
2629

27-
const unsigned int tfTimeslices_ = 3, tfLinksFactor_ = 1; // not really configurable in current architecture
28-
const unsigned int hgcTimeslices_ = 3, hgcLinksFactor_ = 4; // not really configurable in current architecture
29-
const unsigned int gctTimeslices_ = 1, gctSectors_ = 3; // not really configurable in current architecture
30-
const unsigned int gctLinksEcal_ = 1, gctLinksHad_ = 2; // could be made configurable later
31-
const unsigned int gmtTimeslices_ = 3, gmtLinksFactor_ = 1; // not really configurable in current architecture
32-
const unsigned int gttTimeslices_ = 1, gttLinksFactor_ = 1; // not really configurable in current architecture
30+
const unsigned int tfTmuxFactor_ = 18, tfLinksFactor_ = 1; // numbers not really configurable in current architecture
31+
const unsigned int hgcTmuxFactor_ = 18, hgcLinksFactor_ = 4; // not really configurable in current architecture
32+
const unsigned int gctTmuxFactor_ = 1, gctSectors_ = 3; // not really configurable in current architecture
33+
const unsigned int gctLinksEcal_ = 1, gctLinksHad_ = 2; // could be made configurable later
34+
const unsigned int gmtTmuxFactor_ = 18, gmtLinksFactor_ = 1; // not really configurable in current architecture
35+
const unsigned int gttTmuxFactor_ = 6, gttLinksFactor_ = 1; // not really configurable in current architecture
36+
const unsigned int tfTimeslices_, hgcTimeslices_, gctTimeslices_, gmtTimeslices_, gttTimeslices_;
3337
uint32_t gmtNumberOfMuons_;
3438
uint32_t gttNumberOfPVs_;
3539
uint32_t gttLatency_;
@@ -50,26 +54,38 @@ class L1TCorrelatorLayer1PatternFileWriter {
5054

5155
static Partition parsePartition(const std::string& partition);
5256

57+
static std::unique_ptr<edm::ParameterDescriptionNode> describeTF();
58+
static std::unique_ptr<edm::ParameterDescriptionNode> describeGCT();
59+
static std::unique_ptr<edm::ParameterDescriptionNode> describeHGC();
60+
static std::unique_ptr<edm::ParameterDescriptionNode> describeGMT();
61+
static std::unique_ptr<edm::ParameterDescriptionNode> describeGTT();
62+
static std::unique_ptr<edm::ParameterDescriptionNode> describePuppi();
63+
static std::unique_ptr<edm::ParameterDescriptionNode> describeEG();
64+
5365
void configTimeSlices(const edm::ParameterSet& iConfig,
5466
const std::string& prefix,
5567
unsigned int nSectors,
5668
unsigned int nTimeSlices,
5769
unsigned int linksFactor);
70+
static std::unique_ptr<edm::ParameterDescriptionNode> describeTimeSlices(const std::string& prefix);
5871
void configSectors(const edm::ParameterSet& iConfig,
5972
const std::string& prefix,
6073
unsigned int nSectors,
6174
unsigned int linksFactor);
75+
static std::unique_ptr<edm::ParameterDescriptionNode> describeSectors(const std::string& prefix);
6276
void configLinks(const edm::ParameterSet& iConfig,
6377
const std::string& prefix,
6478
unsigned int linksFactor,
6579
unsigned int offset);
80+
static std::unique_ptr<edm::ParameterDescriptionNode> describeLinks(const std::string& prefix);
6681

6782
void writeTF(const l1ct::Event& event, l1t::demo::EventData& out);
6883
void writeBarrelGCT(const l1ct::Event& event, l1t::demo::EventData& out);
6984
void writeHGC(const l1ct::Event& event, l1t::demo::EventData& out);
7085
void writeGMT(const l1ct::Event& event, l1t::demo::EventData& out);
7186
void writeGTT(const l1ct::Event& event, l1t::demo::EventData& out);
7287
void writePuppi(const l1ct::Event& event, l1t::demo::EventData& out);
88+
void writeEgamma(const l1ct::OutputBoard& egboard, std::vector<ap_uint<64>>& out);
7389
void writeEgamma(const l1ct::Event& event, l1t::demo::EventData& out);
7490
};
7591

L1Trigger/Phase2L1ParticleFlow/interface/egamma/pfeginput_ref.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
namespace edm {
99
class ParameterSet;
10-
}
10+
class ParameterSetDescription;
11+
} // namespace edm
1112

1213
namespace l1ct {
1314

@@ -16,6 +17,8 @@ namespace l1ct {
1617
EGInputSelectorEmuConfig(unsigned int emIdMask, unsigned int nHADCALO_IN, unsigned int nEMCALO_OUT, int debug)
1718
: idMask(emIdMask), nHADCALO_IN(nHADCALO_IN), nEMCALO_OUT(nEMCALO_OUT), debug(debug) {}
1819

20+
static edm::ParameterSetDescription getParameterSetDescription();
21+
1922
emid_t idMask;
2023
unsigned int nHADCALO_IN;
2124
unsigned int nEMCALO_OUT;

L1Trigger/Phase2L1ParticleFlow/interface/egamma/pftkegalgo_ref.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
namespace edm {
1111
class ParameterSet;
12-
}
12+
class ParameterSetDescription;
13+
} // namespace edm
1314

1415
namespace l1ct {
1516

@@ -47,6 +48,7 @@ namespace l1ct {
4748
ap_int<z0_t::width + 1> dZ;
4849
int dRMin2;
4950
int dRMax2;
51+
static edm::ParameterSetDescription getParameterSetDescription();
5052
};
5153

5254
IsoParameters tkIsoParams_tkEle;
@@ -65,6 +67,7 @@ namespace l1ct {
6567
const double bdtScore_loose_wp; // XGBOOST score
6668
const double bdtScore_tight_wp; // XGBOOST score
6769
const std::string conifer_model;
70+
static edm::ParameterSetDescription getParameterSetDescription();
6871
};
6972

7073
CompIDParameters compIDparams;
@@ -131,6 +134,8 @@ namespace l1ct {
131134
hwIsoTypeTkEm(hwIsoTypeTkEm),
132135
compIDparams(compIDparams),
133136
debug(debug) {}
137+
138+
static edm::ParameterSetDescription getParameterSetDescription();
134139
};
135140

136141
class PFTkEGAlgoEmulator {

L1Trigger/Phase2L1ParticleFlow/interface/egamma/pftkegsorter_barrel_ref.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ namespace l1ct {
1818
PFTkEGSorterBarrelEmulator(const edm::ParameterSet& iConfig)
1919
: PFTkEGSorterEmulator(iConfig.getParameter<uint32_t>("nObjToSort"),
2020
iConfig.getParameter<uint32_t>("nObjSorted")) {}
21+
22+
static edm::ParameterSetDescription getParameterSetDescription() {
23+
return PFTkEGSorterEmulator::getParameterSetDescription();
24+
}
2125
#endif
2226

2327
~PFTkEGSorterBarrelEmulator() override {}

L1Trigger/Phase2L1ParticleFlow/interface/egamma/pftkegsorter_ref.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#ifdef CMSSW_GIT_HASH
1111
#include "FWCore/ParameterSet/interface/ParameterSet.h"
12+
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
1213
#endif
1314

1415
namespace l1ct {
@@ -22,6 +23,12 @@ namespace l1ct {
2223
: PFTkEGSorterEmulator(iConfig.getParameter<uint32_t>("nObjToSort"),
2324
iConfig.getParameter<uint32_t>("nObjSorted")) {}
2425

26+
static edm::ParameterSetDescription getParameterSetDescription() {
27+
edm::ParameterSetDescription description;
28+
description.add<uint32_t>("nObjToSort");
29+
description.add<uint32_t>("nObjSorted");
30+
return description;
31+
}
2532
#endif
2633

2734
virtual ~PFTkEGSorterEmulator() {}

L1Trigger/Phase2L1ParticleFlow/interface/l1-converters/hgcalinput_ref.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,23 @@
33

44
#include "DataFormats/L1TParticleFlow/interface/layer1_emulator.h"
55

6+
namespace edm {
7+
class ParameterSet;
8+
class ParameterSetDescription;
9+
} // namespace edm
10+
611
namespace l1ct {
712
class HgcalClusterDecoderEmulator {
13+
bool slim_;
14+
815
public:
9-
HgcalClusterDecoderEmulator(){};
16+
HgcalClusterDecoderEmulator(bool slim = false) : slim_{slim} {};
17+
HgcalClusterDecoderEmulator(const edm::ParameterSet &pset);
18+
1019
~HgcalClusterDecoderEmulator();
20+
21+
static edm::ParameterSetDescription getParameterSetDescription();
22+
1123
l1ct::HadCaloObjEmu decode(const ap_uint<256> &in) const;
1224
};
1325
} // namespace l1ct

L1Trigger/Phase2L1ParticleFlow/interface/l1-converters/muonGmtToL1ct_ref.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@
55

66
namespace edm {
77
class ParameterSet;
8-
}
8+
class ParameterSetDescription;
9+
} // namespace edm
910

1011
namespace l1ct {
1112
class GMTMuonDecoderEmulator {
1213
public:
1314
GMTMuonDecoderEmulator(float z0Scale, float dxyScale);
1415
GMTMuonDecoderEmulator(const edm::ParameterSet &iConfig);
16+
1517
~GMTMuonDecoderEmulator();
18+
19+
static edm::ParameterSetDescription getParameterSetDescription();
20+
1621
l1ct::MuObjEmu decode(const ap_uint<64> &in) const;
1722

1823
protected:

L1Trigger/Phase2L1ParticleFlow/interface/l1-converters/tkinput_ref.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
namespace edm {
99
class ParameterSet;
10-
}
10+
class ParameterSetDescription;
11+
} // namespace edm
1112

1213
namespace l1ct {
1314
class TrackInputEmulator {
@@ -27,6 +28,8 @@ namespace l1ct {
2728
bool bitwise = true,
2829
bool slim = true);
2930

31+
static edm::ParameterSetDescription getParameterSetDescription();
32+
3033
std::pair<l1ct::TkObjEmu, bool> decodeTrack(ap_uint<96> tkword, const l1ct::PFRegionEmu &sector) const {
3134
return decodeTrack(tkword, sector, bitwise_, slim_);
3235
}

L1Trigger/Phase2L1ParticleFlow/interface/pf/pfalgo2hgc_ref.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
namespace edm {
77
class ParameterSet;
8-
}
8+
class ParameterSetDescription;
9+
} // namespace edm
910

1011
namespace l1ct {
1112

@@ -27,6 +28,8 @@ namespace l1ct {
2728

2829
~PFAlgo2HGCEmulator() override {}
2930

31+
static edm::ParameterSetDescription getParameterSetDescription();
32+
3033
void run(const PFInputRegion& in, OutputRegion& out) const override;
3134

3235
/// moves all objects from out.pfphoton to the beginning of out.pfneutral: nothing to do for this algo

L1Trigger/Phase2L1ParticleFlow/interface/pf/pfalgo3_ref.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
namespace edm {
77
class ParameterSet;
8-
}
8+
class ParameterSetDescription;
9+
} // namespace edm
910

1011
namespace l1ct {
1112

@@ -37,6 +38,8 @@ namespace l1ct {
3738

3839
~PFAlgo3Emulator() override {}
3940

41+
static edm::ParameterSetDescription getParameterSetDescription();
42+
4043
void run(const PFInputRegion& in, OutputRegion& out) const override;
4144

4245
void toFirmware(const PFInputRegion& in,

0 commit comments

Comments
 (0)