32 : muCandTag_(iConfig.getParameter<
edm::
InputTag>(
"MuCand")),
34 trkCandTag_(iConfig.getParameter<
edm::
InputTag>(
"TrackCand")),
36 previousCandTag_(iConfig.getParameter<
edm::
InputTag>(
"PreviousCandTag")),
38 mfName_(iConfig.getParameter<
std::
string>(
"SimpleMagneticField")),
39 thirdTrackMass_(iConfig.getParameter<double>(
"ThirdTrackMass")),
40 maxEta_(iConfig.getParameter<double>(
"MaxEta")),
41 minPt_(iConfig.getParameter<double>(
"MinPt")),
42 minInvMass_(iConfig.getParameter<double>(
"MinInvMass")),
43 maxInvMass_(iConfig.getParameter<double>(
"MaxInvMass")),
44 minD0Significance_(iConfig.getParameter<double>(
"MinD0Significance")),
45 overlapDR_(iConfig.getParameter<double>(
"OverlapDR")),
46 beamSpotTag_(iConfig.getParameter<
edm::
InputTag>(
"BeamSpotTag")),
48 produces<VertexCollection>();
60 desc.
add<
double>(
"ThirdTrackMass", 0.493677);
61 desc.
add<
double>(
"MaxEta", 2.5);
62 desc.
add<
double>(
"MinPt", 3.0);
63 desc.
add<
double>(
"MinInvMass", 0.0);
64 desc.
add<
double>(
"MaxInvMass", 99999.);
65 desc.
add<
double>(
"MinD0Significance", 0.0);
66 desc.
add<
double>(
"OverlapDR", 1.44e-4);
68 descriptions.
add(
"HLTmumutkVtxProducer", desc);
73 const double MuMass(0.106);
74 const double MuMass2(MuMass * MuMass);
109 if (mucands->size() < 2)
111 if (trkcands->empty())
114 RecoChargedCandidateCollection::const_iterator mucand1;
115 RecoChargedCandidateCollection::const_iterator mucand2;
116 RecoChargedCandidateCollection::const_iterator trkcand;
122 vector<RecoChargedCandidateRef> vPrevCands;
125 for (mucand1 = mucands->begin(); mucand1 != mucands->end(); ++mucand1) {
127 LogDebug(
"HLTmumutkVtxProducer") <<
" 1st muon: q*pt= " << trk1->charge() * trk1->pt() <<
", eta= " << trk1->eta()
128 <<
", hits= " << trk1->numberOfValidHits();
135 if (fabs(trk1->eta()) >
maxEta_)
142 for (; mucand2 != mucands->end(); mucand2++) {
145 LogDebug(
"HLTDisplacedMumukFilter") <<
" 2nd muon: q*pt= " << trk2->charge() * trk2->pt()
146 <<
", eta= " << trk2->eta() <<
", hits= " << trk2->numberOfValidHits();
152 if (fabs(trk2->eta()) >
maxEta_)
158 for (trkcand = trkcands->begin(); trkcand != trkcands->end(); ++trkcand) {
165 LogDebug(
"HLTDisplacedMumukFilter") <<
" 3rd track: q*pt= " << trk3->charge() * trk3->pt()
166 <<
", eta= " << trk3->eta() <<
", hits= " << trk3->numberOfValidHits();
169 if (fabs(trk3->eta()) >
maxEta_)
175 e1 =
sqrt(trk1->momentum().Mag2() + MuMass2);
176 e2 =
sqrt(trk2->momentum().Mag2() + MuMass2);
177 e3 =
sqrt(trk3->momentum().Mag2() + thirdTrackMass2);
186 double invmass =
abs(
p.mass());
187 LogDebug(
"HLTDisplacedMumukFilter") <<
" Invmass= " << invmass;
194 vector<TransientTrack> t_tks;
195 t_tks.push_back((*theB).build(&trk1));
196 t_tks.push_back((*theB).build(&trk2));
197 t_tks.push_back((*theB).build(&trk3));
198 if (t_tks.size() != 3)
232 if (
deltaR(trackref1->eta(), trackref1->phi(), trackref2->eta(), trackref2->phi()) <
overlapDR_)
238 const vector<RecoChargedCandidateRef>& refVect)
const {
240 for (
auto&
i : refVect) {