CMS 3D CMS Logo

PixelTrackProducer.cc
Go to the documentation of this file.
1 #include <vector>
2 
16 
20 #include "storeTracks.h"
21 
24 
25 namespace edm {
26  class Event;
27  class EventSetup;
28  class ParameterSet;
30 } // namespace edm
31 class TrackerTopology;
32 
33 using namespace pixeltrackfitting;
34 using edm::ParameterSet;
35 
37 public:
39  : theReconstruction(cfg, consumesCollector()), htTopoToken_(esConsumes()) {
40  edm::LogInfo("PixelTrackProducer") << " construction...";
41  produces<TrackingRecHitCollection>();
42  produces<reco::TrackExtraCollection>();
43  // TrackCollection refers to TrackingRechit and TrackExtra
44  // collections, need to declare its production after them to work
45  // around a rare race condition in framework scheduling
46  produces<reco::TrackCollection>();
47  }
48 
49  ~PixelTrackProducer() override = default;
50 
51  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
53 
54  desc.add<std::string>("passLabel", "pixelTracks"); // What is this? It is not used anywhere in this code.
56 
57  descriptions.add("pixelTracks", desc);
58  }
59 
60  void produce(edm::Event& ev, const edm::EventSetup& es) override {
61  LogDebug("PixelTrackProducer, produce") << "event# :" << ev.id();
62 
64  theReconstruction.run(tracks, ev, es);
65  auto htTopo = es.getData(htTopoToken_);
66 
67  // store tracks
68  storeTracks(ev, tracks, htTopo);
69  }
70 
71 private:
74 };
75 
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void storeTracks(Ev &ev, const TWH &tracksWithHits, const TrackerTopology &ttopo)
Definition: storeTracks.h:19
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< TrackWithTTRHs > TracksWithTTRHs
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > htTopoToken_
void produce(edm::Event &ev, const edm::EventSetup &es) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool getData(T &iHolder) const
Definition: EventSetup.h:122
Log< level::Info, false > LogInfo
auto const & tracks
cannot be loose
void add(std::string const &label, ParameterSetDescription const &psetDescription)
PixelTrackReconstruction theReconstruction
HLT enums.
static void fillDescriptions(edm::ParameterSetDescription &desc)
PixelTrackProducer(const edm::ParameterSet &cfg)
#define LogDebug(id)