CMS 3D CMS Logo

CSCALCTCrossCLCT.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCALCTCrossCLCT
2 #define L1Trigger_CSCTriggerPrimitives_CSCALCTCrossCLCT
3 
25 
26 #include <string>
27 #include <vector>
28 
29 class CSCLUTReader;
30 class CSCALCTDigi;
31 class CSCCLCTDigi;
32 
34 public:
36  unsigned endcap, unsigned station, unsigned ring, bool ignoreAlctCrossClct, const edm::ParameterSet& conf);
37 
38  /*
39  Calculate the 4-bit code for the best LCT and second LCT. Each code corresponds
40  to a unique combination for best and second best. Not each combation is valid.
41  Valid best LCT codes are: 11, 12, 21, 22, and 0
42  Valid second LCT codes are: 12, 21, 22, and 0
43  When a code is nonzero, the first index is the ALCT. The second index is the CLCT.
44 
45  This feature was originally added by Vadim Khotilovich in LS1 to potentially improve the
46  quality of the LCTs sent to the track-finder. Generally the track-finders
47  request all information to be sent. Even if the resulting LCT is potentially
48  unphysical. Therefore, this function is not used.
49  */
50  void calculateLCTCodes(const CSCALCTDigi& a1,
51  const CSCCLCTDigi& c1,
52  const CSCALCTDigi& a2,
53  const CSCCLCTDigi& c2,
54  unsigned& bestLCTCode,
55  unsigned& secondLCTCode) const;
56 
57  /*
58  Check if an ALCT can cross a CLCT. Most of the time it can. Only in ME1/1 there are
59  special cases when they do not. This function is typically not used though, as the
60  EMTF prefers to receive all stubs. However, there is an option to discard unphysical matches.
61  */
62  bool doesALCTCrossCLCT(const CSCALCTDigi& a, const CSCCLCTDigi& c) const;
63 
64 private:
65  // check if a wiregroup cross a halfstrip
66  bool doesWiregroupCrossHalfStrip(int wg, int keystrip) const;
67 
68  unsigned endcap_;
69  unsigned station_;
70  unsigned ring_;
73 
74  // strings to paths of LUTs
75  std::vector<std::string> wgCrossHsME1aFiles_;
76  std::vector<std::string> wgCrossHsME1aGangedFiles_;
77  std::vector<std::string> wgCrossHsME1bFiles_;
78  std::vector<std::string> lctCombinationCodeFiles_;
79 
80  // unique pointers to the luts
81  std::unique_ptr<CSCLUTReader> wg_cross_min_hs_ME1a_;
82  std::unique_ptr<CSCLUTReader> wg_cross_max_hs_ME1a_;
83  std::unique_ptr<CSCLUTReader> wg_cross_min_hs_ME1a_ganged_;
84  std::unique_ptr<CSCLUTReader> wg_cross_max_hs_ME1a_ganged_;
85  std::unique_ptr<CSCLUTReader> wg_cross_min_hs_ME1b_;
86  std::unique_ptr<CSCLUTReader> wg_cross_max_hs_ME1b_;
87  std::unique_ptr<CSCLUTReader> code_to_best_lct_;
88  std::unique_ptr<CSCLUTReader> code_to_second_lct_;
89 };
90 
91 #endif
CSCALCTCrossCLCT::wgCrossHsME1bFiles_
std::vector< std::string > wgCrossHsME1bFiles_
Definition: CSCALCTCrossCLCT.h:77
CSCALCTCrossCLCT::doesALCTCrossCLCT
bool doesALCTCrossCLCT(const CSCALCTDigi &a, const CSCCLCTDigi &c) const
Definition: CSCALCTCrossCLCT.cc:61
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCALCTCrossCLCT::wg_cross_min_hs_ME1a_
std::unique_ptr< CSCLUTReader > wg_cross_min_hs_ME1a_
Definition: CSCALCTCrossCLCT.h:81
CSCLUTReader
Definition: CSCLUTReader.h:14
CSCALCTCrossCLCT::wgCrossHsME1aGangedFiles_
std::vector< std::string > wgCrossHsME1aGangedFiles_
Definition: CSCALCTCrossCLCT.h:76
CSCALCTCrossCLCT::wg_cross_max_hs_ME1b_
std::unique_ptr< CSCLUTReader > wg_cross_max_hs_ME1b_
Definition: CSCALCTCrossCLCT.h:86
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCCLCTDigi
Definition: CSCCLCTDigi.h:17
CSCALCTCrossCLCT::CSCALCTCrossCLCT
CSCALCTCrossCLCT(unsigned endcap, unsigned station, unsigned ring, bool ignoreAlctCrossClct, const edm::ParameterSet &conf)
Definition: CSCALCTCrossCLCT.cc:8
testProducerWithPsetDescEmpty_cfi.a2
a2
Definition: testProducerWithPsetDescEmpty_cfi.py:35
CSCALCTCrossCLCT::station_
unsigned station_
Definition: CSCALCTCrossCLCT.h:69
CSCALCTCrossCLCT::ignoreAlctCrossClct_
bool ignoreAlctCrossClct_
Definition: CSCALCTCrossCLCT.h:72
CSCALCTCrossCLCT
Definition: CSCALCTCrossCLCT.h:33
CSCALCTCrossCLCT::doesWiregroupCrossHalfStrip
bool doesWiregroupCrossHalfStrip(int wg, int keystrip) const
Definition: CSCALCTCrossCLCT.cc:78
CSCALCTCrossCLCT::wg_cross_min_hs_ME1b_
std::unique_ptr< CSCLUTReader > wg_cross_min_hs_ME1b_
Definition: CSCALCTCrossCLCT.h:85
CSCALCTCrossCLCT::ring_
unsigned ring_
Definition: CSCALCTCrossCLCT.h:70
edm::ParameterSet
Definition: ParameterSet.h:47
a
double a
Definition: hdecay.h:119
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
CSCALCTCrossCLCT::code_to_best_lct_
std::unique_ptr< CSCLUTReader > code_to_best_lct_
Definition: CSCALCTCrossCLCT.h:87
CSCALCTCrossCLCT::lctCombinationCodeFiles_
std::vector< std::string > lctCombinationCodeFiles_
Definition: CSCALCTCrossCLCT.h:78
CSCALCTCrossCLCT::code_to_second_lct_
std::unique_ptr< CSCLUTReader > code_to_second_lct_
Definition: CSCALCTCrossCLCT.h:88
CSCALCTCrossCLCT::wg_cross_min_hs_ME1a_ganged_
std::unique_ptr< CSCLUTReader > wg_cross_min_hs_ME1a_ganged_
Definition: CSCALCTCrossCLCT.h:83
CSCALCTCrossCLCT::endcap_
unsigned endcap_
Definition: CSCALCTCrossCLCT.h:68
Frameworkfwd.h
CSCALCTDigi
Definition: CSCALCTDigi.h:17
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CSCALCTCrossCLCT::wg_cross_max_hs_ME1a_
std::unique_ptr< CSCLUTReader > wg_cross_max_hs_ME1a_
Definition: CSCALCTCrossCLCT.h:82
CSCALCTCrossCLCT::calculateLCTCodes
void calculateLCTCodes(const CSCALCTDigi &a1, const CSCCLCTDigi &c1, const CSCALCTDigi &a2, const CSCCLCTDigi &c2, unsigned &bestLCTCode, unsigned &secondLCTCode) const
Definition: CSCALCTCrossCLCT.cc:29
CSCALCTCrossCLCT::gangedME1a_
bool gangedME1a_
Definition: CSCALCTCrossCLCT.h:71
ParameterSet.h
tmbParams.ignoreAlctCrossClct
ignoreAlctCrossClct
Definition: tmbParams.py:43
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
CSCALCTCrossCLCT::wgCrossHsME1aFiles_
std::vector< std::string > wgCrossHsME1aFiles_
Definition: CSCALCTCrossCLCT.h:75
CSCALCTCrossCLCT::wg_cross_max_hs_ME1a_ganged_
std::unique_ptr< CSCLUTReader > wg_cross_max_hs_ME1a_ganged_
Definition: CSCALCTCrossCLCT.h:84