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 {
13 public:
14 
17 
19  void setCSCGeometry(const CSCGeometry *g) { csc_g = g; }
20  void setGEMGeometry(const GEMGeometry *g) { gem_g = g; }
21 
23  void generateLUTs(unsigned e, unsigned s, unsigned se, unsigned sb, unsigned c) const;
24  void generateLUTsME11(unsigned e, unsigned se, unsigned sb, unsigned c) const;
25  void generateLUTsME21(unsigned e, unsigned se, unsigned sb, unsigned c) const;
26  int assignRoll(const std::vector<std::pair<double,double> >&, double eta) const;
27 
28  private:
29  // create LUT: roll->(etaMin,etaMax)
30  void gemRollToEtaLimitsLUT(const GEMChamber* c, std::vector<std::pair<double,double> >& ) const;
31 
32  // create LUT: WG->(rollMin,rollMax)
33  void cscWgToRollLUT(const std::vector<std::pair<double,double> >&,
34  const std::vector<std::pair<double,double> >&,
35  std::vector<std::pair<int,int> >&) const;
36 
37  // create LUT: WG->(etaMin,etaMax)
38  void cscWgToEtaLimitsLUT(const CSCLayer*, std::vector<std::pair<double,double> >&) const;
39 
40  // create LUT: HS->pad
41  void cscHsToGemPadLUT(const CSCLayer*, const GEMEtaPartition*, int minH, int maxH, std::vector<std::pair<int,int> >&) const;
42 
43  // create LUT: pad->HS
44  void gemPadToCscHsLUT(const CSCLayer*, const GEMEtaPartition*, std::vector<int>&) const;
45 
48 };
49 
50 template<typename T>
51 std::ostream &operator <<(std::ostream &os, const std::vector<std::pair<T,T> >&v)
52 {
53  int i = 0;
54  os << "{" << std::endl;
55  for(const auto& p : v) {
56  os << " {" << p.first << ", " << p.second << "}, ";
57  if (i%8==0) os << std::endl;
58  i++;
59  }
60  os << "}" << std::endl;
61  os << std::endl;
62 
63  return os;
64 }
65 
66 template<typename T>
67 std::ostream &operator <<(std::ostream &os, const std::vector<T>&v)
68 {
69  int i = 0;
70  os << "{" << std::endl;
71  for(const auto& p : v) {
72  os << " " << p << ",";
73  if (i%10==0) os << std::endl;
74  i++;
75  }
76  os << "}" << std::endl;
77  os << std::endl;
78 
79  return os;
80 }
81 
82 #endif
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
int assignRoll(const std::vector< std::pair< double, double > > &, double eta) const
void cscHsToGemPadLUT(const CSCLayer *, const GEMEtaPartition *, int minH, int maxH, std::vector< std::pair< int, int > > &) const
void gemRollToEtaLimitsLUT(const GEMChamber *c, std::vector< std::pair< double, double > > &) const
void cscWgToEtaLimitsLUT(const CSCLayer *, std::vector< std::pair< double, double > > &) const
void setCSCGeometry(const CSCGeometry *g)
set CSC and GEM geometries for the matching needs
void cscWgToRollLUT(const std::vector< std::pair< double, double > > &, const std::vector< std::pair< double, double > > &, std::vector< std::pair< int, int > > &) const
void generateLUTsME21(unsigned e, unsigned se, unsigned sb, unsigned c) const
void generateLUTs(unsigned e, unsigned s, unsigned se, unsigned sb, unsigned c) const
generate and print LUT
void generateLUTsME11(unsigned e, unsigned se, unsigned sb, unsigned c) const
void gemPadToCscHsLUT(const CSCLayer *, const GEMEtaPartition *, std::vector< int > &) const