Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
L1Trigger
VertexFinder
plugins
InputDataProducer.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: L1Trigger/VertexFinder
4
// Class: InputDataProducer
5
//
13
//
14
// Original Author: Alexx Perloff
15
// Created: Fri, 05 Feb 2021 23:42:17 GMT
16
//
17
//
18
19
// system include files
20
#include <memory>
21
#include <vector>
22
23
// user include files
24
#include "
DataFormats/L1TrackTrigger/interface/TTTypes.h
"
25
#include "
DataFormats/HepMCCandidate/interface/GenParticle.h
"
26
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
27
#include "
FWCore/Framework/interface/global/EDProducer.h
"
28
#include "
FWCore/Framework/interface/Event.h
"
29
#include "
FWCore/Framework/interface/MakerMacros.h
"
30
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
31
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
32
#include "
FWCore/Utilities/interface/InputTag.h
"
33
#include "
FWCore/Utilities/interface/StreamID.h
"
34
#include "
L1Trigger/VertexFinder/interface/AnalysisSettings.h
"
35
#include "
L1Trigger/VertexFinder/interface/InputData.h
"
36
#include "
SimDataFormats/GeneratorProducts/interface/HepMCProduct.h
"
37
#include "
SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h
"
38
#include "
SimTracker/TrackTriggerAssociation/interface/TTClusterAssociationMap.h
"
39
#include "
SimTracker/TrackTriggerAssociation/interface/TTStubAssociationMap.h
"
40
41
//
42
// class declaration
43
//
44
45
class
InputDataProducer
:
public
edm::global::EDProducer
<> {
46
public
:
47
explicit
InputDataProducer
(
const
edm::ParameterSet
&);
48
~InputDataProducer
()
override
;
49
50
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
51
52
private
:
53
void
produce
(
edm::StreamID
,
edm::Event
&,
const
edm::EventSetup
&)
const override
;
54
55
// ----------constants, enums and typedefs ---------
56
typedef
edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>
>
DetSetVec
;
57
58
// ----------member data ---------------------------
59
const
std::string
outputCollectionName_
;
60
l1tVertexFinder::AnalysisSettings
settings_
;
61
const
edm::EDGetTokenT<edm::HepMCProduct>
hepMCToken_
;
62
const
edm::EDGetTokenT<edm::View<reco::GenParticle>
>
genParticlesToken_
;
63
const
edm::EDGetTokenT<edm::View<TrackingParticle>
>
tpToken_
;
64
const
edm::EDGetTokenT<edm::ValueMap<l1tVertexFinder::TP>
>
tpValueMapToken_
;
65
const
edm::EDGetTokenT<DetSetVec>
stubToken_
;
66
const
edm::EDGetTokenT<edm::ValueMap<l1tVertexFinder::Stub>
>
stubValueMapToken_
;
67
const
edm::ESGetToken<TrackerTopology, TrackerTopologyRcd>
tTopoToken_
;
68
const
edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord>
tGeomToken_
;
69
};
70
71
//
72
// constructors and destructor
73
//
74
InputDataProducer::InputDataProducer
(
const
edm::ParameterSet
&
iConfig
)
75
: outputCollectionName_(iConfig.getParameter<std::
string
>(
"outputCollectionName"
)),
76
settings_(iConfig),
77
hepMCToken_(consumes<edm::
HepMCProduct
>(iConfig.getParameter<edm::
InputTag
>(
"hepMCInputTag"
))),
78
genParticlesToken_(
79
consumes<edm::
View
<
reco
::
GenParticle
>>(iConfig.getParameter<edm::
InputTag
>(
"genParticleInputTag"
))),
80
tpToken_(consumes<edm::
View
<
TrackingParticle
>>(iConfig.getParameter<edm::
InputTag
>(
"tpInputTag"
))),
81
tpValueMapToken_(
82
consumes<edm::ValueMap<l1tVertexFinder::
TP
>>(iConfig.getParameter<edm::
InputTag
>(
"tpValueMapInputTag"
))),
83
stubToken_(consumes<
DetSetVec
>(iConfig.getParameter<edm::
InputTag
>(
"stubInputTag"
))),
84
tTopoToken_
(
esConsumes
<
TrackerTopology
,
TrackerTopologyRcd
>(edm::
ESInputTag
(
""
,
""
))),
85
tGeomToken_(
esConsumes
<
TrackerGeometry
,
TrackerDigiGeometryRecord
>(edm::
ESInputTag
(
""
,
""
))) {
86
// Define EDM output to be written to file (if required)
87
produces<l1tVertexFinder::InputData>(
outputCollectionName_
);
88
89
//now do what ever other initialization is needed
90
}
91
92
InputDataProducer::~InputDataProducer
() {}
93
94
//
95
// member functions
96
//
97
98
// ------------ method called to produce the data ------------
99
void
InputDataProducer::produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
const
{
100
std::unique_ptr<l1tVertexFinder::InputData> product = std::make_unique<l1tVertexFinder::InputData>(
iEvent
,
101
iSetup,
102
settings_
,
103
hepMCToken_
,
104
genParticlesToken_
,
105
tpToken_
,
106
tpValueMapToken_
,
107
stubToken_
,
108
tTopoToken_
,
109
tGeomToken_
);
110
111
iEvent.put(
std::move
(product),
outputCollectionName_
);
112
}
113
114
// ------------ method fills 'descriptions' with the allowed parameters for the module ------------
115
void
InputDataProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
116
//The following says we do not know what parameters are allowed so do no validation
117
// Please change this to state exactly what you do use, even if it is no parameters
118
edm::ParameterSetDescription
desc
;
119
desc.
setUnknown
();
120
descriptions.
addDefault
(desc);
121
}
122
123
//define this as a plug-in
124
DEFINE_FWK_MODULE
(
InputDataProducer
);
l1tVertexFinder::AnalysisSettings
Definition:
AnalysisSettings.h:15
GenParticle.GenParticle
GenParticle
Definition:
GenParticle.py:18
TrackerTopologyRcd
Definition:
TrackerTopologyRcd.h:10
EDProducer.h
InputDataProducer::genParticlesToken_
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticlesToken_
Definition:
InputDataProducer.cc:62
InputDataProducer::~InputDataProducer
~InputDataProducer() override
Definition:
InputDataProducer.cc:92
MessageLogger.h
InputDataProducer
Definition:
InputDataProducer.cc:45
GenParticle.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
InputDataProducer::tGeomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken_
Definition:
InputDataProducer.cc:68
edm::StreamID
Definition:
StreamID.h:30
Event.h
InputDataProducer::InputDataProducer
InputDataProducer(const edm::ParameterSet &)
Definition:
InputDataProducer.cc:74
TrackerTopology
Definition:
TrackerTopology.h:16
MakerMacros.h
TrackingParticle.h
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:111
InputDataProducer::tTopoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition:
InputDataProducer.cc:67
edm::EDGetTokenT< edm::HepMCProduct >
Frameworkfwd.h
InputDataProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition:
InputDataProducer.cc:99
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ParameterSet.h
InputData.h
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
InputDataProducer::settings_
l1tVertexFinder::AnalysisSettings settings_
Definition:
InputDataProducer.cc:60
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:99
TTTypes.h
TTClusterAssociationMap.h
InputDataProducer::hepMCToken_
const edm::EDGetTokenT< edm::HepMCProduct > hepMCToken_
Definition:
InputDataProducer.cc:61
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
eostools.move
def move
Definition:
eostools.py:511
InputDataProducer::tpValueMapToken_
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::TP > > tpValueMapToken_
Definition:
InputDataProducer.cc:64
HepMCProduct
edmNew::DetSetVector
Definition:
DetSetNew.h:13
StreamID.h
edm::EventSetup
Definition:
EventSetup.h:59
edm::global::EDProducer
Definition:
EDProducer.h:32
InputDataProducer::stubValueMapToken_
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::Stub > > stubValueMapToken_
Definition:
InputDataProducer.cc:66
HepMCProduct.h
InputDataProducer::stubToken_
const edm::EDGetTokenT< DetSetVec > stubToken_
Definition:
InputDataProducer.cc:65
AnalysisSettings.h
TTStubAssociationMap.h
HLT_FULL_cff.InputTag
tuple InputTag
Definition:
HLT_FULL_cff.py:86956
DigiToRawDM_cff.TP
string TP
Definition:
DigiToRawDM_cff.py:51
InputTag.h
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition:
TrackingParticle.h:29
edm::ParameterSetDescription::setUnknown
void setUnknown()
Definition:
ParameterSetDescription.cc:39
edm::ParameterSet
Definition:
ParameterSet.h:47
InputDataProducer::tpToken_
const edm::EDGetTokenT< edm::View< TrackingParticle > > tpToken_
Definition:
InputDataProducer.cc:63
InputDataProducer::DetSetVec
edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > DetSetVec
Definition:
InputDataProducer.cc:56
InputDataProducer::outputCollectionName_
const std::string outputCollectionName_
Definition:
InputDataProducer.cc:59
edm::Event
Definition:
Event.h:73
TrackerDigiGeometryRecord
Definition:
TrackerDigiGeometryRecord.h:16
InputDataProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
InputDataProducer.cc:115
iConfig
iConfig
Definition:
TSGFromPropagation.cc:56
TrackerGeometry
Definition:
TrackerGeometry.h:14
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition:
DeDxTools.cc:283
ESInputTag
sistrip::View
View
Definition:
ConstantsForView.h:26
tTopoToken_
tTopoToken_
Definition:
SiStripOfflineDQM.cc:62
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
Generated for CMSSW Reference Manual by
1.8.5