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 matchRPCDigis(enum MEX1Station st);
69 
70  void correlateLCTsRPC(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
71  CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT,
73  const RPCDigisBX& digis = RPCDigisBX());
74 
75  void correlateLCTsRPC(CSCCLCTDigi bestCLCT,CSCCLCTDigi secondCLCT,
76  RPCDigi rpcDigi, int roll,
78 
79  void correlateLCTsRPC(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
80  RPCDigi gemPad,
82 
84  CSCCorrelatedLCTDigi constructLCTsRPC(const CSCCLCTDigi& clct, const RPCDigi& rpc, int roll,
85  bool oldDataFormat);
86  CSCCorrelatedLCTDigi constructLCTsRPC(const CSCALCTDigi& alct, const RPCDigi& rpc, bool oldDataFormat);
87 
89  std::vector<CSCCorrelatedLCTDigi> sortLCTsByQuality(int bx);
90  std::vector<CSCCorrelatedLCTDigi> sortLCTsByQuality(std::vector<CSCCorrelatedLCTDigi>);
91  std::vector<CSCCorrelatedLCTDigi> sortLCTsByGEMDPhi(int bx);
92  std::vector<CSCCorrelatedLCTDigi> sortLCTsByGEMDPhi(std::vector<CSCCorrelatedLCTDigi>);
93 
94  std::vector<CSCCorrelatedLCTDigi> getLCTs();
95  std::vector<CSCCorrelatedLCTDigi> readoutLCTs();
96 
97  private:
98 
102 
103  static const double lut_pt_vs_dphi_rpccsc_me31[8][3];
104  static const double lut_pt_vs_dphi_rpccsc_me41[8][3];
105  static const double lut_wg_me31_eta_odd[96][2];
106  static const double lut_wg_me31_eta_even[96][2];
107  static const double lut_wg_me41_eta_odd[96][2];
108  static const double lut_wg_me41_eta_even[96][2];
109 
112 
113  std::vector<CSCALCTDigi> alctV;
114  std::vector<CSCCLCTDigi> clctV;
115 
118 
120 
122 
123  unsigned int tmb_cross_bx_algo;
124 
126  unsigned int max_me3141_lcts;
127 
128  // masterswitch
130 
133 
138 
141 
144 
147 
148  // debug
152 
153  // deltas used to match to RPC digis
159 
161 
162  // drop low quality stubs if they don't have RPCs
164 
168 
172 
173  std::map<int,std::pair<double,double> > rpcRollToEtaLimits_;
174  std::map<int,int> cscWgToRpcRoll_;
175 
176  // map of RPC strip to CSC HS
177  std::map<int,int> rpcStripToCscHs_;
178  std::map<int,std::pair<int,int>> cscHsToRpcStrip_;
179 
180  // map< bx , vector<rpcid, pad> >
182 };
183 #endif
184 
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
bool rpc_clear_nomatch_lcts
whether to throw out RPC-fiducial LCTs that have no rpc match
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::vector< CSCCorrelatedLCTDigi > sortLCTsByGEMDPhi(int bx)
std::map< int, RPCDigisBX > RPCDigis
int rpc_match_delta_bx
delta BX for RPC pads matching
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]
static const double lut_pt_vs_dphi_rpccsc_me31[8][3]
std::map< int, std::pair< double, double > > rpcRollToEtaLimits_
double rpc_match_delta_phi_odd
RPC matching dphi and deta.
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 matchRPCDigis(enum MEX1Station st)
void correlateLCTsRPC(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, const RPCDigisBX &digis=RPCDigisBX())
bool do_rpc_matching
Do RPC matching?
std::pair< unsigned int, const RPCDigi * > RPCDigiBX
std::unique_ptr< CSCCathodeLCTProcessor > clct
std::vector< CSCALCTDigi > alctV
double rpc_match_min_eta
min eta of LCT for which we require RPC match (we don&#39;t throw out LCTs below this min eta) ...
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]