CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/DQMOffline/CalibCalo/src/DQMSourcePi0.h

Go to the documentation of this file.
00001 #ifndef DQMSourcePi0_H
00002 #define DQMSourcePi0_H
00003 
00004 #include "FWCore/Framework/interface/Frameworkfwd.h"
00005 #include "FWCore/Framework/interface/EDAnalyzer.h"
00006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00007 #include "FWCore/Utilities/interface/InputTag.h"
00008 
00009 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
00010 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00011 
00012 // Geometry
00013 #include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h"
00014 #include "Geometry/CaloTopology/interface/CaloTopology.h"
00015 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00016 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00017 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00018 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00019 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00020 #include "Geometry/CaloTopology/interface/EcalEndcapTopology.h"
00021 #include "Geometry/CaloTopology/interface/EcalBarrelTopology.h"
00022 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
00023 
00024 
00025 typedef std::map<DetId, EcalRecHit> RecHitsMap;
00026 // Less than operator for sorting EcalRecHits according to energy.
00027 class ecalRecHitLess : public std::binary_function<EcalRecHit, EcalRecHit, bool> 
00028 {
00029 public:
00030   bool operator()(EcalRecHit x, EcalRecHit y) 
00031   { 
00032     return (x.energy() > y.energy()); 
00033   }
00034 };
00035 
00036 
00037 
00038 
00039 class DQMStore;
00040 class MonitorElement;
00041 
00042 class DQMSourcePi0 : public edm::EDAnalyzer {
00043 
00044 public:
00045 
00046   DQMSourcePi0( const edm::ParameterSet& );
00047   ~DQMSourcePi0();
00048 
00049 protected:
00050    
00051   void beginJob();
00052 
00053   void beginRun(const edm::Run& r, const edm::EventSetup& c);
00054 
00055   void analyze(const edm::Event& e, const edm::EventSetup& c) ;
00056 
00057   void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00058                             const edm::EventSetup& context) ;
00059 
00060   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00061                           const edm::EventSetup& c);
00062 
00063   void endRun(const edm::Run& r, const edm::EventSetup& c);
00064 
00065   void endJob();
00066 
00067   void convxtalid(int & , int &);
00068   int diff_neta_s(int,int);
00069   int diff_nphi_s(int,int);
00070 
00071 
00072 
00073 private:
00074  
00075 
00076   DQMStore*   dbe_;  
00077   int eventCounter_;      
00078   PositionCalc posCalculator_ ;                        
00079 
00081   MonitorElement * hiPhiDistrEBpi0_;
00082 
00084   MonitorElement * hiXDistrEEpi0_;
00085 
00087   MonitorElement * hiPhiDistrEBeta_;
00088 
00090   MonitorElement * hiXDistrEEeta_;
00091 
00093   MonitorElement * hiEtaDistrEBpi0_;
00094 
00096   MonitorElement * hiYDistrEEpi0_;
00097 
00099   MonitorElement * hiEtaDistrEBeta_;
00100 
00102   MonitorElement * hiYDistrEEeta_;
00103 
00105   MonitorElement * hRechitEnergyEBpi0_;
00106 
00108   MonitorElement * hRechitEnergyEEpi0_;
00109 
00111   MonitorElement * hRechitEnergyEBeta_;
00112 
00114   MonitorElement * hRechitEnergyEEeta_;
00115 
00117   MonitorElement * hEventEnergyEBpi0_;
00118 
00120   MonitorElement * hEventEnergyEEpi0_;
00121   
00123   MonitorElement * hEventEnergyEBeta_;
00124 
00126   MonitorElement * hEventEnergyEEeta_;
00127   
00129   MonitorElement * hNRecHitsEBpi0_;
00130 
00132   MonitorElement * hNRecHitsEEpi0_;
00133 
00135   MonitorElement * hNRecHitsEBeta_;
00136 
00138   MonitorElement * hNRecHitsEEeta_;
00139 
00141   MonitorElement * hMeanRecHitEnergyEBpi0_;
00142 
00144   MonitorElement * hMeanRecHitEnergyEEpi0_;
00145 
00147   MonitorElement * hMeanRecHitEnergyEBeta_;
00148 
00150   MonitorElement * hMeanRecHitEnergyEEeta_;
00151 
00153   MonitorElement * hMinvPi0EB_;
00154 
00156   MonitorElement * hMinvPi0EE_;
00157 
00159   MonitorElement * hMinvEtaEB_;
00160 
00162   MonitorElement * hMinvEtaEE_;
00163 
00165   MonitorElement *hPt1Pi0EB_;
00166 
00168   MonitorElement *hPt1Pi0EE_;
00169 
00171   MonitorElement *hPt1EtaEB_;
00172 
00174   MonitorElement *hPt1EtaEE_;
00175 
00176   
00178   MonitorElement *hPt2Pi0EB_;
00179 
00181   MonitorElement *hPt2Pi0EE_;
00182 
00184   MonitorElement *hPt2EtaEB_;
00185 
00187   MonitorElement *hPt2EtaEE_;
00188 
00189   
00191   MonitorElement * hPtPi0EB_;
00192 
00194   MonitorElement * hPtPi0EE_;
00195 
00197   MonitorElement * hPtEtaEB_;
00198 
00200   MonitorElement * hPtEtaEE_;
00201 
00203   MonitorElement * hIsoPi0EB_;
00204 
00206   MonitorElement * hIsoPi0EE_;
00207 
00209   MonitorElement * hIsoEtaEB_;
00210 
00212   MonitorElement * hIsoEtaEE_;
00213 
00215   MonitorElement * hS4S91Pi0EB_;
00216 
00218   MonitorElement * hS4S91Pi0EE_;
00219 
00221   MonitorElement * hS4S91EtaEB_;
00222 
00224   MonitorElement * hS4S91EtaEE_;
00225 
00227   MonitorElement * hS4S92Pi0EB_;
00228   
00230   MonitorElement * hS4S92Pi0EE_;
00231   
00233   MonitorElement * hS4S92EtaEB_;
00234   
00236   MonitorElement * hS4S92EtaEE_;
00237   
00238 
00239 
00240 
00242   edm::InputTag productMonitoredEBpi0_;
00243   edm::InputTag productMonitoredEBeta_;
00244 
00246   edm::InputTag productMonitoredEEpi0_;
00247   edm::InputTag productMonitoredEEeta_;
00248 
00249       int gammaCandEtaSize_;
00250       int gammaCandPhiSize_;
00251 
00252       double seleXtalMinEnergy_;
00253       double seleXtalMinEnergyEndCap_;
00254 
00255   double clusSeedThr_;
00256   int clusEtaSize_;
00257   int clusPhiSize_;
00258 
00259   double clusSeedThrEndCap_;
00260 
00262       double selePtGamma_;
00263       double selePtPi0_;
00264       double seleMinvMaxPi0_;
00265       double seleMinvMinPi0_;
00266       double seleS4S9Gamma_;
00267       double selePi0BeltDR_;
00268       double selePi0BeltDeta_;
00269       double selePi0Iso_;
00270       double ptMinForIsolation_; 
00271 
00273       double selePtGammaEndCap_;
00274       double selePtPi0EndCap_;
00275       double seleMinvMaxPi0EndCap_;
00276       double seleMinvMinPi0EndCap_;
00277       double seleS4S9GammaEndCap_;
00278       double selePi0IsoEndCap_;
00279       double selePi0BeltDREndCap_;
00280       double selePi0BeltDetaEndCap_;
00281       double ptMinForIsolationEndCap_; 
00282 
00284       double selePtGammaEta_;
00285       double selePtEta_;
00286       double seleS4S9GammaEta_; 
00287       double seleS9S25GammaEta_; 
00288       double seleMinvMaxEta_; 
00289       double seleMinvMinEta_; 
00290       double ptMinForIsolationEta_; 
00291       double seleEtaIso_; 
00292       double seleEtaBeltDR_; 
00293       double seleEtaBeltDeta_; 
00294 
00296       double selePtGammaEtaEndCap_;
00297       double seleS4S9GammaEtaEndCap_;
00298       double seleS9S25GammaEtaEndCap_;
00299       double selePtEtaEndCap_;
00300       double seleMinvMaxEtaEndCap_;
00301       double seleMinvMinEtaEndCap_;
00302       double ptMinForIsolationEtaEndCap_;
00303       double seleEtaIsoEndCap_;
00304       double seleEtaBeltDREndCap_;
00305       double seleEtaBeltDetaEndCap_;
00306 
00307 
00308   bool ParameterLogWeighted_;
00309   double ParameterX0_;
00310   double ParameterT0_barl_;
00311   double ParameterT0_endc_;
00312   double ParameterT0_endcPresh_;
00313   double ParameterW0_;
00314 
00315 
00316 
00317   std::vector<EBDetId> detIdEBRecHits; 
00318   std::vector<EcalRecHit> EBRecHits; 
00319  
00320   
00321   std::vector<EEDetId> detIdEERecHits; 
00322   std::vector<EcalRecHit> EERecHits; 
00323 
00324 
00325 
00327   unsigned int prescaleFactor_;
00328   
00330   std::string folderName_; 
00331  
00333   bool saveToFile_;
00334 
00336   bool isMonEBpi0_;
00337   bool isMonEBeta_;
00338   bool isMonEEpi0_;
00339   bool isMonEEeta_;
00340 
00342   std::string fileName_;
00343 };
00344 
00345 #endif
00346