CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/Validation/CaloTowers/interface/CaloTowersValidation.h

Go to the documentation of this file.
00001 #ifndef CaloTowersValidation_H
00002 #define CaloTowersValidation_H
00003  
00004 
00005 #include "FWCore/Framework/interface/Frameworkfwd.h"
00006 #include "FWCore/Framework/interface/EDAnalyzer.h"
00007 #include "FWCore/Framework/interface/Event.h"
00008 #include "FWCore/Framework/interface/EventSetup.h"
00009 #include "FWCore/Framework/interface/ESHandle.h"
00010 #include "FWCore/PluginManager/interface/ModuleDef.h"
00011 #include "FWCore/Framework/interface/MakerMacros.h"
00012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00014 #include "FWCore/ServiceRegistry/interface/Service.h"
00015 
00016 #include "DQMServices/Core/interface/DQMStore.h"
00017 
00018 #include "DataFormats/DetId/interface/DetId.h"
00019 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
00020 #include "DataFormats/Math/interface/Vector3D.h"
00021 
00022 #include <vector>
00023 #include <utility>
00024 #include <ostream>
00025 #include <string>
00026 #include <algorithm>
00027 #include <cmath>
00028 #include "DQMServices/Core/interface/MonitorElement.h"
00029 
00030 
00031 class CaloTowersValidation : public edm::EDAnalyzer {
00032  public:
00033    CaloTowersValidation(edm::ParameterSet const& conf);
00034   ~CaloTowersValidation();
00035   virtual void analyze(edm::Event const& e, edm::EventSetup const& c);
00036   virtual void beginJob() ;
00037   virtual void endJob() ;
00038   virtual void beginRun() ;
00039   virtual void endRun() ;
00040 
00041  private:
00042   double dR(double eta1, double phi1, double eta2, double phi2);
00043    
00044   DQMStore* dbe_;
00045   std::string outputFile_;
00046   std::string hcalselector_;
00047   std::string mc_;
00048   bool        useAllHistos_;
00049 
00050   typedef math::RhoEtaPhiVector Vector;
00051 
00052   edm::InputTag theCaloTowerCollectionLabel;
00053 
00054   int isub;
00055   int nevent;
00056 
00057   int imc;
00058 
00059   // eta limits to calcualte MET, SET (not to include HF if not needed)
00060   double etaMax[3];
00061   double etaMin[3];
00062 
00063   // ieta scan
00064   MonitorElement*  emean_vs_ieta_E;
00065   MonitorElement*  emean_vs_ieta_H;
00066   MonitorElement*  emean_vs_ieta_EH;
00067 
00068   MonitorElement*  emean_vs_ieta_E1;
00069   MonitorElement*  emean_vs_ieta_H1;
00070   MonitorElement*  emean_vs_ieta_EH1;
00071 
00072   MonitorElement* Ntowers_vs_ieta;
00073   MonitorElement* occupancy_map;
00074   MonitorElement* occupancy_vs_ieta;
00075 
00076   // Global maps
00077   MonitorElement*  mapEnergy_E;
00078   MonitorElement*  mapEnergy_H;
00079   MonitorElement*  mapEnergy_EH;
00080   MonitorElement*  mapEnergy_N;
00081 
00082   // for number of bad, recovered and problematic Ecal and Hcal cells
00083   MonitorElement* numBadCellsEcal_EB;
00084   MonitorElement* numBadCellsEcal_EE;
00085   MonitorElement* numRcvCellsEcal_EB;
00086   MonitorElement* numRcvCellsEcal_EE;
00087   MonitorElement* numPrbCellsEcal_EB;
00088   MonitorElement* numPrbCellsEcal_EE;
00089 
00090   MonitorElement* numBadCellsHcal_HB;
00091   MonitorElement* numBadCellsHcal_HE;
00092   MonitorElement* numBadCellsHcal_HF;
00093   MonitorElement* numRcvCellsHcal_HB;
00094   MonitorElement* numRcvCellsHcal_HE;
00095   MonitorElement* numRcvCellsHcal_HF;
00096   MonitorElement* numPrbCellsHcal_HB;
00097   MonitorElement* numPrbCellsHcal_HE;
00098   MonitorElement* numPrbCellsHcal_HF; 
00099 
00100   // HB
00101   MonitorElement* meEnergyHcalvsEcal_HB;
00102   MonitorElement* meEnergyHO_HB; 
00103   MonitorElement* meEnergyEcal_HB; 
00104   MonitorElement* meEnergyHcal_HB; 
00105   MonitorElement* meNumFiredTowers_HB;
00106 
00107   MonitorElement* meEnergyEcalTower_HB;
00108   MonitorElement* meEnergyHcalTower_HB;
00109   MonitorElement* meTotEnergy_HB;
00110 
00111   MonitorElement* mapEnergy_HB;
00112   MonitorElement* mapEnergyEcal_HB;
00113   MonitorElement* mapEnergyHcal_HB;
00114   MonitorElement* MET_HB;
00115   MonitorElement* SET_HB;
00116   MonitorElement* phiMET_HB;
00117 
00118   MonitorElement* emTiming_HB;
00119   MonitorElement* hadTiming_HB;
00120 
00121   MonitorElement* emEnergyTiming_Low_HB;
00122   MonitorElement* emEnergyTiming_HB;
00123   MonitorElement* emEnergyTiming_High_HB;
00124   MonitorElement* emEnergyTiming_profile_Low_HB;
00125   MonitorElement* emEnergyTiming_profile_HB;
00126   MonitorElement* emEnergyTiming_profile_High_HB;
00127 
00128   MonitorElement* hadEnergyTiming_Low_HB;
00129   MonitorElement* hadEnergyTiming_HB;
00130   MonitorElement* hadEnergyTiming_High_HB;
00131   MonitorElement* hadEnergyTiming_profile_Low_HB;
00132   MonitorElement* hadEnergyTiming_profile_HB;
00133   MonitorElement* hadEnergyTiming_profile_High_HB;
00134 
00135   // HE
00136   MonitorElement* meEnergyHcalvsEcal_HE;
00137   MonitorElement* meEnergyHO_HE; 
00138   MonitorElement* meEnergyEcal_HE; 
00139   MonitorElement* meEnergyHcal_HE; 
00140   MonitorElement* meNumFiredTowers_HE;
00141 
00142   MonitorElement* meEnergyEcalTower_HE;
00143   MonitorElement* meEnergyHcalTower_HE;
00144   MonitorElement* meTotEnergy_HE;
00145 
00146   MonitorElement* mapEnergy_HE;
00147   MonitorElement* mapEnergyEcal_HE;
00148   MonitorElement* mapEnergyHcal_HE;
00149   MonitorElement* MET_HE;
00150   MonitorElement* SET_HE;
00151   MonitorElement* phiMET_HE;
00152 
00153   MonitorElement* emTiming_HE;
00154   MonitorElement* hadTiming_HE;
00155 
00156   MonitorElement* emEnergyTiming_Low_HE;
00157   MonitorElement* emEnergyTiming_HE;
00158   MonitorElement* emEnergyTiming_profile_Low_HE;
00159   MonitorElement* emEnergyTiming_profile_HE;
00160 
00161   MonitorElement* hadEnergyTiming_Low_HE;
00162   MonitorElement* hadEnergyTiming_HE;
00163   MonitorElement* hadEnergyTiming_profile_Low_HE;
00164   MonitorElement* hadEnergyTiming_profile_HE;
00165 
00166   // HF
00167   MonitorElement* meEnergyHcalvsEcal_HF;
00168   MonitorElement* meEnergyHO_HF; 
00169   MonitorElement* meEnergyEcal_HF; 
00170   MonitorElement* meEnergyHcal_HF; 
00171   MonitorElement* meNumFiredTowers_HF;
00172 
00173   MonitorElement* meEnergyEcalTower_HF;
00174   MonitorElement* meEnergyHcalTower_HF;
00175   MonitorElement* meTotEnergy_HF;
00176 
00177   MonitorElement* mapEnergy_HF;
00178   MonitorElement* mapEnergyEcal_HF;
00179   MonitorElement* mapEnergyHcal_HF;
00180   MonitorElement* MET_HF;
00181   MonitorElement* SET_HF;
00182   MonitorElement* phiMET_HF;
00183 
00184   MonitorElement* emTiming_HF;
00185   MonitorElement* hadTiming_HF;
00186   MonitorElement* emEnergyTiming_HF;
00187   MonitorElement* emEnergyTiming_profile_HF;
00188 
00189   MonitorElement* hadEnergyTiming_Low_HF;
00190   MonitorElement* hadEnergyTiming_HF;
00191   MonitorElement* hadEnergyTiming_profile_Low_HF;
00192   MonitorElement* hadEnergyTiming_profile_HF;
00193 
00194 };
00195 
00196 #endif