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 tokenCPPF_(iConsumes.consumes<
CPPFTag::digi_collection>(iConfig.getParameter<
edm::InputTag>(
"CPPFInput"))),
19 tokenGEM_(iConsumes.consumes<
GEMTag::digi_collection>(iConfig.getParameter<
edm::InputTag>(
"GEMInput"))),
20 verbose_(iConfig.getUntrackedParameter<
int>(
"verbosity")),
21 primConvLUT_(iConfig.getParameter<
edm::
ParameterSet>(
"spPCParams16").getParameter<
int>(
"PrimConvLUT")),
22 fwConfig_(iConfig.getParameter<
bool>(
"FWConfig")),
23 useCSC_(iConfig.getParameter<
bool>(
"CSCEnable")),
24 useRPC_(iConfig.getParameter<
bool>(
"RPCEnable")),
25 useCPPF_(iConfig.getParameter<
bool>(
"CPPFEnable")),
26 useGEM_(iConfig.getParameter<
bool>(
"GEMEnable")),
27 era_(iConfig.getParameter<
std::
string>(
"Era"))
30 if (
era_ ==
"Run2_2016") {
32 }
else if (
era_ ==
"Run2_2017" ||
era_ ==
"Run2_2018") {
41 auto bxShiftCSC = iConfig.
getParameter<
int>(
"CSCInputBXShift");
42 auto bxShiftRPC = iConfig.
getParameter<
int>(
"RPCInputBXShift");
43 auto bxShiftGEM = iConfig.
getParameter<
int>(
"GEMInputBXShift");
46 auto zoneBoundaries = spPCParams16.
getParameter<std::vector<int> >(
"ZoneBoundaries");
47 auto zoneOverlap = spPCParams16.getParameter<
int>(
"ZoneOverlap");
48 auto includeNeighbor = spPCParams16.getParameter<
bool>(
"IncludeNeighbor");
49 auto duplicateTheta = spPCParams16.getParameter<
bool>(
"DuplicateTheta");
50 auto fixZonePhi = spPCParams16.getParameter<
bool>(
"FixZonePhi");
51 auto useNewZones = spPCParams16.getParameter<
bool>(
"UseNewZones");
52 auto fixME11Edges = spPCParams16.getParameter<
bool>(
"FixME11Edges");
55 auto pattDefinitions = spPRParams16.
getParameter<std::vector<std::string> >(
"PatternDefinitions");
56 auto symPattDefinitions = spPRParams16.getParameter<std::vector<std::string> >(
"SymPatternDefinitions");
57 auto useSymPatterns = spPRParams16.getParameter<
bool>(
"UseSymmetricalPatterns");
60 auto thetaWindow = spTBParams16.
getParameter<
int>(
"ThetaWindow");
61 auto thetaWindowZone0 = spTBParams16.getParameter<
int>(
"ThetaWindowZone0");
62 auto useSingleHits = spTBParams16.getParameter<
bool>(
"UseSingleHits");
63 auto bugSt2PhDiff = spTBParams16.getParameter<
bool>(
"BugSt2PhDiff");
64 auto bugME11Dupes = spTBParams16.getParameter<
bool>(
"BugME11Dupes");
65 auto bugAmbigThetaWin = spTBParams16.getParameter<
bool>(
"BugAmbigThetaWin");
66 auto twoStationSameBX = spTBParams16.getParameter<
bool>(
"TwoStationSameBX");
69 auto maxRoadsPerZone = spGCParams16.
getParameter<
int>(
"MaxRoadsPerZone");
70 auto maxTracks = spGCParams16.getParameter<
int>(
"MaxTracks");
71 auto useSecondEarliest = spGCParams16.getParameter<
bool>(
"UseSecondEarliest");
72 auto bugSameSectorPt0 = spGCParams16.getParameter<
bool>(
"BugSameSectorPt0");
75 auto readPtLUTFile = spPAParams16.
getParameter<
bool>(
"ReadPtLUTFile");
76 auto fixMode15HighPt = spPAParams16.getParameter<
bool>(
"FixMode15HighPt");
77 auto bug9BitDPhi = spPAParams16.getParameter<
bool>(
"Bug9BitDPhi");
78 auto bugMode7CLCT = spPAParams16.getParameter<
bool>(
"BugMode7CLCT");
79 auto bugNegPt = spPAParams16.getParameter<
bool>(
"BugNegPt");
80 auto bugGMTPhi = spPAParams16.getParameter<
bool>(
"BugGMTPhi");
81 auto promoteMode7 = spPAParams16.getParameter<
bool>(
"PromoteMode7");
82 auto modeQualVer = spPAParams16.getParameter<
int>(
"ModeQualVer");
95 minBX,
maxBX, bxWindow, bxShiftCSC, bxShiftRPC, bxShiftGEM,
97 zoneBoundaries, zoneOverlap,
98 includeNeighbor, duplicateTheta, fixZonePhi, useNewZones, fixME11Edges,
99 pattDefinitions, symPattDefinitions, useSymPatterns,
100 thetaWindow, thetaWindowZone0,
useRPC_, useSingleHits, bugSt2PhDiff, bugME11Dupes, bugAmbigThetaWin, twoStationSameBX,
101 maxRoadsPerZone,
maxTracks, useSecondEarliest, bugSameSectorPt0,
102 readPtLUTFile, fixMode15HighPt, bug9BitDPhi, bugMode7CLCT, bugNegPt, bugGMTPhi, promoteMode7, modeQualVer
146 std::cout <<
"Num of TriggerPrimitive: " << muon_primitives.size() << std::endl;
147 for (
const auto&
p : muon_primitives) {
200 std::cout <<
"==== Endcap " <<
endcap <<
" Sector " << sector <<
" Hits ====" << std::endl;
201 std::cout <<
"bx e s ss st vf ql cp wg id bd hs" << std::endl;
203 bool empty_sector =
true;
204 for (
const auto&
h : out_hits) {
205 if (
h.Sector_idx() != es)
continue;
206 empty_sector =
false;
209 for (
int ibx = -3-5; (ibx < +3+5+5) && !empty_sector; ++ibx) {
211 for (
const auto&
h : out_hits) {
213 if (
h.Sector_idx() != es)
continue;
214 if (
h.BX() != ibx)
continue;
217 int endcap = (
h.Endcap() == 1) ? 1 : 2;
218 int sector =
h.PC_sector();
219 int station = (
h.PC_station() == 0 &&
h.Subsector() == 1) ? 1 :
h.PC_station();
221 int strip = (
h.Station() == 1 &&
h.Ring() == 4) ?
h.Strip() + 128 :
h.Strip();
224 std::cout << bx <<
" " << endcap <<
" " << sector <<
" " <<
h.Subsector() <<
" " 225 << station <<
" " << valid <<
" " <<
h.Quality() <<
" " <<
h.Pattern() <<
" " 226 << wire <<
" " << chamber <<
" " <<
h.Bend() <<
" " << strip << std::endl;
229 if (
h.Sector_idx() != es)
continue;
230 if (
h.BX()+6 != ibx)
continue;
236 rpc_sub =
h.Subsector() - 1;
240 if (
h.Station() <= 2) {
241 rpc_chm = (
h.Station() - 1);
243 rpc_chm = 2 + (
h.Station() - 3)*2 + (
h.Ring() - 2);
247 int endcap = (
h.Endcap() == 1) ? 1 : 2;
248 int sector =
h.PC_sector();
251 int strip = (
h.Phi_fp() >> 2);
252 int wire = (
h.Theta_fp() >> 2);
254 std::cout << bx <<
" " << endcap <<
" " << sector <<
" " << 0 <<
" " 255 << station <<
" " << valid <<
" " << 0 <<
" " << 0 <<
" " 256 << wire <<
" " << chamber <<
" " << 0 <<
" " << strip << std::endl;
266 std::cout <<
"==== Endcap " <<
endcap <<
" Sector " << sector <<
" Tracks ====" << std::endl;
267 std::cout <<
"bx e s a mo et ph cr q pt" << std::endl;
269 for (
const auto&
t : out_tracks) {
270 if (
t.Sector_idx() != es)
continue;
272 std::cout <<
t.BX() <<
" " << (
t.Endcap() == 1 ? 1 : 2) <<
" " <<
t.Sector() <<
" " <<
t.PtLUT().address <<
" " <<
t.Mode() <<
" " 273 << (
t.GMT_eta() >= 0 ?
t.GMT_eta() :
t.GMT_eta()+512)<<
" " <<
t.GMT_phi() <<
" " 274 <<
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
const edm::EDGetToken tokenCPPF_
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