File indexing completed on 2024-04-06 12:23:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <memory>
0021 #include <string>
0022 #include <iostream>
0023
0024
0025 #include "FWCore/Framework/interface/Frameworkfwd.h"
0026 #include "FWCore/Framework/interface/global/EDProducer.h"
0027
0028 #include "FWCore/Framework/interface/Event.h"
0029 #include "FWCore/Framework/interface/MakerMacros.h"
0030
0031 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0032 #include "FWCore/Utilities/interface/InputTag.h"
0033
0034 #include "DataFormats/HeavyIonEvent/interface/HeavyIon.h"
0035 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0036
0037 #include "HepMC/HeavyIon.h"
0038
0039 using namespace std;
0040
0041
0042
0043
0044
0045 class PATHeavyIonProducer : public edm::global::EDProducer<> {
0046 public:
0047 explicit PATHeavyIonProducer(const edm::ParameterSet&);
0048 ~PATHeavyIonProducer() override;
0049
0050 private:
0051 void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
0052
0053
0054 const bool doMC_;
0055 const bool doReco_;
0056 const std::vector<std::string> hepmcSrc_;
0057 const edm::InputTag centSrc_;
0058 const edm::InputTag evtPlaneSrc_;
0059 };
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072 PATHeavyIonProducer::PATHeavyIonProducer(const edm::ParameterSet& iConfig)
0073 : doMC_(iConfig.getParameter<bool>("doMC")),
0074 doReco_(iConfig.getParameter<bool>("doReco")),
0075 hepmcSrc_(doMC_ ? iConfig.getParameter<std::vector<std::string> >("generators") : std::vector<std::string>()),
0076 centSrc_(doReco_ ? iConfig.getParameter<edm::InputTag>("centrality") : edm::InputTag()),
0077 evtPlaneSrc_(doReco_ ? iConfig.getParameter<edm::InputTag>("evtPlane") : edm::InputTag()) {
0078
0079 produces<pat::HeavyIon>();
0080 }
0081
0082 PATHeavyIonProducer::~PATHeavyIonProducer() {
0083
0084
0085 }
0086
0087
0088
0089
0090
0091
0092 void PATHeavyIonProducer::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {}
0093
0094
0095 DEFINE_FWK_MODULE(PATHeavyIonProducer);