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