100 auto out = std::make_unique<std::vector<pat::Muon>>();
101 out->reserve(
src->size());
103 auto outDTSegments = std::make_unique<DTRecSegment4DCollection>();
104 std::set<DTRecSegment4DRef> dtSegmentsRefs;
105 auto outCSCSegments = std::make_unique<CSCSegmentCollection>();
106 std::set<CSCSegmentRef> cscSegmentsRefs;
112 std::map<reco::CandidatePtr, pat::PackedCandidateRef> mu2pc;
116 for (
unsigned int ipfh = 0, npfh =
pf_.size(); ipfh < npfh; ++ipfh) {
119 const auto &pfcoll = (*pf);
120 const auto &pfmap = (*pf2pc);
121 for (
unsigned int i = 0,
n =
pf->size();
i <
n; ++
i) {
123 if (
p.muonRef().isNonnull())
134 for (vector<pat::Muon>::const_iterator it =
src->begin(), ed =
src->end(); it != ed; ++it) {
152 mu.setPFIsolation(
"pfIsoMeanDRProfileR03",
zero);
153 mu.setPFIsolation(
"pfIsoSumDRProfileR03",
zero);
154 mu.setPFIsolation(
"pfIsoMeanDRProfileR04",
zero);
155 mu.setPFIsolation(
"pfIsoSumDRProfileR04",
zero);
162 ene.
tower = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
tower);
164 ene.
towerS9 = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
towerS9);
166 ene.
had = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
had);
168 ene.
hadS9 = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
hadS9);
170 ene.
hadMax = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
hadMax);
172 ene.
em = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
em);
174 ene.
emS25 = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
emS25);
176 ene.
emMax = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
emMax);
186 MiniFloatConverter::reduceMantissaToNbitsRounding<14>(ene.
ecal_position.Y()),
187 MiniFloatConverter::reduceMantissaToNbitsRounding<14>(ene.
ecal_position.Z()));
189 MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
hcal_position.Y()),
190 MiniFloatConverter::reduceMantissaToNbitsRounding<12>(ene.
hcal_position.Z()));
191 mu.setCalEnergy(ene);
197 MiniFloatConverter::reduceMantissaToNbitsRounding<12>(qual.
tkKink_position.Y()),
198 MiniFloatConverter::reduceMantissaToNbitsRounding<12>(qual.
tkKink_position.Z()));
199 mu.setCombinedQuality(qual);
204 MiniFloatConverter::reduceMantissaToNbitsRounding<10>(corrs.
corrX()),
205 MiniFloatConverter::reduceMantissaToNbitsRounding<10>(corrs.
corrY()));
206 mu.embedCaloMETMuonCorrs(corrs);
210 cmatch.edgeX = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(cmatch.edgeX);
211 cmatch.edgeY = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(cmatch.edgeY);
212 cmatch.xErr = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(cmatch.xErr);
213 cmatch.yErr = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(cmatch.yErr);
214 cmatch.dXdZErr = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(cmatch.dXdZErr);
215 cmatch.dYdZErr = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(cmatch.dYdZErr);
217 smatch.
xErr = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(smatch.
xErr);
218 smatch.
yErr = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(smatch.
yErr);
219 smatch.
dXdZErr = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(smatch.
dXdZErr);
220 smatch.
dYdZErr = MiniFloatConverter::reduceMantissaToNbitsRounding<12>(smatch.
dYdZErr);
235 std::map<DTRecSegment4DRef, size_t> dtMap;
236 std::vector<DTRecSegment4D> outDTSegmentsTmp;
237 std::map<CSCSegmentRef, size_t> cscMap;
238 std::vector<CSCSegment> outCSCSegmentsTmp;
239 for (
auto &seg : dtSegmentsRefs) {
240 dtMap[seg] = outDTSegments->size();
241 outDTSegmentsTmp.push_back(*seg);
243 for (
auto &seg : cscSegmentsRefs) {
244 cscMap[seg] = outCSCSegments->size();
245 outCSCSegmentsTmp.push_back(*seg);
247 outDTSegments->put(
DTChamberId(), outDTSegmentsTmp.begin(), outDTSegmentsTmp.end());
248 outCSCSegments->put(
CSCDetId(), outCSCSegmentsTmp.begin(), outCSCSegmentsTmp.end());
251 for (
auto &
mu : *
out) {
252 if (
mu.isMatchesValid()) {