Go to the documentation of this file.00001 #ifndef PhysicsToolsAnalysisAnalyzerMinBias_h
00002 #define PhysicsToolsAnalysisAnalyzerMinBias_h
00003
00004
00005 #include <memory>
00006 #include <string>
00007 #include <iostream>
00008
00009
00010 #include "FWCore/Framework/interface/Frameworkfwd.h"
00011 #include "FWCore/Framework/interface/EDAnalyzer.h"
00012 #include "FWCore/Framework/interface/Event.h"
00013 #include "FWCore/Framework/interface/MakerMacros.h"
00014 #include "FWCore/Framework/interface/EDProducer.h"
00015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00016 #include "DataFormats/Common/interface/Ref.h"
00017 #include "DataFormats/TrackReco/interface/Track.h"
00018 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
00019 #include "DataFormats/Candidate/interface/Candidate.h"
00020 #include "DataFormats/DetId/interface/DetId.h"
00021 #include "DataFormats/JetReco/interface/Jet.h"
00022 #include "DataFormats/JetReco/interface/CaloJet.h"
00023 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
00024 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00025 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00026 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00027 #include "Geometry/Records/interface/CaloGeometryRecord.h"
00028 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00029 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
00030 #include "FWCore/Framework/interface/ESHandle.h"
00031 #include "FWCore/Framework/interface/EventSetup.h"
00032 #include "FWCore/Framework/interface/Run.h"
00033
00034 #include "TFile.h"
00035 #include "TH1.h"
00036 #include "TH2.h"
00037 #include "TTree.h"
00038 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00039 #include <vector>
00040 #include <map>
00041
00042 #include <string>
00043 #include <iostream>
00044 #include <fstream>
00045 #include <sstream>
00046
00047
00048
00049
00050 namespace cms{
00051 class Analyzer_minbias : public edm::EDAnalyzer {
00052 public:
00053 explicit Analyzer_minbias(const edm::ParameterSet&);
00054 ~Analyzer_minbias();
00055
00056 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00057 virtual void beginJob() ;
00058 virtual void endJob() ;
00059 virtual void beginRun( const edm::Run& r, const edm::EventSetup& iSetup);
00060 virtual void endRun( const edm::Run& r, const edm::EventSetup& iSetup);
00061
00062 private:
00063
00064 std::string fOutputFileName ;
00065 std::string hcalfile_;
00066 std::ofstream *myout_hcal;
00067
00068
00069
00070 TFile* hOutputFile ;
00071 TTree* myTree;
00072 TH1F* hCalo1[73][43];
00073 TH1F* hCalo2[73][43];
00074 TH1F* hCalo1mom2[73][43];
00075 TH1F* hCalo2mom2[73][43];
00076 TH1F* hbheNoiseE;
00077 TH1F* hbheSignalE;
00078 TH1F* hfNoiseE;
00079 TH1F* hfSignalE;
00080
00081 TH2F* hHBHEsize_vs_run;
00082 TH2F* hHFsize_vs_run;
00083
00084 int nevent_run;
00085 int mydet, mysubd, depth, iphi, ieta;
00086 float phi,eta;
00087 float mom0_MB,mom1_MB,mom2_MB,mom3_MB,mom4_MB,occup;
00088 float mom0_Noise,mom1_Noise,mom2_Noise,mom3_Noise,mom4_Noise;
00089 float mom0_Diff,mom1_Diff,mom2_Diff,mom3_Diff,mom4_Diff;
00090
00091
00092
00093 double meannoise_pl[73][43],meannoise_min[73][43];
00094 double noise_pl[73][43],noise_min[73][43];
00095
00096
00097
00098 double nevent;
00099 double theMBFillDetMapPl0[5][5][73][43];
00100 double theMBFillDetMapPl1[5][5][73][43];
00101 double theMBFillDetMapPl2[5][5][73][43];
00102 double theMBFillDetMapPl4[5][5][73][43];
00103
00104 double theMBFillDetMapMin0[5][5][73][43];
00105 double theMBFillDetMapMin1[5][5][73][43];
00106 double theMBFillDetMapMin2[5][5][73][43];
00107 double theMBFillDetMapMin4[5][5][73][43];
00108
00109 double theNSFillDetMapPl0[5][5][73][43];
00110 double theNSFillDetMapPl1[5][5][73][43];
00111 double theNSFillDetMapPl2[5][5][73][43];
00112 double theNSFillDetMapPl4[5][5][73][43];
00113
00114 double theNSFillDetMapMin0[5][5][73][43];
00115 double theNSFillDetMapMin1[5][5][73][43];
00116 double theNSFillDetMapMin2[5][5][73][43];
00117 double theNSFillDetMapMin4[5][5][73][43];
00118
00119 double theDFFillDetMapPl0[5][5][73][43];
00120 double theDFFillDetMapPl1[5][5][73][43];
00121 double theDFFillDetMapPl2[5][5][73][43];
00122 double theDFFillDetMapMin0[5][5][73][43];
00123 double theDFFillDetMapMin1[5][5][73][43];
00124 double theDFFillDetMapMin2[5][5][73][43];
00125
00126 edm::InputTag hbherecoMB;
00127 edm::InputTag horecoMB;
00128 edm::InputTag hfrecoMB;
00129
00130 edm::InputTag hbherecoNoise;
00131 edm::InputTag horecoNoise;
00132 edm::InputTag hfrecoNoise;
00133
00134
00135 bool theRecalib;
00136
00137 };
00138 }
00139 #endif