CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #ifndef CSCTriggerPrimitives_CSCMotherboard_h
00002 #define CSCTriggerPrimitives_CSCMotherboard_h
00003 
00038 #include <L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.h>
00039 #include <L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.h>
00040 #include <DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h>
00041 
00042 class CSCMotherboard
00043 {
00044  public:
00046   CSCMotherboard(unsigned endcap, unsigned station, unsigned sector, 
00047                  unsigned subsector, unsigned chamber,
00048                  const edm::ParameterSet& conf);
00049 
00051   CSCMotherboard();
00052 
00054   ~CSCMotherboard();
00055 
00057   void run(const std::vector<int> w_time[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES],
00058            const std::vector<int> hs_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS],
00059            const std::vector<int> ds_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS]);
00060 
00063   void run(const CSCWireDigiCollection* wiredc, const CSCComparatorDigiCollection* compdc);
00064 
00066   std::vector<CSCCorrelatedLCTDigi> readoutLCTs();
00067 
00069   std::vector<CSCCorrelatedLCTDigi> getLCTs();
00070 
00073   void clear();
00074 
00076   void setConfigParameters(const CSCDBL1TPParameters* conf);
00077 
00079   CSCAnodeLCTProcessor* alct;
00080 
00082   CSCCathodeLCTProcessor* clct;
00083 
00084  // VK: change to protected, to allow inheritance
00085  protected:
00086 
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   bool isSLHC;
00106 
00108   unsigned int mpc_block_me1a;
00109   unsigned int alct_trig_enable, clct_trig_enable, match_trig_enable;
00110   unsigned int match_trig_window_size, tmb_l1a_window_size;
00111 
00113   bool drop_used_alcts;
00114 
00116   int early_tbins;
00117   
00119   bool readout_earliest_2;
00120 
00122   static const unsigned int def_mpc_block_me1a;
00123   static const unsigned int def_alct_trig_enable, def_clct_trig_enable;
00124   static const unsigned int def_match_trig_enable, def_match_trig_window_size;
00125   static const unsigned int def_tmb_l1a_window_size;
00126 
00128   enum {MAX_LCT_BINS = 16};
00129 
00131   CSCCorrelatedLCTDigi firstLCT[MAX_LCT_BINS];
00132 
00134   CSCCorrelatedLCTDigi secondLCT[MAX_LCT_BINS];
00135 
00137   void checkConfigParameters();
00138 
00139   void correlateLCTs(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT,
00140                      CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT);
00141   CSCCorrelatedLCTDigi constructLCTs(const CSCALCTDigi& aLCT,
00142                                      const CSCCLCTDigi& cLCT);
00143   unsigned int encodePattern(const int ptn, const int highPt);
00144   unsigned int findQuality(const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT);
00145 
00147   void dumpConfigParams() const;
00148 
00149   // Method for tests
00150   void testLCT();
00151 };
00152 #endif