91 double const firstTrackMass2 = firstTrackMass*firstTrackMass;
93 double const secondTrackMass2 = secondTrackMass*secondTrackMass;
109 RecoChargedCandidateCollection::const_iterator cand1;
110 RecoChargedCandidateCollection::const_iterator cand2;
116 vector<RecoChargedCandidateRef> vPrevCands;
119 std::vector<bool> candComp;
120 for (cand1=trackcands->begin(); cand1!=trackcands->end(); cand1++)
123 for (cand1=trackcands->begin(); cand1!=trackcands->end(); cand1++) {
125 LogDebug(
"HLTDisplacedtktkVtxProducer") <<
" 1st track in loop: q*pt= " << cand1->charge()*cand1->pt() <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
128 if (!candComp[cand1-trackcands->begin()])
continue;
133 if (cand1->pt() <
minPt_)
continue;
136 cand2=trackcands->begin();
139 for (; cand2!=trackcands->end(); cand2++) {
142 if(tk1==tk2)
continue;
145 LogDebug(
"HLTDisplacedtktkVtxProducer") <<
" 2nd track in loop: q*pt= " << cand2->charge()*cand2->pt() <<
", eta= " << cand2->eta() <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
147 if (!candComp[cand2-trackcands->begin()])
continue;
152 if (cand2->pt() <
minPt_)
continue;
156 if (cand1->charge()*cand2->charge()>0)
continue;
158 if (cand1->charge()*cand2->charge()<0)
continue;
162 e1 =
sqrt(cand1->momentum().Mag2()+firstTrackMass2);
163 e2 =
sqrt(cand2->momentum().Mag2()+secondTrackMass2);
171 double invmass =
abs(p.mass());
172 LogDebug(
"HLTDisplacedtktkVtxProducer") <<
" ... 1-2 invmass= " << invmass;
178 vector<TransientTrack> t_tks;
181 t_tks.push_back(ttkp1);
182 t_tks.push_back(ttkp2);
185 if (t_tks.size()!=2)
continue;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const int triggerTypeDaughters_
std::vector< Vertex > VertexCollection
collection of Vertex objects
bool checkPreviousCand(const reco::TrackRef &trackref, std::vector< reco::RecoChargedCandidateRef > &ref2)
const double massParticle2_
Abs< T >::type abs(const T &t)
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
T const * get() const
Returns C++ pointer to the item.
const double massParticle1_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > srcToken_
math::PtEtaPhiELorentzVectorF LorentzVector