CMS 3D CMS Logo

CSCTriggerPrimitivesBuilder.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCTriggerPrimitivesBuilder_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCTriggerPrimitivesBuilder_h
3 
38 
40 class CSCMotherboard;
41 class CSCMuonPortCard;
42 class CSCGeometry;
43 class GEMGeometry;
45 public:
51 
53 
54  struct BuildContext {
61  };
62 
63  // Build anode, cathode, and correlated LCTs in each chamber and fill them
64  // into output collections. Pass collections of wire and comparator digis
65  // to Trigger MotherBoard (TMB) processors, which, in turn, pass them to
66  // ALCT and CLCT processors. Up to 2 anode and 2 cathode LCTs can be found
67  // in each chamber during any bunch crossing. The 2 projections are then
68  // combined into three-dimensional "correlated" LCTs in the TMB. Finally,
69  // MPC processor sorts up to 18 LCTs from 9 TMBs and writes collections of
70  // up to 3 best LCTs per (sub)sector into Event (to be used by the Sector
71  // Receiver).
72  void build(const CSCBadChambers* badChambers,
73  const CSCWireDigiCollection* wiredc,
74  const CSCComparatorDigiCollection* compdc,
75  const GEMPadDigiClusterCollection* gemPadClusters,
76  const BuildContext& context,
77  CSCALCTDigiCollection& oc_alct,
78  CSCCLCTDigiCollection& oc_clct,
79  CSCALCTPreTriggerDigiCollection& oc_alctpretrigger,
80  CSCCLCTPreTriggerDigiCollection& oc_clctpretrigger,
81  CSCCLCTPreTriggerCollection& oc_pretrig,
83  CSCCorrelatedLCTDigiCollection& oc_sorted_lct,
84  CSCShowerDigiCollection& oc_shower_anode,
85  CSCShowerDigiCollection& oc_shower_cathode,
86  CSCShowerDigiCollection& oc_shower,
87  GEMCoPadDigiCollection& oc_gemcopad);
88 
92 
93 private:
97  template <class T, class S>
98  void put(const T&, S&, const CSCDetId&, std::string comment);
99 
102  static const int min_endcap; // endcaps
103  static const int max_endcap;
104  static const int min_station; // stations per endcap
105  static const int max_station;
106  static const int min_sector; // trigger sectors per station
107  static const int max_sector;
108  static const int min_subsector; // trigger subsectors per sector
109  static const int max_subsector;
110  static const int min_chamber; // chambers per trigger subsector
111  static const int max_chamber;
112 
113  // debug
114  int infoV;
115 
118 
121 
124 
128 
131 
134 
136  std::vector<std::string> selectedChambers_;
137 
139  std::unique_ptr<CSCMotherboard> tmb_[MAX_ENDCAPS][MAX_STATIONS][MAX_SECTORS][MAX_SUBSECTORS][MAX_CHAMBERS];
140 
142  std::unique_ptr<CSCMuonPortCard> mpc_[MAX_ENDCAPS][MAX_STATIONS][MAX_SECTORS];
143 };
144 
145 template <class T, class S>
146 void CSCTriggerPrimitivesBuilder::put(const T& t, S& s, const CSCDetId& detid, std::string comment) {
147  if (!t.empty()) {
148  LogTrace("L1CSCTrigger") << "Put " << t.size() << comment << ((t.size() > 1) ? "s " : " ") << "in collection\n";
149  s.put(std::make_pair(t.begin(), t.end()), detid);
150  }
151 }
152 
153 #endif
std::unique_ptr< CSCMotherboard > tmb_[MAX_ENDCAPS][MAX_STATIONS][MAX_SECTORS][MAX_SUBSECTORS][MAX_CHAMBERS]
std::unique_ptr< CSCMuonPortCard > mpc_[MAX_ENDCAPS][MAX_STATIONS][MAX_SECTORS]
std::vector< std::string > selectedChambers_
#define LogTrace(id)
CSCTriggerPrimitivesBuilder(const edm::ParameterSet &)
void put(const T &, S &, const CSCDetId &, std::string comment)
bool checkBadChambers_
a flag whether to skip chambers from the bad chambers map
long double T
void build(const CSCBadChambers *badChambers, const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiClusterCollection *gemPadClusters, const BuildContext &context, CSCALCTDigiCollection &oc_alct, CSCCLCTDigiCollection &oc_clct, CSCALCTPreTriggerDigiCollection &oc_alctpretrigger, CSCCLCTPreTriggerDigiCollection &oc_clctpretrigger, CSCCLCTPreTriggerCollection &oc_pretrig, CSCCorrelatedLCTDigiCollection &oc_lct, CSCCorrelatedLCTDigiCollection &oc_sorted_lct, CSCShowerDigiCollection &oc_shower_anode, CSCShowerDigiCollection &oc_shower_cathode, CSCShowerDigiCollection &oc_shower, GEMCoPadDigiCollection &oc_gemcopad)
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...