31 using namespace trigger;
36 src_ (iConfig.getParameter<edm::
InputTag>(
"Src")),
37 previousCandTag_(iConfig.getParameter<edm::
InputTag>(
"PreviousCandTag")),
38 maxEta_ (iConfig.getParameter<double>(
"MaxEta")),
39 minPt_ (iConfig.getParameter<double>(
"MinPt")),
40 minPtTriplet_ (iConfig.getParameter<double>(
"MinPtTriplet")),
41 minInvMass_ (iConfig.getParameter<double>(
"MinInvMass")),
42 maxInvMass_ (iConfig.getParameter<double>(
"MaxInvMass")),
43 chargeOpt_ (iConfig.getParameter<int>(
"ChargeOpt"))
45 produces<VertexCollection>();
70 double const MuMass = 0.106;
71 double const MuMass2 = MuMass*MuMass;
88 RecoChargedCandidateCollection::const_iterator cand1;
89 RecoChargedCandidateCollection::const_iterator cand2;
90 RecoChargedCandidateCollection::const_iterator cand3;
96 vector<RecoChargedCandidateRef> vPrevCands;
99 for (cand1=mucands->begin(); cand1!=mucands->end(); cand1++) {
101 LogDebug(
"HLTDisplacedMumumuFilter") <<
" 1st muon in loop: q*pt= " << cand1->charge()*cand1->pt() <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
107 if (fabs(cand1->eta())>
maxEta_)
continue;
108 if (cand1->pt() <
minPt_)
continue;
110 cand2 = cand1; cand2++;
111 for (; cand2!=mucands->end(); cand2++) {
115 LogDebug(
"HLTMuonDimuonFilter") <<
" 2nd muon in loop: q*pt= " << cand2->charge()*cand2->pt() <<
", eta= " << cand2->eta() <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
120 if (fabs(cand2->eta())>
maxEta_)
continue;
121 if (cand2->pt() <
minPt_)
continue;
123 cand3 = cand2; cand3++;
124 for (; cand3!=mucands->end(); cand3++) {
128 LogDebug(
"HLTMuonDimuonFilter") <<
" 3rd muon in loop: q*pt= " << cand3->charge()*cand3->pt() <<
", eta= " << cand3->eta() <<
", hits= " << tk3->numberOfValidHits() <<
", d0= " << tk3->d0();
133 if (fabs(cand3->eta())>
maxEta_)
continue;
134 if (cand3->pt() <
minPt_)
continue;
138 if (fabs (cand1->charge() + cand2->charge() + cand3->charge()) !=
chargeOpt_)
continue;
142 e1 =
sqrt(cand1->momentum().Mag2()+MuMass2);
143 e2 =
sqrt(cand2->momentum().Mag2()+MuMass2);
144 e3 =
sqrt(cand3->momentum().Mag2()+MuMass2);
153 double invmass =
abs(p.mass());
154 LogDebug(
"HLTDisplacedMumumuFilter") <<
" ... 1-2 invmass= " << invmass;
160 vector<TransientTrack> t_tks;
164 t_tks.push_back(ttkp1);
165 t_tks.push_back(ttkp2);
166 t_tks.push_back(ttkp3);
169 if (t_tks.size()!=3)
continue;
179 vertexCollection->push_back(vertex);
183 iEvent.
put(vertexCollection);
190 for (
unsigned int i=0;
i<refVect.size();
i++) {
191 if ( refVect[
i]->get<TrackRef>() == trackref ) {
HLTDisplacedmumumuVtxProducer(const edm::ParameterSet &)
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::InputTag previousCandTag_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
~HLTDisplacedmumumuVtxProducer()
bool checkPreviousCand(const reco::TrackRef &trackref, std::vector< reco::RecoChargedCandidateRef > &ref2)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void produce(edm::Event &, const edm::EventSetup &)
T const * get() const
Returns C++ pointer to the item.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
math::PtEtaPhiELorentzVectorF LorentzVector