ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/ssen/Analyzers/interface/ZDCAnalyzer.h
Revision: 1.1.1.1 (vendor branch)
Committed: Thu Dec 10 20:05:05 2009 UTC (15 years, 4 months ago) by tyetkin
Content type: text/plain
Branch: INITIAL, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
Log Message:
with flags

File Contents

# Content
1 // -*- C++ -*-
2 //
3 // Package: ZDCAnalyzer
4 // Class: ZDCAnalyzer
5 //
6 /**\class ZDCAnalyzer ZDCAnalyzer.cc Analyzers/ZDCAnalyzer/src/ZDCAnalyzer.cc
7
8 Description: <one line class summary>
9
10 Implementation:
11 <Notes on implementation>
12 */
13 //
14 // Original Author: Taylan Yetkin
15 // Created: Sat Nov 7 23:04:14 CET 2009
16 // $Id: ZDCAnalyzer.h,v 1.3 2009/11/08 00:29:19 tyetkin Exp $
17 //
18 //
19
20
21 // system include files
22 #include <memory>
23 #include <string>
24
25 // user include files
26 #include "FWCore/Framework/interface/Frameworkfwd.h"
27 #include "FWCore/Framework/interface/EDAnalyzer.h"
28
29 #include "FWCore/Framework/interface/Event.h"
30 #include "FWCore/Framework/interface/MakerMacros.h"
31
32 #include "FWCore/ParameterSet/interface/ParameterSet.h"
33 //TFile Service
34 #include "FWCore/ServiceRegistry/interface/Service.h"
35 #include "PhysicsTools/UtilAlgos/interface/TFileService.h"
36
37 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
38
39
40 class TH1F;
41 class TH2F;
42
43 class ZDCAnalyzer : public edm::EDAnalyzer {
44 public:
45 explicit ZDCAnalyzer(const edm::ParameterSet&);
46 ~ZDCAnalyzer();
47
48
49 private:
50 virtual void beginJob(const edm::EventSetup&) ;
51 virtual void analyze(const edm::Event&, const edm::EventSetup&);
52 virtual void endJob();
53
54 //void setZDClabels(MonitorElement * h);
55
56 double getTime(double fData[10], double& fSum);
57 int getTSMax(double fData[10], int fTS);
58 bool isGood(double fData[10], double fCut, double fPercentage);
59 TH2F *book2DHistogram(TFileDirectory & fDir, const std::string & fName, const std::string & fTitle,
60 int fNbinsX, double fXmin, double fXmax, int fNbinsY, double fYmin, double fYmax) const;
61 TH1F *book1DHistogram(TFileDirectory & fDir, const std::string & fName, const std::string & fTitle,
62 int fNbins, double fXmin, double fXmax) const;
63 void htmlOutput(void);
64 void ZDCHTMLOutput(std::string startTime, std::string htmlDir, std::string htmlName);
65
66 void histoHTML(TH1F * hist, const char *xlab, const char *ylab, int width, std::ofstream & htmlFile, std::string htmlDir, bool log=false);
67 void histoHTML2(TH2F * hist, const char *xlab, const char *ylab, int width, std::ofstream & htmlFile, std::string htmlDir, bool color = false, bool log=false);
68 std::string getIMG(TH1F* hist, int size, std::string htmlDir, const char* xlab, const char* ylab, bool log=false);
69 std::string getIMG2(TH2F* hist, int size, std::string htmlDir, const char* xlab, const char* ylab,bool color=false, bool log=false);
70 void parseString(std::string& title);
71 void cleanString(std::string& title);
72
73 private:
74
75
76 std::string baseHtmlDir_;
77 std::string externalFile1;
78 std::string externalFile2;
79 long runBegin,lumibegin,lumiend,evtNo;
80 int run, event, lumi, bxnumber;
81 std::string startTime;
82 bool htmlPrint;
83 bool doZDCHTML;
84
85 int Runno;
86 // edm::ESHandle<HcalDbService> conditions;
87 edm::Service<TFileService> mFileServer;
88
89 TH2F* h_channel_side_charge;
90 TH2F* h_channel_side_charge_Ave;
91 TH2F* h_channel_side_TSMean_Ave;
92 TH2F* h_channel_side_timing;
93
94 TH1F* h_bunchXing;
95 TH1F* h_lumiBlock;
96 TH1F* histodeneme;
97 TH1F* histFlag1;
98 TH1F* histFlag2;
99 TH1F* histFlag3;
100 TH1F* histFlag4;
101 TH1F* histFlag5;
102 TH1F* histFlag6;
103 TH1F* histFlag7;
104 TH1F* h_ZDCP_EM_Pulse[5];
105 TH1F* h_ZDCP_HAD_Pulse[4];
106 TH1F* h_ZDCP_EM_Charge[5];
107 TH1F* h_ZDCP_EM_RecHitEnergy[5];
108 TH1F* h_ZDCP_HAD_Charge[4];
109 TH1F* h_ZDCP_HAD_RecHitEnergy[4];
110 TH1F* h_ZDCP_EM_TSMean[5];
111 TH1F* h_ZDCP_HAD_TSMean[4];
112 TH1F* h_ZDCP_EM_RecHitEnergyAve;
113 TH1F* h_ZDCP_HAD_RecHitEnergyAve;
114 TH2F* h_ZDCP_Charge_Correlation;
115 TH2F* h_ZDCP_Charge_CorrelationHAD;
116 TH2F* h_ZDCP_Charge_Correlation2;
117 TH2F* h_ZDCP_RecHit_Correlation;
118 TH1F* h_ZDCP_EMHAD_ChargeAve;
119 TH1F* h_ZDCP_EMHAD_TSMeanAve;
120
121 TH1F* h_ZDCM_EM_Pulse[5];
122 TH1F* h_ZDCM_HAD_Pulse[4];
123 TH1F* h_ZDCM_EM_Charge[5];
124 TH1F* h_ZDCM_EM_RecHitEnergy[5];
125 TH1F* h_ZDCM_HAD_Charge[4];
126 TH1F* h_ZDCM_HAD_RecHitEnergy[4];
127 TH1F* h_ZDCM_EM_TSMean[5];
128 TH1F* h_ZDCM_HAD_TSMean[4];
129 TH1F* h_ZDCM_EM_RecHitEnergyAve;
130 TH1F* h_ZDCM_HAD_RecHitEnergyAve;
131 TH2F* h_ZDCM_RecHit_Correlation;
132 TH1F* h_ZDCM_EMHAD_ChargeAve;
133 TH1F* h_ZDCM_EMHAD_TSMeanAve;
134
135 TH1F* h_recHitSum_HFP_Long;
136 TH1F* h_recHitSum_HFM_Long;
137 TH1F* h_hf_time_difference;
138 TH1F* h_BX_before_return;
139 TH1F* h_BX_after_return;
140 TH1F* h_l1_techBit;
141
142 };
143 DEFINE_FWK_MODULE(ZDCAnalyzer);