10 geometry_translator_(),
12 sector_processor_lut_(),
16 tokenCSC_(iConsumes.consumes<
CSCTag::digi_collection>(iConfig.getParameter<
edm::InputTag>(
"CSCInput"))),
17 tokenRPC_(iConsumes.consumes<
RPCTag::digi_collection>(iConfig.getParameter<
edm::InputTag>(
"RPCInput"))),
18 tokenGEM_(iConsumes.consumes<
GEMTag::digi_collection>(iConfig.getParameter<
edm::InputTag>(
"GEMInput"))),
19 verbose_(iConfig.getUntrackedParameter<
int>(
"verbosity")),
20 primConvLUT_(iConfig.getParameter<
edm::
ParameterSet>(
"spPCParams16").getParameter<
int>(
"PrimConvLUT")),
21 fwConfig_(iConfig.getParameter<
bool>(
"FWConfig")),
22 useCSC_(iConfig.getParameter<
bool>(
"CSCEnable")),
23 useRPC_(iConfig.getParameter<
bool>(
"RPCEnable")),
24 useGEM_(iConfig.getParameter<
bool>(
"GEMEnable")),
25 era_(iConfig.getParameter<
std::
string>(
"Era"))
28 if (
era_ ==
"Run2_2016") {
30 }
else if (
era_ ==
"Run2_2017" ||
era_ ==
"Run2_2018") {
39 auto bxShiftCSC = iConfig.
getParameter<
int>(
"CSCInputBXShift");
40 auto bxShiftRPC = iConfig.
getParameter<
int>(
"RPCInputBXShift");
41 auto bxShiftGEM = iConfig.
getParameter<
int>(
"GEMInputBXShift");
44 auto zoneBoundaries = spPCParams16.
getParameter<std::vector<int> >(
"ZoneBoundaries");
45 auto zoneOverlap = spPCParams16.getParameter<
int>(
"ZoneOverlap");
46 auto includeNeighbor = spPCParams16.getParameter<
bool>(
"IncludeNeighbor");
47 auto duplicateTheta = spPCParams16.getParameter<
bool>(
"DuplicateTheta");
48 auto fixZonePhi = spPCParams16.getParameter<
bool>(
"FixZonePhi");
49 auto useNewZones = spPCParams16.getParameter<
bool>(
"UseNewZones");
50 auto fixME11Edges = spPCParams16.getParameter<
bool>(
"FixME11Edges");
53 auto pattDefinitions = spPRParams16.
getParameter<std::vector<std::string> >(
"PatternDefinitions");
54 auto symPattDefinitions = spPRParams16.getParameter<std::vector<std::string> >(
"SymPatternDefinitions");
55 auto useSymPatterns = spPRParams16.getParameter<
bool>(
"UseSymmetricalPatterns");
58 auto thetaWindow = spTBParams16.
getParameter<
int>(
"ThetaWindow");
59 auto thetaWindowZone0 = spTBParams16.getParameter<
int>(
"ThetaWindowZone0");
60 auto useSingleHits = spTBParams16.getParameter<
bool>(
"UseSingleHits");
61 auto bugSt2PhDiff = spTBParams16.getParameter<
bool>(
"BugSt2PhDiff");
62 auto bugME11Dupes = spTBParams16.getParameter<
bool>(
"BugME11Dupes");
63 auto bugAmbigThetaWin = spTBParams16.getParameter<
bool>(
"BugAmbigThetaWin");
64 auto twoStationSameBX = spTBParams16.getParameter<
bool>(
"TwoStationSameBX");
67 auto maxRoadsPerZone = spGCParams16.
getParameter<
int>(
"MaxRoadsPerZone");
68 auto maxTracks = spGCParams16.getParameter<
int>(
"MaxTracks");
69 auto useSecondEarliest = spGCParams16.getParameter<
bool>(
"UseSecondEarliest");
70 auto bugSameSectorPt0 = spGCParams16.getParameter<
bool>(
"BugSameSectorPt0");
73 auto readPtLUTFile = spPAParams16.
getParameter<
bool>(
"ReadPtLUTFile");
74 auto fixMode15HighPt = spPAParams16.getParameter<
bool>(
"FixMode15HighPt");
75 auto bug9BitDPhi = spPAParams16.getParameter<
bool>(
"Bug9BitDPhi");
76 auto bugMode7CLCT = spPAParams16.getParameter<
bool>(
"BugMode7CLCT");
77 auto bugNegPt = spPAParams16.getParameter<
bool>(
"BugNegPt");
78 auto bugGMTPhi = spPAParams16.getParameter<
bool>(
"BugGMTPhi");
79 auto promoteMode7 = spPAParams16.getParameter<
bool>(
"PromoteMode7");
80 auto modeQualVer = spPAParams16.getParameter<
int>(
"ModeQualVer");
93 minBX,
maxBX, bxWindow, bxShiftCSC, bxShiftRPC, bxShiftGEM,
95 zoneBoundaries, zoneOverlap,
96 includeNeighbor, duplicateTheta, fixZonePhi, useNewZones, fixME11Edges,
97 pattDefinitions, symPattDefinitions, useSymPatterns,
98 thetaWindow, thetaWindowZone0,
useRPC_, useSingleHits, bugSt2PhDiff, bugME11Dupes, bugAmbigThetaWin, twoStationSameBX,
99 maxRoadsPerZone,
maxTracks, useSecondEarliest, bugSameSectorPt0,
100 readPtLUTFile, fixMode15HighPt, bug9BitDPhi, bugMode7CLCT, bugNegPt, bugGMTPhi, promoteMode7, modeQualVer
142 std::cout <<
"Num of TriggerPrimitive: " << muon_primitives.size() << std::endl;
143 for (
const auto&
p : muon_primitives) {
196 std::cout <<
"==== Endcap " <<
endcap <<
" Sector " << sector <<
" Hits ====" << std::endl;
197 std::cout <<
"bx e s ss st vf ql cp wg id bd hs" << std::endl;
199 bool empty_sector =
true;
200 for (
const auto&
h : out_hits) {
201 if (
h.Sector_idx() != es)
continue;
202 empty_sector =
false;
205 for (
int ibx = -3-5; (ibx < +3+5+5) && !empty_sector; ++ibx) {
207 for (
const auto&
h : out_hits) {
209 if (
h.Sector_idx() != es)
continue;
210 if (
h.BX() != ibx)
continue;
213 int endcap = (
h.Endcap() == 1) ? 1 : 2;
214 int sector =
h.PC_sector();
215 int station = (
h.PC_station() == 0 &&
h.Subsector() == 1) ? 1 :
h.PC_station();
217 int strip = (
h.Station() == 1 &&
h.Ring() == 4) ?
h.Strip() + 128 :
h.Strip();
220 std::cout << bx <<
" " << endcap <<
" " << sector <<
" " <<
h.Subsector() <<
" " 221 << station <<
" " << valid <<
" " <<
h.Quality() <<
" " <<
h.Pattern() <<
" " 222 << wire <<
" " << chamber <<
" " <<
h.Bend() <<
" " << strip << std::endl;
225 if (
h.Sector_idx() != es)
continue;
226 if (
h.BX()+6 != ibx)
continue;
232 rpc_sub =
h.Subsector() - 1;
236 if (
h.Station() <= 2) {
237 rpc_chm = (
h.Station() - 1);
239 rpc_chm = 2 + (
h.Station() - 3)*2 + (
h.Ring() - 2);
243 int endcap = (
h.Endcap() == 1) ? 1 : 2;
244 int sector =
h.PC_sector();
247 int strip = (
h.Phi_fp() >> 2);
248 int wire = (
h.Theta_fp() >> 2);
250 std::cout << bx <<
" " << endcap <<
" " << sector <<
" " << 0 <<
" " 251 << station <<
" " << valid <<
" " << 0 <<
" " << 0 <<
" " 252 << wire <<
" " << chamber <<
" " << 0 <<
" " << strip << std::endl;
262 std::cout <<
"==== Endcap " <<
endcap <<
" Sector " << sector <<
" Tracks ====" << std::endl;
263 std::cout <<
"bx e s a mo et ph cr q pt" << std::endl;
265 for (
const auto&
t : out_tracks) {
266 if (
t.Sector_idx() != es)
continue;
268 std::cout <<
t.BX() <<
" " << (
t.Endcap() == 1 ? 1 : 2) <<
" " <<
t.Sector() <<
" " <<
t.PtLUT().address <<
" " <<
t.Mode() <<
" " 269 << (
t.GMT_eta() >= 0 ?
t.GMT_eta() :
t.GMT_eta()+512)<<
" " <<
t.GMT_phi() <<
" " 270 <<
t.GMT_charge() <<
" " <<
t.GMT_quality() <<
" " <<
t.Pt() << std::endl;
T getParameter(std::string const &) const
EventNumber_t event() const
ConditionHelper condition_helper_
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
GeometryTranslator geometry_translator_
const edm::EDGetToken tokenCSC_
void read(int pc_lut_version)
unsigned int get_pc_lut_version() const
void checkAndUpdateConditions(const edm::Event &iEvent, const edm::EventSetup &iSetup)
void extractPrimitives(T tag, const edm::Event &iEvent, const edm::EDGetToken &token, TriggerPrimitiveCollection &out) const
TrackFinder(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iConsumes)
l1t::EMTFTrackCollection EMTFTrackCollection
unsigned int get_fw_version() const
const edm::EDGetToken tokenGEM_
void checkAndUpdateGeometry(const edm::EventSetup &)
const L1TMuonEndCapForest & getForest() const
const edm::ParameterSet config_
const edm::EDGetToken tokenRPC_
l1t::EMTFHitCollection EMTFHitCollection
std::unique_ptr< PtAssignmentEngine > pt_assign_engine_
emtf::sector_array< SectorProcessor > sector_processors_
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
SectorProcessorLUT sector_processor_lut_
void process(const edm::Event &iEvent, const edm::EventSetup &iSetup, EMTFHitCollection &out_hits, EMTFTrackCollection &out_tracks)
unsigned int get_pt_lut_version() const