CMS 3D CMS Logo

CSCMotherboardME3141RPC.h
Go to the documentation of this file.
1 #ifndef CSCTriggerPrimitives_CSCMotherboardME3141RPC_h
2 #define CSCTriggerPrimitives_CSCMotherboardME3141RPC_h
3 
17 
18 typedef match<RPCDigi> RPCDigiId;
19 typedef matches<RPCDigi> RPCDigiIds;
20 typedef matchesBX<RPCDigi> RPCDigiIdsBX;
21 
22 class CSCGeometry;
23 class CSCChamber;
24 class RPCGeometry;
25 
27 {
28  typedef std::pair<unsigned int, const RPCDigi> RPCDigiBX;
29  typedef std::vector<RPCDigiBX> RPCDigisBX;
30  typedef std::map<int, RPCDigisBX> RPCDigis;
31 
32  public:
34  CSCMotherboardME3141RPC(unsigned endcap, unsigned station, unsigned sector,
35  unsigned subsector, unsigned chamber,
36  const edm::ParameterSet& conf);
37 
39  ~CSCMotherboardME3141RPC() override;
40 
43  void run(const CSCWireDigiCollection* wiredc,
44  const CSCComparatorDigiCollection* compdc,
45  const RPCDigiCollection* rpcDigis);
46 
48  enum MEX1Station {ME31 = 1, ME41};
49 
52  void clear();
53 
55  void setCSCGeometry(const CSCGeometry *g) { csc_g = g; }
56  void setRPCGeometry(const RPCGeometry *g) { rpc_g = g; }
57 
58  // check that the RE31 and RE41 chambers are really there
59  bool hasRE31andRE41();
60 
61  void retrieveRPCDigis(const RPCDigiCollection* digis, unsigned id);
62  std::map<int,std::pair<double,double> > createRPCRollLUT(RPCDetId id);
63  int assignRPCRoll(double eta);
64  void printRPCTriggerDigis(int minBX, int maxBx);
65 
66  RPCDigisBX matchingRPCDigis(const CSCCLCTDigi& cLCT, const RPCDigisBX& digis = RPCDigisBX(), bool first = true);
67  RPCDigisBX matchingRPCDigis(const CSCALCTDigi& aLCT, const RPCDigisBX& digis = RPCDigisBX(), bool first = true);
68  RPCDigisBX matchingRPCDigis(const CSCCLCTDigi& cLCT, const CSCALCTDigi& aLCT, const RPCDigisBX& digis = RPCDigisBX(),
69  bool first = true);
70 
71  unsigned int findQualityRPC(const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT, bool hasRPC);
72 
73  void correlateLCTsRPC(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
74  CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT,
76  const RPCDigisBX& digis = RPCDigisBX());
77 
78  void correlateLCTsRPC(CSCCLCTDigi bestCLCT,CSCCLCTDigi secondCLCT,
79  RPCDigi rpcDigi, int roll,
81 
82  void correlateLCTsRPC(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
83  RPCDigi rpcPad,
85 
86  CSCCorrelatedLCTDigi constructLCTsRPC(const CSCALCTDigi& alct, const CSCCLCTDigi& clct, const RPCDigisBX& digis = RPCDigisBX());
87  CSCCorrelatedLCTDigi constructLCTsRPC(const CSCCLCTDigi& clct, const RPCDigi& rpc, int roll,
88  bool oldDataFormat);
89  CSCCorrelatedLCTDigi constructLCTsRPC(const CSCALCTDigi& alct, const RPCDigi& rpc, bool oldDataFormat);
90 
92  std::vector<CSCCorrelatedLCTDigi> sortLCTsByQuality(int bx);
93  std::vector<CSCCorrelatedLCTDigi> sortLCTsByQuality(std::vector<CSCCorrelatedLCTDigi>);
94  std::vector<CSCCorrelatedLCTDigi> sortLCTsByRPCDPhi(int bx);
95  std::vector<CSCCorrelatedLCTDigi> sortLCTsByRPCDPhi(std::vector<CSCCorrelatedLCTDigi>);
96 
97  std::vector<CSCCorrelatedLCTDigi> getLCTs();
98  std::vector<CSCCorrelatedLCTDigi> readoutLCTs();
99 
100  private:
101 
105 
106  static const double lut_pt_vs_dphi_rpccsc_me31[8][3];
107  static const double lut_pt_vs_dphi_rpccsc_me41[8][3];
108  static const double lut_wg_me31_eta_odd[96][2];
109  static const double lut_wg_me31_eta_even[96][2];
110  static const double lut_wg_me41_eta_odd[96][2];
111  static const double lut_wg_me41_eta_even[96][2];
112 
115 
116  std::vector<CSCALCTDigi> alctV;
117  std::vector<CSCCLCTDigi> clctV;
118 
121 
123 
125 
126  unsigned int tmb_cross_bx_algo;
127 
129  unsigned int max_me3141_lcts;
130 
131  // masterswitch
133 
134  // debug
138 
139  // deltas used to match to RPC digis
145 
147 
148  // drop low quality stubs if they don't have RPCs
150 
154 
158 
159  std::map<int,std::pair<double,double> > rpcRollToEtaLimits_;
160  std::map<int,int> cscWgToRpcRoll_;
161 
162  // map of RPC strip to CSC HS
163  std::map<int,int> rpcStripToCscHs_;
164  std::map<int,std::pair<int,int>> cscHsToRpcStrip_;
165 
166  // map< bx , vector<rpcid, pad> >
167  RPCDigis rpcDigis_;
168 };
169 #endif
170 
static const double lut_wg_me41_eta_odd[96][2]
matches< RPCDigi > RPCDigiIds
std::map< int, int > cscWgToRpcRoll_
CSCMotherboardME3141RPC(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
std::map< int, int > rpcStripToCscHs_
void setCSCGeometry(const CSCGeometry *g)
set CSC and RPC geometries for the matching needs
std::vector< CSCCLCTDigi > clctV
std::vector< CSCCorrelatedLCTDigi > readoutLCTs()
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
std::vector< CSCCorrelatedLCTDigi > sortLCTsByQuality(int bx)
std::map< int, RPCDigisBX > RPCDigis
matchesBX< RPCDigi > RPCDigiIdsBX
void printRPCTriggerDigis(int minBX, int maxBx)
std::map< int, std::pair< double, double > > createRPCRollLUT(RPCDetId id)
match< RPCDigi > RPCDigiId
std::map< int, std::pair< int, int > > cscHsToRpcStrip_
static const double lut_wg_me41_eta_even[96][2]
static const double lut_pt_vs_dphi_rpccsc_me41[8][3]
static const double lut_wg_me31_eta_odd[96][2]
std::pair< unsigned int, const RPCDigi > RPCDigiBX
static const double lut_pt_vs_dphi_rpccsc_me31[8][3]
std::map< int, std::pair< double, double > > rpcRollToEtaLimits_
std::vector< CSCCorrelatedLCTDigi > sortLCTsByRPCDPhi(int bx)
CSCCorrelatedLCTDigi allLCTs[MAX_LCT_BINS][15][2]
RPCDigisBX matchingRPCDigis(const CSCCLCTDigi &cLCT, const RPCDigisBX &digis=RPCDigisBX(), bool first=true)
std::vector< RPCDigiBX > RPCDigisBX
std::unique_ptr< CSCAnodeLCTProcessor > alct
void correlateLCTsRPC(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, const RPCDigisBX &digis=RPCDigisBX())
std::unique_ptr< CSCCathodeLCTProcessor > clct
std::vector< CSCALCTDigi > alctV
std::vector< CSCCorrelatedLCTDigi > getLCTs()
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const RPCDigiCollection *rpcDigis)
void retrieveRPCDigis(const RPCDigiCollection *digis, unsigned id)
void setRPCGeometry(const RPCGeometry *g)
unsigned int findQualityRPC(const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, bool hasRPC)
CSCCorrelatedLCTDigi constructLCTsRPC(const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const RPCDigisBX &digis=RPCDigisBX())
static const double lut_wg_me31_eta_even[96][2]