46 CPEgenericMode_ =
p.getParameter<
std::string>(
"ComponentName");
48 useLAWidthFromDB_ =
p.getParameter<
bool>(
"useLAWidthFromDB");
51 char const* laLabel =
"";
53 laLabel =
"fromAlignment";
57 UseErrorsFromTemplates_ =
p.getParameter<
bool>(
"UseErrorsFromTemplates");
60 auto c = setWhatProduced(
this, CPEgenericMode_);
61 magfieldToken_ =
c.consumes(magname);
62 pDDToken_ =
c.consumes();
63 hTTToken_ =
c.consumes();
65 if (useLAWidthFromDB_) {
68 if (UseErrorsFromTemplates_) {
69 genErrorDBObjectToken_ =
c.consumes();
76 if (useLAWidthFromDB_) {
77 lorentzAngleWidthProduct = &iRecord.
get(lorentzAngleWidthToken_);
84 if (UseErrorsFromTemplates_) {
85 genErrorDBObjectProduct = &iRecord.
get(genErrorDBObjectToken_);
90 return (CPEgenericMode_ ==
"PixelCPEGenericForBricked")
91 ? std::make_unique<PixelCPEGenericForBricked>(pset_,
92 &iRecord.
get(magfieldToken_),
93 iRecord.
get(pDDToken_),
94 iRecord.
get(hTTToken_),
95 &iRecord.
get(lorentzAngleToken_),
96 genErrorDBObjectProduct,
97 lorentzAngleWidthProduct)
98 : std::make_unique<PixelCPEGeneric>(pset_,
99 &iRecord.
get(magfieldToken_),
100 iRecord.
get(pDDToken_),
101 iRecord.
get(hTTToken_),
102 &iRecord.
get(lorentzAngleToken_),
103 genErrorDBObjectProduct,
104 lorentzAngleWidthProduct);
119 descriptions.
add(
"_generic_default",
desc);
bool UseErrorsFromTemplates_
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > hTTToken_
static void fillPSetDescription(edm::ParameterSetDescription &desc)
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleWidthToken_
PixelCPEGenericESProducer
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string CPEgenericMode_
std::unique_ptr< PixelClusterParameterEstimator > produce(const TkPixelCPERecord &)
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd > genErrorDBObjectToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
static void fillPSetDescription(edm::ParameterSetDescription &desc)
PixelCPEGenericESProducer(const edm::ParameterSet &p)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)