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 
42 
47 
51 
52 // Local to project
56 
61 
62 //Technical trigger bits
65 
66 //...........................................................................
67 
69 public:
70  explicit RPCTechnicalTrigger(const edm::ParameterSet&);
71  ~RPCTechnicalTrigger() override;
72 
73 private:
74  //virtual void beginJob() ;
75  void beginRun(edm::Run const&, const edm::EventSetup&) final;
76  void produce(edm::Event&, const edm::EventSetup&) override;
77 
78  //...........................................................................
79 
80  void printinfo() const;
81 
82  static constexpr int kMaxTtuBoards = 3;
83  std::array<TTUEmulator, kMaxTtuBoards> m_ttu;
84 
85  std::array<TTUEmulator, kMaxTtuBoards> m_ttuRbcLine;
86 
87  const int m_verbosity;
88  const int m_useEventSetup;
90  const std::vector<unsigned> m_ttBits;
91  const std::vector<std::string> m_ttNames;
94 
95  const int m_useRPCSimLink;
96 
97  std::unique_ptr<TTUConfigurator> m_readConfig;
100 
102 
103  class TTUResults {
104  public:
105  TTUResults() = default;
106  TTUResults(const TTUResults&) = default;
107  TTUResults(TTUResults&&) = default;
108  TTUResults& operator=(TTUResults const&) = default;
109  TTUResults& operator=(TTUResults&&) = default;
110 
111  TTUResults(int idx, int bx, int wh1, int wh2) : m_ttuidx(idx), m_bx(bx), m_trigWheel1(wh1), m_trigWheel2(wh2) { ; }
112 
113  TTUResults(int idx, int bx, int wh1, int wh2, int wdg)
114  : m_ttuidx(idx), m_bx(bx), m_trigWheel1(wh1), m_trigWheel2(wh2), m_wedge(wdg) {
115  ;
116  }
117 
118  int m_ttuidx;
119  int m_bx;
122  int m_wedge;
123 
124  int getTriggerForWheel(int wheel) const {
125  if (abs(wheel) > 1)
126  return m_trigWheel2;
127  else
128  return m_trigWheel1;
129  }
130  };
131 
132  std::map<int, TTUResults*> convertToMap(const std::vector<std::unique_ptr<TTUResults>>&) const;
133 
134  bool searchCoincidence(int, int, std::map<int, TTUResults*> const& ttuResultsByQuandrant) const;
135 };
136 
137 #endif // RPCTECHNICALTRIGGER_H
RPCTechnicalTrigger::TTUResults::m_wedge
int m_wedge
Definition: RPCTechnicalTrigger.h:122
RBCBoardSpecs.h
RPCTechnicalTrigger::m_ttuRbcLine
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
Definition: RPCTechnicalTrigger.h:85
RPCTechnicalTrigger::m_ttu
std::array< TTUEmulator, kMaxTtuBoards > m_ttu
Definition: RPCTechnicalTrigger.h:83
RPCTechnicalTrigger::searchCoincidence
bool searchCoincidence(int, int, std::map< int, TTUResults * > const &ttuResultsByQuandrant) const
Definition: RPCTechnicalTrigger.cc:366
RPCTechnicalTrigger::TTUResults::m_trigWheel2
int m_trigWheel2
Definition: RPCTechnicalTrigger.h:121
RPCTechnicalTrigger::m_hasConfig
bool m_hasConfig
Definition: RPCTechnicalTrigger.h:101
ESHandle.h
RPCTechnicalTrigger::m_ttuspecs
const TTUBoardSpecs * m_ttuspecs
Definition: RPCTechnicalTrigger.h:98
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:345
TTUBoardSpecs.h
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
RPCTechnicalTrigger::m_ttNames
const std::vector< std::string > m_ttNames
Definition: RPCTechnicalTrigger.h:91
EDProducer.h
RPCRoll.h
training_settings.idx
idx
Definition: training_settings.py:16
L1GtTechnicalTriggerRecord.h
RPCTechnicalTrigger::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: RPCTechnicalTrigger.cc:88
MakerMacros.h
RPCTechnicalTrigger::TTUResults::m_bx
int m_bx
Definition: RPCTechnicalTrigger.h:119
Service.h
ProcessInputSignal.h
RPCTechnicalTrigger::m_configFile
std::string m_configFile
Definition: RPCTechnicalTrigger.h:89
RPCTechnicalTrigger::beginRun
void beginRun(edm::Run const &, const edm::EventSetup &) final
Definition: RPCTechnicalTrigger.cc:292
RPCTechnicalTrigger::m_rpcDigiToken
const edm::EDGetTokenT< RPCDigiCollection > m_rpcDigiToken
Definition: RPCTechnicalTrigger.h:93
RPCTechnicalTrigger::m_ttBits
const std::vector< unsigned > m_ttBits
Definition: RPCTechnicalTrigger.h:90
RPCTechnicalTrigger::m_useRPCSimLink
const int m_useRPCSimLink
Definition: RPCTechnicalTrigger.h:95
RPCDigi.h
RPCTechnicalTrigger::TTUResults
Definition: RPCTechnicalTrigger.h:103
RPCTechnicalTrigger::RPCTechnicalTrigger
RPCTechnicalTrigger(const edm::ParameterSet &)
Definition: RPCTechnicalTrigger.cc:39
RPCTechnicalTrigger::kMaxTtuBoards
static constexpr int kMaxTtuBoards
Definition: RPCTechnicalTrigger.h:82
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:92
edm::ParameterSet
Definition: ParameterSet.h:36
RPCTechnicalTrigger::TTUResults::getTriggerForWheel
int getTriggerForWheel(int wheel) const
Definition: RPCTechnicalTrigger.h:124
Event.h
RPCTechnicalTrigger::m_useEventSetup
const int m_useEventSetup
Definition: RPCTechnicalTrigger.h:88
L1GtTechnicalTrigger.h
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
edm::stream::EDProducer
Definition: EDProducer.h:38
RPCTechnicalTrigger::TTUResults::m_trigWheel1
int m_trigWheel1
Definition: RPCTechnicalTrigger.h:120
edm::EventSetup
Definition: EventSetup.h:57
TTUBoardSpecs
Definition: TTUBoardSpecs.h:18
RPCTechnicalTrigger::printinfo
void printinfo() const
Definition: RPCTechnicalTrigger.cc:444
RPCTechnicalTrigger::~RPCTechnicalTrigger
~RPCTechnicalTrigger() override
Definition: RPCTechnicalTrigger.cc:85
RPCTechnicalTrigger::TTUResults::TTUResults
TTUResults(int idx, int bx, int wh1, int wh2, int wdg)
Definition: RPCTechnicalTrigger.h:113
Frameworkfwd.h
TTUConfigurator.h
RPCTechnicalTrigger::TTUResults::m_ttuidx
int m_ttuidx
Definition: RPCTechnicalTrigger.h:118
RPCDigiCollection.h
RPCTechnicalTrigger
Definition: RPCTechnicalTrigger.h:68
RPCTechnicalTrigger::m_readConfig
std::unique_ptr< TTUConfigurator > m_readConfig
Definition: RPCTechnicalTrigger.h:97
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:111
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
RPCTechnicalTrigger::m_verbosity
const int m_verbosity
Definition: RPCTechnicalTrigger.h:87
RPCGeometry.h
edm::InputTag
Definition: InputTag.h:15
TTUBoardSpecsRcd.h
RPCTechnicalTrigger::m_rbcspecs
const RBCBoardSpecs * m_rbcspecs
Definition: RPCTechnicalTrigger.h:99