36 : srcTag_(iConfig.getParameter<
edm::
InputTag>(
"Src")),
38 previousCandTag_(iConfig.getParameter<
edm::
InputTag>(
"PreviousCandTag")),
40 maxEta_(iConfig.getParameter<double>(
"MaxEta")),
41 minPt_(iConfig.getParameter<double>(
"MinPt")),
42 minPtTriplet_(iConfig.getParameter<double>(
"MinPtTriplet")),
43 minInvMass_(iConfig.getParameter<double>(
"MinInvMass")),
44 maxInvMass_(iConfig.getParameter<double>(
"MaxInvMass")),
45 chargeOpt_(iConfig.getParameter<
int>(
"ChargeOpt")) {
46 produces<VertexCollection>();
55 desc.
add<
double>(
"MaxEta", 2.5);
56 desc.
add<
double>(
"MinPt", 0.0);
57 desc.
add<
double>(
"MinPtTriplet", 0.0);
58 desc.
add<
double>(
"MinInvMass", 1.0);
59 desc.
add<
double>(
"MaxInvMass", 20.0);
60 desc.
add<
int>(
"ChargeOpt", -1);
61 descriptions.
add(
"hltDisplacedmumumuVtxProducer", desc);
66 double const MuMass = 0.106;
67 double const MuMass2 = MuMass * MuMass;
83 RecoChargedCandidateCollection::const_iterator cand1;
84 RecoChargedCandidateCollection::const_iterator cand2;
85 RecoChargedCandidateCollection::const_iterator cand3;
91 vector<RecoChargedCandidateRef> vPrevCands;
94 for (cand1 = mucands->begin(); cand1 != mucands->end(); cand1++) {
96 LogDebug(
"HLTDisplacedMumumuFilter") <<
" 1st muon in loop: q*pt= " << cand1->charge() * cand1->pt()
97 <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
104 if (fabs(cand1->eta()) >
maxEta_)
111 for (; cand2 != mucands->end(); cand2++) {
115 LogDebug(
"HLTMuonDimuonFilter") <<
" 2nd muon in loop: q*pt= " << cand2->charge() * cand2->pt()
116 <<
", eta= " << cand2->eta() <<
", hits= " << tk2->numberOfValidHits()
117 <<
", d0= " << tk2->d0();
123 if (fabs(cand2->eta()) >
maxEta_)
130 for (; cand3 != mucands->end(); cand3++) {
134 LogDebug(
"HLTMuonDimuonFilter") <<
" 3rd muon in loop: q*pt= " << cand3->charge() * cand3->pt()
135 <<
", eta= " << cand3->eta() <<
", hits= " << tk3->numberOfValidHits()
136 <<
", d0= " << tk3->d0();
142 if (fabs(cand3->eta()) >
maxEta_)
149 if (fabs(cand1->charge() + cand2->charge() + cand3->charge()) !=
chargeOpt_)
154 e1 =
sqrt(cand1->momentum().Mag2() + MuMass2);
155 e2 =
sqrt(cand2->momentum().Mag2() + MuMass2);
156 e3 =
sqrt(cand3->momentum().Mag2() + MuMass2);
165 double invmass =
abs(
p.mass());
166 LogDebug(
"HLTDisplacedMumumuFilter") <<
" ... 1-2 invmass= " << invmass;
174 vector<TransientTrack> t_tks;
178 t_tks.push_back(ttkp1);
179 t_tks.push_back(ttkp2);
180 t_tks.push_back(ttkp3);
182 if (t_tks.size() != 3)
202 const vector<RecoChargedCandidateRef>& refVect)
const {
204 for (
auto&
i : refVect) {