CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCGEMMotherboard.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h
3 
18 
20 public:
21  typedef std::vector<GEMInternalCluster> GEMInternalClusters;
22 
23  // standard constructor
24  CSCGEMMotherboard(unsigned endcap,
25  unsigned station,
26  unsigned sector,
27  unsigned subsector,
28  unsigned chamber,
29  const edm::ParameterSet& conf);
30 
31  ~CSCGEMMotherboard() override;
32 
33  // clear stored pads and copads
34  void clear();
35 
36  /*
37  Use ALCTs, CLCTs, GEMs to build LCTs. Matches are attempted in the following order:
38  1) ALCT-CLCT-2GEM (coincidence pad)
39  2) ALCT-CLCT-GEM
40  3) ALCT-CLCT
41  4) CLCT-2GEM (requires CLCT with at least 4 layers)
42  5) ALCT-2GEM (requires ALCT with at least 4 layers)
43  Sort LCTs according to the cross-bunch-crossing algorithm, and send out best 2 LCTs
44  */
45  void run(const CSCWireDigiCollection* wiredc,
46  const CSCComparatorDigiCollection* compdc,
47  const GEMPadDigiClusterCollection* gemPads);
48 
49  /* GEM cluster processor */
50  std::shared_ptr<GEMClusterProcessor> clusterProc() const { return clusterProc_; }
51 
52  // set CSC and GEM geometries for the matching needs
53  void setGEMGeometry(const GEMGeometry* g) { gem_g = g; }
54 
55 private:
56  // match ALCT-CLCT-(2)GEM pairs
57  void matchALCTCLCTGEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS]);
58 
59  // match ALCT-CLCT pairs
60  void matchALCTCLCT(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS]);
61 
62  // match CLCT-2GEM pairs. The GEM coincidence cluster BX is considered the
63  // reference
64  void matchCLCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS]);
65 
66  // match ALCT-2GEM pairs. The GEM coincidence cluster BX is considered the
67  // reference
68  void matchALCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS]);
69 
70  /* correlate a pair of ALCTs and a pair of CLCTs with matched clusters or coclusters
71  the output is up to two LCTs */
72  void correlateLCTsGEM(const CSCALCTDigi& bestALCT,
73  const CSCALCTDigi& secondALCT,
74  const CSCCLCTDigi& bestCLCT,
75  const CSCCLCTDigi& secondCLCT,
78  CSCCorrelatedLCTDigi& lct2) const;
79 
80  /* correlate a pair of CLCTs with matched clusters or coclusters
81  the output is up to two LCTs */
82  void correlateLCTsGEM(const CSCCLCTDigi& bestCLCT,
83  const CSCCLCTDigi& secondCLCT,
86  CSCCorrelatedLCTDigi& lct2) const;
87 
88  /* correlate a pair of ALCTs with matched clusters or coclusters
89  the output is up to two LCTs */
90  void correlateLCTsGEM(const CSCALCTDigi& bestALCT,
91  const CSCALCTDigi& secondALCT,
94  CSCCorrelatedLCTDigi& lct2) const;
95 
96  /* Construct LCT from CSC and GEM information. Options are ALCT-CLCT-GEM, ALCT-CLCT-2GEM */
97  void constructLCTsGEM(const CSCALCTDigi& alct,
98  const CSCCLCTDigi& clct,
99  const GEMInternalCluster& gem,
100  CSCCorrelatedLCTDigi& lct) const;
101 
102  /* Construct LCT from CSC and GEM information. Options are CLCT-2GEM */
103  void constructLCTsGEM(const CSCCLCTDigi& clct,
104  const GEMInternalCluster& gem,
105  int trackNumber,
106  CSCCorrelatedLCTDigi& lct) const;
107 
108  /* Construct LCT from CSC and GEM information. Options are ALCT-2GEM */
109  void constructLCTsGEM(const CSCALCTDigi& alct,
110  const GEMInternalCluster& gem,
111  int trackNumber,
112  CSCCorrelatedLCTDigi& lct) const;
113 
114  // helper functions to drop low quality ALCTs or CLCTs
115  // without matching LCTs
116  void dropLowQualityALCTNoClusters(CSCALCTDigi& alct, const GEMInternalCluster& cluster) const;
117  void dropLowQualityCLCTNoClusters(CSCCLCTDigi& clct, const GEMInternalCluster& cluster) const;
118 
119  /*
120  - For Run-2 GEM-CSC trigger primitives, which we temporarily have
121  to integrate with the Run-2 EMTF during LS2, we sort by quality.
122  Larger quality means smaller bending
123 
124  - For Run-3 GEM-CSC trigger primitives, which we have
125  to integrate with the Run-3 EMTF, we sort by slope.
126  Smaller slope means smaller bending
127  */
128  void sortLCTsByBending(std::vector<CSCCorrelatedLCTDigi>& lcts) const;
129 
131  unsigned gemId;
133 
134  // map of BX to vectors of GEM clusters. Makes it easier to match objects
135  std::map<int, GEMInternalClusters> clusters_;
136 
137  std::unique_ptr<CSCGEMMatcher> cscGEMMatcher_;
138 
139  /* GEM cluster processor */
140  std::shared_ptr<GEMClusterProcessor> clusterProc_;
141 
142  // Drop low quality stubs in ME1/b or ME2/1
145 
146  // build LCT from ALCT/CLCT and GEM in ME1/b or ME2/1
151 
152  // Drop low quality stubs in ME1/a
154 
155  // build LCT from CLCT and GEM in ME1/a
157 
158  // bunch crossing window cuts
161 
162  // assign GEM-CSC bending angle
164 
167 
168  // The GE2/1 geometry should have 16 eta partitions
169  // The 8-eta partition case (older prototype versions) is not supported
171 };
172 
173 #endif
void correlateLCTsGEM(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, const GEMInternalClusters &clusters, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
std::unique_ptr< CSCGEMMatcher > cscGEMMatcher_
void setGEMGeometry(const GEMGeometry *g)
void sortLCTsByBending(std::vector< CSCCorrelatedLCTDigi > &lcts) const
void constructLCTsGEM(const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const GEMInternalCluster &gem, CSCCorrelatedLCTDigi &lct) const
bool drop_low_quality_clct_no_gems_me1a_
void matchALCTCLCT(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
std::shared_ptr< GEMClusterProcessor > clusterProc() const
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
void matchALCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
unsigned max_delta_bx_clct_gem_
std::vector< GEMInternalCluster > GEMInternalClusters
void dropLowQualityALCTNoClusters(CSCALCTDigi &alct, const GEMInternalCluster &cluster) const
void matchCLCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
void matchALCTCLCTGEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
std::shared_ptr< GEMClusterProcessor > clusterProc_
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiClusterCollection *gemPads)
unsigned max_delta_bx_alct_gem_
std::map< int, GEMInternalClusters > clusters_
void dropLowQualityCLCTNoClusters(CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
CSCGEMMotherboard(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
~CSCGEMMotherboard() override
const GEMGeometry * gem_g