27 muCandTag_(iConfig.getParameter<
edm::
InputTag>(
"MuCand")),
29 trkCandTag_(iConfig.getParameter<
edm::
InputTag>(
"TrackCand")),
31 previousCandTag_(iConfig.getParameter<
edm::
InputTag>(
"PreviousCandTag")),
33 mfName_(iConfig.getParameter<
std::
string>(
"SimpleMagneticField")),
35 thirdTrackMass_(iConfig.getParameter<double>(
"ThirdTrackMass")),
36 maxEta_(iConfig.getParameter<double>(
"MaxEta")),
37 minPt_(iConfig.getParameter<double>(
"MinPt")),
38 minInvMass_(iConfig.getParameter<double>(
"MinInvMass")),
39 maxInvMass_(iConfig.getParameter<double>(
"MaxInvMass")),
40 minD0Significance_(iConfig.getParameter<double>(
"MinD0Significance")),
42 overlapDR2_(iConfig.getParameter<double>(
"OverlapDR") *
std::
abs(iConfig.getParameter<double>(
"OverlapDR"))),
43 beamSpotTag_(iConfig.getParameter<
edm::
InputTag>(
"BeamSpotTag")),
45 produces<VertexCollection>();
54 desc.add<
double>(
"ThirdTrackMass", 0.493677);
55 desc.add<
double>(
"MaxEta", 2.5);
56 desc.add<
double>(
"MinPt", 3.0);
57 desc.add<
double>(
"MinInvMass", 0.0);
58 desc.add<
double>(
"MaxInvMass", 99999.);
59 desc.add<
double>(
"MinD0Significance", 0.0);
60 desc.add<
double>(
"OverlapDR", 1.44e-4);
62 descriptions.
add(
"HLTmumutkVtxProducer",
desc);
66 const double MuMass(0.106);
67 const double MuMass2(MuMass * MuMass);
100 if (mucands->size() < 2)
102 if (trkcands->empty())
105 RecoChargedCandidateCollection::const_iterator mucand1;
106 RecoChargedCandidateCollection::const_iterator mucand2;
107 RecoChargedCandidateCollection::const_iterator trkcand;
113 vector<RecoChargedCandidateRef> vPrevCands;
116 for (mucand1 = mucands->begin(); mucand1 != mucands->end(); ++mucand1) {
118 LogDebug(
"HLTmumutkVtxProducer") <<
" 1st muon: q*pt= " << trk1->charge() * trk1->pt() <<
", eta= " << trk1->eta()
119 <<
", hits= " << trk1->numberOfValidHits();
126 if (fabs(trk1->eta()) >
maxEta_)
133 for (; mucand2 != mucands->end(); mucand2++) {
136 LogDebug(
"HLTDisplacedMumukFilter") <<
" 2nd muon: q*pt= " << trk2->charge() * trk2->pt()
137 <<
", eta= " << trk2->eta() <<
", hits= " << trk2->numberOfValidHits();
143 if (fabs(trk2->eta()) >
maxEta_)
149 for (trkcand = trkcands->begin(); trkcand != trkcands->end(); ++trkcand) {
156 LogDebug(
"HLTDisplacedMumukFilter") <<
" 3rd track: q*pt= " << trk3->charge() * trk3->pt()
157 <<
", eta= " << trk3->eta() <<
", hits= " << trk3->numberOfValidHits();
160 if (fabs(trk3->eta()) >
maxEta_)
166 e1 =
sqrt(trk1->momentum().Mag2() + MuMass2);
167 e2 =
sqrt(trk2->momentum().Mag2() + MuMass2);
168 e3 =
sqrt(trk3->momentum().Mag2() + thirdTrackMass2);
177 double invmass =
abs(
p.mass());
178 LogDebug(
"HLTDisplacedMumukFilter") <<
" Invmass= " << invmass;
185 vector<TransientTrack> t_tks;
186 t_tks.push_back((*theB).build(&trk1));
187 t_tks.push_back((*theB).build(&trk2));
188 t_tks.push_back((*theB).build(&trk3));
189 if (t_tks.size() != 3)
227 const vector<RecoChargedCandidateRef>& refVect)
const {
229 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_
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
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
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)