CMS 3D CMS Logo

KFTrajectoryFitterESProducer.cc
Go to the documentation of this file.
4 
9 
14 
18 #include <memory>
19 
20 namespace {
21 
22  class KFTrajectoryFitterESProducer : public edm::ESProducer {
23  public:
24  KFTrajectoryFitterESProducer(const edm::ParameterSet& p);
25  std::unique_ptr<TrajectoryFitter> produce(const TrajectoryFitterRecord&);
26 
27  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
29  desc.add<std::string>("ComponentName", "KFFitter");
30  desc.add<std::string>("Propagator", "PropagatorWithMaterial");
31  desc.add<std::string>("Updator", "KFUpdator");
32  desc.add<std::string>("Estimator", "Chi2");
33  desc.add<std::string>("RecoGeometry", "GlobalDetLayerGeometry");
34  desc.add<int>("minHits", 3);
35  descriptions.add("KFTrajectoryFitter", desc);
36  }
37 
38  private:
43  const int minHits_;
44  };
45 
46  KFTrajectoryFitterESProducer::KFTrajectoryFitterESProducer(const edm::ParameterSet& p)
47  : minHits_{p.getParameter<int>("minHits")} {
48  std::string myname = p.getParameter<std::string>("ComponentName");
49  auto cc = setWhatProduced(this, myname);
50  propToken_ = cc.consumes(edm::ESInputTag("", p.getParameter<std::string>("Propagator")));
51  updToken_ = cc.consumes(edm::ESInputTag("", p.getParameter<std::string>("Updator")));
52  estToken_ = cc.consumes(edm::ESInputTag("", p.getParameter<std::string>("Estimator")));
53  geoToken_ = cc.consumes(edm::ESInputTag("", p.getParameter<std::string>("RecoGeometry")));
54  }
55 
56  std::unique_ptr<TrajectoryFitter> KFTrajectoryFitterESProducer::produce(const TrajectoryFitterRecord& iRecord) {
57  return std::make_unique<KFTrajectoryFitter>(
58  &iRecord.get(propToken_), &iRecord.get(updToken_), &iRecord.get(estToken_), minHits_, &iRecord.get(geoToken_));
59  }
60 
61 } // namespace
62 
64 
65 DEFINE_FWK_EVENTSETUP_MODULE(KFTrajectoryFitterESProducer);
ConfigurationDescriptions.h
Chi2MeasurementEstimatorBase.h
Propagator.h
edm::ESInputTag
Definition: ESInputTag.h:87
ESHandle.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
TrajectoryStateUpdator.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrajectoryFitterRecord
Definition: TrajectoryFitterRecord.h:12
TrajectoryFitterRecord.h
ParameterSetDescription.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:103
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
cc
edm::ESGetToken< Propagator, TrackingComponentsRecord >
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
TrackingComponentsRecord.h
KFTrajectoryFitter.h
edm::ESProducer
Definition: ESProducer.h:104
ParameterSet.h