PhysicsTools
PatAlgos
plugins
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
25
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
26
#include "
FWCore/Framework/interface/global/EDProducer.h
"
27
28
#include "
FWCore/Framework/interface/Event.h
"
29
#include "
FWCore/Framework/interface/MakerMacros.h
"
30
31
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
32
#include "
FWCore/Utilities/interface/InputTag.h
"
33
34
#include "
DataFormats/HeavyIonEvent/interface/HeavyIon.h
"
35
#include "
SimDataFormats/GeneratorProducts/interface/HepMCProduct.h
"
36
37
#include "HepMC/HeavyIon.h"
38
39
using namespace
std
;
40
41
//
42
// class decleration
43
//
44
45
class
PATHeavyIonProducer
:
public
edm::global::EDProducer
<> {
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_
;
57
const
edm::InputTag
centSrc_
;
58
const
edm::InputTag
evtPlaneSrc_
;
59
};
60
61
//
62
// constants, enums and typedefs
63
//
64
65
//
66
// static data member definitions
67
//
68
69
//
70
// constructors and destructor
71
//
72
PATHeavyIonProducer::PATHeavyIonProducer
(
const
edm::ParameterSet
& iConfig)
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
82
PATHeavyIonProducer::~PATHeavyIonProducer
() {
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 ------------
92
void
PATHeavyIonProducer::produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
const
{}
93
94
//define this as a plug-in
95
DEFINE_FWK_MODULE
(
PATHeavyIonProducer
);
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:372
edm
HLT enums.
Definition:
AlignableModifier.h:19
HeavyIon.h
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
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
PATHeavyIonProducer::PATHeavyIonProducer
PATHeavyIonProducer(const edm::ParameterSet &)
Definition:
PATHeavyIonProducer.cc:72
HLT_2018_cff.InputTag
InputTag
Definition:
HLT_2018_cff.py:79016
edm::ParameterSet
Definition:
ParameterSet.h:36
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
edm::EventSetup
Definition:
EventSetup.h:57
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
Generated for CMSSW Reference Manual by
1.8.16