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>();
91 desc.
add<
double>(
"MaxEtaTk",2.5);
92 desc.
add<
double>(
"MinPtResTk1",0.0);
93 desc.
add<
double>(
"MinPtResTk2",0.0);
94 desc.
add<
double>(
"MinPtThirdTk",0.0);
95 desc.
add<
double>(
"MinPtRes",0.0);
96 desc.
add<
double>(
"MinPtTri",0.0);
97 desc.
add<
double>(
"MinInvMassRes",1.0);
98 desc.
add<
double>(
"MaxInvMassRes",20.0);
99 desc.
add<
double>(
"MinInvMass",1.0);
100 desc.
add<
double>(
"MaxInvMass",20.0);
101 desc.
add<
double>(
"massParticleRes1",0.4937);
102 desc.
add<
double>(
"massParticleRes2",0.4937);
103 desc.
add<
double>(
"massParticle3",0.1396);
104 desc.
add<
int>(
"ChargeOpt",-1);
105 desc.
add<
int>(
"ResOpt",1);
106 desc.
add<
int>(
"triggerTypeDaughters",0);
108 descriptions.
add(
"hltDisplacedtktktkVtxProducer", desc);
129 if ( trackcands->size() < 3 )
return;
141 RecoChargedCandidateCollection::const_iterator cand1;
142 RecoChargedCandidateCollection::const_iterator cand2;
143 RecoChargedCandidateCollection::const_iterator cand3;
149 vector<RecoChargedCandidateRef> vPrevCands;
152 std::vector<bool> candComp;
153 for (cand1=trackcands->begin(); cand1!=trackcands->end(); cand1++)
156 for (cand1=trackcands->begin(); cand1!=trackcands->end(); cand1++) {
159 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" 1st track in loop: q*pt= " << cand1->charge()*cand1->pt() <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
162 if (!candComp[cand1-trackcands->begin()])
continue;
169 cand2=trackcands->begin();
172 for (; cand2!=trackcands->end(); cand2++) {
175 if(tk1==tk2)
continue;
176 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" 2nd track in loop: q*pt= " << cand2->charge()*cand2->pt() <<
", eta= " << cand2->eta() <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
179 if (!candComp[cand2-trackcands->begin()])
continue;
190 if (cand1->charge()*cand2->charge()>0)
continue;
192 if (cand1->charge()*cand2->charge()<0)
continue;
205 double invmassRes =
std::abs(pres.mass());
206 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" ... 1-2 invmass= " << invmassRes;
211 cand3=trackcands->begin();
214 for (; cand3!=trackcands->end(); cand3++) {
217 if(tk1==tk3 || tk2==tk3)
continue;
218 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" 3rd track in loop: q*pt= " << cand3->charge()*cand3->pt() <<
", eta= " << cand3->eta() <<
", hits= " << tk3->numberOfValidHits();
221 if (!candComp[cand3-trackcands->begin()])
continue;
232 double invmass =
std::abs(p.mass());
233 LogDebug(
"HLTDisplacedtktktkVtxProducer") <<
" ... 1-2-3 invmass= " << invmass;
238 vector<TransientTrack> t_tks;
243 t_tks.push_back(ttkp1);
244 t_tks.push_back(ttkp2);
245 t_tks.push_back(ttkp3);
247 if (t_tks.size()!=3)
continue;
257 vertexCollection->push_back(vertex);
268 for (
auto &
i : refVect) {
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const int triggerTypeDaughters_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool checkPreviousCand(const reco::TrackRef &trackref, std::vector< reco::RecoChargedCandidateRef > &ref2)
std::vector< Vertex > VertexCollection
collection of Vertex objects
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > srcToken_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
~HLTDisplacedtktktkVtxProducer() override
const double massParticle1_
Abs< T >::type abs(const T &t)
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
HLTDisplacedtktktkVtxProducer(const edm::ParameterSet &)
T const * get() const
Returns C++ pointer to the item.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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_
math::PtEtaPhiELorentzVectorF LorentzVector