CMS 3D CMS Logo

CSCGEMMotherboard.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h
3 
20 
22 public:
23  typedef std::vector<GEMInternalCluster> GEMInternalClusters;
24 
25  // standard constructor
26  CSCGEMMotherboard(unsigned endcap,
27  unsigned station,
28  unsigned sector,
29  unsigned subsector,
30  unsigned chamber,
32 
33  ~CSCGEMMotherboard() override;
34 
35  // clear stored pads and copads
36  void clear();
37 
38  //helper function to convert GEM-CSC amended slopes into Run2 patterns
39  uint16_t Run2PatternConverter(const int slope) const;
40 
41  struct RunContext {
42  // set CSC and GEM geometries for the matching needs
45  // access to lookup tables via eventsetup
50  };
51 
52  void run(const CSCWireDigiCollection* wiredc,
53  const CSCComparatorDigiCollection* compdc,
54  const GEMPadDigiClusterCollection* gemPads,
55  RunContext const&);
56 
57  /* GEM cluster processor */
58  std::shared_ptr<GEMClusterProcessor> clusterProc() const { return clusterProc_; }
59 
60 private:
61  /*
62  Use ALCTs, CLCTs, GEMs to build LCTs. Matches in FW are attempted in the following order:
63  1) ALCT-CLCT-2GEM (coincidence pad)
64  2) ALCT-CLCT-GEM
65  3) ALCT-CLCT (requires CLCT with at least 4 layers)
66  4) CLCT-2GEM (requires CLCT with at least 4 layers)
67  5) ALCT-2GEM (requires ALCT with at least 4 layers)
68  => If there are second ALCTs/CLCTs which could not be matched to GEM:
69  6) Copy over valid to invalid
70  7) ALCT-CLCT with unused combination
71  */
72  void matchALCTCLCTGEM(const CSCL1TPLookupTableME11ILT* lookupTableME11ILT,
73  const CSCL1TPLookupTableME21ILT* lookupTableME21ILT);
74 
75  // correlate ALCT, CLCT with matched pads or copads
76  void correlateLCTsGEM(const CSCALCTDigi& ALCT,
77  const CSCCLCTDigi& CLCT,
79  const CSCL1TPLookupTableME11ILT* lookupTableME11ILT,
80  const CSCL1TPLookupTableME21ILT* lookupTableME21ILT,
81  CSCCorrelatedLCTDigi& lct) const;
82 
83  // correlate ALCT and CLCT, no GEM
84  void correlateLCTsGEM(const CSCALCTDigi& ALCT, const CSCCLCTDigi& CLCT, CSCCorrelatedLCTDigi& lct) const;
85 
86  // correlate CLCT with matched pads or copads
87  void correlateLCTsGEM(const CSCCLCTDigi& CLCT,
89  const CSCL1TPLookupTableME11ILT* lookupTableME11ILT,
90  const CSCL1TPLookupTableME21ILT* lookupTableME21ILT,
91  CSCCorrelatedLCTDigi& lct) const;
92 
93  // correlate ALCT with matched pads or copads
95 
96  // Construct LCT from CSC and GEM information. ALCT+CLCT+GEM
97  void constructLCTsGEM(const CSCALCTDigi& alct,
98  const CSCCLCTDigi& clct,
99  const GEMInternalCluster& gem,
100  const CSCL1TPLookupTableME11ILT* lookupTableME11ILT,
101  const CSCL1TPLookupTableME21ILT* lookupTableME21ILT,
102  CSCCorrelatedLCTDigi& lct) const;
103 
104  // Construct LCT from CSC and no GEM information. ALCT+CLCT
105  void constructLCTsGEM(const CSCALCTDigi& alct, const CSCCLCTDigi& clct, CSCCorrelatedLCTDigi& lct) const;
106 
107  // Construct LCT from CSC and GEM information. CLCT+2GEM
108  void constructLCTsGEM(const CSCCLCTDigi& clct,
109  const GEMInternalCluster& gem,
110  const CSCL1TPLookupTableME11ILT* lookupTableME11ILT,
111  const CSCL1TPLookupTableME21ILT* lookupTableME21ILT,
112  CSCCorrelatedLCTDigi& lct) const;
113 
114  // Construct LCT from CSC and GEM information. ALCT+2GEM
115  void constructLCTsGEM(const CSCALCTDigi& alct, const GEMInternalCluster& gem, CSCCorrelatedLCTDigi& lct) const;
116 
117  // LCTs are sorted by quality. If there are two with the same quality,
118  // then the sorting is done by the slope
119  void sortLCTs(std::vector<CSCCorrelatedLCTDigi>& lcts) const;
120 
122  unsigned gemId;
123 
124  // map of BX to vectors of GEM clusters. Makes it easier to match objects
125  std::map<int, GEMInternalClusters> clusters_;
126 
127  /* CSCGEM matcher */
128  std::unique_ptr<CSCGEMMatcher> cscGEMMatcher_;
129 
130  /* GEM cluster processor */
131  std::shared_ptr<GEMClusterProcessor> clusterProc_;
132 
133  // Drop low quality stubs in ME1/b or ME2/1
136  // Drop low quality stubs in ME1/a
138 
139  // build LCT from ALCT/CLCT and GEM in ME1/b or ME2/1
142 
143  // bunch crossing window cuts
146 
147  // assign GEM-CSC bending angle
149 
150  // The GE2/1 geometry should have 16 eta partitions
151  // The 8-eta partition case (older prototype versions) is not supported
153 };
154 
155 #endif
uint16_t Run2PatternConverter(const int slope) const
const CSCGeometry * cscGeometry_
std::unique_ptr< CSCGEMMatcher > cscGEMMatcher_
unsigned alct_gem_bx_window_size_
const CSCL1TPLookupTableME21ILT * lookupTableME21ILT_
static const double slope[3]
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiClusterCollection *gemPads, RunContext const &)
void correlateLCTsGEM(const CSCALCTDigi &ALCT, const CSCCLCTDigi &CLCT, const GEMInternalClusters &clusters, const CSCL1TPLookupTableME11ILT *lookupTableME11ILT, const CSCL1TPLookupTableME21ILT *lookupTableME21ILT, CSCCorrelatedLCTDigi &lct) const
void constructLCTsGEM(const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const GEMInternalCluster &gem, const CSCL1TPLookupTableME11ILT *lookupTableME11ILT, const CSCL1TPLookupTableME21ILT *lookupTableME21ILT, CSCCorrelatedLCTDigi &lct) const
std::vector< GEMInternalCluster > GEMInternalClusters
const CSCL1TPLookupTableME11ILT * lookupTableME11ILT_
void sortLCTs(std::vector< CSCCorrelatedLCTDigi > &lcts) const
const CSCL1TPLookupTableCCLUT * lookupTableCCLUT_
std::shared_ptr< GEMClusterProcessor > clusterProc_
void matchALCTCLCTGEM(const CSCL1TPLookupTableME11ILT *lookupTableME11ILT, const CSCL1TPLookupTableME21ILT *lookupTableME21ILT)
std::map< int, GEMInternalClusters > clusters_
unsigned clct_gem_bx_window_size_
~CSCGEMMotherboard() override
CSCGEMMotherboard(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, CSCBaseboard::Parameters &conf)
const CSCDBL1TPParameters * parameters_
const GEMGeometry * gemGeometry_
std::shared_ptr< GEMClusterProcessor > clusterProc() const