12 geometry_translator_(),
14 sector_processor_lut_(),
18 tokenCSC_(iConsumes.consumes<
CSCTag::digi_collection>(iConfig.getParameter<
edm::InputTag>(
"CSCInput"))),
19 tokenRPC_(iConsumes.consumes<
RPCTag::digi_collection>(iConfig.getParameter<
edm::InputTag>(
"RPCInput"))),
20 tokenGEM_(iConsumes.consumes<
GEMTag::digi_collection>(iConfig.getParameter<
edm::InputTag>(
"GEMInput"))),
21 verbose_(iConfig.getUntrackedParameter<
int>(
"verbosity")),
22 useCSC_(iConfig.getParameter<
bool>(
"CSCEnable")),
23 useRPC_(iConfig.getParameter<
bool>(
"RPCEnable")),
24 useGEM_(iConfig.getParameter<
bool>(
"GEMEnable"))
30 auto bxShiftCSC = iConfig.
getParameter<
int>(
"CSCInputBXShift");
31 auto bxShiftRPC = iConfig.
getParameter<
int>(
"RPCInputBXShift");
32 auto bxShiftGEM = iConfig.
getParameter<
int>(
"GEMInputBXShift");
35 auto zoneBoundaries = spPCParams16.
getParameter<std::vector<int> >(
"ZoneBoundaries");
36 auto zoneOverlap = spPCParams16.getParameter<
int>(
"ZoneOverlap");
37 auto includeNeighbor = spPCParams16.getParameter<
bool>(
"IncludeNeighbor");
38 auto duplicateTheta = spPCParams16.getParameter<
bool>(
"DuplicateTheta");
39 auto fixZonePhi = spPCParams16.getParameter<
bool>(
"FixZonePhi");
40 auto useNewZones = spPCParams16.getParameter<
bool>(
"UseNewZones");
41 auto fixME11Edges = spPCParams16.getParameter<
bool>(
"FixME11Edges");
44 auto pattDefinitions = spPRParams16.
getParameter<std::vector<std::string> >(
"PatternDefinitions");
45 auto symPattDefinitions = spPRParams16.getParameter<std::vector<std::string> >(
"SymPatternDefinitions");
46 auto useSymPatterns = spPRParams16.getParameter<
bool>(
"UseSymmetricalPatterns");
49 auto thetaWindow = spTBParams16.
getParameter<
int>(
"ThetaWindow");
50 auto thetaWindowRPC = spTBParams16.getParameter<
int>(
"ThetaWindowRPC");
51 auto useSingleHits = spTBParams16.getParameter<
bool>(
"UseSingleHits");
52 auto bugSt2PhDiff = spTBParams16.getParameter<
bool>(
"BugSt2PhDiff");
53 auto bugME11Dupes = spTBParams16.getParameter<
bool>(
"BugME11Dupes");
56 auto maxRoadsPerZone = spGCParams16.
getParameter<
int>(
"MaxRoadsPerZone");
57 auto maxTracks = spGCParams16.getParameter<
int>(
"MaxTracks");
58 auto useSecondEarliest = spGCParams16.getParameter<
bool>(
"UseSecondEarliest");
59 auto bugSameSectorPt0 = spGCParams16.getParameter<
bool>(
"BugSameSectorPt0");
62 auto ptLUTVersion = spPAParams16.
getParameter<
int>(
"PtLUTVersion");
63 auto readPtLUTFile = spPAParams16.getParameter<
bool>(
"ReadPtLUTFile");
64 auto fixMode15HighPt = spPAParams16.getParameter<
bool>(
"FixMode15HighPt");
65 auto bug9BitDPhi = spPAParams16.getParameter<
bool>(
"Bug9BitDPhi");
66 auto bugMode7CLCT = spPAParams16.getParameter<
bool>(
"BugMode7CLCT");
67 auto bugNegPt = spPAParams16.getParameter<
bool>(
"BugNegPt");
68 auto bugGMTPhi = spPAParams16.getParameter<
bool>(
"BugGMTPhi");
69 auto promoteMode7 = spPAParams16.getParameter<
bool>(
"PromoteMode7");
89 minBX, maxBX, bxWindow, bxShiftCSC, bxShiftRPC, bxShiftGEM,
90 zoneBoundaries, zoneOverlap,
91 includeNeighbor, duplicateTheta, fixZonePhi, useNewZones, fixME11Edges,
92 pattDefinitions, symPattDefinitions, useSymPatterns,
93 thetaWindow, thetaWindowRPC, useSingleHits, bugSt2PhDiff, bugME11Dupes,
94 maxRoadsPerZone, maxTracks, useSecondEarliest, bugSameSectorPt0,
95 ptLUTVersion, readPtLUTFile, fixMode15HighPt, bug9BitDPhi, bugMode7CLCT, bugNegPt, bugGMTPhi, promoteMode7
125 if (new_conditions) {
170 std::cout <<
"Num of TriggerPrimitive: " << muon_primitives.size() << std::endl;
171 for (
const auto&
p : muon_primitives) {
185 if (new_conditions) {
217 std::cout <<
"==== Endcap " <<
endcap <<
" Sector " << sector <<
" Hits ====" << std::endl;
218 std::cout <<
"bx e s ss st vf ql cp wg id bd hs" << std::endl;
220 bool empty_sector =
true;
221 for (
const auto&
h : out_hits) {
222 if (
h.Sector_idx() != es)
continue;
223 empty_sector =
false;
226 for (
int ibx = -3-5; (ibx < +3+5+5) && !empty_sector; ++ibx) {
228 for (
const auto&
h : out_hits) {
230 if (
h.Sector_idx() != es)
continue;
231 if (
h.BX() != ibx)
continue;
234 int endcap = (
h.Endcap() == 1) ? 1 : 2;
235 int sector =
h.PC_sector();
236 int station = (
h.PC_station() == 0 &&
h.Subsector() == 1) ? 1 :
h.PC_station();
238 int strip = (
h.Station() == 1 &&
h.Ring() == 4) ?
h.Strip() + 128 :
h.Strip();
241 std::cout << bx <<
" " << endcap <<
" " << sector <<
" " <<
h.Subsector() <<
" " 242 << station <<
" " << valid <<
" " <<
h.Quality() <<
" " <<
h.Pattern() <<
" " 243 << wire <<
" " << chamber <<
" " <<
h.Bend() <<
" " << strip << std::endl;
246 if (
h.Sector_idx() != es)
continue;
247 if (
h.BX()+5 != ibx)
continue;
253 rpc_sub =
h.Subsector() - 1;
257 if (
h.Station() <= 2) {
258 rpc_chm = (
h.Station() - 1);
260 rpc_chm = 2 + (
h.Station() - 3)*2 + (
h.Ring() - 2);
264 int endcap = (
h.Endcap() == 1) ? 1 : 2;
265 int sector =
h.PC_sector();
268 int strip = (
h.Phi_fp() >> 2);
269 int wire = (
h.Theta_fp() >> 2);
271 std::cout << bx <<
" " << endcap <<
" " << sector <<
" " << 0 <<
" " 272 << station <<
" " << valid <<
" " << 0 <<
" " << 0 <<
" " 273 << wire <<
" " << chamber <<
" " << 0 <<
" " << strip << std::endl;
283 std::cout <<
"==== Endcap " <<
endcap <<
" Sector " << sector <<
" Tracks ====" << std::endl;
284 std::cout <<
"bx e s a mo et ph cr q pt" << std::endl;
286 for (
const auto&
t : out_tracks) {
287 if (
t.Sector_idx() != es)
continue;
289 std::cout <<
t.BX() <<
" " << (
t.Endcap() == 1 ? 1 : 2) <<
" " <<
t.Sector() <<
" " <<
t.PtLUT().address <<
" " <<
t.Mode() <<
" " 290 << (
t.GMT_eta() >= 0 ?
t.GMT_eta() :
t.GMT_eta()+512)<<
" " <<
t.GMT_phi() <<
" " 291 <<
t.GMT_charge() <<
" " <<
t.GMT_quality() <<
" " <<
t.Pt() << std::endl;
T getParameter(std::string const &) const
EventNumber_t event() const
ConditionHelper condition_helper_
GeometryTranslator geometry_translator_
const edm::EDGetToken tokenCSC_
unsigned int get_pc_lut_version() const
void load(const L1TMuonEndCapForest *payload)
TrackFinder(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iConsumes)
void read(unsigned pc_lut_version)
l1t::EMTFTrackCollection EMTFTrackCollection
unsigned int get_fw_version() const
unsigned int pt_lut_version_
const edm::EDGetToken tokenGEM_
void checkAndUpdateGeometry(const edm::EventSetup &)
const L1TMuonEndCapForest & getForest() const
const edm::ParameterSet config_
const edm::EDGetToken tokenRPC_
l1t::EMTFHitCollection EMTFHitCollection
unsigned int pc_lut_version_
emtf::sector_array< SectorProcessor > sector_processors_
bool checkAndUpdateConditions(const edm::Event &iEvent, const edm::EventSetup &iSetup)
void extractPrimitives(T tag, const edm::Event &iEvent, const edm::EDGetToken &token, TriggerPrimitiveCollection &out)
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
SectorProcessorLUT sector_processor_lut_
void process(const edm::Event &iEvent, const edm::EventSetup &iSetup, EMTFHitCollection &out_hits, EMTFTrackCollection &out_tracks)
std::unique_ptr< PtAssignmentEngine > pt_assign_engine_2017_
std::unique_ptr< PtAssignmentEngine > pt_assign_engine_2016_
PtAssignmentEngine * pt_assign_engine_
unsigned int get_pt_lut_version() const
void set_ptLUTVersion(int ptLUTVersion)