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
void beginRun(edm::Run const &, const edm::EventSetup &) final
std::unique_ptr< TTUConfigurator > m_readConfig
const edm::InputTag m_rpcDigiLabel
std::map< int, TTUResults * > convertToMap(const std::vector< std::unique_ptr< TTUResults >> &) const
TTUResults(int idx, int bx, int wh1, int wh2, int wdg)
static constexpr int kMaxTtuBoards
TTUResults & operator=(TTUResults const &)=default
int getTriggerForWheel(int wheel) const
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > m_rpcGeometryToken
RPCTechnicalTrigger(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const TTUBoardSpecs * m_ttuspecs
bool searchCoincidence(int, int, std::map< int, TTUResults *> const &ttuResultsByQuandrant) const
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 RBCBoardSpecs * m_rbcspecs
const std::vector< std::string > m_ttNames
edm::ESGetToken< TTUBoardSpecs, TTUBoardSpecsRcd > m_pTTUSpecsToken
Definition: Run.h:45
TTUResults(int idx, int bx, int wh1, int wh2)
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
void produce(edm::Event &, const edm::EventSetup &) override