31 srcTag_(iConfig.getParameter<
edm::
InputTag>(
"Src")),
33 previousCandTag_(iConfig.getParameter<
edm::
InputTag>(
"PreviousCandTag")),
35 maxEta_(iConfig.getParameter<double>(
"MaxEtaTk")),
36 minPtTk1_(iConfig.getParameter<double>(
"MinPtResTk1")),
37 minPtTk2_(iConfig.getParameter<double>(
"MinPtResTk2")),
38 minPtTk3_(iConfig.getParameter<double>(
"MinPtThirdTk")),
39 minPtRes_(iConfig.getParameter<double>(
"MinPtRes")),
40 minPtTri_(iConfig.getParameter<double>(
"MinPtTri")),
41 minInvMassRes_(iConfig.getParameter<double>(
"MinInvMassRes")),
42 maxInvMassRes_(iConfig.getParameter<double>(
"MaxInvMassRes")),
43 minInvMass_(iConfig.getParameter<double>(
"MinInvMass")),
44 maxInvMass_(iConfig.getParameter<double>(
"MaxInvMass")),
45 massParticle1_(iConfig.getParameter<double>(
"massParticleRes1")),
46 massParticle2_(iConfig.getParameter<double>(
"massParticleRes2")),
47 massParticle3_(iConfig.getParameter<double>(
"massParticle3")),
48 chargeOpt_(iConfig.getParameter<
int>(
"ChargeOpt")),
49 resOpt_(iConfig.getParameter<
int>(
"ResOpt")),
50 triggerTypeDaughters_(iConfig.getParameter<
int>(
"triggerTypeDaughters")) {
51 produces<VertexCollection>();
80 desc.add<
double>(
"MaxEtaTk", 2.5);
81 desc.add<
double>(
"MinPtResTk1", 0.0);
82 desc.add<
double>(
"MinPtResTk2", 0.0);
83 desc.add<
double>(
"MinPtThirdTk", 0.0);
84 desc.add<
double>(
"MinPtRes", 0.0);
85 desc.add<
double>(
"MinPtTri", 0.0);
86 desc.add<
double>(
"MinInvMassRes", 1.0);
87 desc.add<
double>(
"MaxInvMassRes", 20.0);
88 desc.add<
double>(
"MinInvMass", 1.0);
89 desc.add<
double>(
"MaxInvMass", 20.0);
90 desc.add<
double>(
"massParticleRes1", 0.4937);
91 desc.add<
double>(
"massParticleRes2", 0.4937);
92 desc.add<
double>(
"massParticle3", 0.1396);
93 desc.add<
int>(
"ChargeOpt", -1);
94 desc.add<
int>(
"ResOpt", 1);
95 desc.add<
int>(
"triggerTypeDaughters", 0);
97 descriptions.
add(
"hltDisplacedtktktkVtxProducer",
desc);
105 if (trackcands->size() < 3)
117 RecoChargedCandidateCollection::const_iterator cand1;
118 RecoChargedCandidateCollection::const_iterator cand2;
119 RecoChargedCandidateCollection::const_iterator cand3;
125 vector<RecoChargedCandidateRef> vPrevCands;
128 std::vector<bool> candComp;
129 for (cand1 = trackcands->begin(); cand1 != trackcands->end(); cand1++)
132 for (cand1 = trackcands->begin(); cand1 != trackcands->end(); cand1++) {
134 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" 1st track in loop: q*pt= " << cand1->charge() * cand1->pt()
135 <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
138 if (!candComp[cand1 - trackcands->begin()])
148 cand2 = trackcands->begin();
153 for (; cand2 != trackcands->end(); cand2++) {
157 LogDebug(
"HLTDisplacedtktktkVtxProducer")
158 <<
" 2nd track in loop: q*pt= " << cand2->charge() * cand2->pt() <<
", eta= " << cand2->eta()
159 <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
162 if (!candComp[cand2 - trackcands->begin()])
175 if (cand1->charge() * cand2->charge() > 0)
178 if (cand1->charge() * cand2->charge() < 0)
193 double invmassRes =
std::abs(pres.mass());
194 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" ... 1-2 invmass= " << invmassRes;
201 cand3 = trackcands->begin();
206 for (; cand3 != trackcands->end(); cand3++) {
208 if (tk1 == tk3 || tk2 == tk3)
210 LogDebug(
"HLTDisplacedtktktkVtxProducer")
211 <<
" 3rd track in loop: q*pt= " << cand3->charge() * cand3->pt() <<
", eta= " << cand3->eta()
212 <<
", hits= " << tk3->numberOfValidHits();
215 if (!candComp[cand3 - trackcands->begin()])
233 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" ... 1-2-3 invmass= " << invmass;
240 vector<TransientTrack> t_tks;
245 t_tks.push_back(ttkp1);
246 t_tks.push_back(ttkp2);
247 t_tks.push_back(ttkp3);
249 if (t_tks.size() != 3)
269 const vector<RecoChargedCandidateRef>& refVect)
const {
271 for (
auto&
i : refVect) {
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const int triggerTypeDaughters_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
std::vector< Vertex > VertexCollection
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > srcToken_
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
~HLTDisplacedtktktkVtxProducer() override
bool checkPreviousCand(const reco::TrackRef &trackref, const std::vector< reco::RecoChargedCandidateRef > &ref2) const
const double massParticle1_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackRecordToken_
Abs< T >::type abs(const T &t)
HLTDisplacedtktktkVtxProducer(const edm::ParameterSet &)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const double massParticle2_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
const double maxInvMassRes_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::Event &, const edm::EventSetup &) override
const double massParticle3_
const double minInvMassRes_
T const * get() const
Returns C++ pointer to the item.
math::PtEtaPhiELorentzVectorF LorentzVector