Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:02:10

0001 #ifndef ECALSIMPLE2007H4TBANALYZER_H
0002 #define ECALSIMPLE2007H4TBANALYZER_H
0003 
0004 /**\class EcalSimple2007H4TBAnalyzer
0005 
0006  Description: <one line class summary>
0007 
0008  Implementation:
0009      <Notes on implementation>
0010 */
0011 //
0012 //
0013 
0014 // system include files
0015 #include <memory>
0016 
0017 // user include files
0018 #include "FWCore/Framework/interface/Frameworkfwd.h"
0019 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0020 
0021 #include "FWCore/Framework/interface/Event.h"
0022 #include "FWCore/Framework/interface/MakerMacros.h"
0023 
0024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0025 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0026 #include "DataFormats/EcalRecHit/interface/EcalUncalibratedRecHit.h"
0027 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0028 #include "DataFormats/EcalDetId/interface/EEDetId.h"
0029 #include "TBDataFormats/EcalTBObjects/interface/EcalTBHodoscopeRecInfo.h"
0030 #include "TBDataFormats/EcalTBObjects/interface/EcalTBTDCRecInfo.h"
0031 #include "TBDataFormats/EcalTBObjects/interface/EcalTBEventHeader.h"
0032 
0033 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0034 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0035 
0036 #include <string>
0037 #include "TH1.h"
0038 #include "TGraph.h"
0039 #include "TH2.h"
0040 #include <fstream>
0041 #include <map>
0042 
0043 class EcalSimple2007H4TBAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0044 public:
0045   explicit EcalSimple2007H4TBAnalyzer(const edm::ParameterSet&);
0046   ~EcalSimple2007H4TBAnalyzer() override;
0047 
0048   void analyze(edm::Event const&, edm::EventSetup const&) override;
0049   void beginRun(edm::Run const&, edm::EventSetup const&) override;
0050   void endRun(edm::Run const&, edm::EventSetup const&) override;
0051   void endJob() override;
0052 
0053 private:
0054   const std::string rootfile_;
0055   const std::string digiCollection_;
0056   const std::string digiProducer_;
0057   const std::string hitCollection_;
0058   const std::string hitProducer_;
0059   const std::string hodoRecInfoCollection_;
0060   const std::string hodoRecInfoProducer_;
0061   const std::string tdcRecInfoCollection_;
0062   const std::string tdcRecInfoProducer_;
0063   const std::string eventHeaderCollection_;
0064   const std::string eventHeaderProducer_;
0065 
0066   const edm::EDGetTokenT<EEDigiCollection> eeDigiToken_;
0067   const edm::EDGetTokenT<EEUncalibratedRecHitCollection> eeUncalibratedRecHitToken_;
0068   const edm::EDGetTokenT<EcalTBHodoscopeRecInfo> tbHodoscopeRecInfoToken_;
0069   const edm::EDGetTokenT<EcalTBTDCRecInfo> tbTDCRecInfoToken_;
0070   const edm::EDGetTokenT<EcalTBEventHeader> tbEventHeaderToken_;
0071   const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> geometryToken_;
0072 
0073   // Amplitude vs TDC offset
0074   TH2F* h_ampltdc;
0075 
0076   TH2F* h_Shape_;
0077 
0078   // Reconstructed energies
0079   TH1F* h_tableIsMoving;
0080   TH1F* h_e1x1;
0081   TH1F* h_e3x3;
0082   TH1F* h_e5x5;
0083 
0084   TH1F* h_e1x1_center;
0085   TH1F* h_e3x3_center;
0086   TH1F* h_e5x5_center;
0087 
0088   TH1F* h_e1e9;
0089   TH1F* h_e1e25;
0090   TH1F* h_e9e25;
0091 
0092   TH1F* h_S6;
0093   TH1F* h_bprofx;
0094   TH1F* h_bprofy;
0095 
0096   TH1F* h_qualx;
0097   TH1F* h_qualy;
0098 
0099   TH1F* h_slopex;
0100   TH1F* h_slopey;
0101 
0102   TH2F* h_mapx[25];
0103   TH2F* h_mapy[25];
0104 
0105   TH2F* h_e1e9_mapx;
0106   TH2F* h_e1e9_mapy;
0107 
0108   TH2F* h_e1e25_mapx;
0109   TH2F* h_e1e25_mapy;
0110 
0111   TH2F* h_e9e25_mapx;
0112   TH2F* h_e9e25_mapy;
0113 
0114   EEDetId xtalInBeam_;
0115   EBDetId xtalInBeamTmp;
0116   EEDetId Xtals5x5[25];
0117 
0118   const CaloGeometry* theTBGeometry_;
0119 };
0120 
0121 #endif