CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Calibration/EcalCalibAlgos/src/PhiSymmetryCalibration_step2_SM.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_SM :  public edm::EDAnalyzer
00013 {
00014 
00015  public:
00016 
00017   PhiSymmetryCalibration_step2_SM(const edm::ParameterSet& iConfig);
00018   ~PhiSymmetryCalibration_step2_SM();
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 
00042   // energy sum for SM calibration
00043   // number of crystals in a "supercrystal" 
00044   static const int  nscx=20;
00045   double etsum_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides];
00046   int    nBads_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides];
00047   double etsumMean_barl_SM_[kBarlRings];
00048   double epsilon_M_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides];
00049 
00050   double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides];
00051   double etsum_endc_uncorr[kEndcWedgesX][kEndcWedgesX][kSides];
00052   double etsumMean_barl_[kBarlRings];
00053   double etsumMean_endc_[kEndcEtaRings];
00054    
00055   unsigned int nhits_barl_[kBarlRings][kBarlWedges] [kSides];
00056   unsigned int nhits_endc_[kEndcWedgesX][kEndcWedgesX][kSides];
00057    
00058    
00059   double esum_barl_[kBarlRings]  [kBarlWedges] [kSides];
00060   double esum_endc_[kEndcWedgesX][kEndcWedgesX][kSides];
00061 
00062   double esumMean_barl_[kBarlRings];
00063   double esumMean_endc_[kEndcEtaRings];
00064 
00065   double k_barl_[kBarlRings];
00066   double k_endc_[kEndcEtaRings];
00067    
00068    // calibration const not corrected for k
00069   float rawconst_barl[kBarlRings][kBarlWedges][kSides];
00070   float rawconst_endc[kEndcWedgesX][kEndcWedgesX][kSides];   
00071 
00072 
00073   // calibration constants not multiplied by old ones
00074   float epsilon_M_barl[kBarlRings][kBarlWedges][kSides];
00075   float epsilon_M_endc[kEndcWedgesX][kEndcWedgesY][kSides];
00076 
00077   EcalGeomPhiSymHelper e_; 
00078 
00079   std::vector<DetId> barrelCells;
00080   std::vector<DetId> endcapCells;
00081 
00082   bool firstpass_;
00083   int statusThreshold_;
00084 
00085 
00086   bool reiteration_;
00087   std::string oldcalibfile_;
00088   
00090   EcalIntercalibConstants oldCalibs_;
00091   
00093   EcalIntercalibConstants newCalibs_;
00094   
00095   
00097   EcalIntercalibConstants miscalib_;
00098 
00100   bool have_initial_miscalib_;
00101   std::string initialmiscalibfile_;
00102 
00103 
00105   std::vector<TH1F*> miscal_resid_barl_histos;
00106   std::vector<TH2F*> correl_barl_histos;
00107   
00108   std::vector<TH1F*> miscal_resid_endc_histos;
00109   std::vector<TH2F*> correl_endc_histos;
00110 
00111 };