CMS 3D CMS Logo

CSCUpgradeMotherboardLUTGenerator.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCUpgradeMotherboardLUTGenerator_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCUpgradeMotherboardLUTGenerator_h
3 
8 
9 #include <vector>
10 
12 public:
15 
17  void setCSCGeometry(const CSCGeometry* g) { csc_g = g; }
18  void setGEMGeometry(const GEMGeometry* g) { gem_g = g; }
19 
21  void generateLUTs(unsigned e, unsigned s, unsigned se, unsigned sb, unsigned c) const;
22  void generateLUTsME11(unsigned e, unsigned se, unsigned sb, unsigned c) const;
23  void generateLUTsME21(unsigned e, unsigned se, unsigned sb, unsigned c) const;
24  int assignRoll(const std::vector<std::pair<double, double> >&, double eta) const;
25 
26 private:
27  // create LUT: roll->(etaMin,etaMax)
28  void gemRollToEtaLimitsLUT(const GEMChamber* c, std::vector<std::pair<double, double> >&) const;
29 
30  // create LUT: WG->(rollMin,rollMax)
31  void cscWgToRollLUT(const std::vector<std::pair<double, double> >&,
32  const std::vector<std::pair<double, double> >&,
33  std::vector<std::pair<int, int> >&) const;
34 
35  // create LUT: WG->(etaMin,etaMax)
36  void cscWgToEtaLimitsLUT(const CSCLayer*, std::vector<std::pair<double, double> >&) const;
37 
38  // create LUT: HS->pad
39  void cscHsToGemPadLUT(
40  const CSCLayer*, const GEMEtaPartition*, int minH, int maxH, std::vector<std::pair<int, int> >&) const;
41 
42  // create LUT: pad->HS
43  void gemPadToCscHsLUT(const CSCLayer*, const GEMEtaPartition*, std::vector<int>&) const;
44 
45  // create LUT: roll-> center wg
46  void gemRollToCscWgLUT(const CSCLayer*, const GEMChamber*, std::vector<int>&) const;
47 
50 };
51 
52 template <typename T>
53 std::ostream& operator<<(std::ostream& os, const std::vector<std::pair<T, T> >& v) {
54  int i = 0;
55  os << "{" << std::endl;
56  for (const auto& p : v) {
57  os << " {" << p.first << ", " << p.second << "}, ";
58  if (i % 8 == 0)
59  os << std::endl;
60  i++;
61  }
62  os << "}" << std::endl;
63  os << std::endl;
64 
65  return os;
66 }
67 
68 template <typename T>
69 std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {
70  int i = 0;
71  os << "{" << std::endl;
72  for (const auto& p : v) {
73  os << " " << p << ",";
74  if (i % 10 == 0)
75  os << std::endl;
76  i++;
77  }
78  os << "}" << std::endl;
79  os << std::endl;
80 
81  return os;
82 }
83 
84 #endif
CSCUpgradeMotherboardLUTGenerator::setGEMGeometry
void setGEMGeometry(const GEMGeometry *g)
Definition: CSCUpgradeMotherboardLUTGenerator.h:18
mps_fire.i
i
Definition: mps_fire.py:428
CSCUpgradeMotherboardLUTGenerator::generateLUTsME21
void generateLUTsME21(unsigned e, unsigned se, unsigned sb, unsigned c) const
Definition: CSCUpgradeMotherboardLUTGenerator.cc:112
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GEMEtaPartition
Definition: GEMEtaPartition.h:12
operator<<
std::ostream & operator<<(std::ostream &os, const std::vector< std::pair< T, T > > &v)
Definition: CSCUpgradeMotherboardLUTGenerator.h:53
CSCUpgradeMotherboardLUTGenerator::gemPadToCscHsLUT
void gemPadToCscHsLUT(const CSCLayer *, const GEMEtaPartition *, std::vector< int > &) const
Definition: CSCUpgradeMotherboardLUTGenerator.cc:264
CSCUpgradeMotherboardLUTGenerator
Definition: CSCUpgradeMotherboardLUTGenerator.h:11
CSCLayer
Definition: CSCLayer.h:24
findQualityFiles.v
v
Definition: findQualityFiles.py:179
CSCUpgradeMotherboardLUTGenerator::csc_g
const CSCGeometry * csc_g
Definition: CSCUpgradeMotherboardLUTGenerator.h:48
CSCDetId.h
CSCGeometry
Definition: CSCGeometry.h:24
CSCUpgradeMotherboardLUTGenerator::gem_g
const GEMGeometry * gem_g
Definition: CSCUpgradeMotherboardLUTGenerator.h:49
alignCSCRings.s
s
Definition: alignCSCRings.py:92
PVValHelper::eta
Definition: PVValidationHelpers.h:69
CSCTriggerNumbering.h
CSCUpgradeMotherboardLUTGenerator::setCSCGeometry
void setCSCGeometry(const CSCGeometry *g)
set CSC and GEM geometries for the matching needs
Definition: CSCUpgradeMotherboardLUTGenerator.h:17
CSCUpgradeMotherboardLUTGenerator::~CSCUpgradeMotherboardLUTGenerator
~CSCUpgradeMotherboardLUTGenerator()
Definition: CSCUpgradeMotherboardLUTGenerator.h:14
CSCUpgradeMotherboardLUTGenerator::cscWgToRollLUT
void cscWgToRollLUT(const std::vector< std::pair< double, double > > &, const std::vector< std::pair< double, double > > &, std::vector< std::pair< int, int > > &) const
Definition: CSCUpgradeMotherboardLUTGenerator.cc:223
CSCUpgradeMotherboardLUTGenerator::CSCUpgradeMotherboardLUTGenerator
CSCUpgradeMotherboardLUTGenerator()
Definition: CSCUpgradeMotherboardLUTGenerator.h:13
CSCUpgradeMotherboardLUTGenerator::gemRollToCscWgLUT
void gemRollToCscWgLUT(const CSCLayer *, const GEMChamber *, std::vector< int > &) const
Definition: CSCUpgradeMotherboardLUTGenerator.cc:278
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
CSCUpgradeMotherboardLUTGenerator::cscHsToGemPadLUT
void cscHsToGemPadLUT(const CSCLayer *, const GEMEtaPartition *, int minH, int maxH, std::vector< std::pair< int, int > > &) const
Definition: CSCUpgradeMotherboardLUTGenerator.cc:248
CSCUpgradeMotherboardLUTGenerator::generateLUTsME11
void generateLUTsME11(unsigned e, unsigned se, unsigned sb, unsigned c) const
Definition: CSCUpgradeMotherboardLUTGenerator.cc:16
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
CSCUpgradeMotherboardLUTGenerator::generateLUTs
void generateLUTs(unsigned e, unsigned s, unsigned se, unsigned sb, unsigned c) const
generate and print LUT
Definition: CSCUpgradeMotherboardLUTGenerator.cc:8
GEMChamber
Definition: GEMChamber.h:19
GEMGeometry.h
CSCUpgradeMotherboardLUTGenerator::cscWgToEtaLimitsLUT
void cscWgToEtaLimitsLUT(const CSCLayer *, std::vector< std::pair< double, double > > &) const
Definition: CSCUpgradeMotherboardLUTGenerator.cc:233
CSCUpgradeMotherboardLUTGenerator::gemRollToEtaLimitsLUT
void gemRollToEtaLimitsLUT(const GEMChamber *c, std::vector< std::pair< double, double > > &) const
Definition: CSCUpgradeMotherboardLUTGenerator.cc:209
CSCUpgradeMotherboardLUTGenerator::assignRoll
int assignRoll(const std::vector< std::pair< double, double > > &, double eta) const
Definition: CSCUpgradeMotherboardLUTGenerator.cc:193
GEMGeometry
Definition: GEMGeometry.h:24
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
CSCGeometry.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37