46 << m_rpcDigiLabel <<
'\n'
50 <<
"\nConfiguration file used for UseEventSetup = 0 \n" <<
m_configFile <<
'\n'
103 produces<L1GtTechnicalTriggerRecord>();
111 LogDebug(
"RPCTechnicalTrigger") <<
"RPCTechnicalTrigger: object starts deletion" << std::endl;
130 LogDebug(
"RPCTechnicalTrigger") <<
"RPCTechnicalTrigger: object deleted" <<
'\n';
150 edm::LogError(
"RPCTechnicalTrigger") <<
"can't find RPCDigiCollection with label: "
159 iEvent.
getByLabel(
"simMuonRPCDigis",
"RPCDigiSimLink", simIn);
162 edm::LogError(
"RPCTechnicalTrigger") <<
"can't find RPCDigiCollection with label: "
170 LogDebug(
"RPCTechnicalTrigger") <<
"signal object created" <<
'\n';
173 edm::LogError(
"RPCTechnicalTrigger") <<
"cannot read hardware configuration \n";
188 std::vector<L1GtTechnicalTrigger> ttVec(
m_ttBits.size() );
194 std::vector<TTUEmulator::TriggerResponse*>::const_iterator outItr;
213 (*outItr)->m_trigger[0],
214 (*outItr)->m_trigger[1],
215 (*outItr)->m_wedge ) );
227 std::vector<RPCTechnicalTrigger::TTUResults*>::const_iterator ttuItr;
234 << (*ttuItr)->m_ttuidx <<
'\t'
235 << (*ttuItr)->m_bx <<
'\t'
236 << (*ttuItr)->m_trigWheel1 <<
'\t'
237 << (*ttuItr)->m_trigWheel2 <<
'\n';
240 bool has_bx0 =
false;
280 << (*ttuItr)->m_ttuidx <<
'\t'
281 << (*ttuItr)->m_bx <<
'\t'
282 << (*ttuItr)->m_trigWheel1 <<
'\t'
283 << (*ttuItr)->m_trigWheel2 <<
'\t'
284 << (*ttuItr)->m_wedge <<
'\n';
289 std::bitset<8> triggerCoincidence;
290 triggerCoincidence.reset();
294 triggerCoincidence.set(0, result );
298 triggerCoincidence.set(1, result );
302 triggerCoincidence.set(2, result );
306 triggerCoincidence.set(3, result );
310 triggerCoincidence.set(4, result );
314 triggerCoincidence.set(5, result );
318 triggerCoincidence.set(6, result );
322 triggerCoincidence.set(7, result );
324 bool five_wheels_OR = triggerCoincidence.any();
326 if (
m_verbosity )
std::cout <<
"RPCTechnicalTrigger> pointing trigger: " << five_wheels_OR <<
'\n';
330 triggerCoincidence.reset();
338 LogDebug(
"RPCTechnicalTrigger") <<
"RPCTechnicalTrigger> end of event loop" << std::endl;
343 output->setGtTechnicalTrigger(ttVec);
350 LogDebug(
"RPCTechnicalTrigger") <<
"RPCTechnicalTrigger> end of event loop" << std::endl;
359 std::vector<TTUResults*>::iterator itrRes;
380 LogDebug(
"RPCTechnicalTrigger") <<
"RPCTechnicalTrigger::beginRun> starts" << std::endl;
397 edm::LogError(
"RPCTechnicalTrigger") <<
"can't find RBC/TTU BoardSpecsRcd" <<
'\n';
446 std::vector<TTUResults*>::const_iterator itr = ttuResults.begin();
448 while ( itr != ttuResults.end() ) {
450 if ( (*itr)->m_bx != 0 ) {
456 key = 1000 * ( (*itr)->m_ttuidx + 1 ) + 1*(*itr)->m_wedge;
470 std::map<int, TTUResults*>::iterator itr;
471 bool topRight(
false);
479 bool finalTrigger(
false);
480 int maxTopQuadrants = 4;
490 topRight = (*itr).second->getTriggerForWheel(wheel1);
499 botLeft = (*itr).second->getTriggerForWheel(wheel2);
503 finalTrigger |= ( topRight && botLeft );
507 if ( k > maxTopQuadrants)
522 topRight = (*itr).second->getTriggerForWheel(wheel1);
531 botLeft = (*itr).second->getTriggerForWheel(wheel2);
535 finalTrigger |= ( topRight && botLeft );
539 if ( k > maxTopQuadrants)
553 LogDebug(
"RPCTechnicalTrigger") <<
"RPCTechnicalTrigger::endJob>" << std::endl;
560 LogDebug(
"RPCTechnicalTrigger") <<
"RPCTechnicalTrigger::Printing TTU emulators info>" << std::endl;
edm::InputTag m_rpcSimLinkInstance
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::map< int, int > m_WheelTtu
std::vector< TTUResults * > m_serializedInfoLine1
#define DEFINE_FWK_MODULE(type)
edm::ESHandle< RPCGeometry > m_rpcGeometry
TTUBoardSpecs * getTtuSpecs()
std::vector< int > m_quadrants
std::bitset< 5 > m_triggerbits
RBCBoardSpecs * getRbcSpecs()
std::vector< TriggerResponse * > m_triggerBxVec
ProcessInputSignal * m_signal
void clearTriggerResponse()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::map< int, TTUResults * > m_ttuResultsByQuadrant
std::vector< TTUResults * > m_serializedInfoLine2
RPCTechnicalTrigger(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< unsigned > m_ttBits
TTUConfigurator * m_readConfig
virtual void beginRun(edm::Run const &, const edm::EventSetup &) overridefinal
const TTUBoardSpecs * m_ttuspecs
void processTtu(RPCInputSignal *)
std::vector< std::string > m_ttNames
std::vector< int >::iterator m_firstSector
T const * product() const
virtual void produce(edm::Event &, const edm::EventSetup &)
TTUEmulator * m_ttuRbcLine[3]
edm::InputTag m_rpcDigiLabel
const RBCBoardSpecs * m_rbcspecs
int convertToMap(const std::vector< TTUResults * > &)
bool searchCoincidence(int, int)
void setSpecifications(const TTUBoardSpecs *, const RBCBoardSpecs *)