CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/EventFilter/EcalRawToDigi/interface/DCCRawDataDefinitions.h

Go to the documentation of this file.
00001 #ifndef DCCRAWDATADEFINITIONS_
00002 #define DCCRAWDATADEFINITIONS_
00003 
00004 
00005 enum globalFieds{
00006 
00007   BLOCK_UNPACKED = 0, 
00008   SKIP_BLOCK_UNPACKING=1, 
00009   STOP_EVENT_UNPACKING=2, 
00010 
00011 
00012   B_MASK               =  1,
00013   HEADERLENGTH         =  9,
00014   HEADERSIZE           = 72,
00015   EMPTYEVENTSIZE       = 32,
00016         
00017   PHYSICTRIGGER        = 1,
00018   CALIBRATIONTRIGGER   = 2,
00019   TESTTRIGGER          = 3,
00020   TECHNICALTRIGGER     = 4,
00021       
00022   CH_ENABLED           = 0,
00023   CH_DISABLED          = 1,
00024   CH_TIMEOUT           = 2,
00025   CH_HEADERERR         = 3,
00026   CH_LINKERR           = 5,
00027   CH_LENGTHERR         = 6,
00028   CH_SUPPRESS          = 7,
00029   CH_IFIFOFULL         = 8,
00030   CH_L1AIFIFOFULL      = 0xC,
00031   CH_FORCEDZS1         = 0xF,
00032 
00033 
00034   
00035   SRP_NUMBFLAGS        = 68,
00036   SRP_BLOCKLENGTH      = 6,
00037   SRP_EB_NUMBFLAGS     = 68,
00038   
00039   BOEVALUE             = 0x5, 
00040   ERROR_EMPTYEVENT     = 0x1,           
00041   TOWERH_SIZE          = 8, 
00042   TRAILER_SIZE         = 8,
00043   TCC_EB_NUMBTTS       = 68,
00044   TCCID_SMID_SHIFT_EB  = 27,
00045   
00046   NUMB_SM             = 54,
00047   NUMB_FE             = 68,
00048   NUMB_TCC            = 108,
00049   NUMB_XTAL           = 5,
00050   NUMB_STRIP          = 5,
00051   NUMB_PSEUDOSTRIPS   = 30, // input1 and input2 of TCC board has at most 30 PS_input (12 of which are duplicated)
00052   NUMB_TTS_TPG2_DUPL  = 12, //
00053   NUMB_TTS_TPG1       = 16, // input1 of TCC board has at most 16 TP's
00054   NUMB_TTS_TPG2       = 12, // input2 of TCC board has at most 12 TP's
00055 
00056   NUMB_SM_EE_MIN_MIN  = 1,
00057   NUMB_SM_EE_MIN_MAX  = 9,
00058   NUMB_SM_EB_MIN_MIN  = 10,
00059   NUMB_SM_EB_MIN_MAX  = 27,
00060   NUMB_SM_EB_PLU_MIN  = 28,
00061   NUMB_SM_EB_PLU_MAX  = 45,
00062   NUMB_SM_EE_PLU_MIN  = 46,
00063   NUMB_SM_EE_PLU_MAX  = 54,
00064 
00065   // two DCC have a missing interval in the CCU_id's
00066   SECTOR_EEM_CCU_JUMP = 8,
00067   SECTOR_EEP_CCU_JUMP = 53,
00068   MIN_CCUID_JUMP      = 18,
00069   MAX_CCUID_JUMP      = 24,
00070   
00071   NUMB_TCC_EE_MIN_EXT_MIN  = 19,     // outer TCC's in EE-
00072   NUMB_TCC_EE_MIN_EXT_MAX  = 36,
00073   NUMB_TCC_EE_PLU_EXT_MIN  = 73,    // outer TCC's in EE+
00074   NUMB_TCC_EE_PLU_EXT_MAX  = 90
00075 
00076 };
00077 
00078 
00079 
00080 enum headerFields{ 
00081           
00082   H_FEDID_B            = 8,
00083   H_FEDID_MASK         = 0xFFF,
00084  
00085   H_BX_B               = 20,
00086   H_BX_MASK            = 0xFFF,
00087       
00088   H_L1_B               = 32,
00089   H_L1_MASK            = 0xFFFFFF,
00090 
00091   H_TTYPE_B            = 56,
00092   H_TTYPE_MASK         = 0xF,    
00093 
00094   H_EVLENGTH_MASK      = 0xFFFFFF,
00095       
00096   H_ERRORS_B           = 24,
00097   H_ERRORS_MASK        = 0xFF,
00098 
00099   H_RNUMB_B            = 32,
00100   H_RNUMB_MASK         = 0xFFFFFF,
00101 
00102   H_RTYPE_MASK         = 0xFFFFFFFF, // bits 0.. 31 of the 3rd DCC header word
00103 
00104   H_DET_TTYPE_B        = 32,
00105   H_DET_TTYPE_MASK     = 0xFFFF,     // for bits 32.. 47 of the 3rd DCC header word
00106 
00107         
00108   H_FOV_B              = 48,
00109   H_FOV_MASK           = 0xF,
00110 
00111 
00112   H_ORBITCOUNTER_B            = 0,
00113   H_ORBITCOUNTER_MASK         = 0xFFFFFFFF, // bits 0.. 31 of the 4th DCC header word
00114 
00115   H_SR_B               = 32,
00116   H_ZS_B               = 33,
00117   H_TZS_B              = 34,
00118   H_MEM_B              = 35,
00119         
00120   H_SRCHSTATUS_B       = 36,
00121   H_CHSTATUS_MASK      = 0xF,
00122 
00123   H_TCC1CHSTATUS_B     = 40, 
00124   H_TCC2CHSTATUS_B     = 44,
00125   H_TCC3CHSTATUS_B     = 48,
00126   H_TCC4CHSTATUS_B     = 52
00127      
00128 
00129 };              
00130 
00131 
00132 /* 1st TTC Command */
00133 /*                 Half :       1 bits: 7                 1st Half (0), 2nd Half (1) */
00134 /*                 TE           1 bit : 6                 Test Enable Identifier */
00135 /*                 Type         2 bits: 5-4               Laser (00), LED (01) Test pulse (10), Pedestal (11) */
00136 /*                 Color        2 bits: 3-2               Blue (00), Red(01), Infrared (10), Green (11) */
00137 
00138 /* 2nd TCC Command */
00139 /*                 DCC #:     6 bits: 5-0.              DCC 1 to 54. Zero means all DCC */
00140 
00141 
00142 enum detailedTriggerTypeFields{ 
00143 
00144    H_DCCID_B            = 0,
00145    H_DCCID_MASK         = 0x3F,
00146 
00147    H_WAVEL_B            = 6,
00148    H_WAVEL_MASK         = 0x3,
00149 
00150    H_TR_TYPE_B          = 8,
00151    H_TR_TYPE_MASK       = 0x7,
00152 
00153    H_HALF_B             = 11,
00154    H_HALF_MASK          = 0x1
00155 
00156 };
00157 
00158 
00159 enum towerFields{ 
00160        
00161   TOWER_ID_MASK        = 0x7F,
00162   
00163   TOWER_NSAMP_MASK     = 0x7F,
00164   TOWER_NSAMP_B        = 8,  
00165       
00166   TOWER_BX_MASK        = 0xFFF,
00167   TOWER_BX_B           = 16,     
00168  
00169   TOWER_L1_MASK        = 0xFFF,
00170   TOWER_L1_B           = 32,
00171       
00172   TOWER_ADC_MASK       = 0xFFF,
00173   TOWER_DIGI_MASK      = 0x3FFF,
00174       
00175   TOWER_STRIPID_MASK   = 0x7,
00176       
00177   TOWER_XTALID_MASK    = 0x7,
00178   TOWER_XTALID_B       = 4,
00179 
00180 
00181   TOWER_LENGTH_MASK    = 0x1FF,
00182   TOWER_LENGTH_B       = 48
00183 
00184 };      
00185 
00186 
00187 enum tccFields{
00188   
00189    TCC_ID_MASK         = 0xFF,
00190    
00191    TCC_PS_B            = 11,
00192  
00193    TCC_BX_MASK         = 0xFFF,
00194    TCC_BX_B            = 16,
00195 
00196    TCC_L1_MASK         = 0xFFF, 
00197    TCC_L1_B            = 32,  
00198 
00199    TCC_TT_MASK         = 0x7F,
00200    TCC_TT_B            = 48,
00201 
00202    TCC_TS_MASK         = 0xF,
00203    TCC_TS_B            = 55
00204 
00205 };
00206 
00207 
00208 enum srpFields{
00209   
00210    SRP_NREAD           = 0,
00211    SRP_FULLREADOUT     = 3,
00212   
00213 
00214    SRP_ID_MASK         = 0xFF,
00215  
00216    SRP_BX_MASK         = 0xFFF,
00217    SRP_BX_B            = 16,
00218 
00219    SRP_L1_MASK         = 0xFFF, 
00220    SRP_L1_B            = 32,  
00221 
00222    SRP_NFLAGS_MASK     = 0x7F,
00223    SRP_NFLAGS_B        = 48,
00224         
00225    SRP_SRFLAG_MASK     = 0x7,
00226    SRP_SRVAL_MASK      = 0x3
00227 
00228 };
00229 
00230 enum dccFOVs{
00231   // MC raw data based on CMS NOTE 2005/021
00232   // (and raw data when FOV was unassigned, earlier than mid 2008)
00233   dcc_FOV_0           = 0,
00234 
00235   // real data since ever FOV was initialized; only 2 used >= June 09 
00236   dcc_FOV_1           = 1,
00237   dcc_FOV_2           = 2
00238  
00239 };
00240 
00241 
00242 #endif