CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/DataFormats/SiStripCommon/interface/ConstantsForHardwareSystems.h

Go to the documentation of this file.
00001 // Last commit: $Id: ConstantsForHardwareSystems.h,v 1.9 2010/01/27 13:21:07 bainbrid Exp $
00002 
00003 #ifndef DataFormats_SiStripCommon_ConstantsForHardwareSystems_H
00004 #define DataFormats_SiStripCommon_ConstantsForHardwareSystems_H
00005 
00006 #include "DataFormats/FEDRawData/interface/FEDNumbering.h"
00007 #include "DataFormats/SiStripCommon/interface/Constants.h"
00008 
00014 namespace sistrip { 
00015 
00016   // -------------------- FED misc --------------------
00017 
00018   static const uint16_t FED_ADC_RANGE  = 0x400; // 1024
00019 
00020   // -------------------- FED ids --------------------
00021   
00022   static const uint16_t FED_ID_MIN     = static_cast<uint16_t>( FEDNumbering::MINSiStripFEDID);
00023   static const uint16_t FED_ID_MAX     = static_cast<uint16_t>( FEDNumbering::MAXSiStripFEDID);
00024   static const uint16_t CMS_FED_ID_MAX = static_cast<uint16_t>( FEDNumbering::MAXFEDID);
00025   static const uint16_t NUMBER_OF_FEDS = static_cast<uint16_t>( FED_ID_MAX - FED_ID_MIN + 1 );
00026   
00027   // -------------------- FEDs to channels --------------------
00028 
00029   static const uint16_t FEDCH_PER_FEUNIT = 12;
00030   static const uint16_t FEUNITS_PER_FED  = 8;
00031   static const uint16_t FEDCH_PER_FED    = FEDCH_PER_FEUNIT * FEUNITS_PER_FED; // 96
00032 
00033   // -------------------- Front-end devices --------------------
00034 
00035   static const uint16_t APVS_PER_FEDCH   = 2;
00036   static const uint16_t APVS_PER_FEUNIT  = APVS_PER_FEDCH * FEDCH_PER_FEUNIT; // 24
00037   static const uint16_t APVS_PER_FED     = APVS_PER_FEUNIT * FEUNITS_PER_FED; // 194
00038 
00039   static const uint16_t APVS_PER_CHAN    = 2;
00040   static const uint16_t CHANS_PER_LLD    = 3;
00041   
00042   // -------------------- Detector strips -------------------- 
00043 
00044   static const uint16_t STRIPS_PER_APV    = 128;
00045   static const uint16_t STRIPS_PER_FEDCH  = STRIPS_PER_APV * APVS_PER_FEDCH;
00046   static const uint16_t STRIPS_PER_FEUNIT = STRIPS_PER_FEDCH * FEDCH_PER_FEUNIT; // 3072
00047   static const uint16_t STRIPS_PER_FED    = STRIPS_PER_FEUNIT * FEUNITS_PER_FED; // 24576
00048 
00049   // -------------------- FED buffers --------------------
00050 
00051   static const uint16_t DAQ_HDR_SIZE        = 8;
00052   static const uint16_t TRK_HDR_SIZE        = 8;
00053   static const uint16_t FE_HDR_SIZE         = 16;
00054   static const uint16_t APV_ERROR_HDR_SIZE  = 24;
00055   static const uint16_t FULL_DEBUG_HDR_SIZE = 8 * FE_HDR_SIZE;
00056 
00057   // -------------------- Control system --------------------
00058 
00059   //static const uint16_t FEC_CRATE_OFFSET =  1; //@@ temporary
00060   //static const uint16_t FEC_RING_OFFSET  =  1; //@@ temporary
00061   
00062   static const uint16_t FEC_RING_MIN    =   1;
00063   static const uint16_t FEC_RING_MAX    =   8;
00064 
00065   static const uint16_t CCU_ADDR_MIN    =   1;
00066   static const uint16_t CCU_ADDR_MAX    = 127;
00067 
00068   static const uint16_t CCU_CHAN_MIN    =  16;
00069   static const uint16_t CCU_CHAN_MAX    =  31;
00070 
00071   static const uint16_t LLD_CHAN_MIN    =   1;
00072   static const uint16_t LLD_CHAN_MAX    =   3;
00073 
00074   static const uint16_t APV_I2C_MIN     =  32;
00075   static const uint16_t APV_I2C_MAX     =  37;
00076 
00077   // -------------------- VME crates --------------------
00078 
00079   static const uint16_t SLOTS_PER_CRATE    =  20;
00080 
00081   static const uint16_t CRATE_SLOT_MIN     =   2; // slot 1 is reserved for VME controller
00082   static const uint16_t CRATE_SLOT_MAX     =  21;
00083 
00084   static const uint16_t MAX_FEDS_PER_CRATE =  16;
00085   static const uint16_t MAX_FECS_PER_CRATE =  20;
00086 
00087   static const uint16_t FED_CRATE_MIN      =   1;
00088   static const uint16_t FED_CRATE_MAX      =  60;
00089   
00090   static const uint16_t FEC_CRATE_MIN      =   1;
00091   static const uint16_t FEC_CRATE_MAX      =   4;
00092   
00093 
00094   // -------------------- String constants -------------------- 
00095 
00096   static const char unknownApvReadoutMode_[]   = "UnknownApvReadoutMode";
00097   static const char undefinedApvReadoutMode_[] = "UndefinedApvReadoutMode";
00098 
00099   static const char apvPeakMode_[] = "ApvPeakMode";
00100   static const char apvDeconMode_[] = "ApvDeconMode";
00101   static const char apvMultiMode_[] = "ApvMultiMode";
00102 
00103   static const char unknownFedReadoutMode_[]   = "UnknownFedReadoutMode";
00104   static const char undefinedFedReadoutMode_[] = "UndefinedFedReadoutMode";
00105 
00106   static const char fedScopeMode_[]     = "FedScopeMode";
00107   static const char fedVirginRaw_[]     = "FedVirginRaw";
00108   static const char fedProcRaw_[]       = "FedProcessedRaw";
00109   static const char fedZeroSuppr_[]     = "FedZeroSuppressed";
00110   static const char fedZeroSupprLite_[] = "FedZeroSupprressedLite";
00111   
00112   // -------------------- Enumerators --------------------
00113   
00114   enum ApvReadoutMode { UNKNOWN_APV_READOUT_MODE = sistrip::unknown_,
00115                         UNDEFINED_APV_READOUT_MODE = sistrip::invalid_,
00116                         APV_PEAK_MODE = 1, 
00117                         APV_DECON_MODE = 2, 
00118                         APV_MULTI_MODE = 3
00119   };
00120   
00121   enum FedReadoutMode { UNKNOWN_FED_READOUT_MODE = sistrip::unknown_,
00122                         UNDEFINED_FED_READOUT_MODE = sistrip::invalid_,
00123                         FED_SCOPE_MODE = 1, 
00124                         FED_VIRGIN_RAW = 2, 
00125                         FED_PROC_RAW = 6, 
00126                         FED_ZERO_SUPPR = 10,
00127                         FED_ZERO_SUPPR_LITE = 12
00128   };
00129 
00130   enum FedReadoutPath { UNKNOWN_FED_READOUT_PATH = sistrip::unknown_,
00131                         UNDEFINED_FED_READOUT_PATH = sistrip::invalid_,
00132                         VME_READOUT = 1, 
00133                         SLINK_READOUT = 2 
00134   };
00135   
00136   enum FedBufferFormat { UNKNOWN_FED_BUFFER_FORMAT = sistrip::unknown_,
00137                          UNDEFINED_FED_BUFFER_FORMAT = sistrip::invalid_,
00138                          FULL_DEBUG_FORMAT = 1, 
00139                          APV_ERROR_FORMAT = 2 
00140   };
00141   
00142   enum FedSuperMode { UNKNOWN_FED_SUPER_MODE = sistrip::unknown_,
00143                       UNDEFINED_FED_SUPER_MODE = sistrip::invalid_,
00144                       REAL = 0, 
00145                       FAKE = 1 
00146   };
00147 
00148 }
00149   
00150 #endif // DataFormats_SiStripCommon_ConstantsForHardwareSystems_H
00151 
00152