34 src_ (iConfig.getParameter<edm::
InputTag>(
"Src")),
35 maxEta_ (iConfig.getParameter<double>(
"MaxEta")),
36 minPt_ (iConfig.getParameter<double>(
"MinPt")),
37 minPtPair_ (iConfig.getParameter<double>(
"MinPtPair")),
38 minInvMass_ (iConfig.getParameter<double>(
"MinInvMass")),
39 maxInvMass_ (iConfig.getParameter<double>(
"MaxInvMass")),
40 chargeOpt_ (iConfig.getParameter<int>(
"ChargeOpt"))
42 produces<VertexCollection>();
67 double const MuMass = 0.106;
68 double const MuMass2 = MuMass*MuMass;
85 RecoChargedCandidateCollection::const_iterator cand1;
86 RecoChargedCandidateCollection::const_iterator cand2;
87 for (cand1=mucands->begin(); cand1!=mucands->end(); cand1++) {
90 LogDebug(
"HLTDisplacedMumuFilter") <<
" 1st muon in loop: q*pt= " << tk1->charge()*tk1->pt() <<
", eta= " << tk1->eta() <<
", hits= " << tk1->numberOfValidHits();
93 if (fabs(tk1->eta())>
maxEta_)
continue;
94 if (tk1->pt() <
minPt_)
continue;
96 cand2 = cand1; cand2++;
97 for (; cand2!=mucands->end(); cand2++) {
101 LogDebug(
"HLTMuonDimuonFilter") <<
" 2nd muon in loop: q*pt= " << tk2->charge()*tk2->pt() <<
", eta= " << tk2->eta() <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
104 if (fabs(tk2->eta())>
maxEta_)
continue;
105 if (tk2->pt() <
minPt_)
continue;
109 if (tk1->charge()*tk2->charge()>0)
continue;
111 if (tk1->charge()*tk2->charge()<0)
continue;
115 e1 =
sqrt(tk1->momentum().Mag2()+MuMass2);
116 e2 =
sqrt(tk2->momentum().Mag2()+MuMass2);
124 double invmass =
abs(p.mass());
125 LogDebug(
"HLTDisplacedMumuFilter") <<
" ... 1-2 invmass= " << invmass;
131 vector<TransientTrack> t_tks;
134 t_tks.push_back(ttkp1);
135 t_tks.push_back(ttkp2);
138 if (t_tks.size()!=2)
continue;
148 vertexCollection->push_back(vertex);
151 iEvent.
put(vertexCollection);
HLTDisplacedmumuVtxProducer(const edm::ParameterSet &)
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
~HLTDisplacedmumuVtxProducer()
virtual void produce(edm::Event &, const edm::EventSetup &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * get() const
Returns C++ pointer to the item.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
math::PtEtaPhiELorentzVectorF LorentzVector