CMS 3D CMS Logo

L1TMuonBarrelKalmanTrackProducer.cc
Go to the documentation of this file.
1 #include <memory>
4 
7 
10 
15 
16 //
17 // class declaration
18 //
19 
21 public:
24 
25  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
26 
27 private:
28  void beginStream(edm::StreamID) override;
29  void produce(edm::Event&, const edm::EventSetup&) override;
30  void endStream() override;
32  std::vector<int> bx_;
35 };
37  : src_(consumes<std::vector<L1MuKBMTCombinedStub> >(iConfig.getParameter<edm::InputTag>("src"))),
38  bx_(iConfig.getParameter<std::vector<int> >("bx")),
39  algo_(new L1TMuonBarrelKalmanAlgo(iConfig.getParameter<edm::ParameterSet>("algoSettings"))),
40  trackFinder_(new L1TMuonBarrelKalmanTrackFinder(iConfig.getParameter<edm::ParameterSet>("trackFinderSettings"))) {
41  produces<L1MuKBMTrackBxCollection>();
42  produces<l1t::RegionalMuonCandBxCollection>("BMTF");
43 }
44 
46  if (algo_ != nullptr)
47  delete algo_;
48 
49  if (trackFinder_ != nullptr)
50  delete trackFinder_;
51 
52  // do anything here that needs to be done at destruction time
53  // (e.g. close files, deallocate resources etc.)
54 }
55 
56 //
57 // member functions
58 //
59 
60 // ------------ method called to produce the data ------------
62  using namespace edm;
64  iEvent.getByToken(src_, stubHandle);
65 
67  for (uint i = 0; i < stubHandle->size(); ++i) {
68  L1MuKBMTCombinedStubRef r(stubHandle, i);
69  stubs.push_back(r);
70  }
71 
72  std::unique_ptr<l1t::RegionalMuonCandBxCollection> outBMTF(new l1t::RegionalMuonCandBxCollection());
73  std::unique_ptr<L1MuKBMTrackBxCollection> out(new L1MuKBMTrackBxCollection());
74  outBMTF->setBXRange(bx_.front(), bx_.back());
75  out->setBXRange(bx_.front(), bx_.back());
76  for (const auto& bx : bx_) {
78  for (const auto& track : tmp) {
79  out->push_back(bx, track);
80  algo_->addBMTFMuon(bx, track, outBMTF);
81  }
82  }
83  iEvent.put(std::move(outBMTF), "BMTF");
84  iEvent.put(std::move(out));
85 }
86 
87 // ------------ method called once each stream before processing any runs, lumis or events ------------
89 
90 // ------------ method called once each stream after processing all runs, lumis and events ------------
92 
94  //The following says we do not know what parameters are allowed so do no validation
95  // Please change this to state exactly what you do use, even if it is no parameters
97  desc.setUnknown();
98  descriptions.addDefault(desc);
99 }
100 
101 //define this as a plug-in
L1TMuonBarrelKalmanTrackFinder::process
L1MuKBMTrackCollection process(L1TMuonBarrelKalmanAlgo *, const L1MuKBMTCombinedStubRefVector &stubs, int bx)
Definition: L1TMuonBarrelKalmanTrackFinder.cc:13
edm::StreamID
Definition: StreamID.h:30
L1TMuonBarrelKalmanTrackProducer::~L1TMuonBarrelKalmanTrackProducer
~L1TMuonBarrelKalmanTrackProducer() override
Definition: L1TMuonBarrelKalmanTrackProducer.cc:45
L1TMuonBarrelKalmanTrackProducer::bx_
std::vector< int > bx_
Definition: L1TMuonBarrelKalmanTrackProducer.cc:32
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11776
L1TMuonBarrelKalmanTrackProducer
Definition: L1TMuonBarrelKalmanTrackProducer.cc:20
L1TMuonBarrelKalmanTrackProducer::trackFinder_
L1TMuonBarrelKalmanTrackFinder * trackFinder_
Definition: L1TMuonBarrelKalmanTrackProducer.cc:34
L1TMuonBarrelKalmanTrackProducer::algo_
L1TMuonBarrelKalmanAlgo * algo_
Definition: L1TMuonBarrelKalmanTrackProducer.cc:33
L1TMuonBarrelKalmanTrackFinder
Definition: L1TMuonBarrelKalmanTrackFinder.h:10
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
L1MuKBMTrackCollection
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:15
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:85964
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EDProducer.h
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
edm::Handle
Definition: AssociativeIterator.h:50
parallelization.uint
uint
Definition: parallelization.py:124
edm::Ref
Definition: AssociativeIterator.h:58
BXVector< RegionalMuonCand >
MakerMacros.h
L1TMuonBarrelKalmanTrackProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: L1TMuonBarrelKalmanTrackProducer.cc:93
L1TMuonBarrelKalmanTrackProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: L1TMuonBarrelKalmanTrackProducer.cc:61
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
L1TMuonBarrelKalmanTrackProducer::src_
edm::EDGetTokenT< std::vector< L1MuKBMTCombinedStub > > src_
Definition: L1TMuonBarrelKalmanTrackProducer.cc:31
L1MuKBMTCombinedStub
Definition: L1MuKBMTCombinedStub.h:45
L1TMuonBarrelKalmanTrackProducer::endStream
void endStream() override
Definition: L1TMuonBarrelKalmanTrackProducer.cc:91
L1MuKBMTrackBxCollection
BXVector< L1MuKBMTrack > L1MuKBMTrackBxCollection
Definition: L1MuKBMTrack.h:17
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
ParameterSet
Definition: Functions.h:16
L1MuKBMTCombinedStub.h
L1TMuonBarrelKalmanAlgo
Definition: L1TMuonBarrelKalmanAlgo.h:16
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
L1TMuonBarrelKalmanTrackProducer::L1TMuonBarrelKalmanTrackProducer
L1TMuonBarrelKalmanTrackProducer(const edm::ParameterSet &)
Definition: L1TMuonBarrelKalmanTrackProducer.cc:36
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
alignCSCRings.r
r
Definition: alignCSCRings.py:93
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
Frameworkfwd.h
L1TMuonBarrelKalmanTrackFinder.h
L1TMuonBarrelKalmanTrackProducer::beginStream
void beginStream(edm::StreamID) override
Definition: L1TMuonBarrelKalmanTrackProducer.cc:88
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
RegionalMuonCandFwd.h
ParameterSet.h
L1TMuonBarrelKalmanAlgo::addBMTFMuon
void addBMTFMuon(int, const L1MuKBMTrack &, std::unique_ptr< l1t::RegionalMuonCandBxCollection > &)
Definition: L1TMuonBarrelKalmanAlgo.cc:128
L1TMuonBarrelKalmanAlgo.h
edm::Event
Definition: Event.h:73
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
StreamID.h
L1MuKBMTCombinedStubRefVector
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
Definition: L1MuKBMTCombinedStub.h:43