Go to the documentation of this file.00001 #ifndef CastorPedestalsAnalysis_H
00002 #define CastorPedestalsAnalysis_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/CastorObjects/interface/CastorPedestals.h"
00021 #include "CondFormats/CastorObjects/interface/CastorPedestalWidths.h"
00022 #include "CondFormats/CastorObjects/interface/CastorQIECoder.h"
00023 #include "CondFormats/CastorObjects/interface/CastorQIEData.h"
00024 #include "CondFormats/CastorObjects/interface/CastorQIEShape.h"
00025 #include "CondFormats/CastorObjects/interface/CastorElectronicsMap.h"
00026 #include "CondFormats/CastorObjects/interface/AllObjects.h"
00027
00028 #include "CalibFormats/CastorObjects/interface/CastorDbRecord.h"
00029 #include "CalibFormats/CastorObjects/interface/CastorDbService.h"
00030 #include "CalibFormats/CastorObjects/interface/CastorCalibrations.h"
00031 #include "CalibFormats/CastorObjects/interface/CastorCalibrationWidths.h"
00032
00033
00034
00035 #include "CalibCalorimetry/CastorCalib/interface/CastorDbASCIIIO.h"
00036
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 NewPedBunch
00061 {
00062 HcalCastorDetId detid;
00063 bool usedflag;
00064 float cap[4];
00065 float capfc[4];
00066 float sig[4][4];
00067 float sigfc[4][4];
00068 float prod[4][4];
00069 float prodfc[4][4];
00070 int num[4][4];
00071 };
00072
00073 class CastorPedestalsAnalysis : public edm::EDAnalyzer
00074 {
00075 public:
00076
00077 CastorPedestalsAnalysis(const edm::ParameterSet& ps);
00078
00079 virtual ~CastorPedestalsAnalysis();
00080
00081 void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
00082
00083 private:
00084
00085 std::vector<NewPedBunch> Bunches;
00086
00087 bool hiSaveFlag;
00088 bool dumpXML;
00089 bool verboseflag;
00090 int runnum;
00091 int firstTS;
00092 int lastTS;
00093 std::string ROOTfilename;
00094 std::string pedsADCfilename;
00095 std::string pedsfCfilename;
00096 std::string widthsADCfilename;
00097 std::string widthsfCfilename;
00098 std::string XMLfilename;
00099 std::string XMLtag;
00100 std::string ZSfilename;
00101
00102 TH1F *CASTORMeans;
00103 TH1F *CASTORWidths;
00104
00105
00106 TH2F *dephist;
00107
00108 TFile *theFile;
00109 bool firsttime;
00110
00111 edm::InputTag castorDigiCollectionTag;
00112 };
00113 #endif
00114