1 #ifndef HLTrigger_Muon_HLTTriMuonIsolation_h
2 #define HLTrigger_Muon_HLTTriMuonIsolation_h
44 return cand_1.pt() > cand_2.pt();
71 L3DiMuonsFilterToken_(
72 consumes<
trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<
edm::
InputTag>(
"L3DiMuonsFilterSrc"))),
74 Muon1PtCut_(iConfig.getParameter<double>(
"Muon1PtCut")),
75 Muon2PtCut_(iConfig.getParameter<double>(
"Muon2PtCut")),
76 Muon3PtCut_(iConfig.getParameter<double>(
"Muon3PtCut")),
77 TriMuonPtCut_(iConfig.getParameter<double>(
"TriMuonPtCut")),
78 TriMuonEtaCut_(iConfig.getParameter<double>(
"TriMuonEtaCut")),
79 ChargedRelIsoCut_(iConfig.getParameter<double>(
"ChargedRelIsoCut")),
80 ChargedAbsIsoCut_(iConfig.getParameter<double>(
"ChargedAbsIsoCut")),
81 IsoConeSize_(iConfig.getParameter<double>(
"IsoConeSize")),
82 MatchingConeSize_(iConfig.getParameter<double>(
"MatchingConeSize")),
83 MinTriMuonMass_(iConfig.getParameter<double>(
"MinTriMuonMass")),
84 MaxTriMuonMass_(iConfig.getParameter<double>(
"MaxTriMuonMass")),
85 MaxTriMuonRadius_(iConfig.getParameter<double>(
"MaxTriMuonRadius")),
86 TriMuonAbsCharge_(iConfig.getParameter<
int>(
"TriMuonAbsCharge")),
87 MaxDZ_(iConfig.getParameter<double>(
"MaxDZ")),
88 EnableRelIso_(iConfig.getParameter<
bool>(
"EnableRelIso")),
89 EnableAbsIso_(iConfig.getParameter<
bool>(
"EnableAbsIso")) {
91 produces<reco::CompositeCandidateCollection>(
"Taus");
92 produces<reco::CompositeCandidateCollection>(
"SelectedTaus");
124 for (
auto i =
AllMuCands->begin();
i != AllMuCands_end - 2; ++
i) {
126 bool passingPreviousFilter_1 =
false;
129 passingPreviousFilter_1 =
true;
131 for (
auto j =
i + 1;
j != AllMuCands_end - 1; ++
j) {
133 bool passingPreviousFilter_2 =
false;
136 passingPreviousFilter_2 =
true;
139 if (!(passingPreviousFilter_1 || passingPreviousFilter_2))
141 for (
auto k =
j + 1;
k != AllMuCands_end; ++
k) {
143 bool passingPreviousFilter_3 =
false;
146 passingPreviousFilter_3 =
true;
149 if (!((passingPreviousFilter_1 & passingPreviousFilter_2) ||
150 (passingPreviousFilter_1 & passingPreviousFilter_3) ||
151 (passingPreviousFilter_2 & passingPreviousFilter_3)))
165 std::sort(
daughters.begin(),
daughters.end(), ptComparer<reco::RecoChargedCandidate>);
183 int tauPdgId =
charge > 0 ? 15 : -15;
187 tau.setPdgId(tauPdgId);
199 bool collimated =
true;
233 Taus->push_back(
tau);
239 std::sort(Taus->begin(), Taus->end(), ptComparer<reco::CompositeCandidate>);
242 for (
const auto& itau : *Taus) {
244 double sumPt = -itau.pt();
259 if (!((
sumPt < chAbsIsoCut) || (
sumPt < chRelIsoCut)))
262 SelectedTaus->push_back(itau);
277 desc.
add<
double>(
"Muon1PtCut", 5.);
278 desc.
add<
double>(
"Muon2PtCut", 3.);
279 desc.
add<
double>(
"Muon3PtCut", 0.);
280 desc.
add<
double>(
"TriMuonPtCut", 8.);
281 desc.
add<
double>(
"TriMuonEtaCut", 2.5);
282 desc.
add<
double>(
"ChargedAbsIsoCut", 3.0);
283 desc.
add<
double>(
"ChargedRelIsoCut", 0.1);
284 desc.
add<
double>(
"IsoConeSize", 0.5);
285 desc.
add<
double>(
"MatchingConeSize", 0.03);
286 desc.
add<
double>(
"MinTriMuonMass", 0.5);
287 desc.
add<
double>(
"MaxTriMuonMass", 2.8);
288 desc.
add<
double>(
"MaxTriMuonRadius", 0.6);
289 desc.
add<
int>(
"TriMuonAbsCharge", -1);
290 desc.
add<
double>(
"MaxDZ", 0.3);
291 desc.
add<
bool>(
"EnableRelIso",
false);
292 desc.
add<
bool>(
"EnableAbsIso",
true);
293 descriptions.
add(
"hltTriMuonIsolationProducer", desc);