CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/Calibration/EcalCalibAlgos/src/PhiSymmetryCalibration_step2.h

Go to the documentation of this file.
00001 #include "Calibration/EcalCalibAlgos/interface/EcalGeomPhiSymHelper.h"
00002 #include "CondFormats/EcalObjects/interface/EcalIntercalibConstants.h"
00003 #include "FWCore/Framework/interface/EDAnalyzer.h"
00004 #include "FWCore/Framework/interface/EventSetup.h"
00005 #include "FWCore/Framework/interface/ProducerBase.h"
00006 #include "FWCore/Framework/interface/Event.h"
00007 #include "FWCore/Framework/interface/ESHandle.h"
00008 
00009 class TH1F;
00010 class TH2F;
00011 
00012 class PhiSymmetryCalibration_step2 :  public edm::EDAnalyzer
00013 {
00014 
00015  public:
00016 
00017   PhiSymmetryCalibration_step2(const edm::ParameterSet& iConfig);
00018   ~PhiSymmetryCalibration_step2();
00019   
00020   void beginJob();
00021   void endJob();
00022   
00023   void analyze( const edm::Event&, const edm::EventSetup& );
00024 
00025   void fillHistos();
00026   void fillConstantsHistos();
00027   void setupResidHistos();
00028   void outResidHistos();
00029 
00030   void setUp(const edm::EventSetup& setup);
00031 
00032   void readEtSums();
00033 
00034  private:  
00035 
00036 
00037  
00038   
00039   // Transverse energy sum arrays
00040   double etsum_barl_[kBarlRings]  [kBarlWedges] [kSides];
00041   double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides];
00042   double etsum_endc_uncorr[kEndcWedgesX][kEndcWedgesX][kSides];
00043   double etsumMean_barl_[kBarlRings];
00044   double etsumMean_endc_[kEndcEtaRings];
00045    
00046   unsigned int nhits_barl_[kBarlRings][kBarlWedges] [kSides];
00047   unsigned int nhits_endc_[kEndcWedgesX][kEndcWedgesX][kSides];
00048    
00049    
00050   double esum_barl_[kBarlRings]  [kBarlWedges] [kSides];
00051   double esum_endc_[kEndcWedgesX][kEndcWedgesX][kSides];
00052 
00053   double esumMean_barl_[kBarlRings];
00054   double esumMean_endc_[kEndcEtaRings];
00055 
00056   double k_barl_[kBarlRings];
00057   double k_endc_[kEndcEtaRings];
00058    
00059    // calibration const not corrected for k
00060   float rawconst_barl[kBarlRings][kBarlWedges][kSides];
00061   float rawconst_endc[kEndcWedgesX][kEndcWedgesX][kSides];   
00062 
00063 
00064   // calibration constants not multiplied by old ones
00065   float epsilon_M_barl[kBarlRings][kBarlWedges][kSides];
00066   float epsilon_M_endc[kEndcWedgesX][kEndcWedgesY][kSides];
00067 
00068   EcalGeomPhiSymHelper e_; 
00069 
00070   std::vector<DetId> barrelCells;
00071   std::vector<DetId> endcapCells;
00072 
00073   bool firstpass_;
00074   int statusThreshold_;
00075 
00076 
00077   bool reiteration_;
00078   std::string oldcalibfile_;
00079   
00081   EcalIntercalibConstants oldCalibs_;
00082   
00084   EcalIntercalibConstants newCalibs_;
00085   
00086   
00088   EcalIntercalibConstants miscalib_;
00089 
00091   bool have_initial_miscalib_;
00092   std::string initialmiscalibfile_;
00093 
00094 
00096   std::vector<TH1F*> miscal_resid_barl_histos;
00097   std::vector<TH2F*> correl_barl_histos;
00098   
00099   std::vector<TH1F*> miscal_resid_endc_histos;
00100   std::vector<TH2F*> correl_endc_histos;
00101 
00102 };