File indexing completed on 2024-04-06 11:58:38
0001 #ifndef PUDumper_h
0002 #define PUDumper_h
0003
0004 #include "FWCore/Framework/interface/Frameworkfwd.h"
0005 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0006
0007 #include "FWCore/Framework/interface/Event.h"
0008 #include "FWCore/Framework/interface/MakerMacros.h"
0009 #include "FWCore/Utilities/interface/InputTag.h"
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011
0012 #include "FWCore/ServiceRegistry/interface/Service.h"
0013 #include "CommonTools/UtilAlgos/interface/TFileService.h"
0014
0015 #include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h"
0016
0017 #include "TTree.h"
0018
0019 class PUDumper : public edm::one::EDAnalyzer<> {
0020 public:
0021
0022 explicit PUDumper(const edm::ParameterSet&);
0023
0024
0025 ~PUDumper() override;
0026
0027 private:
0028
0029 void analyze(const edm::Event&, const edm::EventSetup&) override;
0030
0031 private:
0032 edm::EDGetTokenT<std::vector<PileupSummaryInfo> > pileupSummaryToken_;
0033
0034 TTree* PUTree_;
0035
0036 Int_t runNumber;
0037 Long64_t eventNumber;
0038 Int_t lumiBlock;
0039
0040 Int_t nBX;
0041 Int_t BX_[100];
0042 Int_t nPUtrue_;
0043 Int_t nPUobs_[100];
0044 };
0045
0046 #endif