Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:33:03

0001 #ifndef PhotonValidatorMiniAOD_H
0002 #define PhotonValidatorMiniAOD_H
0003 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "FWCore/Framework/interface/ESHandle.h"
0007 #include "DataFormats/PatCandidates/interface/Photon.h"
0008 //#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
0009 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
0010 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0011 #include "DataFormats/JetReco/interface/GenJetCollection.h"
0012 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0013 #include "DataFormats/Common/interface/ValueMap.h"
0014 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0015 //
0016 //DQM services
0017 #include "DQMServices/Core/interface/DQMStore.h"
0018 #include "FWCore/ServiceRegistry/interface/Service.h"
0019 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0020 
0021 //
0022 #include <map>
0023 #include <vector>
0024 #include <memory>
0025 /** \class PhotonValidatorMiniAOD
0026  **
0027  **
0028  **  $Id: PhotonValidatorMiniAOD
0029  **  \author Nancy Marinelli, U. of Notre Dame, US
0030  **
0031  ***/
0032 
0033 // forward declarations
0034 namespace edm {
0035   class HepMCProduct;
0036 }
0037 class TFile;
0038 class TH1F;
0039 class TH2F;
0040 class TProfile;
0041 class TTree;
0042 class SimVertex;
0043 class SimTrack;
0044 
0045 class PhotonValidatorMiniAOD : public DQMEDAnalyzer {
0046 public:
0047   //
0048   explicit PhotonValidatorMiniAOD(const edm::ParameterSet&);
0049   ~PhotonValidatorMiniAOD() override;
0050 
0051   void analyze(const edm::Event&, const edm::EventSetup&) override;
0052   //  virtual void beginJob();
0053   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0054 
0055 private:
0056   std::string outputFileName_;
0057   edm::EDGetTokenT<edm::View<pat::Photon> > photonToken_;
0058   edm::EDGetTokenT<reco::GenParticleCollection> genpartToken_;
0059 
0060   std::string fName_;
0061 
0062   //  edm::ESHandle<MagneticField> theMF_;
0063   edm::ParameterSet parameters_;
0064   int verbosity_;
0065 
0066   MonitorElement* h_scEta_[2];
0067   MonitorElement* h_scPhi_[2];
0068 
0069   MonitorElement* h_r9_[3][3];
0070   MonitorElement* h_full5x5_r9_[3][3];
0071   MonitorElement* h_sigmaIetaIeta_[3][3];
0072   MonitorElement* h_full5x5_sigmaIetaIeta_[3][3];
0073   MonitorElement* h_r1_[3][3];
0074   MonitorElement* h_r2_[3][3];
0075   MonitorElement* h_hOverE_[3][3];
0076   MonitorElement* h_newhOverE_[3][3];
0077   MonitorElement* h_ecalRecHitSumEtConeDR04_[3][3];
0078   MonitorElement* h_hcalTowerSumEtConeDR04_[3][3];
0079   MonitorElement* h_hcalTowerBcSumEtConeDR04_[3][3];
0080   MonitorElement* h_isoTrkSolidConeDR04_[3][3];
0081   MonitorElement* h_nTrkSolidConeDR04_[3][3];
0082 
0083   MonitorElement* h_phoE_[2][3];
0084   MonitorElement* h_phoEt_[2][3];
0085   MonitorElement* h_phoERes_[3][3];
0086   MonitorElement* h_phoSigmaEoE_[3][3];
0087 
0088   // Information from Particle Flow
0089   // Isolation
0090   MonitorElement* h_chHadIso_[3];
0091   MonitorElement* h_nHadIso_[3];
0092   MonitorElement* h_phoIso_[3];
0093 
0094   class sortPhotons {
0095   public:
0096     bool operator()(const pat::PhotonRef& lhs, const pat::PhotonRef& rhs) { return lhs->et() > rhs->et(); }
0097   };
0098 };
0099 
0100 #endif