CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.h

Go to the documentation of this file.
00001 #ifndef CSCTriggerPrimitives_CSCMotherboard_h
00002 #define CSCTriggerPrimitives_CSCMotherboard_h
00003 
00039 #include <L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.h>
00040 #include <L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.h>
00041 #include <DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h>
00042 
00043 class CSCMotherboard
00044 {
00045  public:
00047   CSCMotherboard(unsigned endcap, unsigned station, unsigned sector, 
00048                  unsigned subsector, unsigned chamber,
00049                  const edm::ParameterSet& conf);
00050 
00052   CSCMotherboard();
00053 
00055   ~CSCMotherboard();
00056 
00058   void run(const std::vector<int> w_time[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES],
00059            const std::vector<int> hs_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS],
00060            const std::vector<int> ds_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS]);
00061 
00064   std::vector<CSCCorrelatedLCTDigi> run(const CSCWireDigiCollection* wiredc,
00065                                     const CSCComparatorDigiCollection* compdc);
00066 
00068   std::vector<CSCCorrelatedLCTDigi> readoutLCTs();
00069 
00071   std::vector<CSCCorrelatedLCTDigi> getLCTs();
00072 
00075   void clear();
00076 
00078   void setConfigParameters(const CSCDBL1TPParameters* conf);
00079 
00081   CSCAnodeLCTProcessor* alct;
00082 
00084   CSCCathodeLCTProcessor* clct;
00085 
00086  private:
00089   int infoV;
00090 
00092   const unsigned theEndcap;
00093   const unsigned theStation;
00094   const unsigned theSector;
00095   const unsigned theSubsector;
00096   const unsigned theTrigChamber;
00097 
00099   bool isMTCC;
00100 
00102   bool isTMB07;
00103 
00105   unsigned int mpc_block_me1a;
00106   unsigned int alct_trig_enable, clct_trig_enable, match_trig_enable;
00107   unsigned int match_trig_window_size, tmb_l1a_window_size;
00108 
00110   static const unsigned int def_mpc_block_me1a;
00111   static const unsigned int def_alct_trig_enable, def_clct_trig_enable;
00112   static const unsigned int def_match_trig_enable, def_match_trig_window_size;
00113   static const unsigned int def_tmb_l1a_window_size;
00114 
00116   enum {MAX_LCT_BINS = 16};
00117 
00119   CSCCorrelatedLCTDigi firstLCT[MAX_LCT_BINS];
00120 
00122   CSCCorrelatedLCTDigi secondLCT[MAX_LCT_BINS];
00123 
00125   void checkConfigParameters();
00126 
00127   void correlateLCTs(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
00128                      CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT);
00129   CSCCorrelatedLCTDigi constructLCTs(const CSCALCTDigi& aLCT,
00130                                      const CSCCLCTDigi& cLCT);
00131   unsigned int encodePattern(const int ptn, const int highPt);
00132   unsigned int findQuality(const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT);
00133 
00135   void dumpConfigParams() const;
00136 
00137   // Method for tests
00138   void testLCT();
00139 };
00140 #endif