7 #ifndef PHASE2GMT_KMTFPRODUCER 8 #define PHASE2GMT_KMTFPRODUCER 69 produces<std::vector<l1t::SAMuon> >(
"prompt").setBranchAlias(
"prompt");
70 produces<std::vector<l1t::SAMuon> >(
"displaced").setBranchAlias(
"displaced");
71 produces<std::vector<l1t::KMTFTrack> >(
"kmtfTracks");
85 for (
uint i = 0;
i < stubHandle->size(); ++
i) {
87 if (stub->bxNum() == 0)
88 stubs.push_back(stub);
92 std::vector<SAMuon> prompt;
94 std::pair<std::vector<l1t::KMTFTrack>, std::vector<l1t::KMTFTrack> > kmtfOutput =
kmtf_->process(
stubs, 0, 32);
95 std::vector<l1t::KMTFTrack> kmtfTracks;
96 for (
const auto&
track : kmtfOutput.first) {
97 kmtfTracks.push_back(
track);
99 (
track.curvatureAtVertex() < 0),
102 track.phiAtMuon() / (1 << 5),
105 track.stubs().size() - 1);
109 bstart = wordconcat<wordtype>(
word, bstart, 1, 1);
110 bstart = wordconcat<wordtype>(
word, bstart,
p.hwCharge(), 1);
111 bstart = wordconcat<wordtype>(
word, bstart,
p.hwPt(),
BITSPT);
112 bstart = wordconcat<wordtype>(
word, bstart,
p.hwPhi(),
BITSPHI);
113 bstart = wordconcat<wordtype>(
word, bstart,
p.hwEta(),
BITSETA);
114 bstart = wordconcat<wordtype>(
word, bstart,
p.hwD0(),
BITSSAD0);
115 bstart = wordconcat<wordtype>(
word, bstart,
track.rankPrompt(), 8);
117 for (
const auto& stub :
track.stubs())
123 for (
const auto&
track : kmtfOutput.second) {
124 kmtfTracks.push_back(
track);
125 ap_int<7>
dxy =
track.dxy() * ap_ufixed<8, 1>(1.606);
127 (
track.curvatureAtMuon() < 0),
130 track.phiAtMuon() / (1 << 5),
133 track.approxDispChi2());
137 bstart = wordconcat<wordtype>(
word, bstart, 1, 1);
138 bstart = wordconcat<wordtype>(
word, bstart,
p.hwCharge(), 1);
139 bstart = wordconcat<wordtype>(
word, bstart,
p.hwPt(),
BITSPT);
140 bstart = wordconcat<wordtype>(
word, bstart,
p.hwPhi(),
BITSPHI);
141 bstart = wordconcat<wordtype>(
word, bstart,
p.hwEta(),
BITSETA);
142 bstart = wordconcat<wordtype>(
word, bstart,
p.hwD0(),
BITSSAD0);
143 bstart = wordconcat<wordtype>(
word, bstart,
track.rankDisp(), 8);
145 for (
const auto& stub :
track.stubs()) {
151 std::unique_ptr<std::vector<l1t::SAMuon> > prompt_ptr = std::make_unique<std::vector<l1t::SAMuon> >(prompt);
152 std::unique_ptr<std::vector<l1t::SAMuon> > displaced_ptr = std::make_unique<std::vector<l1t::SAMuon> >(
displaced);
153 std::unique_ptr<std::vector<l1t::KMTFTrack> > kmtf_ptr = std::make_unique<std::vector<l1t::KMTFTrack> >(kmtfTracks);
Phase2L1TGMTKMTFProducer(const edm::ParameterSet &)
std::vector< edm::Ref< MuonStubCollection > > MuonStubRefVector
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< l1t::MuonStubCollection > stubToken_
#define DEFINE_FWK_MODULE(type)
std::vector< MuonStub > MuonStubCollection
std::unique_ptr< KMTF > kmtf_