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 //...........................................................................
68 
70 public:
71 
72  explicit RPCTechnicalTrigger(const edm::ParameterSet&);
73  ~RPCTechnicalTrigger() override;
74 
75 private:
76 
77  //virtual void beginJob() ;
78  void beginRun(edm::Run const&, const edm::EventSetup&) final;
79  void produce(edm::Event&, const edm::EventSetup&) override;
80 
81  //...........................................................................
82 
83  void printinfo() const;
84 
85  static constexpr int kMaxTtuBoards = 3;
86  std::array<TTUEmulator,kMaxTtuBoards> m_ttu;
87 
88  std::array<TTUEmulator,kMaxTtuBoards> m_ttuRbcLine;
89 
90  const int m_verbosity;
91  const int m_useEventSetup;
93  const std::vector<unsigned> m_ttBits;
94  const std::vector<std::string> m_ttNames;
97 
98  const int m_useRPCSimLink;
99 
100  std::unique_ptr<TTUConfigurator> m_readConfig;
103 
105 
106  class TTUResults {
107  public:
108  TTUResults() = default;
109  TTUResults(const TTUResults&) = default;
110  TTUResults(TTUResults&&) = default;
111  TTUResults& operator=(TTUResults const&) = default;
112  TTUResults& operator=(TTUResults&&) = default;
113 
114  TTUResults( int idx, int bx, int wh1, int wh2 ):
115  m_ttuidx(idx),
116  m_bx(bx),
117  m_trigWheel1(wh1),
118  m_trigWheel2(wh2) {;}
119 
120  TTUResults( int idx, int bx, int wh1, int wh2 , int wdg ):
121  m_ttuidx(idx),
122  m_bx(bx),
123  m_trigWheel1(wh1),
124  m_trigWheel2(wh2),
125  m_wedge(wdg) {;}
126 
127  int m_ttuidx;
128  int m_bx;
131  int m_wedge;
132 
133  int getTriggerForWheel( int wheel ) const
134  {
135  if( abs(wheel) > 1 ) return m_trigWheel2;
136  else return m_trigWheel1;
137  }
138 
139 
140  };
141 
142 
143  std::map<int,TTUResults*> convertToMap( const std::vector<std::unique_ptr<TTUResults>> & ) const;
144 
145  bool searchCoincidence( int , int, std::map<int, TTUResults*> const& ttuResultsByQuandrant ) const;
146 };
147 
148 #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
std::array< TTUEmulator, kMaxTtuBoards > m_ttuRbcLine
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)
void produce(edm::Event &, const edm::EventSetup &) override