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 
35 };
36 
38  theTTRHBuilderName(iConfig.getParameter<std::string>("TTRHBuilder"))
39 {
40  produces<PixelFitter>();
41 }
42 
45 
46  desc.add<std::string>("TTRHBuilder", "");
47 
48  descriptions.add("trackFitter", desc);
49 }
50 
53  iSetup.get<TrackerDigiGeometryRecord>().get(trackerESH);
54 
56  iSetup.get<IdealMagneticFieldRecord>().get(fieldESH);
57 
59  iSetup.get<TransientRecHitRecord>().get(theTTRHBuilderName, ttrhbESH);
60 
61  auto impl = std::make_unique<TrackFitter>(trackerESH.product(),
62  fieldESH.product(),
63  ttrhbESH.product());
64  auto prod = std::make_unique<PixelFitter>(std::move(impl));
65  iEvent.put(std::move(prod));
66 }
67 
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
T get() const
Definition: EventSetup.h:71
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
T const * product() const
Definition: ESHandle.h:86
TrackFitterProducer(const edm::ParameterSet &iConfig)
def move(src, dest)
Definition: eostools.py:511