32 using namespace trigger;
37 srcTag_ (iConfig.getParameter<edm::
InputTag>(
"Src")),
39 previousCandTag_(iConfig.getParameter<edm::
InputTag>(
"PreviousCandTag")),
41 maxEta_ (iConfig.getParameter<double>(
"MaxEta")),
42 minPt_ (iConfig.getParameter<double>(
"MinPt")),
43 minPtTriplet_ (iConfig.getParameter<double>(
"MinPtTriplet")),
44 minInvMass_ (iConfig.getParameter<double>(
"MinInvMass")),
45 maxInvMass_ (iConfig.getParameter<double>(
"MaxInvMass")),
46 chargeOpt_ (iConfig.getParameter<int>(
"ChargeOpt"))
48 produces<VertexCollection>();
62 desc.
add<
double>(
"MaxEta",2.5);
63 desc.
add<
double>(
"MinPt",0.0);
64 desc.
add<
double>(
"MinPtTriplet",0.0);
65 desc.
add<
double>(
"MinInvMass",1.0);
66 desc.
add<
double>(
"MaxInvMass",20.0);
67 desc.
add<
int>(
"ChargeOpt",-1);
68 descriptions.
add(
"hltDisplacedmumumuVtxProducer", desc);
87 double const MuMass = 0.106;
88 double const MuMass2 = MuMass*MuMass;
105 RecoChargedCandidateCollection::const_iterator cand1;
106 RecoChargedCandidateCollection::const_iterator cand2;
107 RecoChargedCandidateCollection::const_iterator cand3;
113 vector<RecoChargedCandidateRef> vPrevCands;
116 for (cand1=mucands->begin(); cand1!=mucands->end(); cand1++) {
118 LogDebug(
"HLTDisplacedMumumuFilter") <<
" 1st muon in loop: q*pt= " << cand1->charge()*cand1->pt() <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
124 if (fabs(cand1->eta())>
maxEta_)
continue;
125 if (cand1->pt() <
minPt_)
continue;
127 cand2 = cand1; cand2++;
128 for (; cand2!=mucands->end(); cand2++) {
132 LogDebug(
"HLTMuonDimuonFilter") <<
" 2nd muon in loop: q*pt= " << cand2->charge()*cand2->pt() <<
", eta= " << cand2->eta() <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
137 if (fabs(cand2->eta())>
maxEta_)
continue;
138 if (cand2->pt() <
minPt_)
continue;
140 cand3 = cand2; cand3++;
141 for (; cand3!=mucands->end(); cand3++) {
145 LogDebug(
"HLTMuonDimuonFilter") <<
" 3rd muon in loop: q*pt= " << cand3->charge()*cand3->pt() <<
", eta= " << cand3->eta() <<
", hits= " << tk3->numberOfValidHits() <<
", d0= " << tk3->d0();
150 if (fabs(cand3->eta())>
maxEta_)
continue;
151 if (cand3->pt() <
minPt_)
continue;
155 if (fabs (cand1->charge() + cand2->charge() + cand3->charge()) !=
chargeOpt_)
continue;
159 e1 =
sqrt(cand1->momentum().Mag2()+MuMass2);
160 e2 =
sqrt(cand2->momentum().Mag2()+MuMass2);
161 e3 =
sqrt(cand3->momentum().Mag2()+MuMass2);
170 double invmass =
abs(p.mass());
171 LogDebug(
"HLTDisplacedMumumuFilter") <<
" ... 1-2 invmass= " << invmass;
177 vector<TransientTrack> t_tks;
181 t_tks.push_back(ttkp1);
182 t_tks.push_back(ttkp2);
183 t_tks.push_back(ttkp3);
186 if (t_tks.size()!=3)
continue;
196 vertexCollection->push_back(vertex);
200 iEvent.
put(vertexCollection);
207 for (
unsigned int i=0;
i<refVect.size();
i++) {
208 if ( refVect[
i]->get<TrackRef>() == trackref ) {
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > srcToken_
HLTDisplacedmumumuVtxProducer(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
~HLTDisplacedmumumuVtxProducer()
Abs< T >::type abs(const T &t)
bool checkPreviousCand(const reco::TrackRef &trackref, std::vector< reco::RecoChargedCandidateRef > &ref2)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void produce(edm::Event &, const edm::EventSetup &)
T const * get() const
Returns C++ pointer to the item.
math::PtEtaPhiELorentzVectorF LorentzVector