CMS 3D CMS Logo

HcalGainsCheck.h

Go to the documentation of this file.
00001 #ifndef HcalGainsCheck_h
00002 #define HcalGainsCheck_h
00003 
00004 // 
00005 // R.Ofierzynski 9.12.2007
00006 //
00007 // Code to check pedestals for completeness and to compare to previous pedestals
00008 
00009 #include <string>
00010 #include <iostream>
00011 #include <fstream>
00012 #include <sstream>
00013 #include <map>
00014 #include <vector>
00015 #include <algorithm>
00016 
00017 #include "FWCore/Framework/interface/EDAnalyzer.h"
00018 #include "FWCore/Framework/interface/Event.h"
00019 #include "FWCore/Framework/interface/ESHandle.h"
00020 #include "FWCore/Framework/interface/MakerMacros.h"
00021 
00022 #include "FWCore/Framework/interface/EventSetup.h"
00023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00024 
00025 #include "CondFormats/HcalObjects/interface/HcalPedestals.h"
00026 #include "CondFormats/HcalObjects/interface/HcalPedestalWidths.h"
00027 #include "CondFormats/HcalObjects/interface/HcalGains.h"
00028 #include "CondFormats/HcalObjects/interface/HcalGainWidths.h"
00029 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
00030 
00031 #include "DataFormats/HcalDetId/interface/HcalGenericDetId.h"
00032 #include "DataFormats/DetId/interface/DetId.h"
00033 
00034 #include "CondFormats/DataRecord/interface/HcalPedestalsRcd.h"
00035 #include "CondFormats/DataRecord/interface/HcalPedestalWidthsRcd.h"
00036 #include "CondFormats/DataRecord/interface/HcalGainsRcd.h"
00037 #include "CondFormats/DataRecord/interface/HcalGainWidthsRcd.h"
00038 #include "CondFormats/DataRecord/interface/HcalElectronicsMapRcd.h"
00039 
00040 #include "CalibCalorimetry/HcalAlgos/interface/HcalDbASCIIIO.h"
00041 #include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h"
00042 
00043 #include "TFile.h"
00044 #include "TH1.h"
00045 #include "TH2.h"
00046 
00047 class HcalGainsCheck: public edm::EDAnalyzer
00048 {
00049  public:
00050   HcalGainsCheck(edm::ParameterSet const& ps);
00051 
00052   ~HcalGainsCheck() {}
00053 
00054   virtual void beginJob(const edm::EventSetup&) ;
00055   virtual void endJob();
00056  
00057   void analyze(const edm::Event& ev, const edm::EventSetup& es);
00058 
00059  private:
00060   //  std::string front;
00061   //  vecDetId getMissingDetIds(std::vector<HcalPedestals> &);
00062   std::string dumpupdate;
00063   std::string dumprefs; 
00064   std::string rootfile;
00065   std::string outfile;
00066   bool emapflag;
00067   bool validategainsflag;
00068   double epsilon;
00069 
00070   TFile * f;
00071   //plots:
00072   TH2F * ocMapUp;
00073   TH2F * ocMapRef;
00074 //  TH2F* valMapUp;
00075 //  TH2F* valMapRef;
00076 
00077   TH1F* diffUpRefCap0;
00078   TH1F* diffUpRefCap1;
00079   TH1F* diffUpRefCap2;
00080   TH1F* diffUpRefCap3;
00081   TH1F* ratioUpRefCap0;
00082   TH1F* ratioUpRefCap1;
00083   TH1F* ratioUpRefCap2;
00084   TH1F* ratioUpRefCap3;
00085   TH1F* gainsUpCap0;
00086   TH1F* gainsUpCap1;
00087   TH1F* gainsUpCap2;
00088   TH1F* gainsUpCap3;
00089   TH1F* gainsRefCap0;
00090   TH1F* gainsRefCap1;
00091   TH1F* gainsRefCap2;
00092   TH1F* gainsRefCap3;
00093   TH1F* gainsUpCap0vsEta;
00094   TH1F* gainsUpCap1vsEta;
00095   TH1F* gainsUpCap2vsEta;
00096   TH1F* gainsUpCap3vsEta;
00097   TH1F* gainsRefCap0vsEta;
00098   TH1F* gainsRefCap1vsEta;
00099   TH1F* gainsRefCap2vsEta;
00100   TH1F* gainsRefCap3vsEta;
00101 
00102 };
00103 #endif

Generated on Tue Jun 9 17:26:53 2009 for CMSSW by  doxygen 1.5.4