CMS 3D CMS Logo

TrackFitterProducer.cc
Go to the documentation of this file.
3 
8 
12 
15 
22 
24 public:
25  explicit TrackFitterProducer(const edm::ParameterSet& iConfig);
26  ~TrackFitterProducer() override {}
27 
28  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
29 
30 private:
31  void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
32 
37 };
38 
40  : geomToken_(esConsumes()),
41  magFieldToken_(esConsumes()),
42  ttrhToken_(esConsumes(edm::ESInputTag("", iConfig.getParameter<std::string>("TTRHBuilder")))) {
43  produces<PixelFitter>();
44 }
45 
48 
49  desc.add<std::string>("TTRHBuilder", "");
50 
51  descriptions.add("trackFitter", desc);
52 }
53 
55  const auto& tracker = &iSetup.getData(geomToken_);
56  const auto& field = &iSetup.getData(magFieldToken_);
57  const auto& ttrh = &iSetup.getData(ttrhToken_);
58 
59  auto impl = std::make_unique<TrackFitter>(tracker, field, ttrh);
60  auto prod = std::make_unique<PixelFitter>(std::move(impl));
61  iEvent.put(std::move(prod));
62 }
63 
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > ttrhToken_
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
HLT enums.
TrackFitterProducer(const edm::ParameterSet &iConfig)
def move(src, dest)
Definition: eostools.py:511