79 const double MuMass(0.106);
80 const double MuMass2(MuMass * MuMass);
112 double e1, e2, e3_m3, e3_m4, e4_m3, e4_m4;
115 if (mucands->size() < 2)
117 if (trkcands->size() < 2)
120 RecoChargedCandidateCollection::const_iterator mucand1;
121 RecoChargedCandidateCollection::const_iterator mucand2;
122 RecoChargedCandidateCollection::const_iterator trkcand1;
123 RecoChargedCandidateCollection::const_iterator trkcand2;
129 vector<RecoChargedCandidateRef> vPrevCands;
132 for (mucand1 = mucands->begin(); mucand1 != mucands->end(); ++mucand1) {
134 LogDebug(
"HLTmumutktkVtxProducer") <<
" 1st muon: q*pt= " << trk1->charge() * trk1->pt() <<
", eta= " << trk1->eta()
135 <<
", hits= " << trk1->numberOfValidHits();
141 if (fabs(trk1->eta()) >
maxEta_)
148 for (; mucand2 != mucands->end(); mucand2++) {
153 LogDebug(
"HLTDisplacedMumukFilter") <<
" 2nd muon: q*pt= " << trk2->charge() * trk2->pt()
154 <<
", eta= " << trk2->eta() <<
", hits= " << trk2->numberOfValidHits();
160 if (fabs(trk2->eta()) >
maxEta_)
166 for (trkcand1 = trkcands->begin(); trkcand1 != trkcands->end(); ++trkcand1) {
174 LogDebug(
"HLTDisplacedMumukFilter") <<
" 3rd track: q*pt= " << trk3->charge() * trk3->pt()
175 <<
", eta= " << trk3->eta() <<
", hits= " << trk3->numberOfValidHits();
178 if (fabs(trk3->eta()) >
maxEta_)
185 double d0sigTrk3 = tscb_Trk3.transverseImpactParameter().significance();
190 for (trkcand2 = trkcands->begin(); trkcand2 != trkcands->end(); ++trkcand2) {
194 if (trk3->charge() * trk4->charge() != -1)
204 LogDebug(
"HLTDisplacedMumukFilter") <<
" 4th track: q*pt= " << trk4->charge() * trk4->pt()
205 <<
", eta= " << trk4->eta() <<
", hits= " << trk4->numberOfValidHits();
208 if (fabs(trk4->eta()) >
maxEta_)
215 double d0sigTrk4 = tscb_Trk4.transverseImpactParameter().significance();
220 e1 =
sqrt(trk1->momentum().Mag2() + MuMass2);
221 e2 =
sqrt(trk2->momentum().Mag2() + MuMass2);
222 e3_m3 =
sqrt(trk3->momentum().Mag2() + thirdTrackMass2);
223 e3_m4 =
sqrt(trk3->momentum().Mag2() + fourthTrackMass2);
224 e4_m3 =
sqrt(trk4->momentum().Mag2() + thirdTrackMass2);
225 e4_m4 =
sqrt(trk4->momentum().Mag2() + fourthTrackMass2);
234 p =
p1 +
p2 + p3_m3 + p4_m4;
235 pBar =
p1 +
p2 + p3_m4 + p4_m3;
236 p_m3m4 = p3_m3 + p4_m4;
237 p_m4m3 = p3_m4 + p4_m3;
248 vector<TransientTrack> t_tks;
249 t_tks.push_back((*theB).build(&trk1));
250 t_tks.push_back((*theB).build(&trk2));
251 t_tks.push_back((*theB).build(&trk3));
252 t_tks.push_back((*theB).build(&trk4));
253 if (t_tks.size() != 4)
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
bool checkPreviousCand(const reco::TrackRef &trackref, const std::vector< reco::RecoChargedCandidateRef > &ref2) const
bool overlap(const reco::TrackRef &trackref1, const reco::TrackRef &trackref2)
std::vector< Vertex > VertexCollection
static FreeTrajectoryState initialFreeState(const reco::Track &, const MagneticField *)
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > trkCandToken_
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > muCandToken_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackRecordToken_
const edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > idealMagneticFieldRecordToken_
const double minTrkTrkMass_
const double fourthTrackMass_
const double thirdTrackMass_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
T const * get() const
Returns C++ pointer to the item.
const double minD0Significance_
const double maxTrkTrkMass_
math::PtEtaPhiELorentzVectorF LorentzVector