RecoRomanPot
RecoFP420
plugins
TrackerizerFP420.cc
Go to the documentation of this file.
1
// File: TrackerizerFP420.cc
3
// Date: 12.2006
4
// Description: TrackerizerFP420 for FP420
5
// Modifications:
7
#include <memory>
8
#include <string>
9
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
10
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
11
#include "
FWCore/Framework/interface/Event.h
"
12
#include "
FWCore/Framework/interface/MakerMacros.h
"
13
#include "
FWCore/Framework/interface/EventSetup.h
"
14
#include "
FWCore/Framework/interface/ESHandle.h
"
15
16
#include "
RecoRomanPot/RecoFP420/interface/TrackerizerFP420.h
"
17
#include "
DataFormats/FP420Cluster/interface/ClusterCollectionFP420.h
"
18
#include "
DataFormats/FP420Cluster/interface/TrackCollectionFP420.h
"
19
20
#include <iostream>
21
using namespace
std
;
22
23
//
24
namespace
cms
{
25
TrackerizerFP420::TrackerizerFP420(
const
edm::ParameterSet
& conf) : sFP420TrackMain_(conf) {
26
std::string
alias
(conf.
getParameter
<
std::string
>(
"@module_label"
));
27
28
produces<TrackCollectionFP420>().setBranchAlias(
alias
);
29
30
trackerContainers
.clear();
31
trackerContainers
= conf.
getParameter
<std::vector<std::string> >(
"ROUList"
);
32
33
verbosity
= conf.
getUntrackedParameter
<
int
>(
"VerbosityLevel"
);
34
if
(
verbosity
> 0) {
35
std::cout
<<
"Creating a TrackerizerFP420"
<< std::endl;
36
}
37
}
38
39
void
TrackerizerFP420::produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
const
{
40
// beginJob;
41
// be lazy and include the appropriate namespaces
42
using namespace
edm
;
43
using namespace
std
;
44
45
// Get input
46
//A
47
// edm::Handle<ClusterCollectionFP420> icf_simhit;
48
/*
49
Handle<ClusterCollectionFP420> cf_simhit;
50
std::vector<const ClusterCollectionFP420 *> cf_simhitvec;
51
for(uint32_t i = 0; i< trackerContainers.size();i++){
52
iEvent.getByLabel( trackerContainers[i], cf_simhit);
53
cf_simhitvec.push_back(cf_simhit.product()); }
54
std::unique_ptr<ClusterCollectionFP420 > input(new DigiCollectionFP420(cf_simhitvec));
55
*/
56
57
//B
58
59
Handle<ClusterCollectionFP420>
input
;
60
iEvent
.getByLabel(
trackerContainers
[0],
input
);
61
62
// Step C: create empty output collection
63
auto
toutput = std::make_unique<TrackCollectionFP420>();
64
65
// put zero to container info from the beginning (important! because not any detID is updated with coming of new event !!!!!!
66
// clean info of container from previous event
67
68
std::vector<TrackFP420> collector;
69
collector.clear();
70
TrackCollectionFP420::Range
inputRange
;
71
inputRange
.first = collector.begin();
72
inputRange
.second = collector.end();
73
74
unsigned
int
detID = 0;
75
toutput->putclear(
inputRange
, detID);
76
77
unsigned
int
StID = 1111;
78
toutput->putclear(
inputRange
, StID);
79
StID = 2222;
80
toutput->putclear(
inputRange
, StID);
81
82
// !!!!!!
83
// if we want to keep Track container/Collection for one event ---> uncomment the line below and vice versa
84
toutput->clear();
//container_.clear() --> start from the beginning of the container
85
86
// RUN now: !!!!!!
87
// startFP420TrackMain_.run(input, toutput);
88
sFP420TrackMain_
.
run
(
input
, toutput.get());
89
// std::cout <<"======= TrackerizerFP420: end of produce " << std::endl;
90
91
// Step D: write output to file
92
iEvent
.put(
std::move
(toutput));
93
}
//produce
94
95
}
// namespace cms
ClusterCollectionFP420.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::StreamID
Definition:
StreamID.h:30
Event.h
MakerMacros.h
edm::Handle
Definition:
AssociativeIterator.h:50
EventSetup.h
SiStripOfflineCRack_cfg.alias
alias
Definition:
SiStripOfflineCRack_cfg.py:128
std
Definition:
JetResolutionObject.h:76
TrackCollectionFP420::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition:
TrackCollectionFP420.h:12
Frameworkfwd.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
input
static std::string const input
Definition:
EdmProvDump.cc:47
ParameterSet.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
cms::TrackerizerFP420::trackerContainers
vstring trackerContainers
Definition:
TrackerizerFP420.h:36
FP420TrackMain::run
void run(edm::Handle< ClusterCollectionFP420 > &input, TrackCollectionFP420 *toutput) const
Runs the algorithm.
Definition:
FP420TrackMain.cc:152
iEvent
int iEvent
Definition:
GenABIO.cc:224
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:59
TrackCollectionFP420.h
cms::TrackerizerFP420::produce
void produce(edm::StreamID, edm::Event &e, const edm::EventSetup &c) const override
Definition:
TrackerizerFP420.cc:39
cms
Namespace of DDCMS conversion namespace.
Definition:
ProducerAnalyzer.cc:41
cms::TrackerizerFP420::sFP420TrackMain_
const FP420TrackMain sFP420TrackMain_
Definition:
TrackerizerFP420.h:38
cms::TrackerizerFP420::verbosity
int verbosity
Definition:
TrackerizerFP420.h:41
edm
HLT enums.
Definition:
AlignableModifier.h:19
pileupCalc.inputRange
inputRange
Definition:
pileupCalc.py:168
edm::ParameterSet
Definition:
ParameterSet.h:47
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
edm::Event
Definition:
Event.h:73
eostools.move
def move(src, dest)
Definition:
eostools.py:511
TrackerizerFP420.h
Generated for CMSSW Reference Manual by
1.8.14