CMS 3D CMS Logo

EcalHVScanAnalyzer.h

Go to the documentation of this file.
00001 #ifndef ECALHVSCANANALYZER_H
00002 #define ECALHVSCANANALYZER_H
00003 
00010 //
00011 // $Id: EcalHVScanAnalyzer.h,v 1.2 2006/11/17 16:36:12 rahatlou Exp $
00012 //
00013 
00014 
00015 
00016 // system include files
00017 #include <memory>
00018 
00019 // user include files
00020 #include "FWCore/Framework/interface/Frameworkfwd.h"
00021 #include "FWCore/Framework/interface/EDAnalyzer.h"
00022 
00023 #include "FWCore/Framework/interface/Event.h"
00024 #include "FWCore/Framework/interface/MakerMacros.h"
00025 
00026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00027 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
00028 #include "DataFormats/EcalDetId/interface/EcalTrigTowerDetId.h"
00029 
00030 #include <string>
00031 #include "TTree.h"
00032 #include "TH1.h"
00033 #include "TGraph.h"
00034 #include "TH2.h"
00035 #include<fstream>
00036 #include<map>
00037 //#include<stl_pair>
00038 
00039 
00040 struct PNfit {
00041   double max;
00042   double t0;
00043 };
00044 
00045 class EcalPnDiodeDigi;
00046 
00047 //
00048 // class declaration
00049 //
00050 
00051 class EcalHVScanAnalyzer : public edm::EDAnalyzer {
00052    public:
00053       explicit EcalHVScanAnalyzer( const edm::ParameterSet& );
00054       ~EcalHVScanAnalyzer();
00055 
00056 
00057       virtual void analyze( const edm::Event&, const edm::EventSetup& );
00058       virtual void beginJob(edm::EventSetup const&);
00059       virtual void endJob();
00060  private:
00061 
00062       
00063       PNfit maxPNDiode( const EcalPnDiodeDigi& digi );
00064 
00065       void initPNTTMap();
00066       std::pair<int,int> pnFromTT( const EcalTrigTowerDetId& tt);
00067       std::map<int, std::pair<int,int> > pnFromTTMap_; // map of PN diodes as a function of Trig towers
00068 
00069       std::string rootfile_;
00070       std::string hitCollection_;
00071       std::string hitProducer_;
00072       std::string pndiodeProducer_;
00073       fstream file;
00074       TH1F h_ampl_;
00075       TH1F h_jitt_;
00076       TH1F h1d_pnd_[10];
00077       TH1F h_pnd_max_[10];
00078       TH1F h_pnd_t0_[10];
00079       TH1F h_ampl_xtal_[85][20];
00080       TH1F h_jitt_xtal_[85][20];
00081       //TH1F h_alpha_xtal_[85][20];
00082       //TH1F h_tp_xtal_[85][20];
00083       TH1F h_norm_ampl_xtal_[85][20];
00084 
00085       TH2F h2d_anfit_tot_;
00086       TH2F h2d_anfit_bad_;
00087 
00088       // tree with output info
00089       TTree* tree_;
00090       int  tnXtal;
00091       //const int kMaxXtals; Shr 20061117: what is this??
00092       float tAmpl[85][20],tJitter[85][20],tChi2[85][20], tAmplPN1[85][20],
00093             tAmplPN2[85][20];
00094       int   tiEta[85][20],tiPhi[85][20],tiTT[85][20], tiC[85][20];
00095 
00096 
00097 };
00098 
00099 
00100 
00101 #endif

Generated on Tue Jun 9 17:45:10 2009 for CMSSW by  doxygen 1.5.4