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");
122 for (
auto i =
AllMuCands->begin();
i != AllMuCands_end - 2; ++
i) {
124 bool passingPreviousFilter_1 =
false;
127 passingPreviousFilter_1 =
true;
129 for (
auto j =
i + 1;
j != AllMuCands_end - 1; ++
j) {
131 bool passingPreviousFilter_2 =
false;
134 passingPreviousFilter_2 =
true;
137 if (!(passingPreviousFilter_1 || passingPreviousFilter_2))
139 for (
auto k =
j + 1;
k != AllMuCands_end; ++
k) {
141 bool passingPreviousFilter_3 =
false;
144 passingPreviousFilter_3 =
true;
147 if (!((passingPreviousFilter_1 & passingPreviousFilter_2) ||
148 (passingPreviousFilter_1 & passingPreviousFilter_3) ||
149 (passingPreviousFilter_2 & passingPreviousFilter_3)))
181 int tauPdgId =
charge > 0 ? 15 : -15;
185 tau.setPdgId(tauPdgId);
197 bool collimated =
true;
231 Taus->push_back(
tau);
237 std::sort(Taus->begin(), Taus->end(), ptComparer<reco::CompositeCandidate>);
240 for (
const auto& itau : *Taus) {
242 double sumPt = -itau.pt();
257 if (!((
sumPt < chAbsIsoCut) || (
sumPt < chRelIsoCut)))
260 SelectedTaus->push_back(itau);
275 desc.add<
double>(
"Muon1PtCut", 5.);
276 desc.add<
double>(
"Muon2PtCut", 3.);
277 desc.add<
double>(
"Muon3PtCut", 0.);
278 desc.add<
double>(
"TriMuonPtCut", 8.);
279 desc.add<
double>(
"TriMuonEtaCut", 2.5);
280 desc.add<
double>(
"ChargedAbsIsoCut", 3.0);
281 desc.add<
double>(
"ChargedRelIsoCut", 0.1);
282 desc.add<
double>(
"IsoConeSize", 0.5);
283 desc.add<
double>(
"MatchingConeSize", 0.03);
284 desc.add<
double>(
"MinTriMuonMass", 0.5);
285 desc.add<
double>(
"MaxTriMuonMass", 2.8);
286 desc.add<
double>(
"MaxTriMuonRadius", 0.6);
287 desc.add<
int>(
"TriMuonAbsCharge", -1);
288 desc.add<
double>(
"MaxDZ", 0.3);
289 desc.add<
bool>(
"EnableRelIso",
false);
290 desc.add<
bool>(
"EnableAbsIso",
true);
291 descriptions.
add(
"hltTriMuonIsolationProducer",
desc);
~HLTTriMuonIsolation() override=default
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > AllMuonsToken_
edm::Handle< reco::RecoChargedCandidateCollection > L3MuCands
edm::Handle< trigger::TriggerFilterObjectWithRefs > L3DiMuonsFilterCands
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
const double MaxTriMuonMass_
std::vector< CompositeCandidate > CompositeCandidateCollection
collection of Candidate objects
const double TriMuonPtCut_
const int TriMuonAbsCharge_
const double MinTriMuonMass_
std::vector< Track > TrackCollection
collection of Tracks
static bool ptComparer(const T &cand_1, const T &cand_2)
const double TriMuonEtaCut_
const double TwiceMuonMass_
const double ChargedAbsIsoCut_
const double IsoConeSize_
const double MatchingConeSize_
Abs< T >::type abs(const T &t)
edm::Handle< reco::TrackCollection > IsoTracks
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const double ChargedRelIsoCut_
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > L3MuonsToken_
edm::Handle< reco::RecoChargedCandidateCollection > AllMuCands
edm::Handle< reco::RecoChargedCandidateRef > PassedL3Muons
HLTTriMuonIsolation(const edm::ParameterSet &iConfig)
const double MaxTriMuonRadius_
const edm::EDGetTokenT< reco::TrackCollection > IsoTracksToken_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > L3DiMuonsFilterToken_