CMS 3D CMS Logo

PATHeavyIonProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: PATHeavyIonProducer
4 // Class: PATHeavyIonProducer
5 //
13 //
14 // Original Author: Yetkin Yilmaz
15 // Created: Thu Aug 13 08:39:51 EDT 2009
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 #include <string>
22 #include <iostream>
23 
24 // user include files
27 
30 
33 
36 
37 #include "HepMC/HeavyIon.h"
38 
39 using namespace std;
40 
41 //
42 // class decleration
43 //
44 
46 public:
47  explicit PATHeavyIonProducer(const edm::ParameterSet&);
48  ~PATHeavyIonProducer() override;
49 
50 private:
51  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
52  // ----------member data ---------------------------
53 
54  const bool doMC_;
55  const bool doReco_;
56  const std::vector<std::string> hepmcSrc_;
59 };
60 
61 //
62 // constants, enums and typedefs
63 //
64 
65 //
66 // static data member definitions
67 //
68 
69 //
70 // constructors and destructor
71 //
73  : doMC_(iConfig.getParameter<bool>("doMC")),
74  doReco_(iConfig.getParameter<bool>("doReco")),
75  hepmcSrc_(doMC_ ? iConfig.getParameter<std::vector<std::string> >("generators") : std::vector<std::string>()),
76  centSrc_(doReco_ ? iConfig.getParameter<edm::InputTag>("centrality") : edm::InputTag()),
77  evtPlaneSrc_(doReco_ ? iConfig.getParameter<edm::InputTag>("evtPlane") : edm::InputTag()) {
78  //register your products
79  produces<pat::HeavyIon>();
80 }
81 
83  // do anything here that needs to be done at desctruction time
84  // (e.g. close files, deallocate resources etc.)
85 }
86 
87 //
88 // member functions
89 //
90 
91 // ------------ method called to produce the data ------------
93 
94 //define this as a plug-in
const edm::InputTag centSrc_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
int iEvent
Definition: GenABIO.cc:224
PATHeavyIonProducer(const edm::ParameterSet &)
const std::vector< std::string > hepmcSrc_
HLT enums.
const edm::InputTag evtPlaneSrc_