82 std::vector<edm::Handle<std::vector<L1MuRegionalCand> > > handleVec;
83 handleVec.push_back(rpcBarrel);
84 handleVec.push_back(rpcForward);
90 float etaGen = 0, phiGen = 0, ptGen = 0;
94 int noOfMatchedRecMuons = 0;
96 bool firstRunForMuonMatchingCnt =
true;
99 double deltarMin = -1;
100 edm::SimTrackContainer::const_iterator simTrk =
simTracks->begin();
101 for (; simTrk !=
simTracks->end(); ++simTrk) {
102 if (simTrk->type() != -13 && simTrk->type() != 13)
105 edm::SimTrackContainer::const_iterator simTrk2 = simTrk;
107 for (; simTrk2 !=
simTracks->end(); ++simTrk2) {
108 if (simTrk2->type() != -13 && simTrk2->type() != 13)
110 double drCand =
reco::deltaR(simTrk2->momentum(), simTrk->momentum());
111 if (drCand < deltarMin || deltarMin < 0)
117 if (deltarMin < 0.7 && deltarMin > 0)
121 for (; simTrk !=
simTracks->end(); simTrk++) {
122 int type = simTrk->type();
126 etaGen = momentum.eta();
127 ptGen = momentum.Pt();
128 phiGen = momentum.phi();
141 for (std::vector<
edm::Handle<std::vector<L1MuRegionalCand> > >::iterator it = handleVec.begin();
142 it != handleVec.end();
144 std::vector<L1MuRegionalCand>::const_iterator itRPC;
145 for (itRPC = (*it)->begin(); itRPC != (*it)->end(); itRPC++) {
146 int ptCode = itRPC->pt_packed();
148 if (firstRunForMuonMatchingCnt)
151 phiRec = itRPC->phi_packed();
152 qual = itRPC->quality();
153 towerRec = itRPC->eta_packed();
155 towerRec = -((~towerRec & 63) + 1);
158 float pi = 3.14159265;
160 float phiScaled = phiGen;
163 int phiHwGen = (phiScaled) / 2 /
pi * 144;
172 ++noOfMatchedRecMuons;
173 m_outfileR << etaGen <<
" " << phiGen <<
" " << ptGen <<
" " << towerRec <<
" " << phiRec <<
" "
174 << ptCodeRec <<
" " << qual <<
" " << ghost << std::endl;
179 firstRunForMuonMatchingCnt =
false;
181 m_outfileR << etaGen <<
" " << phiGen <<
" " << ptGen <<
" " << 0 <<
" " << 0 <<
" " << 0 <<
" " << 0 <<
" "
191 if (noOfMatchedRecMuons != noOfRecMuons) {
192 edm::LogInfo(
"RPCEffWarn") <<
" MuonCands " << noOfRecMuons <<
" matched " << noOfMatchedRecMuons <<
" in run "
193 << rnNum <<
" event " << evNum;