CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DQMOffline/EGamma/plugins/PiZeroAnalyzer.h

Go to the documentation of this file.
00001 #ifndef PiZeroAnalyzer_H
00002 #define PiZeroAnalyzer_H
00003 
00004 #include "FWCore/ServiceRegistry/interface/Service.h"
00005 #include "CommonTools/UtilAlgos/interface/TFileService.h"
00006 //
00007 #include "FWCore/Framework/interface/Frameworkfwd.h"
00008 #include "FWCore/Framework/interface/MakerMacros.h"
00009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00010 #include "FWCore/Utilities/interface/Exception.h"
00011 
00012 // DataFormats
00013 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00014 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00015 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00016 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
00017 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
00018 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
00020 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
00021 #include "RecoEcal/EgammaCoreTools/interface/EcalEtaPhiRegion.h"
00022 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterTools.h"
00023 // Geometry
00024 #include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h"
00025 #include "Geometry/CaloTopology/interface/CaloTopology.h"
00026 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00027 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00028 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00029 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00030 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00031 #include "Geometry/CaloTopology/interface/EcalEndcapTopology.h"
00032 #include "Geometry/CaloTopology/interface/EcalBarrelTopology.h"
00033 //
00034 #include "TFile.h"
00035 #include "TH1.h"
00036 #include "TH2.h"
00037 #include "TTree.h"
00038 #include "TVector3.h"
00039 #include "TProfile.h"
00040 //
00041 
00042 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00043 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00044 #include "Geometry/CaloTopology/interface/CaloTopology.h"
00045 #include "FWCore/Framework/interface/EDAnalyzer.h"
00046 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00047 #include "FWCore/Framework/interface/Event.h"
00048 #include "FWCore/Framework/interface/EventSetup.h"
00049 #include "FWCore/Framework/interface/ESHandle.h"
00050 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00051 //
00052 //DQM services
00053 #include "DQMServices/Core/interface/DQMStore.h"
00054 #include "FWCore/ServiceRegistry/interface/Service.h"
00055 #include "DQMServices/Core/interface/MonitorElement.h"
00056 
00057 //
00058 #include <map>
00059 #include <vector>
00060 
00073 // forward declarations
00074 class TFile;
00075 class TH1F;
00076 class TH2F;
00077 class TProfile;
00078 class TTree;
00079 class SimVertex;
00080 class SimTrack;
00081 
00082 
00083 class PiZeroAnalyzer : public edm::EDAnalyzer
00084 {
00085 
00086  public:
00087    
00088   //
00089   explicit PiZeroAnalyzer( const edm::ParameterSet& ) ;
00090   virtual ~PiZeroAnalyzer();
00091                                    
00092       
00093   virtual void analyze( const edm::Event&, const edm::EventSetup& ) ;
00094   virtual void beginJob() ;
00095   virtual void endJob() ;
00096  
00097  private:
00098   //
00099 
00100   void makePizero(const edm::EventSetup& es, const edm::Handle<EcalRecHitCollection> eb, const edm::Handle<EcalRecHitCollection> ee ); 
00101 
00102   std::string fName_;
00103   DQMStore *dbe_;
00104   int verbosity_;
00105 
00106   int nEvt_;
00107   int nEntry_;
00108 
00109   unsigned int prescaleFactor_;
00110 
00111 
00112   edm::ParameterSet parameters_;
00113 
00114   edm::InputTag barrelEcalHits_;
00115   edm::InputTag endcapEcalHits_;  
00116 
00117 
00118 
00119   double minPhoEtCut_;
00120 
00121   double cutStep_;
00122   int numberOfSteps_;
00123 
00124 
00125 
00126   bool standAlone_;
00127 
00128 
00129 
00131   double clusSeedThr_;
00132   int clusEtaSize_;
00133   int clusPhiSize_;
00134 
00135   double seleXtalMinEnergy_;
00136 
00137   bool ParameterLogWeighted_;
00138   double ParameterX0_;
00139   double ParameterT0_barl_;
00140   double ParameterW0_;
00141 
00142   double selePtGammaOne_;
00143   double selePtGammaTwo_;
00144   double selePtPi0_;
00145   double seleS4S9GammaOne_;
00146   double seleS4S9GammaTwo_;
00147   double selePi0BeltDR_;
00148   double selePi0BeltDeta_;
00149   double selePi0Iso_;
00150   double seleMinvMaxPi0_;
00151   double seleMinvMinPi0_;
00152  
00153 
00154 
00155   std::stringstream currentFolder_;
00156    
00157 
00158   MonitorElement*  hMinvPi0EB_;
00159   MonitorElement*  hPt1Pi0EB_;
00160   MonitorElement*  hPt2Pi0EB_;
00161   MonitorElement*  hIsoPi0EB_;
00162   MonitorElement*  hPtPi0EB_;
00163 
00164 
00165   
00166 
00167 
00168 };
00169 
00170 
00171 class ecalRecHitLess : public std::binary_function<EcalRecHit, EcalRecHit, bool> 
00172 {
00173 public:
00174   bool operator()(EcalRecHit x, EcalRecHit y) 
00175   { 
00176     return (x.energy() > y.energy()); 
00177   }
00178 };
00179 
00180 
00181 #endif
00182 
00183 
00184 
00185