36 : srcTag_(iConfig.getParameter<
edm::
InputTag>(
"Src")),
38 previousCandTag_(iConfig.getParameter<
edm::
InputTag>(
"PreviousCandTag")),
40 maxEta_(iConfig.getParameter<double>(
"MaxEtaTk")),
41 minPtTk1_(iConfig.getParameter<double>(
"MinPtResTk1")),
42 minPtTk2_(iConfig.getParameter<double>(
"MinPtResTk2")),
43 minPtTk3_(iConfig.getParameter<double>(
"MinPtThirdTk")),
44 minPtRes_(iConfig.getParameter<double>(
"MinPtRes")),
45 minPtTri_(iConfig.getParameter<double>(
"MinPtTri")),
46 minInvMassRes_(iConfig.getParameter<double>(
"MinInvMassRes")),
47 maxInvMassRes_(iConfig.getParameter<double>(
"MaxInvMassRes")),
48 minInvMass_(iConfig.getParameter<double>(
"MinInvMass")),
49 maxInvMass_(iConfig.getParameter<double>(
"MaxInvMass")),
50 massParticle1_(iConfig.getParameter<double>(
"massParticleRes1")),
51 massParticle2_(iConfig.getParameter<double>(
"massParticleRes2")),
52 massParticle3_(iConfig.getParameter<double>(
"massParticle3")),
53 chargeOpt_(iConfig.getParameter<
int>(
"ChargeOpt")),
54 resOpt_(iConfig.getParameter<
int>(
"ResOpt")),
55 triggerTypeDaughters_(iConfig.getParameter<
int>(
"triggerTypeDaughters"))
58 produces<VertexCollection>();
87 desc.
add<
double>(
"MaxEtaTk", 2.5);
88 desc.
add<
double>(
"MinPtResTk1", 0.0);
89 desc.
add<
double>(
"MinPtResTk2", 0.0);
90 desc.
add<
double>(
"MinPtThirdTk", 0.0);
91 desc.
add<
double>(
"MinPtRes", 0.0);
92 desc.
add<
double>(
"MinPtTri", 0.0);
93 desc.
add<
double>(
"MinInvMassRes", 1.0);
94 desc.
add<
double>(
"MaxInvMassRes", 20.0);
95 desc.
add<
double>(
"MinInvMass", 1.0);
96 desc.
add<
double>(
"MaxInvMass", 20.0);
97 desc.
add<
double>(
"massParticleRes1", 0.4937);
98 desc.
add<
double>(
"massParticleRes2", 0.4937);
99 desc.
add<
double>(
"massParticle3", 0.1396);
100 desc.
add<
int>(
"ChargeOpt", -1);
101 desc.
add<
int>(
"ResOpt", 1);
102 desc.
add<
int>(
"triggerTypeDaughters", 0);
104 descriptions.
add(
"hltDisplacedtktktkVtxProducer", desc);
112 if (trackcands->size() < 3)
125 RecoChargedCandidateCollection::const_iterator cand1;
126 RecoChargedCandidateCollection::const_iterator cand2;
127 RecoChargedCandidateCollection::const_iterator cand3;
133 vector<RecoChargedCandidateRef> vPrevCands;
136 std::vector<bool> candComp;
137 for (cand1 = trackcands->begin(); cand1 != trackcands->end(); cand1++)
140 for (cand1 = trackcands->begin(); cand1 != trackcands->end(); cand1++) {
142 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" 1st track in loop: q*pt= " << cand1->charge() * cand1->pt()
143 <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
146 if (!candComp[cand1 - trackcands->begin()])
156 cand2 = trackcands->begin();
161 for (; cand2 != trackcands->end(); cand2++) {
165 LogDebug(
"HLTDisplacedtktktkVtxProducer")
166 <<
" 2nd track in loop: q*pt= " << cand2->charge() * cand2->pt() <<
", eta= " << cand2->eta()
167 <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
170 if (!candComp[cand2 - trackcands->begin()])
183 if (cand1->charge() * cand2->charge() > 0)
186 if (cand1->charge() * cand2->charge() < 0)
201 double invmassRes =
std::abs(pres.mass());
202 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" ... 1-2 invmass= " << invmassRes;
209 cand3 = trackcands->begin();
214 for (; cand3 != trackcands->end(); cand3++) {
216 if (tk1 == tk3 || tk2 == tk3)
218 LogDebug(
"HLTDisplacedtktktkVtxProducer")
219 <<
" 3rd track in loop: q*pt= " << cand3->charge() * cand3->pt() <<
", eta= " << cand3->eta()
220 <<
", hits= " << tk3->numberOfValidHits();
223 if (!candComp[cand3 - trackcands->begin()])
241 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" ... 1-2-3 invmass= " << invmass;
248 vector<TransientTrack> t_tks;
253 t_tks.push_back(ttkp1);
254 t_tks.push_back(ttkp2);
255 t_tks.push_back(ttkp3);
257 if (t_tks.size() != 3)
277 const vector<RecoChargedCandidateRef>& refVect)
const {
279 for (
auto&
i : refVect) {