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 
32 // Include files From CMSSW
33 
41 
46 
50 
51 // Local to project
55 
60 
61 //Technical trigger bits
64 
65 
66 //...........................................................................
67 
69 public:
70 
71  explicit RPCTechnicalTrigger(const edm::ParameterSet&);
73 
74 private:
75 
76  //virtual void beginJob() ;
77  virtual void beginRun(edm::Run const&, const edm::EventSetup&) override final;
78  virtual void produce(edm::Event&, const edm::EventSetup&) override;
79  virtual void endJob() override;
80 
81  //...........................................................................
82 
83  void printinfo();
84 
85  bool Reset();
86 
88 
90 
92 
94 
95  std::bitset<5> m_triggerbits;
96 
98 
102  std::vector<unsigned> m_ttBits;
103  std::vector<std::string> m_ttNames;
106 
108 
112 
113  int m_ievt;
114  int m_cand;
115  int m_boardIndex[3];
116  int m_nWheels[3];
120 
121  class TTUResults {
122  public:
124 
125  TTUResults( int idx, int bx, int wh1, int wh2 ):
126  m_ttuidx(idx),
127  m_bx(bx),
128  m_trigWheel1(wh1),
129  m_trigWheel2(wh2) {;}
130 
131  TTUResults( int idx, int bx, int wh1, int wh2 , int wdg ):
132  m_ttuidx(idx),
133  m_bx(bx),
134  m_trigWheel1(wh1),
135  m_trigWheel2(wh2),
136  m_wedge(wdg) {;}
137 
139  {
140  m_ttuidx=0;
141  m_bx=0;
142  m_trigWheel1=0;
143  m_trigWheel2=0;
144  m_wedge=0;
145  }
146 
147  int m_ttuidx;
148  int m_bx;
151  int m_wedge;
152 
154  {
155  if( abs(wheel) > 1 ) return m_trigWheel2;
156  else return m_trigWheel1;
157  }
158 
159 
160  };
161 
162  struct sortByBx {
163  bool operator()( const TTUResults * a, const TTUResults * b )
164  {
165  return (*a).m_bx < (*b).m_bx;
166  }
167  };
168 
169  std::vector<TTUResults*> m_serializedInfoLine1;
170  std::vector<TTUResults*> m_serializedInfoLine2;
171 
172  int convertToMap( const std::vector<TTUResults*> & );
173 
174  bool searchCoincidence( int , int );
175 
176  std::map<int,int> m_WheelTtu;
177 
178  std::map<int,TTUResults*> m_ttuResultsByQuadrant;
179 
180  std::vector<int> m_quadrants;
181 
182  std::vector<int>::iterator m_firstSector;
183 
184 
185 };
186 
187 #endif // RPCTECHNICALTRIGGER_H
edm::InputTag m_rpcSimLinkInstance
std::map< int, int > m_WheelTtu
std::vector< TTUResults * > m_serializedInfoLine1
edm::ESHandle< RPCGeometry > m_rpcGeometry
TTUResults(int idx, int bx, int wh1, int wh2, int wdg)
std::vector< int > m_quadrants
bool operator()(const TTUResults *a, const TTUResults *b)
std::bitset< 5 > m_triggerbits
ProcessInputSignal * m_signal
virtual void beginRun(edm::Run const &, const edm::EventSetup &) override final
std::map< int, TTUResults * > m_ttuResultsByQuadrant
TTUEmulator * m_ttu[3]
std::vector< TTUResults * > m_serializedInfoLine2
RPCTechnicalTrigger(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< unsigned > m_ttBits
TTUConfigurator * m_readConfig
const TTUBoardSpecs * m_ttuspecs
std::vector< std::string > m_ttNames
std::vector< int >::iterator m_firstSector
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
TTUEmulator * m_ttuRbcLine[3]
edm::InputTag m_rpcDigiLabel
const RBCBoardSpecs * m_rbcspecs
virtual void endJob() override
RPCInputSignal * m_input
int convertToMap(const std::vector< TTUResults * > &)
Definition: Run.h:43
TTUResults(int idx, int bx, int wh1, int wh2)
bool searchCoincidence(int, int)
virtual void produce(edm::Event &, const edm::EventSetup &) override