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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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
 
edm::ESGetToken< RBCBoardSpecs, RBCBoardSpecsRcdm_pRBCSpecsToken
 
edm::ESGetToken< TTUBoardSpecs, TTUBoardSpecsRcdm_pTTUSpecsToken
 
const RBCBoardSpecsm_rbcspecs
 
std::unique_ptr< TTUConfiguratorm_readConfig
 
const edm::InputTag m_rpcDigiLabel
 
const edm::EDGetTokenT< RPCDigiCollectionm_rpcDigiToken
 
edm::ESGetToken< RPCGeometry, MuonGeometryRecordm_rpcGeometryToken
 
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 constexpr int kMaxTtuBoards = 3
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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::RPCTechnicalTrigger ( const edm::ParameterSet iConfig)
explicit

Definition at line 39 of file RPCTechnicalTrigger.cc.

References edm::ParameterSet::getUntrackedParameter().

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  m_rpcGeometryToken(esConsumes<RPCGeometry, MuonGeometryRecord>()) {
48  std::string configFile = iConfig.getParameter<std::string>("ConfigFile");
49 
50  edm::FileInPath f1("L1Trigger/RPCTechnicalTrigger/data/" + configFile);
51  m_configFile = f1.fullPath();
52 
53  if (m_verbosity) {
54  LogTrace("RPCTechnicalTrigger") << m_rpcDigiLabel << '\n' << std::endl;
55 
56  LogTrace("RPCTechnicalTrigger") << "\nConfiguration file used for UseEventSetup = 0 \n"
57  << m_configFile << '\n'
58  << std::endl;
59  }
60 
61  //...........................................................................
62  //... There are three Technical Trigger Units Boards: 1 can handle 2 Wheels
63  //... n_Wheels sets the number of wheels attached to board with index boardIndex
64 
65  constexpr std::array<int, 3> boardIndex = {{1, 2, 3}};
66  constexpr std::array<int, 3> nWheels = {{2, 1, 2}};
67 
68  m_ttu[0] = TTUEmulator(boardIndex[0], nWheels[0]);
69  m_ttu[1] = TTUEmulator(boardIndex[1], nWheels[1]);
70  m_ttu[2] = TTUEmulator(boardIndex[2], nWheels[2]);
71 
72  //... This is second line that delivers in parallel a second trigger
73  m_ttuRbcLine[0] = TTUEmulator(boardIndex[0], nWheels[0]);
74  m_ttuRbcLine[1] = TTUEmulator(boardIndex[1], nWheels[1]);
75  m_ttuRbcLine[2] = TTUEmulator(boardIndex[2], nWheels[2]);
76 
77  //...........................................................................
78 
79  m_hasConfig = false;
80  produces<L1GtTechnicalTriggerRecord>();
81  consumes<edm::DetSetVector<RPCDigiSimLink>>(edm::InputTag("simMuonRPCDigis", "RPCDigiSimLink", ""));
82  if (m_useEventSetup >= 1) {
83  m_pRBCSpecsToken = esConsumes<RBCBoardSpecs, RBCBoardSpecsRcd, edm::Transition::BeginRun>();
84  m_pTTUSpecsToken = esConsumes<TTUBoardSpecs, TTUBoardSpecsRcd, edm::Transition::BeginRun>();
85  }
86 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::InputTag m_rpcDigiLabel
#define LogTrace(id)
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > m_rpcGeometryToken
std::array< TTUEmulator, kMaxTtuBoards > m_ttu
const edm::EDGetTokenT< RPCDigiCollection > m_rpcDigiToken
const std::vector< unsigned > m_ttBits
edm::ESGetToken< RBCBoardSpecs, RBCBoardSpecsRcd > m_pRBCSpecsToken
const std::vector< std::string > m_ttNames
edm::ESGetToken< TTUBoardSpecs, TTUBoardSpecsRcd > m_pTTUSpecsToken
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine

◆ ~RPCTechnicalTrigger()

RPCTechnicalTrigger::~RPCTechnicalTrigger ( )
override

Definition at line 88 of file RPCTechnicalTrigger.cc.

88 {}

Member Function Documentation

◆ beginRun()

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

Definition at line 292 of file RPCTechnicalTrigger.cc.

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

292  {
293  LogDebug("RPCTechnicalTrigger") << "RPCTechnicalTrigger::beginRun> starts" << std::endl;
294 
295  //.. Get Board Specifications (hardware configuration)
296 
297  if (m_useEventSetup >= 1) {
299 
301 
302  if (!pRBCSpecs.isValid() || !pTTUSpecs.isValid()) {
303  edm::LogError("RPCTechnicalTrigger") << "can't find RBC/TTU BoardSpecsRcd" << '\n';
304  m_hasConfig = false;
305  } else {
306  m_rbcspecs = pRBCSpecs.product();
307  m_ttuspecs = pTTUSpecs.product();
308  m_hasConfig = true;
309  }
310 
311  } else {
312  // read hardware configuration from file
313  m_readConfig = std::make_unique<TTUConfigurator>(m_configFile);
314 
315  if (m_readConfig->m_hasConfig) {
316  m_readConfig->process();
317  m_rbcspecs = m_readConfig->getRbcSpecs();
318  m_ttuspecs = m_readConfig->getTtuSpecs();
319  m_hasConfig = true;
320  }
321 
322  else
323  m_hasConfig = false;
324  }
325 
326  if (m_hasConfig) {
327  //... Initialize all
328 
329  for (int k = 0; k < kMaxTtuBoards; ++k) {
330  m_ttu[k].SetLineId(1);
331  m_ttuRbcLine[k].SetLineId(2);
332 
333  m_ttu[k].setSpecifications(m_ttuspecs, m_rbcspecs);
334  m_ttuRbcLine[k].setSpecifications(m_ttuspecs, m_rbcspecs);
335 
336  m_ttu[k].initialise();
337  m_ttuRbcLine[k].initialise();
338  }
339  }
340 }
std::unique_ptr< TTUConfigurator > m_readConfig
Log< level::Error, false > LogError
static constexpr int kMaxTtuBoards
T const * product() const
Definition: ESHandle.h:86
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
bool isValid() const
Definition: ESHandle.h:44
const TTUBoardSpecs * m_ttuspecs
std::array< TTUEmulator, kMaxTtuBoards > m_ttu
const RBCBoardSpecs * m_rbcspecs
edm::ESGetToken< RBCBoardSpecs, RBCBoardSpecsRcd > m_pRBCSpecsToken
edm::ESGetToken< TTUBoardSpecs, TTUBoardSpecsRcd > m_pTTUSpecsToken
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
#define LogDebug(id)

◆ convertToMap()

std::map< int, RPCTechnicalTrigger::TTUResults * > RPCTechnicalTrigger::convertToMap ( const std::vector< std::unique_ptr< TTUResults >> &  ttuResults) const
private

Definition at line 343 of file RPCTechnicalTrigger.cc.

References submitPVResolutionJobs::key.

Referenced by produce().

344  {
345  std::map<int, TTUResults*> returnValue;
346  auto itr = ttuResults.begin();
347 
348  while (itr != ttuResults.end()) {
349  if ((*itr)->m_bx != 0) {
350  ++itr;
351  continue;
352  }
353 
354  int key(0);
355  key = 1000 * ((*itr)->m_ttuidx + 1) + 1 * (*itr)->m_wedge;
356  returnValue[key] = itr->get();
357  ++itr;
358  }
359 
360  return returnValue;
361 }
key
prepare the HTCondor submission files and eventually submit them

◆ printinfo()

void RPCTechnicalTrigger::printinfo ( ) const
private

Definition at line 442 of file RPCTechnicalTrigger.cc.

References isotrackApplyRegressor::k, kMaxTtuBoards, LogDebug, m_ttu, and m_ttuRbcLine.

442  {
443  LogDebug("RPCTechnicalTrigger") << "RPCTechnicalTrigger::Printing TTU emulators info>" << std::endl;
444 
445  for (int k = 0; k < kMaxTtuBoards; ++k) {
446  m_ttu[k].printinfo();
447  m_ttuRbcLine[k].printinfo();
448  }
449 }
static constexpr int kMaxTtuBoards
std::array< TTUEmulator, kMaxTtuBoards > m_ttu
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
#define LogDebug(id)

◆ produce()

void RPCTechnicalTrigger::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 91 of file RPCTechnicalTrigger.cc.

References funct::abs(), nano_mu_digi_cff::bx, convertToMap(), gather_cfg::cout, edm::EventSetup::getHandle(), iEvent, input, edm::HandleBase::isValid(), isotrackApplyRegressor::k, kMaxTtuBoards, LogDebug, m_hasConfig, m_rpcDigiLabel, m_rpcDigiToken, m_rpcGeometryToken, m_ttBits, m_ttNames, m_ttu, m_ttuRbcLine, m_useRPCSimLink, m_verbosity, eostools::move(), MillePedeFileConverter_cfg::out, convertSQLitetoXML_cfg::output, mps_fire::result, searchCoincidence(), jetUpdater_cfi::sort, and mps_update::status.

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

◆ searchCoincidence()

bool RPCTechnicalTrigger::searchCoincidence ( int  wheel1,
int  wheel2,
std::map< int, TTUResults *> const &  ttuResultsByQuandrant 
) const
private

Definition at line 364 of file RPCTechnicalTrigger.cc.

References isotrackApplyRegressor::k, and submitPVResolutionJobs::key.

Referenced by produce().

366  {
367  std::map<int, TTUResults*>::const_iterator itr;
368  bool topRight(false);
369  bool botLeft(false);
370 
371  int indxW1 = wheelTtu[wheel1 + kWheelOffset];
372  int indxW2 = wheelTtu[wheel2 + kWheelOffset];
373 
374  int k(0);
375  int key(0);
376  bool finalTrigger(false);
377  int maxTopQuadrants = 4;
378 
379  //work out Pointing Logic to Tracker
380 
381  for (auto firstSector : s_quadrants) {
382  key = 1000 * (indxW1) + firstSector;
383 
384  itr = ttuResultsByQuadrant.find(key);
385  if (itr != ttuResultsByQuadrant.end())
386  topRight = (*itr).second->getTriggerForWheel(wheel1);
387 
388  //std::cout << "W1: " << wheel1 << " " << "sec: " << firstSector << " dec: " << topRight << '\n';
389 
390  key = 1000 * (indxW2) + firstSector + 5;
391 
392  itr = ttuResultsByQuadrant.find(key);
393 
394  if (itr != ttuResultsByQuadrant.end())
395  botLeft = (*itr).second->getTriggerForWheel(wheel2);
396 
397  //std::cout << "W2: " << wheel2 << " " << "sec: " << firstSector + 5 << " dec: " << botLeft << '\n';
398 
399  finalTrigger |= (topRight && botLeft);
400 
401  ++k;
402 
403  if (k > maxTopQuadrants)
404  break;
405  }
406 
407  //Try the opposite now
408 
409  k = 0;
410 
411  for (auto firstSector : s_quadrants) {
412  key = 1000 * (indxW2) + firstSector;
413 
414  itr = ttuResultsByQuadrant.find(key);
415  if (itr != ttuResultsByQuadrant.end())
416  topRight = (*itr).second->getTriggerForWheel(wheel1);
417 
418  //std::cout << "W1: " << wheel1 << " " << "sec: " << firstSector << " dec: " << topRight << '\n';
419 
420  key = 1000 * (indxW1) + firstSector + 5;
421 
422  itr = ttuResultsByQuadrant.find(key);
423 
424  if (itr != ttuResultsByQuadrant.end())
425  botLeft = (*itr).second->getTriggerForWheel(wheel2);
426 
427  //std::cout << "W2: " << wheel2 << " " << "sec: " << firstSector + 5 << " dec: " << botLeft << '\n';
428 
429  finalTrigger |= (topRight && botLeft);
430 
431  ++k;
432 
433  if (k > maxTopQuadrants)
434  break;
435  }
436 
437  return finalTrigger;
438 }
key
prepare the HTCondor submission files and eventually submit them

Member Data Documentation

◆ kMaxTtuBoards

constexpr int RPCTechnicalTrigger::kMaxTtuBoards = 3
staticprivate

Definition at line 83 of file RPCTechnicalTrigger.h.

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

◆ m_configFile

std::string RPCTechnicalTrigger::m_configFile
private

Definition at line 90 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

◆ m_hasConfig

bool RPCTechnicalTrigger::m_hasConfig
private

Definition at line 102 of file RPCTechnicalTrigger.h.

Referenced by beginRun(), and produce().

◆ m_pRBCSpecsToken

edm::ESGetToken<RBCBoardSpecs, RBCBoardSpecsRcd> RPCTechnicalTrigger::m_pRBCSpecsToken
private

Definition at line 138 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

◆ m_pTTUSpecsToken

edm::ESGetToken<TTUBoardSpecs, TTUBoardSpecsRcd> RPCTechnicalTrigger::m_pTTUSpecsToken
private

Definition at line 139 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

◆ m_rbcspecs

const RBCBoardSpecs* RPCTechnicalTrigger::m_rbcspecs
private

Definition at line 100 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

◆ m_readConfig

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

Definition at line 98 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

◆ m_rpcDigiLabel

const edm::InputTag RPCTechnicalTrigger::m_rpcDigiLabel
private

Definition at line 93 of file RPCTechnicalTrigger.h.

Referenced by produce().

◆ m_rpcDigiToken

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

Definition at line 94 of file RPCTechnicalTrigger.h.

Referenced by produce().

◆ m_rpcGeometryToken

edm::ESGetToken<RPCGeometry, MuonGeometryRecord> RPCTechnicalTrigger::m_rpcGeometryToken
private

Definition at line 137 of file RPCTechnicalTrigger.h.

Referenced by produce().

◆ m_ttBits

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

Definition at line 91 of file RPCTechnicalTrigger.h.

Referenced by produce().

◆ m_ttNames

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

Definition at line 92 of file RPCTechnicalTrigger.h.

Referenced by produce().

◆ m_ttu

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

Definition at line 84 of file RPCTechnicalTrigger.h.

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

◆ m_ttuRbcLine

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

Definition at line 86 of file RPCTechnicalTrigger.h.

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

◆ m_ttuspecs

const TTUBoardSpecs* RPCTechnicalTrigger::m_ttuspecs
private

Definition at line 99 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

◆ m_useEventSetup

const int RPCTechnicalTrigger::m_useEventSetup
private

Definition at line 89 of file RPCTechnicalTrigger.h.

Referenced by beginRun().

◆ m_useRPCSimLink

const int RPCTechnicalTrigger::m_useRPCSimLink
private

Definition at line 96 of file RPCTechnicalTrigger.h.

Referenced by produce().

◆ m_verbosity

const int RPCTechnicalTrigger::m_verbosity
private

Definition at line 88 of file RPCTechnicalTrigger.h.

Referenced by produce().