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 minPtPair_(iConfig.getParameter<double>(
"MinPtPair")),
43 minInvMass_(iConfig.getParameter<double>(
"MinInvMass")),
44 maxInvMass_(iConfig.getParameter<double>(
"MaxInvMass")),
45 massParticle1_(iConfig.getParameter<double>(
"massParticle1")),
46 massParticle2_(iConfig.getParameter<double>(
"massParticle2")),
47 chargeOpt_(iConfig.getParameter<
int>(
"ChargeOpt")),
48 triggerTypeDaughters_(iConfig.getParameter<
int>(
"triggerTypeDaughters"))
51 produces<VertexCollection>();
60 desc.
add<
double>(
"MaxEta", 2.5);
61 desc.
add<
double>(
"MinPt", 0.0);
62 desc.
add<
double>(
"MinPtPair", 0.0);
63 desc.
add<
double>(
"MinInvMass", 1.0);
64 desc.
add<
double>(
"MaxInvMass", 20.0);
65 desc.
add<
double>(
"massParticle1", 0.1396);
66 desc.
add<
double>(
"massParticle2", 0.4937);
67 desc.
add<
int>(
"ChargeOpt", -1);
68 desc.
add<
int>(
"triggerTypeDaughters", 0);
70 descriptions.
add(
"hltDisplacedtktkVtxProducer", desc);
76 double const firstTrackMass2 = firstTrackMass * firstTrackMass;
78 double const secondTrackMass2 = secondTrackMass * secondTrackMass;
94 RecoChargedCandidateCollection::const_iterator cand1;
95 RecoChargedCandidateCollection::const_iterator cand2;
101 vector<RecoChargedCandidateRef> vPrevCands;
104 std::vector<bool> candComp;
105 for (cand1 = trackcands->begin(); cand1 != trackcands->end(); cand1++)
108 for (cand1 = trackcands->begin(); cand1 != trackcands->end(); cand1++) {
110 LogDebug(
"HLTDisplacedtktkVtxProducer") <<
" 1st track in loop: q*pt= " << cand1->charge() * cand1->pt()
111 <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
114 if (!candComp[cand1 - trackcands->begin()])
124 cand2 = trackcands->begin();
129 for (; cand2 != trackcands->end(); cand2++) {
135 LogDebug(
"HLTDisplacedtktkVtxProducer")
136 <<
" 2nd track in loop: q*pt= " << cand2->charge() * cand2->pt() <<
", eta= " << cand2->eta()
137 <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
139 if (!candComp[cand2 - trackcands->begin()])
151 if (cand1->charge() * cand2->charge() > 0)
154 if (cand1->charge() * cand2->charge() < 0)
159 e1 =
sqrt(cand1->momentum().Mag2() + firstTrackMass2);
160 e2 =
sqrt(cand2->momentum().Mag2() + secondTrackMass2);
168 double invmass =
abs(
p.mass());
169 LogDebug(
"HLTDisplacedtktkVtxProducer") <<
" ... 1-2 invmass= " << invmass;
177 vector<TransientTrack> t_tks;
180 t_tks.push_back(ttkp1);
181 t_tks.push_back(ttkp2);
183 if (t_tks.size() != 2)
202 const vector<RecoChargedCandidateRef>& refVect)
const {
204 for (
auto&
i : refVect) {