84 double const MuMass = 0.106;
85 double const MuMass2 = MuMass*MuMass;
102 RecoChargedCandidateCollection::const_iterator cand1;
103 RecoChargedCandidateCollection::const_iterator cand2;
104 RecoChargedCandidateCollection::const_iterator cand3;
110 vector<RecoChargedCandidateRef> vPrevCands;
113 for (cand1=mucands->begin(); cand1!=mucands->end(); cand1++) {
115 LogDebug(
"HLTDisplacedMumumuFilter") <<
" 1st muon in loop: q*pt= " << cand1->charge()*cand1->pt() <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
121 if (fabs(cand1->eta())>
maxEta_)
continue;
122 if (cand1->pt() <
minPt_)
continue;
124 cand2 = cand1; cand2++;
125 for (; cand2!=mucands->end(); cand2++) {
129 LogDebug(
"HLTMuonDimuonFilter") <<
" 2nd muon in loop: q*pt= " << cand2->charge()*cand2->pt() <<
", eta= " << cand2->eta() <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
134 if (fabs(cand2->eta())>
maxEta_)
continue;
135 if (cand2->pt() <
minPt_)
continue;
137 cand3 = cand2; cand3++;
138 for (; cand3!=mucands->end(); cand3++) {
142 LogDebug(
"HLTMuonDimuonFilter") <<
" 3rd muon in loop: q*pt= " << cand3->charge()*cand3->pt() <<
", eta= " << cand3->eta() <<
", hits= " << tk3->numberOfValidHits() <<
", d0= " << tk3->d0();
147 if (fabs(cand3->eta())>
maxEta_)
continue;
148 if (cand3->pt() <
minPt_)
continue;
152 if (fabs (cand1->charge() + cand2->charge() + cand3->charge()) !=
chargeOpt_)
continue;
156 e1 =
sqrt(cand1->momentum().Mag2()+MuMass2);
157 e2 =
sqrt(cand2->momentum().Mag2()+MuMass2);
158 e3 =
sqrt(cand3->momentum().Mag2()+MuMass2);
167 double invmass =
abs(p.mass());
168 LogDebug(
"HLTDisplacedMumumuFilter") <<
" ... 1-2 invmass= " << invmass;
174 vector<TransientTrack> t_tks;
178 t_tks.push_back(ttkp1);
179 t_tks.push_back(ttkp2);
180 t_tks.push_back(ttkp3);
183 if (t_tks.size()!=3)
continue;
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > srcToken_
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
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
Abs< T >::type abs(const T &t)
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
bool checkPreviousCand(const reco::TrackRef &trackref, std::vector< reco::RecoChargedCandidateRef > &ref2)
T const * get() const
Returns C++ pointer to the item.
math::PtEtaPhiELorentzVectorF LorentzVector