28 muCandTag_(iConfig.getParameter<
edm::
InputTag>(
"MuCand")),
30 trkCandTag_(iConfig.getParameter<
edm::
InputTag>(
"TrackCand")),
32 previousCandTag_(iConfig.getParameter<
edm::
InputTag>(
"PreviousCandTag")),
34 mfName_(iConfig.getParameter<
std::
string>(
"SimpleMagneticField")),
36 thirdTrackMass_(iConfig.getParameter<double>(
"ThirdTrackMass")),
37 maxEta_(iConfig.getParameter<double>(
"MaxEta")),
38 minPt_(iConfig.getParameter<double>(
"MinPt")),
39 minInvMass_(iConfig.getParameter<double>(
"MinInvMass")),
40 maxInvMass_(iConfig.getParameter<double>(
"MaxInvMass")),
41 minD0Significance_(iConfig.getParameter<double>(
"MinD0Significance")),
42 overlapDR_(iConfig.getParameter<double>(
"OverlapDR")),
43 beamSpotTag_(iConfig.getParameter<
edm::
InputTag>(
"BeamSpotTag")),
45 produces<VertexCollection>();
57 desc.add<
double>(
"ThirdTrackMass", 0.493677);
58 desc.add<
double>(
"MaxEta", 2.5);
59 desc.add<
double>(
"MinPt", 3.0);
60 desc.add<
double>(
"MinInvMass", 0.0);
61 desc.add<
double>(
"MaxInvMass", 99999.);
62 desc.add<
double>(
"MinD0Significance", 0.0);
63 desc.add<
double>(
"OverlapDR", 1.44e-4);
65 descriptions.
add(
"HLTmumutkVtxProducer",
desc);
70 const double MuMass(0.106);
71 const double MuMass2(MuMass * MuMass);
104 if (mucands->size() < 2)
106 if (trkcands->empty())
109 RecoChargedCandidateCollection::const_iterator mucand1;
110 RecoChargedCandidateCollection::const_iterator mucand2;
111 RecoChargedCandidateCollection::const_iterator trkcand;
117 vector<RecoChargedCandidateRef> vPrevCands;
120 for (mucand1 = mucands->begin(); mucand1 != mucands->end(); ++mucand1) {
122 LogDebug(
"HLTmumutkVtxProducer") <<
" 1st muon: q*pt= " << trk1->charge() * trk1->pt() <<
", eta= " << trk1->eta()
123 <<
", hits= " << trk1->numberOfValidHits();
130 if (fabs(trk1->eta()) >
maxEta_)
137 for (; mucand2 != mucands->end(); mucand2++) {
140 LogDebug(
"HLTDisplacedMumukFilter") <<
" 2nd muon: q*pt= " << trk2->charge() * trk2->pt()
141 <<
", eta= " << trk2->eta() <<
", hits= " << trk2->numberOfValidHits();
147 if (fabs(trk2->eta()) >
maxEta_)
153 for (trkcand = trkcands->begin(); trkcand != trkcands->end(); ++trkcand) {
160 LogDebug(
"HLTDisplacedMumukFilter") <<
" 3rd track: q*pt= " << trk3->charge() * trk3->pt()
161 <<
", eta= " << trk3->eta() <<
", hits= " << trk3->numberOfValidHits();
164 if (fabs(trk3->eta()) >
maxEta_)
170 e1 =
sqrt(trk1->momentum().Mag2() + MuMass2);
171 e2 =
sqrt(trk2->momentum().Mag2() + MuMass2);
172 e3 =
sqrt(trk3->momentum().Mag2() + thirdTrackMass2);
181 double invmass =
abs(
p.mass());
182 LogDebug(
"HLTDisplacedMumukFilter") <<
" Invmass= " << invmass;
189 vector<TransientTrack> t_tks;
190 t_tks.push_back((*theB).build(&trk1));
191 t_tks.push_back((*theB).build(&trk2));
192 t_tks.push_back((*theB).build(&trk3));
193 if (t_tks.size() != 3)
227 if (
deltaR(trackref1->eta(), trackref1->phi(), trackref2->eta(), trackref2->phi()) <
overlapDR_)
233 const vector<RecoChargedCandidateRef>& refVect)
const {
235 for (
auto&
i : refVect) {
static FreeTrajectoryState initialFreeState(const reco::Track &, const MagneticField *)
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > idealMagneticFieldRecordToken_
std::vector< Vertex > VertexCollection
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
bool overlap(const reco::TrackRef &trackref1, const reco::TrackRef &trackref2)
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackRecordToken_
int charge() const
track electric charge
CovarianceMatrix covariance() const
return track covariance matrix
HLTmumutkVtxProducer(const edm::ParameterSet &)
const double thirdTrackMass_
~HLTmumutkVtxProducer() override
const double minD0Significance_
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > trkCandToken_
Abs< T >::type abs(const T &t)
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Measurement1D transverseImpactParameter() const
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > muCandToken_
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const Vector & momentum() const
track momentum vector
double significance() const
T const * get() const
Returns C++ pointer to the item.
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
const edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
void produce(edm::Event &, const edm::EventSetup &) override
math::PtEtaPhiELorentzVectorF LorentzVector
bool checkPreviousCand(const reco::TrackRef &trackref, const std::vector< reco::RecoChargedCandidateRef > &ref2) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)