Go to the documentation of this file.00001 #ifndef GUARD_HCALCALOFLAGLABELS_H
00002 #define GUARD_HCALCALOFLAGLABELS_H
00003
00004 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
00005 #include <string>
00006
00007
00008
00009
00010 namespace HcalCaloFlagLabels
00011 {
00012
00013 enum HBHEStatusFlag{HBHEHpdHitMultiplicity=0,
00014 HBHEPulseShape=1,
00015 HSCP_R1R2=2,
00016 HSCP_FracLeader=3,
00017 HSCP_OuterEnergy=4,
00018 HSCP_ExpFit=5,
00019 HBHETimingTrustBits=6,
00020 HBHETimingShapedCutsBits=8,
00021 HBHEIsolatedNoise=11,
00022 HBHEFlatNoise=12,
00023 HBHESpikeNoise=13,
00024 HBHETriangleNoise=14,
00025 HBHETS4TS5Noise=15
00026 };
00027
00028 enum HFTimingTrustFlag{HFTimingTrustBits=6};
00029
00030 enum HOStatusFlag{HOBit=0};
00031
00032 enum HFStatusFlag{HFLongShort=0,
00033 HFDigiTime=1,
00034 HFInTimeWindow=2,
00035 HFS8S1Ratio=3,
00036 HFPET=4
00037 };
00038
00039
00040 enum ZDCStatusFlag{ZDCBit=0};
00041
00042 enum CalibrationFlag{CalibrationBit=0};
00043
00044
00045 enum CommonFlag {TimingSubtractedBit=16,
00046 TimingAddedBit=17,
00047 TimingErrorBit=18,
00048 ADCSaturationBit=19,
00049 Fraction2TS=20,
00050 PresampleADC=20,
00051
00052 AddedSimHcalNoise=28,
00053
00054 UserDefinedBit2 = 29,
00055 UserDefinedBit1 = 30,
00056 UserDefinedBit0 = 31
00057 };
00058
00059 }
00060
00064 class HcalCaloFlagTool {
00065 public:
00066 HcalCaloFlagTool(const std::string& releaseName);
00067 std::string getFieldName(HcalSubdetector sd, int bit) const;
00068 int getFieldWidth(HcalSubdetector sd, int bit) const;
00069 int getFieldStart(HcalSubdetector sd, const std::string& field) const;
00070 int getFieldWidth(HcalSubdetector sd, const std::string& field) const;
00071 bool hasField(HcalSubdetector sd, const std::string& field) const;
00072 bool hasField(HcalSubdetector sd, int bit) const;
00073 private:
00074 std::string releaseName_;
00075 bool standardFormat_;
00076 int major_, minor_, patch_, subpatch_;
00077 };
00078
00079 #endif