CMS 3D CMS Logo

KFTrajectorySmootherESProducer.cc
Go to the documentation of this file.
3 
8 
13 
17 #include <memory>
18 
19 namespace {
20 
21  class KFTrajectorySmootherESProducer final : public edm::ESProducer {
22  public:
23  KFTrajectorySmootherESProducer(const edm::ParameterSet& p);
24  std::unique_ptr<TrajectorySmoother> produce(const TrajectoryFitterRecord&);
25 
26  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
28  desc.add<std::string>("ComponentName", "KFSmoother");
29  desc.add<std::string>("Propagator", "PropagatorWithMaterial");
30  desc.add<std::string>("Updator", "KFUpdator");
31  desc.add<std::string>("Estimator", "Chi2");
32  desc.add<std::string>("RecoGeometry", "GlobalDetLayerGeometry");
33  desc.add<double>("errorRescaling", 100);
34  desc.add<int>("minHits", 3);
35  descriptions.add("KFTrajectorySmoother", desc);
36  }
37 
38  private:
43  const double rescaleFactor_;
44  const int minHits_;
45  };
46 
47  KFTrajectorySmootherESProducer::KFTrajectorySmootherESProducer(const edm::ParameterSet& p)
48  : rescaleFactor_{p.getParameter<double>("errorRescaling")}, minHits_{p.getParameter<int>("minHits")} {
49  std::string myname = p.getParameter<std::string>("ComponentName");
50  setWhatProduced(this, myname)
51  .setConsumes(propToken_, edm::ESInputTag("", p.getParameter<std::string>("Propagator")))
52  .setConsumes(updToken_, edm::ESInputTag("", p.getParameter<std::string>("Updator")))
53  .setConsumes(estToken_, edm::ESInputTag("", p.getParameter<std::string>("Estimator")))
54  .setConsumes(geoToken_, edm::ESInputTag("", p.getParameter<std::string>("RecoGeometry")));
55  }
56 
57  std::unique_ptr<TrajectorySmoother> KFTrajectorySmootherESProducer::produce(const TrajectoryFitterRecord& iRecord) {
58  return std::make_unique<KFTrajectorySmoother>(&iRecord.get(propToken_),
59  &iRecord.get(updToken_),
60  &iRecord.get(estToken_),
61  rescaleFactor_,
62  minHits_,
63  &iRecord.get(geoToken_));
64  }
65 } // namespace
66 
68 DEFINE_FWK_EVENTSETUP_MODULE(KFTrajectorySmootherESProducer);
ConfigurationDescriptions.h
Chi2MeasurementEstimatorBase.h
Propagator.h
edm::ESInputTag
Definition: ESInputTag.h:87
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
ESHandle.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
KFTrajectorySmoother.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:112
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
edm::ESGetToken< Propagator, TrackingComponentsRecord >
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
TrackingComponentsRecord.h
edm::ESProducer
Definition: ESProducer.h:101
ParameterSet.h