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 
9 
10 #include <vector>
11 
13 {
14 public:
15 
16  class Helpers {
17  public:
18  // function only makes sense for endcap!
19  static RPCDetId getRPCfromCSC(const CSCDetId& csc_id);
20  };
21 
24 
26  void setCSCGeometry(const CSCGeometry *g) { csc_g = g; }
27  void setGEMGeometry(const GEMGeometry *g) { gem_g = g; }
28  void setRPCGeometry(const RPCGeometry *g) { rpc_g = g; }
29 
31  void generateLUTs(unsigned e, unsigned s, unsigned se, unsigned sb, unsigned c) const;
32  void generateLUTsME11(unsigned e, unsigned se, unsigned sb, unsigned c) const;
33  void generateLUTsME21(unsigned e, unsigned se, unsigned sb, unsigned c) const;
34  void generateLUTsME3141(unsigned e, unsigned s, unsigned se, unsigned sb, unsigned c) const;
35  int assignRoll(const std::vector<std::pair<double,double> >&, double eta) const;
36 
37  private:
38  // create LUT: roll->(etaMin,etaMax)
39  void gemRollToEtaLimitsLUT(const GEMChamber* c, std::vector<std::pair<double,double> >& ) const;
40 
41  // create LUT: roll->(etaMin,etaMax)
42  void rpcRollToEtaLimitsLUT(const RPCChamber* c, std::vector<std::pair<double,double> >&) const;
43 
44  // create LUT: WG->(rollMin,rollMax)
45  void cscWgToRollLUT(const std::vector<std::pair<double,double> >&,
46  const std::vector<std::pair<double,double> >&,
47  std::vector<std::pair<int,int> >&) const;
48 
49  // create LUT: WG->(etaMin,etaMax)
50  void cscWgToEtaLimitsLUT(const CSCLayer*, std::vector<std::pair<double,double> >&) const;
51 
52  // create LUT: HS->pad
53  void cscHsToGemPadLUT(const CSCLayer*, const GEMEtaPartition*, int minH, int maxH, std::vector<std::pair<int,int> >&) const;
54 
55  // create LUT: pad->HS
56  void gemPadToCscHsLUT(const CSCLayer*, const GEMEtaPartition*, std::vector<int>&) const;
57 
58  // create LUT: HS->strip
59  void cscHsToRpcStripLUT(const CSCLayer*, const RPCRoll*, int minH, int maxH, std::vector<std::pair<int,int> >&) const;
60 
61  // create LUT: strip->HS
62  void rpcStripToCscHsLUT(const CSCLayer*, const RPCRoll*, std::vector<int>&) const;
63 
67 };
68 
69 template<typename T>
70 std::ostream &operator <<(std::ostream &os, const std::vector<std::pair<T,T> >&v)
71 {
72  int i = 0;
73  os << "{" << std::endl;
74  for(const auto& p : v) {
75  os << " {" << p.first << ", " << p.second << "}, ";
76  if (i%8==0) os << std::endl;
77  i++;
78  }
79  os << "}" << std::endl;
80  os << std::endl;
81 
82  return os;
83 }
84 
85 template<typename T>
86 std::ostream &operator <<(std::ostream &os, const std::vector<T>&v)
87 {
88  int i = 0;
89  os << "{" << std::endl;
90  for(const auto& p : v) {
91  os << " " << p << ",";
92  if (i%10==0) os << std::endl;
93  i++;
94  }
95  os << "}" << std::endl;
96  os << std::endl;
97 
98  return os;
99 }
100 
101 #endif
void cscHsToRpcStripLUT(const CSCLayer *, const RPCRoll *, int minH, int maxH, std::vector< std::pair< int, int > > &) const
void generateLUTsME3141(unsigned e, unsigned s, unsigned se, unsigned sb, unsigned c) 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
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
static RPCDetId getRPCfromCSC(const CSCDetId &csc_id)
void gemRollToEtaLimitsLUT(const GEMChamber *c, std::vector< std::pair< double, double > > &) const
void rpcStripToCscHsLUT(const CSCLayer *, const RPCRoll *, std::vector< int > &) 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 rpcRollToEtaLimitsLUT(const RPCChamber *c, std::vector< std::pair< double, double > > &) const
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