Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:36

0001 #ifndef CALO_MCTRUTH_TREE_PRODUCER_H
0002 #define CALO_MCTRUTH_TREE_PRODUCER_H
0003 
0004 #include "TTree.h"
0005 #include "TFile.h"
0006 #include "FWCore/Framework/interface/EDAnalyzer.h"
0007 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0008 #include "DataFormats/JetReco/interface/GenJetCollection.h"
0009 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
0010 
0011 //namespace cms
0012 //{
0013 class CaloMCTruthTreeProducer : public edm::EDAnalyzer {
0014 public:
0015   explicit CaloMCTruthTreeProducer(edm::ParameterSet const& cfg);
0016   void beginJob() override;
0017   void analyze(edm::Event const& e, edm::EventSetup const& iSetup) override;
0018   void endJob() override;
0019   ~CaloMCTruthTreeProducer() override;
0020 
0021 private:
0022   std::string histogramFile_;
0023   edm::EDGetTokenT<reco::CaloJetCollection> jets_;
0024   edm::EDGetTokenT<reco::GenJetCollection> genjets_;
0025   edm::EDGetTokenT<GenEventInfoProduct> gen_;
0026   TFile* file_;
0027   TTree* mcTruthTree_;
0028   float ptJet_, emfJet_, ptGen_, ptHat_, dR_, etaJet_, etaGen_, phiJet_, phiGen_;
0029   int rank_;
0030 };
0031 //}
0032 
0033 #endif