CMS 3D CMS Logo

RPCTechnicalTrigger.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RPCTechnicalTrigger
4 // Class: RPCTechnicalTrigger
5 //
14 //
15 // Original Author: Andres Osorio
16 // Created: Tue Mar 10 13:59:40 CET 2009
17 //
18 //
19 //
20 //
21 // $Id:
22 //
23 //
24 
25 #ifndef RPCTECHNICALTRIGGER_H
26 #define RPCTECHNICALTRIGGER_H 1
27 
28 // system include files
29 #include <memory>
30 #include <bitset>
31 #include <array>
32 
33 // Include files From CMSSW
34 
43 
48 
52 
53 // Local to project
57 
62 
63 //Technical trigger bits
66 
67 //...........................................................................
68 
70 public:
71  explicit RPCTechnicalTrigger(const edm::ParameterSet&);
72  ~RPCTechnicalTrigger() override;
73 
74 private:
75  //virtual void beginJob() ;
76  void beginRun(edm::Run const&, const edm::EventSetup&) final;
77  void produce(edm::Event&, const edm::EventSetup&) override;
78 
79  //...........................................................................
80 
81  void printinfo() const;
82 
83  static constexpr int kMaxTtuBoards = 3;
84  std::array<TTUEmulator, kMaxTtuBoards> m_ttu;
85 
86  std::array<TTUEmulator, kMaxTtuBoards> m_ttuRbcLine;
87 
88  const int m_verbosity;
89  const int m_useEventSetup;
91  const std::vector<unsigned> m_ttBits;
92  const std::vector<std::string> m_ttNames;
95 
96  const int m_useRPCSimLink;
97 
98  std::unique_ptr<TTUConfigurator> m_readConfig;
101 
103 
104  class TTUResults {
105  public:
106  TTUResults() = default;
107  TTUResults(const TTUResults&) = default;
108  TTUResults(TTUResults&&) = default;
109  TTUResults& operator=(TTUResults const&) = default;
110  TTUResults& operator=(TTUResults&&) = default;
111 
112  TTUResults(int idx, int bx, int wh1, int wh2) : m_ttuidx(idx), m_bx(bx), m_trigWheel1(wh1), m_trigWheel2(wh2) { ; }
113 
114  TTUResults(int idx, int bx, int wh1, int wh2, int wdg)
115  : m_ttuidx(idx), m_bx(bx), m_trigWheel1(wh1), m_trigWheel2(wh2), m_wedge(wdg) {
116  ;
117  }
118 
119  int m_ttuidx;
120  int m_bx;
123  int m_wedge;
124 
125  int getTriggerForWheel(int wheel) const {
126  if (abs(wheel) > 1)
127  return m_trigWheel2;
128  else
129  return m_trigWheel1;
130  }
131  };
132 
133  std::map<int, TTUResults*> convertToMap(const std::vector<std::unique_ptr<TTUResults>>&) const;
134 
135  bool searchCoincidence(int, int, std::map<int, TTUResults*> const& ttuResultsByQuandrant) const;
136 
140 };
141 
142 #endif // RPCTECHNICALTRIGGER_H
RPCTechnicalTrigger::TTUResults::m_wedge
int m_wedge
Definition: RPCTechnicalTrigger.h:123
RBCBoardSpecs.h
RPCTechnicalTrigger::m_ttuRbcLine
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
Definition: RPCTechnicalTrigger.h:86
RPCTechnicalTrigger::m_ttu
std::array< TTUEmulator, kMaxTtuBoards > m_ttu
Definition: RPCTechnicalTrigger.h:84
RPCTechnicalTrigger::searchCoincidence
bool searchCoincidence(int, int, std::map< int, TTUResults * > const &ttuResultsByQuandrant) const
Definition: RPCTechnicalTrigger.cc:367
RPCTechnicalTrigger::TTUResults::m_trigWheel2
int m_trigWheel2
Definition: RPCTechnicalTrigger.h:122
RPCTechnicalTrigger::m_hasConfig
bool m_hasConfig
Definition: RPCTechnicalTrigger.h:102
ESHandle.h
RPCTechnicalTrigger::m_ttuspecs
const TTUBoardSpecs * m_ttuspecs
Definition: RPCTechnicalTrigger.h:99
edm::Run
Definition: Run.h:45
RPCTechnicalTrigger::TTUResults::TTUResults
TTUResults()=default
edm::EDGetTokenT< RPCDigiCollection >
RPCTechnicalTrigger::convertToMap
std::map< int, TTUResults * > convertToMap(const std::vector< std::unique_ptr< TTUResults >> &) const
Definition: RPCTechnicalTrigger.cc:346
TTUBoardSpecs.h
RPCTechnicalTrigger::m_pTTUSpecsToken
edm::ESGetToken< TTUBoardSpecs, TTUBoardSpecsRcd > m_pTTUSpecsToken
Definition: RPCTechnicalTrigger.h:139
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
RPCTechnicalTrigger::m_ttNames
const std::vector< std::string > m_ttNames
Definition: RPCTechnicalTrigger.h:92
EDProducer.h
RPCRoll.h
L1GtTechnicalTriggerRecord.h
ESGetToken.h
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
RPCTechnicalTrigger::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: RPCTechnicalTrigger.cc:91
MakerMacros.h
RPCTechnicalTrigger::TTUResults::m_bx
int m_bx
Definition: RPCTechnicalTrigger.h:120
Service.h
ProcessInputSignal.h
RPCTechnicalTrigger::m_configFile
std::string m_configFile
Definition: RPCTechnicalTrigger.h:90
RPCTechnicalTrigger::beginRun
void beginRun(edm::Run const &, const edm::EventSetup &) final
Definition: RPCTechnicalTrigger.cc:294
RPCTechnicalTrigger::m_rpcDigiToken
const edm::EDGetTokenT< RPCDigiCollection > m_rpcDigiToken
Definition: RPCTechnicalTrigger.h:94
RPCTechnicalTrigger::m_ttBits
const std::vector< unsigned > m_ttBits
Definition: RPCTechnicalTrigger.h:91
RPCTechnicalTrigger::m_useRPCSimLink
const int m_useRPCSimLink
Definition: RPCTechnicalTrigger.h:96
RPCDigi.h
RPCTechnicalTrigger::TTUResults
Definition: RPCTechnicalTrigger.h:104
RPCTechnicalTrigger::RPCTechnicalTrigger
RPCTechnicalTrigger(const edm::ParameterSet &)
Definition: RPCTechnicalTrigger.cc:39
RPCTechnicalTrigger::kMaxTtuBoards
static constexpr int kMaxTtuBoards
Definition: RPCTechnicalTrigger.h:83
RPCTechnicalTrigger::TTUResults::operator=
TTUResults & operator=(TTUResults const &)=default
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RPCDetId.h
RBCBoardSpecs
Definition: RBCBoardSpecs.h:17
RPCTechnicalTrigger::m_rpcDigiLabel
const edm::InputTag m_rpcDigiLabel
Definition: RPCTechnicalTrigger.h:93
edm::ParameterSet
Definition: ParameterSet.h:47
RPCTechnicalTrigger::TTUResults::getTriggerForWheel
int getTriggerForWheel(int wheel) const
Definition: RPCTechnicalTrigger.h:125
Event.h
RPCTechnicalTrigger::m_useEventSetup
const int m_useEventSetup
Definition: RPCTechnicalTrigger.h:89
L1GtTechnicalTrigger.h
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::stream::EDProducer
Definition: EDProducer.h:38
RPCTechnicalTrigger::TTUResults::m_trigWheel1
int m_trigWheel1
Definition: RPCTechnicalTrigger.h:121
RPCTechnicalTrigger::m_pRBCSpecsToken
edm::ESGetToken< RBCBoardSpecs, RBCBoardSpecsRcd > m_pRBCSpecsToken
Definition: RPCTechnicalTrigger.h:138
edm::EventSetup
Definition: EventSetup.h:58
TTUBoardSpecs
Definition: TTUBoardSpecs.h:18
edm::ESGetToken< RPCGeometry, MuonGeometryRecord >
RPCTechnicalTrigger::printinfo
void printinfo() const
Definition: RPCTechnicalTrigger.cc:445
RPCTechnicalTrigger::~RPCTechnicalTrigger
~RPCTechnicalTrigger() override
Definition: RPCTechnicalTrigger.cc:88
RPCTechnicalTrigger::TTUResults::TTUResults
TTUResults(int idx, int bx, int wh1, int wh2, int wdg)
Definition: RPCTechnicalTrigger.h:114
Frameworkfwd.h
TTUConfigurator.h
RPCTechnicalTrigger::TTUResults::m_ttuidx
int m_ttuidx
Definition: RPCTechnicalTrigger.h:119
RPCDigiCollection.h
RPCTechnicalTrigger
Definition: RPCTechnicalTrigger.h:69
RPCTechnicalTrigger::m_readConfig
std::unique_ptr< TTUConfigurator > m_readConfig
Definition: RPCTechnicalTrigger.h:98
RBCBoardSpecsRcd.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TTUEmulator.h
ParameterSet.h
RPCTechnicalTrigger::TTUResults::TTUResults
TTUResults(int idx, int bx, int wh1, int wh2)
Definition: RPCTechnicalTrigger.h:112
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
RPCTechnicalTrigger::m_verbosity
const int m_verbosity
Definition: RPCTechnicalTrigger.h:88
RPCGeometry.h
edm::InputTag
Definition: InputTag.h:15
TTUBoardSpecsRcd.h
RPCTechnicalTrigger::m_rbcspecs
const RBCBoardSpecs * m_rbcspecs
Definition: RPCTechnicalTrigger.h:100
RPCTechnicalTrigger::m_rpcGeometryToken
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > m_rpcGeometryToken
Definition: RPCTechnicalTrigger.h:137