test
CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCMotherboardME11GEM.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCMotherboardME11GEM_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCMotherboardME11GEM_h
3 
17 
18 class CSCGeometry;
19 class CSCChamber;
20 class GEMGeometry;
21 class GEMSuperChamber;
22 
24 {
25  typedef std::pair<unsigned int, const GEMPadDigi> GEMPadBX;
26  typedef std::vector<GEMPadBX> GEMPadsBX;
27  typedef std::map<int, GEMPadsBX> GEMPads;
28 
29  public:
31  CSCMotherboardME11GEM(unsigned endcap, unsigned station, unsigned sector,
32  unsigned subsector, unsigned chamber,
33  const edm::ParameterSet& conf);
34 
37 
40 
43  void run(const CSCWireDigiCollection* wiredc,
44  const CSCComparatorDigiCollection* compdc,
45  const GEMPadDigiCollection* gemPads);
46 
48  std::vector<CSCCorrelatedLCTDigi> getLCTs1a();
49  std::vector<CSCCorrelatedLCTDigi> getLCTs1b();
50 
52  enum ME11Part {ME1B = 1, ME1A=4};
53 
55  std::vector<CSCCorrelatedLCTDigi> sortLCTsByQuality(int bx, enum ME11Part = ME1B);
56  std::vector<CSCCorrelatedLCTDigi> sortLCTsByQuality(enum ME11Part = ME1B);
57  std::vector<CSCCorrelatedLCTDigi> sortLCTsByQuality(std::vector<CSCCorrelatedLCTDigi>);
58  std::vector<CSCCorrelatedLCTDigi> sortLCTsByGEMDPhi(int bx, enum ME11Part = ME1B);
59  std::vector<CSCCorrelatedLCTDigi> sortLCTsByGEMDPhi(enum ME11Part = ME1B);
60  std::vector<CSCCorrelatedLCTDigi> sortLCTsByGEMDPhi(std::vector<CSCCorrelatedLCTDigi>);
61 
63  std::vector<CSCALCTDigi> getALCTs1b() {return alctV;}
64 
66  std::vector<CSCCLCTDigi> getCLCTs1a() {return clctV1a;}
67  std::vector<CSCCLCTDigi> getCLCTs1b() {return clctV1b;}
68 
71  void clear();
72 
74  void setConfigParameters(const CSCDBL1TPParameters* conf);
75 
77  std::unique_ptr<CSCCathodeLCTProcessor> clct1a;
78 
79  std::vector<CSCCorrelatedLCTDigi> readoutLCTs1a();
80  std::vector<CSCCorrelatedLCTDigi> readoutLCTs1b();
81  std::vector<CSCCorrelatedLCTDigi> readoutLCTs(enum ME11Part me1ab);
82  std::vector<GEMCoPadDigi> readoutCoPads();
83 
85  void setCSCGeometry(const CSCGeometry *g) { csc_g = g; }
86  void setGEMGeometry(const GEMGeometry *g) { gem_g = g; }
87 
88  private:
89 
90  static const int lut_wg_vs_hs_me1b[48][2];
91  static const int lut_wg_vs_hs_me1a[48][2];
92  static const int lut_wg_vs_hs_me1ag[48][2];
93  static const double lut_pt_vs_dphi_gemcsc[8][3];
94  static const double lut_wg_etaMin_etaMax_odd[48][3];
95  static const double lut_wg_etaMin_etaMax_even[48][3];
96 
99 
101 
103  //CSCCorrelatedLCTDigi firstLCT1a[MAX_LCT_BINS];
104 
106  //CSCCorrelatedLCTDigi secondLCT1a[MAX_LCT_BINS];
107 
112 
113  void correlateLCTs(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
114  CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT,
116 
117  void correlateLCTsGEM(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
118  CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT,
119  CSCCorrelatedLCTDigi& lct1, CSCCorrelatedLCTDigi& lct2, int me,
120  const GEMPadsBX& pads = GEMPadsBX(), const GEMPadsBX& copads = GEMPadsBX());
121 
122  void correlateLCTsGEM(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, GEMPadDigi gemPad,
123  CSCCorrelatedLCTDigi& lct1, CSCCorrelatedLCTDigi& lct2, int me);
124 
125  void correlateLCTsGEM(CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, GEMPadDigi gemPad, int roll,
126  CSCCorrelatedLCTDigi& lct1, CSCCorrelatedLCTDigi& lct2, int me);
127 
128  void buildCoincidencePads(const GEMPadDigiCollection* out_pads,
129  GEMCoPadDigiCollection& out_co_pads,
130  CSCDetId csc_id);
131 
132  void retrieveGEMPads(const GEMPadDigiCollection* pads, unsigned id);
133  void retrieveGEMCoPads(const GEMCoPadDigiCollection* pads, unsigned id);
134 
135  void createGEMRollEtaLUT(bool isEven);
136 
137  int assignGEMRoll(double eta);
138  int deltaRoll(int wg, int roll);
139  int deltaPad(int hs, int pad);
140 
142  int me, bool oldDataFormat = false);
143  CSCCorrelatedLCTDigi constructLCTsGEM(const CSCCLCTDigi& clct, const GEMPadDigi& gem, int roll,
144  int me, bool oldDataFormat = true);
146  bool hasPad, bool hasCoPad);
147 
148  unsigned int encodePatternGEM(const int ptn, const int highPt);
149  unsigned int findQualityGEM(const CSCALCTDigi& aLCT, const GEMPadDigi& gem);
150  unsigned int findQualityGEM(const CSCCLCTDigi& cLCT, const GEMPadDigi& gem);
151  unsigned int findQualityGEM(const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT,
152  bool hasPad, bool hasCoPad);
153 
154  void printGEMTriggerPads(int minBX, int maxBx, bool iscopad = false);
155 
156  bool isPadInOverlap(int roll);
157 
158  GEMPadsBX matchingGEMPads(const CSCCLCTDigi& cLCT, const GEMPadsBX& pads = GEMPadsBX(),
159  enum ME11Part = ME1B, bool isCopad = false, bool first = true);
160  GEMPadsBX matchingGEMPads(const CSCALCTDigi& aLCT, const GEMPadsBX& pads = GEMPadsBX(),
161  enum ME11Part = ME1B, bool isCopad = false, bool first = true);
162  GEMPadsBX matchingGEMPads(const CSCCLCTDigi& cLCT, const CSCALCTDigi& aLCT, const GEMPadsBX& pads = GEMPadsBX(),
163  enum ME11Part = ME1B, bool isCopad = false, bool first = true);
164 
165  std::vector<CSCALCTDigi> alctV;
166  std::vector<CSCCLCTDigi> clctV1b;
167  std::vector<CSCCLCTDigi> clctV1a;
168  std::vector<GEMCoPadDigi> gemCoPadV;
169 
172 
175 
179 
183 
184  unsigned int tmb_cross_bx_algo;
185 
187  unsigned int max_me11_lcts;
188 
191 
194 
195  // debug gem matching
199 
200  // deltas used to construct GEM coincidence pads
203 
204  // deltas used to match to GEM pads
211 
212  // deltas used to match to GEM coincidence pads
219 
220  // Drop low quality stubs if they don't have GEMs
225 
226  // build LCT from ALCT and GEM
231 
232  // LCT ghostbusting
234 
235  // correct LCT timing with GEMs
237 
238  // send LCT old dataformat
240 
241  // send only first 2 lcts
243 
244  // promote ALCT-GEM pattern
246 
247  // promote ALCT-GEM quality
251 
252  // map of roll N to min and max eta
253  std::map<int,std::pair<double,double> > gemRollToEtaLimits_;
254  std::map<int,std::pair<int,int>> cscWgToGemRoll_;
255 
256  // map of pad to HS
257  std::map<int,int> gemPadToCscHsME1a_;
258  std::map<int,int> gemPadToCscHsME1b_;
259  std::map<int,std::pair<int,int>> cscHsToGemPadME1a_;
260  std::map<int,std::pair<int,int>> cscHsToGemPadME1b_;
261 
262  // map< bx , vector<gemid, pad> >
265 };
266 #endif
void retrieveGEMCoPads(const GEMCoPadDigiCollection *pads, unsigned id)
std::map< int, std::pair< int, int > > cscHsToGemPadME1a_
std::vector< CSCCorrelatedLCTDigi > sortLCTsByQuality(int bx, enum ME11Part=ME1B)
static const int lut_wg_vs_hs_me1ag[48][2]
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1a()
std::vector< CSCCorrelatedLCTDigi > readoutLCTs()
void setGEMGeometry(const GEMGeometry *g)
void buildCoincidencePads(const GEMPadDigiCollection *out_pads, GEMCoPadDigiCollection &out_co_pads, CSCDetId csc_id)
unsigned int encodePatternGEM(const int ptn, const int highPt)
static const double lut_pt_vs_dphi_gemcsc[8][3]
bool runME11ILT_
GEM-CSC integrated local algorithm.
std::map< int, std::pair< int, int > > cscHsToGemPadME1b_
int deltaPad(int hs, int pad)
std::pair< unsigned int, const GEMPadDigi > GEMPadBX
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
static const int lut_wg_vs_hs_me1b[48][2]
GEMPadsBX matchingGEMPads(const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), enum ME11Part=ME1B, bool isCopad=false, bool first=true)
CSCCorrelatedLCTDigi allLCTs1a[MAX_LCT_BINS][15][2]
void correlateLCTsGEM(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, int me, const GEMPadsBX &pads=GEMPadsBX(), const GEMPadsBX &copads=GEMPadsBX())
std::vector< CSCCLCTDigi > getCLCTs1b()
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMPadDigi &gem, int me, bool oldDataFormat=false)
void correlateLCTs(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2)
std::vector< CSCCorrelatedLCTDigi > getLCTs1b()
int deltaRoll(int wg, int roll)
void printGEMTriggerPads(int minBX, int maxBx, bool iscopad=false)
std::vector< CSCCorrelatedLCTDigi > getLCTs1a()
static const int lut_wg_vs_hs_me1a[48][2]
std::vector< CSCCLCTDigi > getCLCTs1a()
void setCSCGeometry(const CSCGeometry *g)
set CSC and GEM geometries for the matching needs
std::vector< CSCALCTDigi > alctV
void retrieveGEMPads(const GEMPadDigiCollection *pads, unsigned id)
const GEMGeometry * gem_g
unsigned int findQualityGEM(const CSCALCTDigi &aLCT, const GEMPadDigi &gem)
std::vector< GEMCoPadDigi > gemCoPadV
bool doesALCTCrossCLCT(CSCALCTDigi &a, CSCCLCTDigi &c, int me)
std::map< int, int > gemPadToCscHsME1a_
std::map< int, std::pair< int, int > > cscWgToGemRoll_
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1b()
void createGEMRollEtaLUT(bool isEven)
std::unique_ptr< CSCAnodeLCTProcessor > alct
double a
Definition: hdecay.h:121
std::vector< CSCCLCTDigi > clctV1b
std::vector< CSCCLCTDigi > clctV1a
std::unique_ptr< CSCCathodeLCTProcessor > clct
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads)
CSCCorrelatedLCTDigi allLCTs1b[MAX_LCT_BINS][15][2]
std::map< int, int > gemPadToCscHsME1b_
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
std::map< int, GEMPadsBX > GEMPads
const CSCGeometry * csc_g
std::vector< GEMCoPadDigi > readoutCoPads()
std::vector< CSCALCTDigi > getALCTs1b()
static const double lut_wg_etaMin_etaMax_even[48][3]
static const double lut_wg_etaMin_etaMax_odd[48][3]
std::vector< GEMPadBX > GEMPadsBX
void setConfigParameters(const CSCDBL1TPParameters *conf)
std::vector< CSCCorrelatedLCTDigi > sortLCTsByGEMDPhi(int bx, enum ME11Part=ME1B)