CMS 3D CMS Logo

SiPhase2RecHitMatcherESProducer.cc
Go to the documentation of this file.
1 
9 
13 #include <memory>
14 
16 public:
18  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
19  std::unique_ptr<VectorHitBuilderAlgorithm> produce(const TkPhase2OTCPERecord&);
20 
21 private:
27 };
28 
30  name_ = p.getParameter<std::string>("ComponentName");
31  if (!(name_ == "SiPhase2VectorHitMatcher")) {
32  throw cms::Exception("ConfigurationError") << "Configuration specifies unknown ComponentName .\n"
33  << "Currently only 'SiPhase2VectorHitMatcher' is supported\n";
34  }
35  pset_ = p;
36  auto cc = setWhatProduced(this, name_);
37  geometryToken_ = cc.consumes();
38  trackerTopoToken_ = cc.consumes();
39  cpeToken_ = cc.consumes(p.getParameter<edm::ESInputTag>("CPE"));
40 }
41 
42 std::unique_ptr<VectorHitBuilderAlgorithm> SiPhase2RecHitMatcherESProducer::produce(const TkPhase2OTCPERecord& iRecord) {
43  std::unique_ptr<VectorHitBuilderAlgorithm> matcher = std::make_unique<VectorHitBuilderAlgorithm>(
44  pset_,
45  &iRecord.get(geometryToken_),
47  &iRecord.get(cpeToken_));
48 
49  return matcher;
50 }
51 
54  desc.add<std::string>("offlinestubs", "vectorHits");
55  desc.add<int>("maxVectorHits", 999999999);
56  desc.add<std::string>("Algorithm", "VectorHitBuilderAlgorithm");
57  desc.add<std::string>("ComponentName", "SiPhase2VectorHitMatcher");
58  desc.add<edm::ESInputTag>("CPE", edm::ESInputTag("", "Phase2StripCPE"));
59  desc.add<std::vector<double>>("BarrelCut",
60  {
61  0.0,
62  0.05,
63  0.06,
64  0.08,
65  0.09,
66  0.12,
67  0.2,
68  });
69  desc.add<std::string>("Phase2CPE_name", "Phase2StripCPE");
70  desc.add<std::string>("Clusters", "siPhase2Clusters");
71  desc.add<int>("maxVectorHitsInAStack", 999);
72  desc.add<std::vector<double>>("EndcapCut",
73  {
74  0.0,
75  0.1,
76  0.1,
77  0.1,
78  0.1,
79  0.1,
80  });
81  descriptions.add("siPhase2RecHitMatcher", desc);
82 }
83 
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:50
edm::ESInputTag
Definition: ESInputTag.h:87
ESHandle.h
SiPhase2RecHitMatcherESProducer::SiPhase2RecHitMatcherESProducer
SiPhase2RecHitMatcherESProducer(const edm::ParameterSet &)
Definition: SiPhase2RecHitMatcherESProducer.cc:29
VectorHitBuilderAlgorithm.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TkPhase2OTCPERecord.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
CkfComponentsRecord.h
EDMException.h
SiPhase2RecHitMatcherESProducer::pset_
edm::ParameterSet pset_
Definition: SiPhase2RecHitMatcherESProducer.cc:23
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
SiPhase2RecHitMatcherESProducer::cpeToken_
edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkPhase2OTCPERecord > cpeToken_
Definition: SiPhase2RecHitMatcherESProducer.cc:26
SiPhase2RecHitMatcherESProducer::name_
std::string name_
Definition: SiPhase2RecHitMatcherESProducer.cc:22
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
TkPhase2OTCPERecord
Definition: TkPhase2OTCPERecord.h:12
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
SiPhase2RecHitMatcherESProducer
Definition: SiPhase2RecHitMatcherESProducer.cc:15
get
#define get
cc
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
SiPhase2RecHitMatcherESProducer::geometryToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geometryToken_
Definition: SiPhase2RecHitMatcherESProducer.cc:24
SiPhase2RecHitMatcherESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: SiPhase2RecHitMatcherESProducer.cc:52
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
SiPhase2RecHitMatcherESProducer::trackerTopoToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopoToken_
Definition: SiPhase2RecHitMatcherESProducer.cc:25
Exception
Definition: hltDiff.cc:245
EventSetup.h
SiPhase2RecHitMatcherESProducer::produce
std::unique_ptr< VectorHitBuilderAlgorithm > produce(const TkPhase2OTCPERecord &)
Definition: SiPhase2RecHitMatcherESProducer.cc:42
edm::ESProducer
Definition: ESProducer.h:104
ParameterSet.h