CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/DQMOffline/EGamma/plugins/ZToMuMuGammaAnalyzer.h

Go to the documentation of this file.
00001 #ifndef ZToMuMuGammaAnalyzer_H
00002 #define ZToMuMuGammaAnalyzer_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 // DataFormats
00012 #include "DataFormats/Math/interface/deltaR.h"
00013 #include "DataFormats/Common/interface/Handle.h"
00014 #include "DataFormats/TrackReco/interface/Track.h"
00015 #include "DataFormats/TrackReco/interface/TrackExtra.h"
00016 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00017 #include "DataFormats/Common/interface/ValueMap.h"
00018 #include "DataFormats/EgammaCandidates/interface/Conversion.h"
00019 #include "DataFormats/EgammaCandidates/interface/ConversionFwd.h"
00020 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00021 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
00022 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00023 #include "DataFormats/MuonReco/interface/MuonSelectors.h"
00024 
00025 #include "DataFormats/EgammaReco/interface/BasicCluster.h"
00026 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
00027 #include "DataFormats/CaloRecHit/interface/CaloCluster.h"
00028 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
00029 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00030 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00031 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00032 #include "DataFormats/DetId/interface/DetId.h"
00033 
00034 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
00035 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
00036 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
00037 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
00038 
00040 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
00041 #include "RecoEcal/EgammaCoreTools/interface/EcalEtaPhiRegion.h"
00042 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterTools.h"
00043 
00044 #include "CommonTools/Statistics/interface/ChiSquaredProbability.h"
00045 
00046 // Geometry
00047 #include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h"
00048 #include "Geometry/CaloTopology/interface/CaloTopology.h"
00049 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00050 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00051 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00052 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00053 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00054 #include "Geometry/CaloTopology/interface/EcalEndcapTopology.h"
00055 #include "Geometry/CaloTopology/interface/EcalBarrelTopology.h"
00056 //
00057 #include "TFile.h"
00058 #include "TH1.h"
00059 #include "TH2.h"
00060 #include "TTree.h"
00061 #include "TVector3.h"
00062 #include "TProfile.h"
00063 //
00064 
00065 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00066 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00067 #include "Geometry/CaloTopology/interface/CaloTopology.h"
00068 #include "FWCore/Framework/interface/EDAnalyzer.h"
00069 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00070 #include "FWCore/Framework/interface/Event.h"
00071 #include "FWCore/Framework/interface/EventSetup.h"
00072 #include "FWCore/Framework/interface/ESHandle.h"
00073 
00074 //
00075 //DQM services
00076 #include "DQMServices/Core/interface/DQMStore.h"
00077 #include "FWCore/ServiceRegistry/interface/Service.h"
00078 #include "DQMServices/Core/interface/MonitorElement.h"
00079 
00080 
00081 
00082 #include <vector>
00083 #include <string>
00084 
00097 // forward declarations
00098 class TFile;
00099 class TH1F;
00100 class TH2F;
00101 class TProfile;
00102 class TTree;
00103 class SimVertex;
00104 class SimTrack;
00105 
00106 
00107 class ZToMuMuGammaAnalyzer  : public edm::EDAnalyzer
00108 {
00109 
00110 
00111  public:
00112    
00113   //
00114   explicit ZToMuMuGammaAnalyzer( const edm::ParameterSet& ) ;
00115   virtual ~ZToMuMuGammaAnalyzer();
00116                                    
00117   virtual void analyze( const edm::Event&, const edm::EventSetup& ) ;
00118   virtual void beginJob() ;
00119   virtual void endJob() ;
00120   virtual void endRun(const edm::Run& , const edm::EventSetup& ) ;
00121   
00122       
00123  private:
00124   std::string photonProducer_;       
00125   std::string photonCollection_;
00126   std::string barrelRecHitProducer_;
00127   std::string barrelRecHitCollection_;
00128   std::string endcapRecHitProducer_;
00129   std::string endcapRecHitCollection_;
00130   std::string muonProducer_;       
00131   std::string muonCollection_;
00132   //
00133   std::string fName_;
00134   int verbosity_;
00135   edm::InputTag triggerEvent_;
00136   bool useTriggerFiltering_;
00137   unsigned int prescaleFactor_;
00138   bool standAlone_;
00139   std::string outputFileName_;
00140   edm::ParameterSet parameters_;
00141   bool isHeavyIon_;
00142   DQMStore *dbe_;
00143   std::stringstream currentFolder_;
00144   int nEvt_;
00145   int nEntry_;
00146 
00147 
00148   // muon selection
00149   float muonMinPt_;
00150   int minPixStripHits_;
00151   float muonMaxChi2_;
00152   float muonMaxDxy_;
00153   int muonMatches_;
00154   int validPixHits_;
00155   int validMuonHits_;
00156   float muonTrackIso_;
00157   float muonTightEta_;
00158   // dimuon selection
00159   float minMumuInvMass_;
00160   float maxMumuInvMass_;
00161   // photon selection
00162   float photonMinEt_;
00163   float photonMaxEta_;
00164   float photonTrackIso_;
00165   
00166   // mu mu gamma selection
00167   float nearMuonDr_;
00168   float nearMuonHcalIso_;
00169   float farMuonEcalIso_;
00170   float farMuonTrackIso_;
00171   float farMuonMinPt_;
00172   float minMumuGammaInvMass_;
00173   float maxMumuGammaInvMass_;
00174 
00175   float mumuInvMass( const reco::Muon & m1,const reco::Muon & m2 ) ;
00176   float mumuGammaInvMass(const reco::Muon & mu1,const reco::Muon & mu2, const reco::Photon& pho );
00177   bool  basicMuonSelection (  const reco::Muon & m );
00178   bool  muonSelection (  const reco::Muon & m,  const reco::BeamSpot& bs );
00179   bool  photonSelection (  const reco::Photon & p );
00180 
00181   MonitorElement*  h1_mumuInvMass_;
00182   MonitorElement*  h1_mumuGammaInvMass_;
00183 
00184 };
00185 
00186 
00187 
00188 
00189 
00190 #endif
00191 
00192 
00193 
00194