CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DQM/HcalMonitorTasks/interface/HcalNoiseMonitor.h

Go to the documentation of this file.
00001 #ifndef DQM_HCALMONITORTASKS_HCALNoiseMONITOR_H
00002 #define DQM_HCALMONITORTASKS_HCALNoiseMONITOR_H
00003 
00004 #include "DQM/HcalMonitorTasks/interface/HcalBaseDQMonitor.h"
00005 #include "EventFilter/HcalRawToDigi/interface/HcalHTRData.h"
00006 #include "EventFilter/HcalRawToDigi/interface/HcalUnpacker.h"  // need for emap
00007 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
00008 #include "DataFormats/Common/interface/TriggerResults.h"
00009 
00010 class HcalNoiseMonitor;
00011 struct TriangleFitResult;
00012 
00013 class HcalNoiseMonitor: public HcalBaseDQMonitor
00014 {
00015 public:
00016    HcalNoiseMonitor(const edm::ParameterSet& ps);
00017    ~HcalNoiseMonitor();
00018 
00019 
00020    void setup();
00021    void beginRun(const edm::Run& run, const edm::EventSetup& c);
00022    void analyze(edm::Event const&e, edm::EventSetup const&s);
00023 
00024    void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap);
00025    void cleanup();
00026    void reset();
00027 
00028 private:
00029    std::vector<std::string> triggers_;
00030    int period_;
00031 
00032 private:
00033    int mTrianglePeakTS;
00034    double mE2E10MinEnergy;
00035    double mMinE2E10;
00036    double mMaxE2E10;
00037    int mMaxHPDHitCount;
00038    int mMaxHPDNoOtherHitCount;
00039    int mMaxADCZeros;
00040    double mTotalZeroMinEnergy;
00041 
00042 private:
00043    // Monitoring elements
00044    edm::InputTag rawdataLabel_;
00045    edm::InputTag hltresultsLabel_;
00046    edm::InputTag hbheDigiLabel_;
00047    edm::InputTag hbheRechitLabel_;
00048    edm::InputTag noiseLabel_;
00049 
00050    // Double-chi2 related stuff
00051    MonitorElement *hNominalChi2;
00052    MonitorElement *hLinearChi2;
00053    MonitorElement *hLinearTestStatistics;
00054    MonitorElement *hRMS8OverMax;
00055    MonitorElement *hRMS8OverMaxTestStatistics;
00056   
00057    MonitorElement *hLambdaLinearVsTotalCharge;
00058    MonitorElement *hLambdaRMS8MaxVsTotalCharge;
00059    MonitorElement *hTriangleLeftSlopeVsTS4;
00060    MonitorElement *hTriangleRightSlopeVsTS4;
00061 
00062    EtaPhiHists hFailLinearEtaPhi;
00063    EtaPhiHists hFailRMSMaxEtaPhi;
00064    EtaPhiHists hFailTriangleEtaPhi;
00065    
00066    // Isolation Filter
00067    EtaPhiHists hFailIsolationEtaPhi;
00068    
00069    // Jason variable
00070    MonitorElement *hTS4TS5RelativeDifference;
00071    MonitorElement *hTS4TS5RelativeDifferenceVsCharge;
00072 
00073    // Hcal noise summary object variable
00074    MonitorElement *hMaxZeros;
00075    MonitorElement *hTotalZeros;
00076    MonitorElement *hE2OverE10Digi;
00077    MonitorElement *hE2OverE10Digi5;
00078    MonitorElement *hE2OverE10RBX;
00079    MonitorElement *hHPDHitCount;
00080    MonitorElement *hRBXHitCount;
00081    MonitorElement *hHcalNoiseCategory;
00082 
00083    MonitorElement *hBadZeroRBX;
00084    MonitorElement *hBadCountHPD;
00085    MonitorElement *hBadNoOtherCountHPD;
00086    MonitorElement *hBadE2E10RBX;
00087 
00088    std::vector<double> CumulativeIdealPulse;
00089 
00090 private:
00091    double PerformNominalFit(double Charge[10]);
00092    double PerformDualNominalFit(double Charge[10]);
00093    double DualNominalFitSingleTry(double Charge[10], int Offset, int Distance);
00094    double PerformLinearFit(double Charge[10]);
00095    double CalculateRMS8Max(double Charge[10]);
00096    TriangleFitResult PerformTriangleFit(double Charge[10]);
00097    void ReadHcalPulse();
00098 };
00099 
00100 struct TriangleFitResult
00101 {
00102    double Chi2;
00103    double LeftSlope;
00104    double RightSlope;
00105 };
00106 
00107 
00108 
00109 #endif
00110