CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CalibCalorimetry/HcalStandardModules/interface/HcalPedestalMCWidths.h

Go to the documentation of this file.
00001 #ifndef HcalPedestalMCWidths_H
00002 #define HcalPedestalMCWidths_H
00003 
00004 #include "FWCore/Framework/interface/ESHandle.h"
00005 #include "FWCore/Framework/interface/Frameworkfwd.h"
00006 #include "FWCore/Framework/interface/EDAnalyzer.h"
00007 #include "FWCore/Framework/interface/Event.h"
00008 #include "FWCore/Framework/interface/MakerMacros.h"
00009 #include "FWCore/Framework/interface/EventSetup.h"
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011 #include "FWCore/ServiceRegistry/interface/Service.h"
00012 
00013 #include "DataFormats/Common/interface/Handle.h"
00014 #include "DataFormats/HcalDetId/interface/HcalGenericDetId.h"
00015 #include "DataFormats/HcalDetId/interface/HcalElectronicsId.h"
00016 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00017 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00018 #include "DataFormats/DetId/interface/DetId.h"
00019 #include "CondFormats/HcalObjects/interface/HcalPedestals.h"
00020 #include "CondFormats/HcalObjects/interface/HcalPedestalWidths.h"
00021 #include "CondFormats/HcalObjects/interface/HcalQIECoder.h"
00022 #include "CondFormats/HcalObjects/interface/HcalQIEData.h"
00023 #include "CondFormats/HcalObjects/interface/HcalQIEShape.h"
00024 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
00025 #include "CondFormats/HcalObjects/interface/AllObjects.h"
00026 
00027 #include "CalibFormats/HcalObjects/interface/HcalDbRecord.h"
00028 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
00029 #include "CalibFormats/HcalObjects/interface/HcalCalibrations.h"
00030 #include "CalibFormats/HcalObjects/interface/HcalCalibrationWidths.h"
00031 
00032 #include "CondTools/Hcal/interface/HcalDbOnline.h"
00033 
00034 #include "CalibCalorimetry/HcalAlgos/interface/HcalDbASCIIIO.h"
00035 #include "CalibCalorimetry/HcalStandardModules/interface/HcalCondXML.h"
00036 #include "TBDataFormats/HcalTBObjects/interface/HcalTBTriggerData.h"
00037 
00038 #include "TFile.h"
00039 #include "TProfile.h"
00040 #include "TH1.h"
00041 #include "TH2.h"
00042 #include "TCanvas.h"
00043 #include "TStyle.h"
00044 
00045 #include <math.h>
00046 #include <iostream>
00047 #include <map>
00048 #include <iomanip>
00049 #include <fstream>
00050 #include <vector>
00051 #include <string>
00052 
00053 namespace edm {
00054   class ParameterSet;
00055   class Event;
00056   class EventSetup;
00057 }
00058 
00059    struct MCWidthsBunch
00060    {
00061       HcalDetId detid;
00062       bool usedflag;
00063       float sig[4][10][10];
00064       float prod[4][10][10];
00065       int num[4][10][10];
00066    };
00067 
00068 class HcalPedestalMCWidths : public edm::EDAnalyzer
00069 {
00070    public:
00071    //Constructor
00072    HcalPedestalMCWidths(const edm::ParameterSet& ps);
00073    //Destructor
00074    virtual ~HcalPedestalMCWidths();
00075    //Analysis
00076    void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
00077 
00078    private:
00079    //Container for data, 1 per channel
00080    std::vector<MCWidthsBunch> Bunches;
00081    //Flag for saving histos
00082    std::string pedsADCfilename;
00083    std::string widthsfilename;
00084 
00085    int runnum;
00086 
00087    TProfile *HBMeans[10];
00088    TProfile *HEMeans[10];
00089    TProfile *HFMeans[10];
00090    TProfile *HOMeans[10];
00091 
00092    TFile *theFile;
00093    bool firsttime;
00094    bool histflag;
00095 };
00096 #endif
00097