CMS 3D CMS Logo

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