83 double const MuMass = 0.106;
84 double const MuMass2 = MuMass*MuMass;
101 RecoChargedCandidateCollection::const_iterator cand1;
102 RecoChargedCandidateCollection::const_iterator cand2;
108 vector<RecoChargedCandidateRef> vPrevCands;
111 for (cand1=mucands->begin(); cand1!=mucands->end(); cand1++) {
113 LogDebug(
"HLTDisplacedMumuFilter") <<
" 1st muon in loop: q*pt= " << cand1->charge()*cand1->pt() <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
119 if (fabs(cand1->eta())>
maxEta_)
continue;
120 if (cand1->pt() <
minPt_)
continue;
122 cand2 = cand1; cand2++;
123 for (; cand2!=mucands->end(); cand2++) {
127 LogDebug(
"HLTDisplacedmumuVtxProducer") <<
" 2nd muon in loop: q*pt= " << cand2->charge()*cand2->pt() <<
", eta= " << cand2->eta() <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
132 if (fabs(cand2->eta())>
maxEta_)
continue;
133 if (cand2->pt() <
minPt_)
continue;
137 if (cand1->charge()*cand2->charge()>0)
continue;
139 if (cand1->charge()*cand2->charge()<0)
continue;
143 e1 =
sqrt(cand1->momentum().Mag2()+MuMass2);
144 e2 =
sqrt(cand2->momentum().Mag2()+MuMass2);
152 double invmass =
abs(p.mass());
153 LogDebug(
"HLTDisplacedMumuFilter") <<
" ... 1-2 invmass= " << invmass;
159 vector<TransientTrack> t_tks;
162 t_tks.push_back(ttkp1);
163 t_tks.push_back(ttkp2);
166 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 checkPreviousCand(const reco::TrackRef &trackref, std::vector< reco::RecoChargedCandidateRef > &ref2)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
Abs< T >::type abs(const T &t)
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > srcToken_
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
T const * get() const
Returns C++ pointer to the item.
math::PtEtaPhiELorentzVectorF LorentzVector