Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:09

0001 /*
0002  *  File: DataFormats/Scalers/interface/ScalersRaw.h   (W.Badgett)
0003  *
0004  *  Description of the raw data from the Scalers FED
0005  *
0006  */
0007 
0008 #ifndef SCALERSRAW_H
0009 #define SCALERSRAW_H
0010 
0011 #include <ostream>
0012 #include <vector>
0013 
0014 /*! \file ScalersRaw.h
0015  * \Header file for Raw Data Level 1 Global Trigger Scalers and Lumi Scalers
0016  * 
0017  * \author: William Badgett
0018  *
0019  */
0020 
0021 #pragma pack(push)
0022 #pragma pack(4)
0023 
0024 /// \class ScalersRaw.h
0025 /// \brief Raw Data Level 1 Global Trigger Scalers and Lumi Scalers
0026 
0027 class ScalersRaw {
0028 public:
0029   enum {
0030     N_L1_TRIGGERS_v1 = 128,
0031     N_L1_TEST_TRIGGERS_v1 = 64,
0032     N_LUMI_OCC_v1 = 2,
0033     N_BX_v2 = 4,
0034     N_BX_v6 = 8,
0035     N_SPARE_v5 = 3,
0036     I_SPARE_PILEUP_v7 = 0,
0037     I_SPARE_PILEUPRMS_v7 = 1,
0038     I_SPARE_BUNCHLUMI_v8 = 2,
0039     I_SPARE_SPARE_v8 = 3,
0040     SCALERS_FED_ID = 735
0041   };
0042 };
0043 
0044 struct TriggerScalersRaw_v1 {
0045   unsigned int collectionTimeSpecial_sec;
0046   unsigned int collectionTimeSpecial_nsec;
0047   unsigned int ORBIT_NUMBER; /* ORBITNR          */
0048   unsigned int LUMINOSITY_SEGMENT;
0049   unsigned short BC_ERRORS;
0050 
0051   unsigned int collectionTimeSummary_sec;
0052   unsigned int collectionTimeSummary_nsec;
0053   unsigned int TRIGGER_NR;                  /* TRIGNR_          */
0054   unsigned int EVENT_NR;                    /* EVNR             */
0055   unsigned int FINOR_DISTRIBUTED;           /* PHYS_L1A      ?? */
0056   unsigned int CAL_TRIGGER;                 /* CAL_L1A_         */
0057   unsigned int RANDOM_TRIGGER;              /* RNDM_L1A_        */
0058   unsigned int TEST_TRIGGER;                /* TECHTRIG_        */
0059   unsigned int FINOR_GENERATED;             /* FINOR_        ?? */
0060   unsigned int FINOR_IN_INVALID_BC;         /* LOST_BC_      ?? */
0061   unsigned long long DEADTIME;              /* DEADT_           */
0062   unsigned long long LOST_FINOR;            /* LOST_TRIG_    ?? */
0063   unsigned long long DEADTIMEA;             /* DEADT_A          */
0064   unsigned long long LOST_FINORA;           /* LOST_TRIG_A   ?? */
0065   unsigned long long PRIV_DEADTIMEA;        /* DEADT_PRIV_A     */
0066   unsigned long long PTCSTATUS_DEADTIMEA;   /* DEADT_PSTATUS_A  */
0067   unsigned long long THROTTLE_DEADTIMEA;    /* DEADT_THROTTLE_A */
0068   unsigned long long CALIBRATION_DEADTIMEA; /* DEADT_CALIBR_A   */
0069   unsigned long long TIMESLOT_DEADTIMEA;    /*                  */
0070   unsigned int NR_OF_RESETS;                /* NR_RESETS_       */
0071 
0072   unsigned int collectionTimeDetails_sec;
0073   unsigned int collectionTimeDetails_nsec;
0074   unsigned int ALGO_RATE[ScalersRaw::N_L1_TRIGGERS_v1];
0075   unsigned int TEST_RATE[ScalersRaw::N_L1_TEST_TRIGGERS_v1];
0076 };
0077 
0078 struct TriggerScalersRaw_v3 {
0079   unsigned int collectionTime_sec;
0080   unsigned int collectionTime_nsec;
0081   unsigned int lumiSegmentNr;
0082   unsigned int lumiSegmentOrbits;
0083   unsigned int orbitNr;
0084   unsigned int gtResets;
0085   unsigned int bunchCrossingErrors;
0086   unsigned long long gtTriggers;
0087   unsigned long long gtEvents;
0088   float gtTriggersRate;
0089   float gtEventsRate;
0090   int prescaleIndexAlgo;
0091   int prescaleIndexTech;
0092 
0093   unsigned int collectionTimeLumiSeg_sec;
0094   unsigned int collectionTimeLumiSeg_nsec;
0095   unsigned int lumiSegmentNrLumiSeg;
0096   unsigned long long triggersPhysicsGeneratedFDL;
0097   unsigned long long triggersPhysicsLost;
0098   unsigned long long triggersPhysicsLostBeamActive;
0099   unsigned long long triggersPhysicsLostBeamInactive;
0100   unsigned long long l1AsPhysics;
0101   unsigned long long l1AsRandom;
0102   unsigned long long l1AsTest;
0103   unsigned long long l1AsCalibration;
0104   unsigned long long deadtime;
0105   unsigned long long deadtimeBeamActive;
0106   unsigned long long deadtimeBeamActiveTriggerRules;
0107   unsigned long long deadtimeBeamActiveCalibration;
0108   unsigned long long deadtimeBeamActivePrivateOrbit;
0109   unsigned long long deadtimeBeamActivePartitionController;
0110   unsigned long long deadtimeBeamActiveTimeSlot;
0111 
0112   unsigned int gtAlgoCounts[ScalersRaw::N_L1_TRIGGERS_v1];
0113   unsigned int gtTechCounts[ScalersRaw::N_L1_TEST_TRIGGERS_v1];
0114 };
0115 
0116 struct LumiScalersRaw_v1 {
0117   unsigned int collectionTime_sec;
0118   unsigned int collectionTime_nsec;
0119   float DeadtimeNormalization;
0120   float Normalization;
0121 
0122   float LumiFill;
0123   float LumiRun;
0124   float LiveLumiFill;
0125   float LiveLumiRun;
0126   float InstantLumi;
0127   float InstantLumiErr;
0128   unsigned char InstantLumiQlty;
0129 
0130   float LumiETFill;
0131   float LumiETRun;
0132   float LiveLumiETFill;
0133   float LiveLumiETRun;
0134   float InstantETLumi;
0135   float InstantETLumiErr;
0136   unsigned char InstantETLumiQlty;
0137 
0138   float LumiOccFill[ScalersRaw::N_LUMI_OCC_v1];
0139   float LumiOccRun[ScalersRaw::N_LUMI_OCC_v1];
0140   float LiveLumiOccFill[ScalersRaw::N_LUMI_OCC_v1];
0141   float LiveLumiOccRun[ScalersRaw::N_LUMI_OCC_v1];
0142   float InstantOccLumi[ScalersRaw::N_LUMI_OCC_v1];
0143   float InstantOccLumiErr[ScalersRaw::N_LUMI_OCC_v1];
0144   unsigned char InstantOccLumiQlty[ScalersRaw::N_LUMI_OCC_v1];
0145   float lumiNoise[ScalersRaw::N_LUMI_OCC_v1];
0146 
0147   unsigned int sectionNumber;
0148   unsigned int startOrbit;
0149   unsigned int numOrbits;
0150 };
0151 
0152 struct BeamSpotOnlineRaw_v4 {
0153   unsigned int collectionTime_sec;
0154   unsigned int collectionTime_nsec;
0155   float x;
0156   float y;
0157   float z;
0158   float dxdz;
0159   float dydz;
0160   float err_x;
0161   float err_y;
0162   float err_z;
0163   float err_dxdz;
0164   float err_dydz;
0165   float width_x;
0166   float width_y;
0167   float sigma_z;
0168   float err_width_x;
0169   float err_width_y;
0170   float err_sigma_z;
0171 };
0172 
0173 struct DcsStatusRaw_v4 {
0174   unsigned int collectionTime_sec;
0175   unsigned int collectionTime_nsec;
0176   unsigned int ready;
0177   float magnetCurrent;
0178   float magnetTemperature;
0179 };
0180 
0181 struct ScalersEventRecordRaw_v1 {
0182   unsigned long long header;
0183   int version;
0184   struct TriggerScalersRaw_v1 trig;
0185   struct LumiScalersRaw_v1 lumi;
0186   unsigned int filler;
0187   unsigned long long trailer;
0188 };
0189 
0190 struct ScalersEventRecordRaw_v2 {
0191   unsigned long long header;
0192   int version;
0193   struct TriggerScalersRaw_v1 trig;
0194   struct LumiScalersRaw_v1 lumi;
0195   unsigned int filler;
0196   unsigned long long bx[ScalersRaw::N_BX_v2];
0197   unsigned long long trailer;
0198 };
0199 
0200 struct ScalersEventRecordRaw_v3 {
0201   unsigned long long header;
0202   int version;
0203   struct TriggerScalersRaw_v3 trig;
0204   struct LumiScalersRaw_v1 lumi;
0205   unsigned int filler;
0206   unsigned long long bx[ScalersRaw::N_BX_v2];
0207   unsigned long long trailer;
0208 };
0209 
0210 struct ScalersEventRecordRaw_v4 {
0211   unsigned long long header;
0212   int version;
0213   struct TriggerScalersRaw_v3 trig;
0214   struct LumiScalersRaw_v1 lumi;
0215   struct BeamSpotOnlineRaw_v4 beamSpotOnline;
0216   struct DcsStatusRaw_v4 dcsStatus;
0217   unsigned long long bx[ScalersRaw::N_BX_v2];
0218   unsigned long long trailer;
0219 };
0220 
0221 struct ScalersEventRecordRaw_v5 {
0222   unsigned long long header;
0223   int version;
0224   struct TriggerScalersRaw_v3 trig;
0225   struct LumiScalersRaw_v1 lumi;
0226   struct BeamSpotOnlineRaw_v4 beamSpotOnline;
0227   struct DcsStatusRaw_v4 dcsStatus;
0228   unsigned int lastOrbitCounter0;
0229   unsigned int lastTestEnable;
0230   unsigned int lastResync;
0231   unsigned int lastStart;
0232   unsigned int lastEventCounter0;
0233   unsigned int lastHardReset;
0234   unsigned long long spare[ScalersRaw::N_SPARE_v5];
0235   unsigned long long bx[ScalersRaw::N_BX_v2];
0236   unsigned long long trailer;
0237 };
0238 
0239 struct ScalersEventRecordRaw_v6 {
0240   unsigned long long header;
0241   int version;
0242   struct TriggerScalersRaw_v3 trig;
0243   struct LumiScalersRaw_v1 lumi;
0244   struct BeamSpotOnlineRaw_v4 beamSpotOnline;
0245   struct DcsStatusRaw_v4 dcsStatus;
0246   unsigned int lastOrbitCounter0;
0247   unsigned int lastTestEnable;
0248   unsigned int lastResync;
0249   unsigned int lastStart;
0250   unsigned int lastEventCounter0;
0251   unsigned int lastHardReset;
0252   unsigned long long spare[ScalersRaw::N_SPARE_v5];
0253   unsigned long long bx[ScalersRaw::N_BX_v6];
0254   unsigned long long trailer;
0255 };
0256 
0257 #pragma pack(pop)
0258 
0259 #endif