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
PATHeavyIonProducer::hepmcSrc_
const std::vector< std::string > hepmcSrc_
Definition: PATHeavyIonProducer.cc:56
PATHeavyIonProducer::evtPlaneSrc_
const edm::InputTag evtPlaneSrc_
Definition: PATHeavyIonProducer.cc:58
edm::StreamID
Definition: StreamID.h:30
electrons_cff.bool
bool
Definition: electrons_cff.py:366
edm
HLT enums.
Definition: AlignableModifier.h:19
HeavyIon.h
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
PATHeavyIonProducer
Definition: PATHeavyIonProducer.cc:45
edm::global::EDProducer
Definition: EDProducer.h:32
PATHeavyIonProducer::PATHeavyIonProducer
PATHeavyIonProducer(const edm::ParameterSet &)
Definition: PATHeavyIonProducer.cc:72
edm::ParameterSet
Definition: ParameterSet.h:47
PATHeavyIonProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: PATHeavyIonProducer.cc:92
PATHeavyIonProducer::doMC_
const bool doMC_
Definition: PATHeavyIonProducer.cc:54
Event.h
PATHeavyIonProducer::doReco_
const bool doReco_
Definition: PATHeavyIonProducer.cc:55
iEvent
int iEvent
Definition: GenABIO.cc:224
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::EventSetup
Definition: EventSetup.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
InputTag.h
PATHeavyIonProducer::~PATHeavyIonProducer
~PATHeavyIonProducer() override
Definition: PATHeavyIonProducer.cc:82
std
Definition: JetResolutionObject.h:76
Frameworkfwd.h
PATHeavyIonProducer::centSrc_
const edm::InputTag centSrc_
Definition: PATHeavyIonProducer.cc:57
ParameterSet.h
HepMCProduct.h
EDProducer.h
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15