CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
RPCTechnicalTrigger Class Reference

#include <L1Trigger/RPCTechnicalTrigger/interface/RPCTechnicalTrigger.cc>

Inheritance diagram for RPCTechnicalTrigger:
edm::stream::EDProducer<>

Classes

class  TTUResults
 

Public Member Functions

 RPCTechnicalTrigger (const edm::ParameterSet &)
 
 ~RPCTechnicalTrigger () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Member Functions

void beginRun (edm::Run const &, const edm::EventSetup &) final
 
std::map< int, TTUResults * > convertToMap (const std::vector< std::unique_ptr< TTUResults >> &) const
 
void printinfo () const
 
void produce (edm::Event &, const edm::EventSetup &) override
 
bool searchCoincidence (int, int, std::map< int, TTUResults * > const &ttuResultsByQuandrant) const
 

Private Attributes

std::string m_configFile
 
bool m_hasConfig
 
const RBCBoardSpecsm_rbcspecs
 
std::unique_ptr< TTUConfiguratorm_readConfig
 
const edm::InputTag m_rpcDigiLabel
 
const edm::EDGetTokenT< RPCDigiCollectionm_rpcDigiToken
 
const std::vector< unsigned > m_ttBits
 
const std::vector< std::string > m_ttNames
 
std::array< TTUEmulator, kMaxTtuBoardsm_ttu
 
std::array< TTUEmulator, kMaxTtuBoardsm_ttuRbcLine
 
const TTUBoardSpecsm_ttuspecs
 
const int m_useEventSetup
 
const int m_useRPCSimLink
 
const int m_verbosity
 

Static Private Attributes

static int kMaxTtuBoards = 3
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Description: Implementation of the RPC Technical Trigger Emulator

Implementation:

Definition at line 69 of file RPCTechnicalTrigger.h.

Constructor & Destructor Documentation

RPCTechnicalTrigger::RPCTechnicalTrigger ( const edm::ParameterSet iConfig)
explicit

Definition at line 39 of file RPCTechnicalTrigger.cc.

References constexpr, connectstrParser::f1, edm::ParameterSet::getUntrackedParameter(), LogTrace, m_configFile, m_hasConfig, m_rpcDigiLabel, m_rpcDigiToken, m_ttBits, m_ttNames, m_ttu, m_ttuRbcLine, m_useEventSetup, m_useRPCSimLink, m_verbosity, and AlCaHLTBitMon_QueryRunRegistry::string.

39  :
40  m_verbosity{ iConfig.getUntrackedParameter<int>("Verbosity", 0)},
41  m_useEventSetup{iConfig.getUntrackedParameter<int>("UseEventSetup", 0)},
42  m_ttBits{iConfig.getParameter< std::vector<unsigned> >("BitNumbers")},
43  m_ttNames{iConfig.getParameter< std::vector<std::string> >("BitNames")},
44  m_rpcDigiLabel{iConfig.getParameter<edm::InputTag>("RPCDigiLabel")},
45  m_rpcDigiToken{consumes<RPCDigiCollection>(m_rpcDigiLabel)},
46  m_useRPCSimLink{iConfig.getUntrackedParameter<int>("UseRPCSimLink", 0)}
47 {
48 
49  //...........................................................................
50 
51  std::string configFile = iConfig.getParameter<std::string>("ConfigFile");
52 
53  edm::FileInPath f1("L1Trigger/RPCTechnicalTrigger/data/" + configFile);
54  m_configFile = f1.fullPath();
55 
56  if ( m_verbosity ) {
57  LogTrace("RPCTechnicalTrigger")
58  << m_rpcDigiLabel << '\n'
59  << std::endl;
60 
61  LogTrace("RPCTechnicalTrigger")
62  << "\nConfiguration file used for UseEventSetup = 0 \n" << m_configFile << '\n'
63  << std::endl;
64  }
65 
66  //...........................................................................
67  //... There are three Technical Trigger Units Boards: 1 can handle 2 Wheels
68  //... n_Wheels sets the number of wheels attached to board with index boardIndex
69 
70  constexpr std::array<int,3> boardIndex={{1,2,3}};
71  constexpr std::array<int,3> nWheels = { {2,1,2} };
72 
73  m_ttu[0] = TTUEmulator( boardIndex[0] , nWheels[0] );
74  m_ttu[1] = TTUEmulator( boardIndex[1] , nWheels[1] );
75  m_ttu[2] = TTUEmulator( boardIndex[2] , nWheels[2] );
76 
77  //... This is second line that delivers in parallel a second trigger
78  m_ttuRbcLine[0] = TTUEmulator( boardIndex[0] , nWheels[0] );
79  m_ttuRbcLine[1] = TTUEmulator( boardIndex[1] , nWheels[1] );
80  m_ttuRbcLine[2] = TTUEmulator( boardIndex[2] , nWheels[2] );
81 
82  //...........................................................................
83 
84  m_hasConfig = false;
85  produces<L1GtTechnicalTriggerRecord>();
86  consumes<edm::DetSetVector<RPCDigiSimLink> >(edm::InputTag("simMuonRPCDigis", "RPCDigiSimLink",""));
87 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const edm::InputTag m_rpcDigiLabel
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
#define LogTrace(id)
std::array< TTUEmulator, kMaxTtuBoards > m_ttu
const edm::EDGetTokenT< RPCDigiCollection > m_rpcDigiToken
const std::vector< unsigned > m_ttBits
const std::vector< std::string > m_ttNames
#define constexpr
RPCTechnicalTrigger::~RPCTechnicalTrigger ( )
override

Definition at line 90 of file RPCTechnicalTrigger.cc.

91 {
92 }

Member Function Documentation

void RPCTechnicalTrigger::beginRun ( edm::Run const &  iRun,
const edm::EventSetup evtSetup 
)
finalprivate

Definition at line 319 of file RPCTechnicalTrigger.cc.

References edm::EventSetup::get(), edm::ESHandleBase::isValid(), gen::k, kMaxTtuBoards, LogDebug, m_configFile, m_hasConfig, m_rbcspecs, m_readConfig, m_ttu, m_ttuRbcLine, m_ttuspecs, m_useEventSetup, and edm::ESHandle< T >::product().

320 {
321  LogDebug("RPCTechnicalTrigger") << "RPCTechnicalTrigger::beginRun> starts" << std::endl;
322 
323  //.. Get Board Specifications (hardware configuration)
324 
325  if ( m_useEventSetup >= 1 ) {
326 
328  evtSetup.get<RBCBoardSpecsRcd>().get(pRBCSpecs);
329 
331  evtSetup.get<TTUBoardSpecsRcd>().get(pTTUSpecs);
332 
333  if ( !pRBCSpecs.isValid() || !pTTUSpecs.isValid() ) {
334  edm::LogError("RPCTechnicalTrigger") << "can't find RBC/TTU BoardSpecsRcd" << '\n';
335  m_hasConfig = false;
336  }
337  else {
338  m_rbcspecs = pRBCSpecs.product();
339  m_ttuspecs = pTTUSpecs.product();
340  m_hasConfig = true;
341  }
342 
343  } else {
344 
345  // read hardware configuration from file
346  m_readConfig = std::make_unique<TTUConfigurator>( m_configFile );
347 
348  if ( m_readConfig->m_hasConfig ) {
349  m_readConfig->process();
350  m_rbcspecs = m_readConfig->getRbcSpecs();
351  m_ttuspecs = m_readConfig->getTtuSpecs();
352  m_hasConfig = true;
353  }
354 
355  else m_hasConfig = false;
356 
357  }
358 
359  if ( m_hasConfig ) {
360 
361  //... Initialize all
362 
363  for (int k=0; k < kMaxTtuBoards; ++k ) {
364 
365  m_ttu[k].SetLineId ( 1 );
366  m_ttuRbcLine[k].SetLineId( 2 );
367 
368  m_ttu[k].setSpecifications( m_ttuspecs, m_rbcspecs );
369  m_ttuRbcLine[k].setSpecifications( m_ttuspecs, m_rbcspecs );
370 
371  m_ttu[k].initialise();
372  m_ttuRbcLine[k].initialise();
373  }
374 
375  }
376 
377 }
#define LogDebug(id)
std::unique_ptr< TTUConfigurator > m_readConfig
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
int k[5][pyjets_maxn]
const TTUBoardSpecs * m_ttuspecs
std::array< TTUEmulator, kMaxTtuBoards > m_ttu
T get() const
Definition: EventSetup.h:71
const RBCBoardSpecs * m_rbcspecs
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
std::map< int, RPCTechnicalTrigger::TTUResults * > RPCTechnicalTrigger::convertToMap ( const std::vector< std::unique_ptr< TTUResults >> &  ttuResults) const
private

Definition at line 381 of file RPCTechnicalTrigger.cc.

References crabWrapper::key.

Referenced by RPCTechnicalTrigger::TTUResults::getTriggerForWheel(), and produce().

382 {
383  std::map<int,TTUResults*> returnValue;
384  auto itr = ttuResults.begin();
385 
386  while ( itr != ttuResults.end() ) {
387 
388  if ( (*itr)->m_bx != 0 ) {
389  ++itr;
390  continue;
391  }
392 
393  int key(0);
394  key = 1000 * ( (*itr)->m_ttuidx + 1 ) + 1*(*itr)->m_wedge;
395  returnValue[ key ] = itr->get();
396  ++itr;
397  }
398 
399  return returnValue;
400 
401 }
void RPCTechnicalTrigger::printinfo ( ) const
private

Definition at line 487 of file RPCTechnicalTrigger.cc.

References DEFINE_FWK_MODULE, gen::k, kMaxTtuBoards, LogDebug, m_ttu, and m_ttuRbcLine.

488 {
489 
490  LogDebug("RPCTechnicalTrigger") << "RPCTechnicalTrigger::Printing TTU emulators info>" << std::endl;
491 
492  for (int k=0; k < kMaxTtuBoards; ++k ) {
493  m_ttu[k].printinfo();
494  m_ttuRbcLine[k].printinfo();
495  }
496 
497 
498 }
#define LogDebug(id)
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
int k[5][pyjets_maxn]
std::array< TTUEmulator, kMaxTtuBoards > m_ttu
void RPCTechnicalTrigger::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 95 of file RPCTechnicalTrigger.cc.

References funct::abs(), convertToMap(), gather_cfg::cout, edm::EventSetup::get(), edm::Event::getByLabel(), edm::Event::getByToken(), input, edm::HandleBase::isValid(), gen::k, kMaxTtuBoards, LogDebug, m_hasConfig, m_rpcDigiLabel, m_rpcDigiToken, m_ttBits, m_ttNames, m_ttu, m_ttuRbcLine, m_useRPCSimLink, m_verbosity, eostools::move(), MillePedeFileConverter_cfg::out, convertSQLitetoXML_cfg::output, edm::Event::put(), mps_fire::result, searchCoincidence(), and mps_update::status.

95  {
96 
97 
98  bool status(false);
99 
101 
103 
104  std::unique_ptr<L1GtTechnicalTriggerRecord> output(new L1GtTechnicalTriggerRecord());
105 
106  //. Set up RPC geometry
107  edm::ESHandle<RPCGeometry> rpcGeometry;
108  iSetup.get<MuonGeometryRecord>().get( rpcGeometry );
109 
110  std::unique_ptr<ProcessInputSignal> signal;
111  if ( m_useRPCSimLink == 0 ) {
112  iEvent.getByToken(m_rpcDigiToken, pIn);
113  if ( ! pIn.isValid() ) {
114  edm::LogError("RPCTechnicalTrigger") << "can't find RPCDigiCollection with label: "
115  << m_rpcDigiLabel << '\n';
116  iEvent.put(std::move(output));
117  return;
118  }
119 
120  signal = std::make_unique<RBCProcessRPCDigis>( rpcGeometry, pIn );
121 
122  } else {
123 
124  iEvent.getByLabel("simMuonRPCDigis", "RPCDigiSimLink", simIn);
125 
126  if ( ! simIn.isValid() ) {
127  edm::LogError("RPCTechnicalTrigger") << "can't find RPCDigiCollection with label: "
128  << m_rpcDigiLabel << '\n';
129  iEvent.put(std::move(output));
130  return;
131  }
132  signal = std::make_unique<RBCProcessRPCSimDigis>( rpcGeometry, simIn );
133  }
134 
135  LogDebug("RPCTechnicalTrigger") << "signal object created" << '\n';
136 
137  if ( ! m_hasConfig ) {
138  edm::LogError("RPCTechnicalTrigger") << "cannot read hardware configuration \n";
139  iEvent.put(std::move(output));
140  return;
141  }
142 
143  status = signal->next();
144 
145  if ( !status) {
146  iEvent.put(std::move(output));
147  return;
148  }
149 
150  auto* input = signal->retrievedata();
151 
152  std::vector<L1GtTechnicalTrigger> ttVec( m_ttBits.size() );
153 
154  //. distribute data to different TTU emulator instances and process it
155  std::bitset<5> triggerbits;
156 
157  std::vector<std::unique_ptr<TTUResults>> serializedInfoLine1;
158  std::vector<std::unique_ptr<TTUResults>> serializedInfoLine2;
159 
160  for(int k=0; k < kMaxTtuBoards; ++k) {
161 
162  m_ttu[k].processTtu( input );
163 
164  //work out Pointing Logic to Tracker
165  for( auto firstSector : s_quadrants)
166  m_ttuRbcLine[k].processTtu( input , firstSector );
167 
168  //...for trigger 1
169  for( auto const& out : m_ttu[k].m_triggerBxVec)
170  serializedInfoLine1.emplace_back( std::make_unique<TTUResults>( k, out.m_bx, out.m_trigger[0], out.m_trigger[1] ) );
171  m_ttu[k].clearTriggerResponse();
172 
173  //...for trigger 2
174  for( auto const& out : m_ttuRbcLine[k].m_triggerBxVec)
175  serializedInfoLine2.push_back( std::make_unique<TTUResults>( k,
176  out.m_bx,
177  out.m_trigger[0],
178  out.m_trigger[1],
179  out.m_wedge ) );
180 
181  m_ttuRbcLine[k].clearTriggerResponse();
182 
183  }
184 
185  //.. write results to technical trigger bits
186  int bx(0);
187  int infoSize(0);
188 
189  infoSize = serializedInfoLine1.size();
190 
191  auto sortByBx = [](auto& iLHS, auto& iRHS) {
192  return iLHS->m_bx < iRHS->m_bx;
193  };
194  std::sort( serializedInfoLine1.begin(), serializedInfoLine1.end(), sortByBx );
195 
196  if( m_verbosity ) {
197  for( auto& ttu : serializedInfoLine1) {
198  if ( abs( ttu->m_bx ) <= 1 )
199  std::cout << "RPCTechnicalTrigger> "
200  << ttu->m_ttuidx << '\t'
201  << ttu->m_bx << '\t'
202  << ttu->m_trigWheel1 << '\t'
203  << ttu->m_trigWheel2 << '\n';
204  }
205  }
206 
207  bool has_bx0 = false;
208 
209  for(int k = 0; k < infoSize; k+=kMaxTtuBoards) {
210 
211  bx = serializedInfoLine1[k]->m_bx;
212 
213  if ( bx == 0 ) {
214 
215  triggerbits.set(0, serializedInfoLine1[k]->m_trigWheel2);
216  triggerbits.set(1, serializedInfoLine1[k]->m_trigWheel1);
217  triggerbits.set(2, serializedInfoLine1[k+1]->m_trigWheel1);
218  triggerbits.set(3, serializedInfoLine1[k+2]->m_trigWheel1);
219  triggerbits.set(4, serializedInfoLine1[k+2]->m_trigWheel2);
220 
221  bool five_wheels_OR = triggerbits.any();
222 
223  ttVec.at(0)=L1GtTechnicalTrigger(m_ttNames.at(0), m_ttBits.at(0), bx, five_wheels_OR ) ; // bit 24 = Or 5 wheels in TTU mode
224  ttVec.at(2)=L1GtTechnicalTrigger(m_ttNames.at(2), m_ttBits.at(2), bx, triggerbits[0] ) ; // bit 26
225  ttVec.at(3)=L1GtTechnicalTrigger(m_ttNames.at(3), m_ttBits.at(3), bx, triggerbits[1] ) ; // bit 27
226  ttVec.at(4)=L1GtTechnicalTrigger(m_ttNames.at(4), m_ttBits.at(4), bx, triggerbits[2] ) ; // bit 28
227  ttVec.at(5)=L1GtTechnicalTrigger(m_ttNames.at(5), m_ttBits.at(5), bx, triggerbits[3] ) ; // bit 29
228  ttVec.at(6)=L1GtTechnicalTrigger(m_ttNames.at(6), m_ttBits.at(6), bx, triggerbits[4] ) ; // bit 30
229 
230  triggerbits.reset();
231 
232  has_bx0 = true;
233 
234  break;
235 
236  } else continue;
237 
238  }
239 
240  infoSize = serializedInfoLine2.size();
241 
242  std::sort( serializedInfoLine2.begin(), serializedInfoLine2.end(), sortByBx );
243 
244  if(m_verbosity) {
245  for( auto& ttu : serializedInfoLine2) {
246  if (abs ( ttu->m_bx ) <= 1 )
247  std::cout << "RPCTechnicalTrigger> "
248  << ttu->m_ttuidx << '\t'
249  << ttu->m_bx << '\t'
250  << ttu->m_trigWheel1 << '\t'
251  << ttu->m_trigWheel2 << '\t'
252  << ttu->m_wedge << '\n';
253  }
254  }
255 
256  auto ttuResultsByQuadrant = convertToMap( serializedInfoLine2 );
257 
258  std::bitset<8> triggerCoincidence;
259  triggerCoincidence.reset();
260 
261  // searchCoincidence( W-2 , W0 )
262  bool result = searchCoincidence( -2, 0, ttuResultsByQuadrant );
263  triggerCoincidence.set(0, result );
264 
265  // searchCoincidence( W-2 , W+1 )
266  result = searchCoincidence( -2, 1, ttuResultsByQuadrant );
267  triggerCoincidence.set(1, result );
268 
269  // searchCoincidence( W-1 , W0 )
270  result = searchCoincidence( -1, 0, ttuResultsByQuadrant );
271  triggerCoincidence.set(2, result );
272 
273  // searchCoincidence( W-1 , W+1 )
274  result = searchCoincidence( -1, 1, ttuResultsByQuadrant );
275  triggerCoincidence.set(3, result );
276 
277  // searchCoincidence( W-1 , W+2 )
278  result = searchCoincidence( -1, 2, ttuResultsByQuadrant );
279  triggerCoincidence.set(4, result );
280 
281  // searchCoincidence( W0 , W0 )
282  result = searchCoincidence( 0 , 0, ttuResultsByQuadrant );
283  triggerCoincidence.set(5, result );
284 
285  // searchCoincidence( W+1 , W0 )
286  result = searchCoincidence( 1, 0, ttuResultsByQuadrant );
287  triggerCoincidence.set(6, result );
288 
289  // searchCoincidence( W+2 , W0 )
290  result = searchCoincidence( 2, 0, ttuResultsByQuadrant );
291  triggerCoincidence.set(7, result );
292 
293  bool five_wheels_OR = triggerCoincidence.any();
294 
295  if ( m_verbosity ) std::cout << "RPCTechnicalTrigger> pointing trigger: " << five_wheels_OR << '\n';
296 
297  ttVec.at(1)=L1GtTechnicalTrigger(m_ttNames.at(1), m_ttBits.at(1), bx, five_wheels_OR ) ; // bit 25 = Or 5 wheels in RBC mode
298 
299  triggerCoincidence.reset();
300 
301  //...check that data appeared at bx=0
302 
303  if ( ! has_bx0 ) {
304  iEvent.put(std::move(output));
305  LogDebug("RPCTechnicalTrigger") << "RPCTechnicalTrigger> end of event loop" << std::endl;
306  return;
307 
308  }
309 
310  output->setGtTechnicalTrigger(ttVec);
311  iEvent.put(std::move(output));
312 
313  //.... all done
314 
315  LogDebug("RPCTechnicalTrigger") << "RPCTechnicalTrigger> end of event loop" << std::endl;
316 
317 }
#define LogDebug(id)
bool searchCoincidence(int, int, std::map< int, TTUResults * > const &ttuResultsByQuandrant) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
const edm::InputTag m_rpcDigiLabel
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
static std::string const input
Definition: EdmProvDump.cc:48
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:74
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
int k[5][pyjets_maxn]
std::array< TTUEmulator, kMaxTtuBoards > m_ttu
const edm::EDGetTokenT< RPCDigiCollection > m_rpcDigiToken
const std::vector< unsigned > m_ttBits
T get() const
Definition: EventSetup.h:71
const std::vector< std::string > m_ttNames
def move(src, dest)
Definition: eostools.py:511
std::map< int, TTUResults * > convertToMap(const std::vector< std::unique_ptr< TTUResults >> &) const
bool RPCTechnicalTrigger::searchCoincidence ( int  wheel1,
int  wheel2,
std::map< int, TTUResults * > const &  ttuResultsByQuandrant 
) const
private

Definition at line 404 of file RPCTechnicalTrigger.cc.

References gen::k, and crabWrapper::key.

Referenced by RPCTechnicalTrigger::TTUResults::getTriggerForWheel(), and produce().

405 {
406 
407  std::map<int, TTUResults*>::const_iterator itr;
408  bool topRight(false);
409  bool botLeft(false);
410 
411  int indxW1 = wheelTtu[wheel1+kWheelOffset];
412  int indxW2 = wheelTtu[wheel2+kWheelOffset];
413 
414  int k(0);
415  int key(0);
416  bool finalTrigger(false);
417  int maxTopQuadrants = 4;
418 
419  //work out Pointing Logic to Tracker
420 
421  for( auto firstSector : s_quadrants) {
422 
423  key = 1000 * ( indxW1 ) + firstSector;
424 
425  itr = ttuResultsByQuadrant.find( key );
426  if ( itr != ttuResultsByQuadrant.end() )
427  topRight = (*itr).second->getTriggerForWheel(wheel1);
428 
429  //std::cout << "W1: " << wheel1 << " " << "sec: " << firstSector << " dec: " << topRight << '\n';
430 
431  key = 1000 * ( indxW2 ) + firstSector + 5;
432 
433  itr = ttuResultsByQuadrant.find( key );
434 
435  if ( itr != ttuResultsByQuadrant.end() )
436  botLeft = (*itr).second->getTriggerForWheel(wheel2);
437 
438  //std::cout << "W2: " << wheel2 << " " << "sec: " << firstSector + 5 << " dec: " << botLeft << '\n';
439 
440  finalTrigger |= ( topRight && botLeft );
441 
442  ++k;
443 
444  if ( k > maxTopQuadrants)
445  break;
446 
447  }
448 
449  //Try the opposite now
450 
451  k=0;
452 
453  for( auto firstSector : s_quadrants) {
454 
455  key = 1000 * ( indxW2 ) + firstSector;
456 
457  itr = ttuResultsByQuadrant.find( key );
458  if ( itr != ttuResultsByQuadrant.end() )
459  topRight = (*itr).second->getTriggerForWheel(wheel1);
460 
461  //std::cout << "W1: " << wheel1 << " " << "sec: " << firstSector << " dec: " << topRight << '\n';
462 
463  key = 1000 * ( indxW1 ) + firstSector + 5;
464 
465  itr = ttuResultsByQuadrant.find( key );
466 
467  if ( itr != ttuResultsByQuadrant.end() )
468  botLeft = (*itr).second->getTriggerForWheel(wheel2);
469 
470  //std::cout << "W2: " << wheel2 << " " << "sec: " << firstSector + 5 << " dec: " << botLeft << '\n';
471 
472  finalTrigger |= ( topRight && botLeft );
473 
474  ++k;
475 
476  if ( k > maxTopQuadrants)
477  break;
478 
479  }
480 
481  return finalTrigger;
482 
483 }
int k[5][pyjets_maxn]

Member Data Documentation

int RPCTechnicalTrigger::kMaxTtuBoards = 3
staticprivate

Definition at line 85 of file RPCTechnicalTrigger.h.

Referenced by beginRun(), printinfo(), and produce().

std::string RPCTechnicalTrigger::m_configFile
private

Definition at line 92 of file RPCTechnicalTrigger.h.

Referenced by beginRun(), and RPCTechnicalTrigger().

bool RPCTechnicalTrigger::m_hasConfig
private

Definition at line 104 of file RPCTechnicalTrigger.h.

Referenced by beginRun(), produce(), and RPCTechnicalTrigger().

const RBCBoardSpecs* RPCTechnicalTrigger::m_rbcspecs
private

Definition at line 102 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

std::unique_ptr<TTUConfigurator> RPCTechnicalTrigger::m_readConfig
private

Definition at line 100 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

const edm::InputTag RPCTechnicalTrigger::m_rpcDigiLabel
private

Definition at line 95 of file RPCTechnicalTrigger.h.

Referenced by produce(), and RPCTechnicalTrigger().

const edm::EDGetTokenT<RPCDigiCollection> RPCTechnicalTrigger::m_rpcDigiToken
private

Definition at line 96 of file RPCTechnicalTrigger.h.

Referenced by produce(), and RPCTechnicalTrigger().

const std::vector<unsigned> RPCTechnicalTrigger::m_ttBits
private

Definition at line 93 of file RPCTechnicalTrigger.h.

Referenced by produce(), and RPCTechnicalTrigger().

const std::vector<std::string> RPCTechnicalTrigger::m_ttNames
private

Definition at line 94 of file RPCTechnicalTrigger.h.

Referenced by produce(), and RPCTechnicalTrigger().

std::array<TTUEmulator,kMaxTtuBoards> RPCTechnicalTrigger::m_ttu
private

Definition at line 86 of file RPCTechnicalTrigger.h.

Referenced by beginRun(), printinfo(), produce(), and RPCTechnicalTrigger().

std::array<TTUEmulator,kMaxTtuBoards> RPCTechnicalTrigger::m_ttuRbcLine
private

Definition at line 88 of file RPCTechnicalTrigger.h.

Referenced by beginRun(), printinfo(), produce(), and RPCTechnicalTrigger().

const TTUBoardSpecs* RPCTechnicalTrigger::m_ttuspecs
private

Definition at line 101 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

const int RPCTechnicalTrigger::m_useEventSetup
private

Definition at line 91 of file RPCTechnicalTrigger.h.

Referenced by beginRun(), and RPCTechnicalTrigger().

const int RPCTechnicalTrigger::m_useRPCSimLink
private

Definition at line 98 of file RPCTechnicalTrigger.h.

Referenced by produce(), and RPCTechnicalTrigger().

const int RPCTechnicalTrigger::m_verbosity
private

Definition at line 90 of file RPCTechnicalTrigger.h.

Referenced by produce(), and RPCTechnicalTrigger().