test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCMotherboardME3141RPC.h
Go to the documentation of this file.
1 #ifndef CSCTriggerPrimitives_CSCMotherboardME3141RPC_h
2 #define CSCTriggerPrimitives_CSCMotherboardME3141RPC_h
3 
16 
17 class CSCGeometry;
18 class CSCChamber;
19 class RPCGeometry;
20 
22 {
23  typedef std::pair<unsigned int, const RPCDigi> RPCDigiBX;
24  typedef std::vector<RPCDigiBX> RPCDigisBX;
25  typedef std::map<int, RPCDigisBX> RPCDigis;
26 
27  public:
29  CSCMotherboardME3141RPC(unsigned endcap, unsigned station, unsigned sector,
30  unsigned subsector, unsigned chamber,
31  const edm::ParameterSet& conf);
32 
35 
38  void run(const CSCWireDigiCollection* wiredc,
39  const CSCComparatorDigiCollection* compdc,
40  const RPCDigiCollection* rpcDigis);
41 
43  enum MEX1Station {ME31 = 1, ME41};
44 
47  void clear();
48 
50  void setCSCGeometry(const CSCGeometry *g) { csc_g = g; }
51  void setRPCGeometry(const RPCGeometry *g) { rpc_g = g; }
52 
53  // check that the RE31 and RE41 chambers are really there
54  bool hasRE31andRE41();
55 
56  void retrieveRPCDigis(const RPCDigiCollection* digis, unsigned id);
57  std::map<int,std::pair<double,double> > createRPCRollLUT(RPCDetId id);
58  int assignRPCRoll(double eta);
59  void printRPCTriggerDigis(int minBX, int maxBx);
60 
61  RPCDigisBX matchingRPCDigis(const CSCCLCTDigi& cLCT, const RPCDigisBX& digis = RPCDigisBX(), bool first = true);
62  RPCDigisBX matchingRPCDigis(const CSCALCTDigi& aLCT, const RPCDigisBX& digis = RPCDigisBX(), bool first = true);
63  RPCDigisBX matchingRPCDigis(const CSCCLCTDigi& cLCT, const CSCALCTDigi& aLCT, const RPCDigisBX& digis = RPCDigisBX(),
64  bool first = true);
65 
66  unsigned int findQualityRPC(const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT, bool hasRPC);
67 
68  void correlateLCTsRPC(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
69  CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT,
71  const RPCDigisBX& digis = RPCDigisBX());
72 
73  void correlateLCTsRPC(CSCCLCTDigi bestCLCT,CSCCLCTDigi secondCLCT,
74  RPCDigi rpcDigi, int roll,
76 
77  void correlateLCTsRPC(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
78  RPCDigi rpcPad,
80 
82  CSCCorrelatedLCTDigi constructLCTsRPC(const CSCCLCTDigi& clct, const RPCDigi& rpc, int roll,
83  bool oldDataFormat);
84  CSCCorrelatedLCTDigi constructLCTsRPC(const CSCALCTDigi& alct, const RPCDigi& rpc, bool oldDataFormat);
85 
87  std::vector<CSCCorrelatedLCTDigi> sortLCTsByQuality(int bx);
88  std::vector<CSCCorrelatedLCTDigi> sortLCTsByQuality(std::vector<CSCCorrelatedLCTDigi>);
89  std::vector<CSCCorrelatedLCTDigi> sortLCTsByRPCDPhi(int bx);
90  std::vector<CSCCorrelatedLCTDigi> sortLCTsByRPCDPhi(std::vector<CSCCorrelatedLCTDigi>);
91 
92  std::vector<CSCCorrelatedLCTDigi> getLCTs();
93  std::vector<CSCCorrelatedLCTDigi> readoutLCTs();
94 
95  private:
96 
100 
101  static const double lut_pt_vs_dphi_rpccsc_me31[8][3];
102  static const double lut_pt_vs_dphi_rpccsc_me41[8][3];
103  static const double lut_wg_me31_eta_odd[96][2];
104  static const double lut_wg_me31_eta_even[96][2];
105  static const double lut_wg_me41_eta_odd[96][2];
106  static const double lut_wg_me41_eta_even[96][2];
107 
110 
111  std::vector<CSCALCTDigi> alctV;
112  std::vector<CSCCLCTDigi> clctV;
113 
116 
118 
120 
121  unsigned int tmb_cross_bx_algo;
122 
124  unsigned int max_me3141_lcts;
125 
126  // masterswitch
128 
129  // debug
133 
134  // deltas used to match to RPC digis
140 
142 
143  // drop low quality stubs if they don't have RPCs
145 
149 
153 
154  std::map<int,std::pair<double,double> > rpcRollToEtaLimits_;
155  std::map<int,int> cscWgToRpcRoll_;
156 
157  // map of RPC strip to CSC HS
158  std::map<int,int> rpcStripToCscHs_;
159  std::map<int,std::pair<int,int>> cscHsToRpcStrip_;
160 
161  // map< bx , vector<rpcid, pad> >
163 };
164 #endif
165 
static const double lut_wg_me41_eta_odd[96][2]
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
void printRPCTriggerDigis(int minBX, int maxBx)
std::map< int, std::pair< double, double > > createRPCRollLUT(RPCDetId id)
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]