131 histtitle =
"muonPt";
136 histname =
"muonPtNoDxyCut";
137 histtitle =
"muonPtNoDxyCut";
147 histname =
"muonPt_variable";
148 histtitle =
"muonPt";
152 histname =
"muonPtVsLS";
153 histtitle =
"muonPt vs LS";
165 histname =
"muonEta";
166 histtitle =
"muonEta";
171 histname =
"muonPhi";
172 histtitle =
"muonPhi";
177 histname =
"muonDxy";
178 histtitle =
"muonDxy";
184 histname =
"subMuonPt";
185 histtitle =
"subMuonPt";
190 histname =
"subMuonPt_variable";
191 histtitle =
"subMuonPt";
195 histname =
"subMuonEta";
196 histtitle =
"subMuonEta";
206 histname =
"subMuonPhi";
207 histtitle =
"subMuonPhi";
217 histname =
"subMuonDxy";
218 histtitle =
"subMuonDxy";
241 const int ls =
iEvent.id().luminosityBlock();
245 if ((
unsigned int)(DSAHandle->size()) <
nmuons_)
247 std::vector<edm::Ptr<reco::Track>> dsaMuonPtrs_{};
248 for (
size_t i(0);
i != DSAHandle->size(); ++
i) {
249 dsaMuonPtrs_.emplace_back(DSAHandle,
i);
251 std::vector<edm::Ptr<reco::Track>>
muons{}, muonsCutOnPt{}, muonsCutOnDxy{}, muonsCutOnPtAndDxy{};
255 std::copy_if(dsaMuonPtrs_.begin(), dsaMuonPtrs_.end(), back_inserter(
muons), selectGeneral_);
261 return lhs->
pt() > rhs->pt();
267 std::copy_if(
muons.begin(),
muons.end(), back_inserter(muonsCutOnPt), selectOnPt_);
270 std::copy_if(
muons.begin(),
muons.end(), back_inserter(muonsCutOnDxy), selectOnDxy_);
272 auto selectOnPtAndDxy_(
274 std::copy_if(
muons.begin(),
muons.end(), back_inserter(muonsCutOnPtAndDxy), selectOnPtAndDxy_);
276 std::sort(muonsCutOnPt.begin(), muonsCutOnPt.end(), ptSorter_);
277 std::sort(muonsCutOnDxy.begin(), muonsCutOnDxy.end(), ptSorter_);
278 std::sort(muonsCutOnPtAndDxy.begin(), muonsCutOnPtAndDxy.end(), ptSorter_);
283 if (muonsCutOnDxy.size() >=
nmuons_) {
294 if (muonsCutOnPtAndDxy.size() >=
nmuons_) {
303 if (muonsCutOnPt.size() >=
nmuons_) {
317 if (muonsCutOnDxy.size() >=
nmuons_) {
328 if (muonsCutOnPtAndDxy.size() >=
nmuons_) {
337 if (muonsCutOnPt.size() >=
nmuons_) {
349 desc.add<
bool>(
"requireValidHLTPaths",
true);
352 desc.add<
unsigned int>(
"nmuons", 2);
393 std::vector<double>
bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
394 170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
399 descriptions.
add(
"DiDispStaMuonMonitoring",
desc);