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,
31  const edm::ParameterSet& conf);
32 
33  ~CSCGEMMotherboard() override;
34 
35  // clear stored pads and copads
36  void clear();
37 
38  /*
39  Use ALCTs, CLCTs, GEMs to build LCTs. Matches are attempted in the following order:
40  1) ALCT-CLCT-2GEM (coincidence pad)
41  2) ALCT-CLCT-GEM
42  3) ALCT-CLCT
43  4) CLCT-2GEM (requires CLCT with at least 4 layers)
44  5) ALCT-2GEM (requires ALCT with at least 4 layers)
45  Sort LCTs according to the cross-bunch-crossing algorithm, and send out best 2 LCTs
46  */
47  void run(const CSCWireDigiCollection* wiredc,
48  const CSCComparatorDigiCollection* compdc,
49  const GEMPadDigiClusterCollection* gemPads);
50 
51  /* GEM cluster processor */
52  std::shared_ptr<GEMClusterProcessor> clusterProc() const { return clusterProc_; }
53 
54  // set CSC and GEM geometries for the matching needs
55  void setGEMGeometry(const GEMGeometry* g) { gem_g = g; }
56 
57 private:
58  // match ALCT-CLCT-GEM pairs
59  void matchALCTCLCTGEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS]);
60 
61  // match CLCT-2GEM pairs. The GEM coincidence cluster BX is considered the
62  // reference
63  void matchCLCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS]);
64 
65  // match ALCT-2GEM pairs. The GEM coincidence cluster BX is considered the
66  // reference
67  void matchALCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS]);
68 
69  /* correlate a pair of ALCTs and a pair of CLCTs with matched clusters or coclusters
70  the output is up to two LCTs */
71  void correlateLCTsGEM(const CSCALCTDigi& bestALCT,
72  const CSCALCTDigi& secondALCT,
73  const CSCCLCTDigi& bestCLCT,
74  const CSCCLCTDigi& secondCLCT,
77  CSCCorrelatedLCTDigi& lct2) const;
78 
79  /* correlate a pair of CLCTs with matched clusters or coclusters
80  the output is up to two LCTs */
81  void correlateLCTsGEM(const CSCCLCTDigi& bestCLCT,
82  const CSCCLCTDigi& secondCLCT,
85  CSCCorrelatedLCTDigi& lct2) const;
86 
87  /* correlate a pair of ALCTs with matched clusters or coclusters
88  the output is up to two LCTs */
89  void correlateLCTsGEM(const CSCALCTDigi& bestALCT,
90  const CSCALCTDigi& secondALCT,
93  CSCCorrelatedLCTDigi& lct2) const;
94 
95  /* Construct LCT from CSC and GEM information. Options are ALCT-CLCT-GEM, ALCT-CLCT-2GEM */
96  void constructLCTsGEM(const CSCALCTDigi& alct,
97  const CSCCLCTDigi& clct,
98  const GEMInternalCluster& gem,
99  CSCCorrelatedLCTDigi& lct) const;
100 
101  /* Construct LCT from CSC and GEM information. Options are CLCT-2GEM */
102  void constructLCTsGEM(const CSCCLCTDigi& clct,
103  const GEMInternalCluster& gem,
104  int trackNumber,
105  CSCCorrelatedLCTDigi& lct) const;
106 
107  /* Construct LCT from CSC and GEM information. Options are ALCT-2GEM */
108  void constructLCTsGEM(const CSCALCTDigi& alct,
109  const GEMInternalCluster& gem,
110  int trackNumber,
111  CSCCorrelatedLCTDigi& lct) const;
112 
113  // helper functions to drop low quality ALCTs or CLCTs
114  // without matching LCTs
115  void dropLowQualityALCTNoClusters(CSCALCTDigi& alct, const GEMInternalCluster& cluster) const;
116  void dropLowQualityCLCTNoClusters(CSCCLCTDigi& clct, const GEMInternalCluster& cluster) const;
117 
118  /*
119  - For Run-2 GEM-CSC trigger primitives, which we temporarily have
120  to integrate with the Run-2 EMTF during LS2, we sort by quality.
121  Larger quality means smaller bending
122 
123  - For Run-3 GEM-CSC trigger primitives, which we have
124  to integrate with the Run-3 EMTF, we sort by slope.
125  Smaller slope means smaller bending
126  */
127  void sortLCTsByBending(std::vector<CSCCorrelatedLCTDigi>& lcts) const;
128 
130  unsigned gemId;
132 
133  // map of BX to vectors of GEM clusters. Makes it easier to match objects
134  std::map<int, GEMInternalClusters> clusters_;
135 
136  std::unique_ptr<CSCGEMMatcher> cscGEMMatcher_;
137 
138  /* GEM cluster processor */
139  std::shared_ptr<GEMClusterProcessor> clusterProc_;
140 
141  // Drop low quality stubs in ME1/b or ME2/1
144 
145  // build LCT from ALCT/CLCT and GEM in ME1/b or ME2/1
148 
149  // Drop low quality stubs in ME1/a
151 
152  // build LCT from CLCT and GEM in ME1/a
154 
155  // bunch crossing window cuts
158 
159  // assign GEM-CSC bending angle
161 
164 
165  // The GE2/1 geometry should have 16 eta partitions
166  // The 8-eta partition case (older prototype versions) is not supported
168 };
169 
170 #endif
CSCGEMMotherboard::build_lct_from_alct_gem_
bool build_lct_from_alct_gem_
Definition: CSCGEMMotherboard.h:146
CSCGEMMotherboard::cscGEMMatcher_
std::unique_ptr< CSCGEMMatcher > cscGEMMatcher_
Definition: CSCGEMMotherboard.h:136
CSCConstants::MAX_ALCT_TBINS
Definition: CSCConstants.h:127
CSCGEMMotherboard::drop_low_quality_clct_no_gems_me1a_
bool drop_low_quality_clct_no_gems_me1a_
Definition: CSCGEMMotherboard.h:150
CSCGEMMotherboard::match_earliest_gem_only_
bool match_earliest_gem_only_
Definition: CSCGEMMotherboard.h:163
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCGEMMotherboard::drop_used_gems_
bool drop_used_gems_
Definition: CSCGEMMotherboard.h:162
CSCGEMMotherboard::matchALCT2GEM
void matchALCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
Definition: CSCGEMMotherboard.cc:222
GEMCoPadDigiCollection.h
CSCMotherboard
Definition: CSCMotherboard.h:47
CSCGEMMotherboard::setGEMGeometry
void setGEMGeometry(const GEMGeometry *g)
Definition: CSCGEMMotherboard.h:55
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCGEMMotherboard::hasGE21Geometry16Partitions_
bool hasGE21Geometry16Partitions_
Definition: CSCGEMMotherboard.h:167
CSCCLCTDigi
Definition: CSCCLCTDigi.h:17
CSCGEMMotherboard::constructLCTsGEM
void constructLCTsGEM(const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const GEMInternalCluster &gem, CSCCorrelatedLCTDigi &lct) const
Definition: CSCGEMMotherboard.cc:465
CSCGEMMatcher.h
CSCGEMMotherboard::build_lct_from_clct_gem_me1a_
bool build_lct_from_clct_gem_me1a_
Definition: CSCGEMMotherboard.h:153
CSCGEMMotherboard::matchCLCT2GEM
void matchCLCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
Definition: CSCGEMMotherboard.cc:164
CSCGEMMotherboard::gemId
unsigned gemId
Definition: CSCGEMMotherboard.h:130
CSCGEMMotherboard::sortLCTsByBending
void sortLCTsByBending(std::vector< CSCCorrelatedLCTDigi > &lcts) const
Definition: CSCGEMMotherboard.cc:587
CSCMotherboard.h
GEMPadDigiClusterCollection
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
edm::ParameterSet
Definition: ParameterSet.h:47
CSCGEMMotherboard::max_delta_bx_clct_gem_
unsigned max_delta_bx_clct_gem_
Definition: CSCGEMMotherboard.h:157
CSCComparatorDigiCollection
CSCGEMMotherboard::GEMInternalClusters
std::vector< GEMInternalCluster > GEMInternalClusters
Definition: CSCGEMMotherboard.h:23
CSCGEMMotherboard::dropLowQualityCLCTNoClusters
void dropLowQualityCLCTNoClusters(CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
Definition: CSCGEMMotherboard.cc:576
gem
Definition: AMC13Event.h:6
CSCGEMMotherboard::matchALCTCLCTGEM
void matchALCTCLCTGEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
Definition: CSCGEMMotherboard.cc:117
GEMClusterProcessor.h
CSCGEMMotherboard::run
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiClusterCollection *gemPads)
Definition: CSCGEMMotherboard.cc:54
CSCGEMMotherboard::CSCGEMMotherboard
CSCGEMMotherboard(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
Definition: CSCGEMMotherboard.cc:4
CSCGEMMotherboard
Definition: CSCGEMMotherboard.h:21
GEMGeometry.h
CSCWireDigiCollection
CSCGEMMotherboard::correlateLCTsGEM
void correlateLCTsGEM(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, const GEMInternalClusters &clusters, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
Definition: CSCGEMMotherboard.cc:273
CSCALCTDigi
Definition: CSCALCTDigi.h:17
CSCGEMMotherboard::clusterProc
std::shared_ptr< GEMClusterProcessor > clusterProc() const
Definition: CSCGEMMotherboard.h:52
CSCGEMMotherboard::max_delta_bx_alct_gem_
unsigned max_delta_bx_alct_gem_
Definition: CSCGEMMotherboard.h:156
GEMPadDigiCollection.h
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
CSCGEMMotherboard::dropLowQualityALCTNoClusters
void dropLowQualityALCTNoClusters(CSCALCTDigi &alct, const GEMInternalCluster &cluster) const
Definition: CSCGEMMotherboard.cc:570
CSCGEMMotherboard::clear
void clear()
Definition: CSCGEMMotherboard.cc:49
GEMInternalCluster
Definition: GEMInternalCluster.h:18
GEMGeometry
Definition: GEMGeometry.h:24
CSCGEMMotherboard::build_lct_from_clct_gem_
bool build_lct_from_clct_gem_
Definition: CSCGEMMotherboard.h:147
CSCGEMMotherboard::clusters_
std::map< int, GEMInternalClusters > clusters_
Definition: CSCGEMMotherboard.h:134
CSCGEMMotherboard::clusterProc_
std::shared_ptr< GEMClusterProcessor > clusterProc_
Definition: CSCGEMMotherboard.h:139
CSCGEMMotherboard::assign_gem_csc_bending_
bool assign_gem_csc_bending_
Definition: CSCGEMMotherboard.h:160
CSCGEMMotherboard::~CSCGEMMotherboard
~CSCGEMMotherboard() override
Definition: CSCGEMMotherboard.cc:47
CSCGEMMotherboard::gem_g
const GEMGeometry * gem_g
Definition: CSCGEMMotherboard.h:131
CSCCorrelatedLCTDigi
Definition: CSCCorrelatedLCTDigi.h:19
g
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
CSCGEMMotherboard::drop_low_quality_alct_no_gems_
bool drop_low_quality_alct_no_gems_
Definition: CSCGEMMotherboard.h:142
CSCGEMMotherboard::drop_low_quality_clct_no_gems_
bool drop_low_quality_clct_no_gems_
Definition: CSCGEMMotherboard.h:143