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 "DataFormats/Common/interface/Handle.h"
00014 #include "FWCore/Framework/interface/MakerMacros.h"
00015 #include "DataFormats/Common/interface/EDProduct.h"
00016 #include "FWCore/Framework/interface/EDProducer.h"
00017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00018 #include "DataFormats/Common/interface/Ref.h"
00019 #include "DataFormats/TrackReco/interface/Track.h"
00020 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
00021 #include "DataFormats/Candidate/interface/Candidate.h"
00022 #include "DataFormats/DetId/interface/DetId.h"
00023 #include "DataFormats/JetReco/interface/Jet.h"
00024 #include "DataFormats/JetReco/interface/CaloJet.h"
00025 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
00026 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00027 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00028 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00029 #include "Geometry/Records/interface/CaloGeometryRecord.h"
00030 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00031 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
00032 #include "FWCore/Framework/interface/ESHandle.h"
00033 #include "FWCore/Framework/interface/EventSetup.h"
00034
00035 #include "TFile.h"
00036 #include "TH1.h"
00037 #include "TH2.h"
00038 #include "TTree.h"
00039 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00040 #include <vector>
00041 #include <map>
00042
00043 #include <string>
00044 #include <iostream>
00045 #include <fstream>
00046 #include <sstream>
00047
00048 using namespace std;
00049 using namespace reco;
00050
00051
00052
00053 namespace cms{
00054 class Analyzer_minbias : public edm::EDAnalyzer {
00055 public:
00056 explicit Analyzer_minbias(const edm::ParameterSet&);
00057 ~Analyzer_minbias();
00058
00059 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00060 virtual void beginJob(const edm::EventSetup& ) ;
00061 virtual void endJob() ;
00062
00063 private:
00064
00065 string fOutputFileName ;
00066
00067
00068
00069
00070
00071 TFile* hOutputFile ;
00072 TH1D* hHBHEEt;
00073 TH1D* hHBHEEt_eta_1;
00074 TH1D* hHBHEEt_eta_25;
00075 TH1D* hHBHEEta;
00076 TH1D* hHBHEPhi;
00077
00078 TH1D* hHFEt;
00079 TH1D* hHFEt_eta_33;
00080 TH1D* hHFEta;
00081 TH1D* hHFPhi;
00082
00083 TH1D* hHOEt;
00084 TH1D* hHOEt_eta_5;
00085 TH1D* hHOEta;
00086 TH1D* hHOPhi;
00087 TTree * myTree;
00088 int mystart;
00089
00090 int mydet, mysubd, depth, iphi, ieta;
00091 float phi,eta;
00092 float mom0,mom1,mom2,mom3,mom4,occup;
00093 float mom0_cut,mom1_cut,mom2_cut,mom3_cut,mom4_cut;
00094
00095 map<DetId,double> theFillDetMap0;
00096 map<DetId,double> theFillDetMap1;
00097 map<DetId,double> theFillDetMap2;
00098 map<DetId,double> theFillDetMap3;
00099 map<DetId,double> theFillDetMap4;
00100
00101 map<DetId,double> theFillDetMap_cut0;
00102 map<DetId,double> theFillDetMap_cut1;
00103 map<DetId,double> theFillDetMap_cut2;
00104 map<DetId,double> theFillDetMap_cut3;
00105 map<DetId,double> theFillDetMap_cut4;
00106
00107
00108
00109
00110 std::string nameprod;
00111 edm::InputTag hbhereco;
00112 edm::InputTag horeco;
00113 edm::InputTag hfreco;
00114 bool useMCInfo;
00115 bool theRecalib;
00116 double hbhecut;
00117 double hocut;
00118 double hfcut;
00119 std::vector<HcalDetId> theHcalId;
00120
00121 std::string hcalfile_;
00122 std::ofstream *myout_hcal;
00123 int start;
00124 std::vector<DetId> alldid;
00125
00126 };
00127 }
00128 #endif