9 : geometry_translator_(),
11 sector_processor_lut_(),
15 tokenCSC_(iConsumes.consumes<
CSCTag::digi_collection>(iConfig.getParameter<
edm::
InputTag>(
"CSCInput"))),
16 tokenRPC_(iConsumes.consumes<
RPCTag::digi_collection>(iConfig.getParameter<
edm::
InputTag>(
"RPCInput"))),
17 tokenCPPF_(iConsumes.consumes<
CPPFTag::digi_collection>(iConfig.getParameter<
edm::
InputTag>(
"CPPFInput"))),
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 useCPPF_(iConfig.getParameter<
bool>(
"CPPFEnable")),
25 useGEM_(iConfig.getParameter<
bool>(
"GEMEnable")),
26 era_(iConfig.getParameter<
std::
string>(
"Era")) {
27 if (
era_ ==
"Run2_2016") {
29 }
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");
170 std::cout <<
"Num of TriggerPrimitive: " << muon_primitives.size() << std::endl;
171 for (
const auto&
p : muon_primitives) {
220 std::cout <<
"==== Endcap " <<
endcap <<
" Sector " << sector <<
" Hits ====" << std::endl;
221 std::cout <<
"bx e s ss st vf ql cp wg id bd hs" << std::endl;
223 bool empty_sector =
true;
224 for (
const auto&
h : out_hits) {
225 if (
h.Sector_idx() != es)
227 empty_sector =
false;
230 for (
int ibx = -3 - 5; (ibx < +3 + 5 + 5) && !empty_sector; ++ibx) {
231 for (
const auto&
h : out_hits) {
233 if (
h.Sector_idx() != es)
239 int endcap = (
h.Endcap() == 1) ? 1 : 2;
240 int sector =
h.PC_sector();
241 int station = (
h.PC_station() == 0 &&
h.Subsector() == 1) ? 1 :
h.PC_station();
243 int strip = (
h.Station() == 1 &&
h.Ring() == 4) ?
h.Strip() + 128 :
h.Strip();
246 std::cout << bx <<
" " << endcap <<
" " << sector <<
" " <<
h.Subsector() <<
" " << station <<
" " 247 << valid <<
" " <<
h.Quality() <<
" " <<
h.Pattern() <<
" " << wire <<
" " << chamber <<
" " 248 <<
h.Bend() <<
" " << strip << std::endl;
251 if (
h.Sector_idx() != es)
253 if (
h.BX() + 6 != ibx)
260 rpc_sub =
h.Subsector() - 1;
264 if (
h.Station() <= 2) {
265 rpc_chm = (
h.Station() - 1);
267 rpc_chm = 2 + (
h.Station() - 3) * 2 + (
h.Ring() - 2);
271 int endcap = (
h.Endcap() == 1) ? 1 : 2;
272 int sector =
h.PC_sector();
275 int strip = (
h.Phi_fp() >> 2);
276 int wire = (
h.Theta_fp() >> 2);
278 std::cout << bx <<
" " << endcap <<
" " << sector <<
" " << 0 <<
" " << station <<
" " << valid <<
" " 279 << 0 <<
" " << 0 <<
" " << wire <<
" " << chamber <<
" " << 0 <<
" " << strip << std::endl;
289 std::cout <<
"==== Endcap " <<
endcap <<
" Sector " << sector <<
" Tracks ====" << std::endl;
290 std::cout <<
"bx e s a mo et ph cr q pt" << std::endl;
292 for (
const auto&
t : out_tracks) {
293 if (
t.Sector_idx() != es)
296 std::cout <<
t.BX() <<
" " << (
t.Endcap() == 1 ? 1 : 2) <<
" " <<
t.Sector() <<
" " <<
t.PtLUT().address
297 <<
" " <<
t.Mode() <<
" " << (
t.GMT_eta() >= 0 ?
t.GMT_eta() :
t.GMT_eta() + 512) <<
" " 298 <<
t.GMT_phi() <<
" " <<
t.GMT_charge() <<
" " <<
t.GMT_quality() <<
" " <<
t.Pt() << std::endl;
T getParameter(std::string const &) const
EventNumber_t event() const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
l1t::EMTFTrackCollection EMTFTrackCollection
ConditionHelper condition_helper_
GeometryTranslator geometry_translator_
const edm::EDGetToken tokenCSC_
unsigned int get_pc_lut_version() const
const edm::EDGetToken tokenCPPF_
void read(bool pc_lut_data, int pc_lut_version)
l1t::EMTFHitCollection EMTFHitCollection
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)
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_
std::unique_ptr< PtAssignmentEngine > pt_assign_engine_
emtf::sector_array< SectorProcessor > sector_processors_
SectorProcessorLUT sector_processor_lut_
void process(const edm::Event &iEvent, const edm::EventSetup &iSetup, EMTFHitCollection &out_hits, EMTFTrackCollection &out_tracks)
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
unsigned int get_pt_lut_version() const