CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DQM/HLTEvF/interface/HLTAlCaMonPi0.h

Go to the documentation of this file.
00001 #ifndef HLTAlCaMonPi0_H
00002 #define HLTAlCaMonPi0_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 typedef std::map<DetId, EcalRecHit> RecHitsMap;
00025 // Less than operator for sorting EcalRecHits according to energy.
00026 class ecalRecHitLess : public std::binary_function<EcalRecHit, EcalRecHit, bool> 
00027 {
00028 public:
00029   bool operator()(EcalRecHit x, EcalRecHit y) 
00030   { 
00031     return (x.energy() > y.energy()); 
00032   }
00033 };
00034 
00035 
00036 
00037 
00038 class DQMStore;
00039 class MonitorElement;
00040 
00041 class HLTAlCaMonPi0 : public edm::EDAnalyzer {
00042 
00043 public:
00044 
00045   HLTAlCaMonPi0( const edm::ParameterSet& );
00046   ~HLTAlCaMonPi0();
00047 
00048 protected:
00049    
00050   void beginJob();
00051 
00052   void beginRun(const edm::Run& r, const edm::EventSetup& c);
00053 
00054   void analyze(const edm::Event& e, const edm::EventSetup& c) ;
00055 
00056   void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00057                             const edm::EventSetup& context) ;
00058 
00059   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 
00060                           const edm::EventSetup& c);
00061 
00062   void endRun(const edm::Run& r, const edm::EventSetup& c);
00063 
00064   void endJob();
00065 
00066   void convxtalid(int & , int &);
00067   int diff_neta_s(int,int);
00068   int diff_nphi_s(int,int);
00069 
00070 
00071 
00072 private:
00073  
00074 
00075   DQMStore*   dbe_;  
00076   int eventCounter_;      
00077   PositionCalc posCalculator_ ;                     
00078 
00080   MonitorElement * hiPhiDistrEBpi0_;
00081 
00083   MonitorElement * hiXDistrEEpi0_;
00084 
00086   MonitorElement * hiPhiDistrEBeta_;
00087 
00089   MonitorElement * hiXDistrEEeta_;
00090 
00092   MonitorElement * hiEtaDistrEBpi0_;
00093 
00095   MonitorElement * hiYDistrEEpi0_;
00096 
00098   MonitorElement * hiEtaDistrEBeta_;
00099 
00101   MonitorElement * hiYDistrEEeta_;
00102 
00104   MonitorElement * hRechitEnergyEBpi0_;
00105 
00107   MonitorElement * hRechitEnergyEEpi0_;
00108 
00110   MonitorElement * hRechitEnergyEBeta_;
00111 
00113   MonitorElement * hRechitEnergyEEeta_;
00114 
00116   MonitorElement * hEventEnergyEBpi0_;
00117 
00119   MonitorElement * hEventEnergyEEpi0_;
00120   
00122   MonitorElement * hEventEnergyEBeta_;
00123 
00125   MonitorElement * hEventEnergyEEeta_;
00126   
00128   MonitorElement * hNRecHitsEBpi0_;
00129 
00131   MonitorElement * hNRecHitsEEpi0_;
00132 
00134   MonitorElement * hNRecHitsEBeta_;
00135 
00137   MonitorElement * hNRecHitsEEeta_;
00138 
00140   MonitorElement * hMeanRecHitEnergyEBpi0_;
00141 
00143   MonitorElement * hMeanRecHitEnergyEEpi0_;
00144 
00146   MonitorElement * hMeanRecHitEnergyEBeta_;
00147 
00149   MonitorElement * hMeanRecHitEnergyEEeta_;
00150 
00152   MonitorElement * hMinvPi0EB_;
00153 
00155   MonitorElement * hMinvPi0EE_;
00156 
00158   MonitorElement * hMinvEtaEB_;
00159 
00161   MonitorElement * hMinvEtaEE_;
00162 
00164   MonitorElement *hPt1Pi0EB_;
00165 
00167   MonitorElement *hPt1Pi0EE_;
00168 
00170   MonitorElement *hPt1EtaEB_;
00171 
00173   MonitorElement *hPt1EtaEE_;
00174 
00175   
00177   MonitorElement *hPt2Pi0EB_;
00178 
00180   MonitorElement *hPt2Pi0EE_;
00181 
00183   MonitorElement *hPt2EtaEB_;
00184 
00186   MonitorElement *hPt2EtaEE_;
00187 
00188   
00190   MonitorElement * hPtPi0EB_;
00191 
00193   MonitorElement * hPtPi0EE_;
00194 
00196   MonitorElement * hPtEtaEB_;
00197 
00199   MonitorElement * hPtEtaEE_;
00200 
00202   MonitorElement * hIsoPi0EB_;
00203 
00205   MonitorElement * hIsoPi0EE_;
00206 
00208   MonitorElement * hIsoEtaEB_;
00209 
00211   MonitorElement * hIsoEtaEE_;
00212 
00214   MonitorElement * hS4S91Pi0EB_;
00215 
00217   MonitorElement * hS4S91Pi0EE_;
00218 
00220   MonitorElement * hS4S91EtaEB_;
00221 
00223   MonitorElement * hS4S91EtaEE_;
00224 
00226   MonitorElement * hS4S92Pi0EB_;
00227   
00229   MonitorElement * hS4S92Pi0EE_;
00230   
00232   MonitorElement * hS4S92EtaEB_;
00233   
00235   MonitorElement * hS4S92EtaEE_;
00236   
00237 
00238 
00239 
00241   edm::InputTag productMonitoredEBpi0_;
00242   edm::InputTag productMonitoredEBeta_;
00243 
00245   edm::InputTag productMonitoredEEpi0_;
00246   edm::InputTag productMonitoredEEeta_;
00247 
00248       int gammaCandEtaSize_;
00249       int gammaCandPhiSize_;
00250 
00251       double seleXtalMinEnergy_;
00252       double seleXtalMinEnergyEndCap_;
00253 
00254   double clusSeedThr_;
00255   int clusEtaSize_;
00256   int clusPhiSize_;
00257 
00258   double clusSeedThrEndCap_;
00259 
00261       double selePtGamma_;
00262       double selePtPi0_;
00263       double seleMinvMaxPi0_;
00264       double seleMinvMinPi0_;
00265       double seleS4S9Gamma_;
00266       double selePi0BeltDR_;
00267       double selePi0BeltDeta_;
00268       double selePi0Iso_;
00269       double ptMinForIsolation_; 
00270 
00272       double selePtGammaEndCap_;
00273       double selePtPi0EndCap_;
00274       double seleMinvMaxPi0EndCap_;
00275       double seleMinvMinPi0EndCap_;
00276       double seleS4S9GammaEndCap_;
00277       double selePi0IsoEndCap_;
00278       double selePi0BeltDREndCap_;
00279       double selePi0BeltDetaEndCap_;
00280       double ptMinForIsolationEndCap_; 
00281 
00283       double selePtGammaEta_;
00284       double selePtEta_;
00285       double seleS4S9GammaEta_; 
00286       double seleS9S25GammaEta_; 
00287       double seleMinvMaxEta_; 
00288       double seleMinvMinEta_; 
00289       double ptMinForIsolationEta_; 
00290       double seleEtaIso_; 
00291       double seleEtaBeltDR_; 
00292       double seleEtaBeltDeta_; 
00293 
00295       double selePtGammaEtaEndCap_;
00296       double seleS4S9GammaEtaEndCap_;
00297       double seleS9S25GammaEtaEndCap_;
00298       double selePtEtaEndCap_;
00299       double seleMinvMaxEtaEndCap_;
00300       double seleMinvMinEtaEndCap_;
00301       double ptMinForIsolationEtaEndCap_;
00302       double seleEtaIsoEndCap_;
00303       double seleEtaBeltDREndCap_;
00304       double seleEtaBeltDetaEndCap_;
00305 
00306 
00307   bool ParameterLogWeighted_;
00308   double ParameterX0_;
00309   double ParameterT0_barl_;
00310   double ParameterT0_endc_;
00311   double ParameterT0_endcPresh_;
00312   double ParameterW0_;
00313 
00314 
00315 
00316   std::vector<EBDetId> detIdEBRecHits; 
00317   std::vector<EcalRecHit> EBRecHits; 
00318  
00319   
00320   std::vector<EEDetId> detIdEERecHits; 
00321   std::vector<EcalRecHit> EERecHits; 
00322 
00323 
00324 
00326   unsigned int prescaleFactor_;
00327   
00329   std::string folderName_; 
00330  
00332   bool saveToFile_;
00333 
00335   bool isMonEBpi0_;
00336   bool isMonEBeta_;
00337   bool isMonEEpi0_;
00338   bool isMonEEeta_;
00339 
00341   std::string fileName_;
00342 };
00343 
00344 #endif
00345