26 m_trigConfig(0),m_pacTrigger(0)
28 produces<std::vector<L1MuRegionalCand> >(
"RPCb");
29 produces<std::vector<L1MuRegionalCand> >(
"RPCf");
31 produces<std::vector<RPCDigiL1Link> >(
"RPCb");
32 produces<std::vector<RPCDigiL1Link> >(
"RPCf");
115 std::auto_ptr<std::vector<L1MuRegionalCand> > candBarell(
new std::vector<L1MuRegionalCand>);
116 std::auto_ptr<std::vector<L1MuRegionalCand> > candForward(
new std::vector<L1MuRegionalCand>);
120 <<
"\nWarning: RPCDigiCollection with input tag " <<
m_label
121 <<
"\nrequested in configuration, but not found in the event. Emulator will produce empty collection \n ";
123 iEvent.
put(candBarell,
"RPCb");
124 iEvent.
put(candForward,
"RPCf");
130 if (rpcDigis->begin() == rpcDigis->end() )
133 <<
"\nWarning: RPCDigiCollection with input tag " <<
m_label
134 <<
"\n seems to be empty for this event. Emulator will run on empty collection ";
140 std::auto_ptr<std::vector<RPCDigiL1Link> > brlLinks(
new std::vector<RPCDigiL1Link>);
141 std::auto_ptr<std::vector<RPCDigiL1Link> > fwdLinks(
new std::vector<RPCDigiL1Link>);
143 for (
int iBx = -1; iBx < 2; ++ iBx) {
186 std::vector<RPCDigiL1Link> dlBrl;
187 std::vector<RPCDigiL1Link> dlFwd;
192 brlLinks->insert(brlLinks->end(), dlBrl.begin(), dlBrl.end() );
193 fwdLinks->insert(fwdLinks->end(), dlFwd.begin(), dlFwd.end() );
195 candBarell->insert(candBarell->end(), RPCb.begin(), RPCb.end());
196 candForward->insert(candForward->end(), RPCf.begin(), RPCf.end());
201 iEvent.
put(fwdLinks,
"RPCf");
202 iEvent.
put(brlLinks,
"RPCb");
203 iEvent.
put(candBarell,
"RPCb");
204 iEvent.
put(candForward,
"RPCf");
220 std::vector<L1MuRegionalCand> RPCCand;
222 for(
unsigned int iMu = 0; iMu < finalMuons.size(); iMu++)
225 if (finalMuons[iMu].getPtCode()==0){
235 short int digiIndex = 0;
237 for (detUnitIt=rpcDigis->begin();
238 detUnitIt!=rpcDigis->end();
242 const RPCDetId&
id = (*detUnitIt).first;
243 uint32_t rawId =
id.
rawId();
248 digiIt!=range.second;
253 RPCMuon::TDigiLinkVec::iterator it = digiIVec.begin();
254 for(;it!=digiIVec.end();++it) {
255 if (digiIndex==it->m_digiIdx) {
256 newDigiLink.
setLink(it->m_layer+1, rawId, digiIt->strip(), digiIt->bx() );
263 retRPCDigiLink.push_back(newDigiLink);
276 int charge=finalMuons[iMu].getSign();
300 int phiPacked = finalMuons[iMu].getPhiAddr();
307 signed short etaAddr = finalMuons[iMu].getEtaAddr();
327 RPCCand.push_back(l1Cand);
329 LogDebug(
"RPCTrigger") <<
"Found muonf of pt "
330 << finalMuons[iMu].getPtCode()
331 <<
" bx " << l1Cand.
bx()
334 <<
" fp " << finalMuons[iMu].getFiredPlanes()
339 <<
" killed " << finalMuons[iMu].wasKilled();
RPCBasicTrigConfig * m_trigConfig
T getParameter(std::string const &) const
EventNumber_t event() const
unsigned long long cacheIdentifier() const
T getUntrackedParameter(std::string const &, T const &) const
void setLink(unsigned int layer, unsigned int rpcdetId, int strip, int bx)
unsigned charge_packed() const
return charge packed as in hardware (0=pos, 1=neg)
L1RpcLogConesVec getConesFromES(edm::Handle< RPCDigiCollection > rpcDigis, edm::ESHandle< L1RPCConeBuilder > coneBuilder, edm::ESHandle< L1RPCConeDefinition > coneDef, edm::ESHandle< L1RPCBxOrConfig > bxOrDef, edm::ESHandle< L1RPCHwConfig > hwConfig, int bx)
int bunchCrossing() const
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< L1MuRegionalCand > giveFinallCandindates(L1RpcTBMuonsVec finalMuons, int type, int bx, edm::Handle< RPCDigiCollection > rpcDigis, std::vector< RPCDigiL1Link > &retRPCDigiLink)
Returns vector of L1MuRegionalCand (input of L1GMT)
uint32_t rawId() const
get the raw id
static MuonsGrabber & Instance()
void setRPCBasicTrigConfig(RPCBasicTrigConfig *c)
void setBx(int bx)
Set Bunch Crossing.
std::vector< RPCTBMuon > L1RpcTBMuonsVec
void startNewEvent(int event, int bx)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
RPCPacManager< RPCPacData > m_pacManager
std::vector< L1RpcTBMuonsVec > L1RpcTBMuonsVec2
unsigned eta_packed() const
return eta packed as in hardware
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
RPCConeBuilderFromES m_theLinksystemFromES
void setChargePacked(unsigned ch)
Set Charge (0=pos, 1=neg)
std::vector< TDigiLink > TDigiLinkVec
void setPtPacked(unsigned pt)
Set Pt: 0..31.
T const * product() const
std::vector< DigiType >::const_iterator const_iterator
unsigned int quality() const
return quality
RPCTrigger(const edm::ParameterSet &)
void setPhiPacked(unsigned phi)
Set Phi: 0..143.
void init(std::string patFilesDirectory, L1RpcPACsCntEnum _PACsCnt)
void setDebugLevel(int debgLevel)
int bx() const
return bunch crossing identifier
void setQualityPacked(unsigned qual)
Set Quality: 0..7.
void setEtaPacked(unsigned eta)
Set Eta: 6-bit code.
std::pair< const_iterator, const_iterator > Range
void setChargeValid(bool valid)
Set Charge Valid.
RPCPacTrigger * m_pacTrigger
L1RpcTBMuonsVec2 runEvent(const L1RpcLogConesVec &logConesVec, edm::ESHandle< L1RPCHsbConfig > hsbConf)
void writeDataForRelativeBX(int bx)
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
std::vector< RPCLogCone > L1RpcLogConesVec
unsigned phi_packed() const
return phi packed as in hardware
unsigned long long m_cacheID