-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide fillDescriptions for Pixel CPE classes #27694
Changes from all commits
9338d0a
b84d6fe
9fc23c2
14b150e
72a243b
d6945ba
12ce9d6
243b926
02258d0
6bf1f4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ class PixelCPEGenericESProducer : public edm::ESProducer { | |
public: | ||
PixelCPEGenericESProducer(const edm::ParameterSet& p); | ||
std::unique_ptr<PixelClusterParameterEstimator> produce(const TkPixelCPERecord&); | ||
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); | ||
|
||
private: | ||
edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> magfieldToken_; | ||
|
@@ -42,18 +43,15 @@ using namespace edm; | |
PixelCPEGenericESProducer::PixelCPEGenericESProducer(const edm::ParameterSet& p) { | ||
std::string myname = p.getParameter<std::string>("ComponentName"); | ||
// Use LA-width from DB. If both (upper and this) are false LA-width is calcuated from LA-offset | ||
useLAWidthFromDB_ = p.existsAs<bool>("useLAWidthFromDB") ? p.getParameter<bool>("useLAWidthFromDB") : false; | ||
useLAWidthFromDB_ = p.getParameter<bool>("useLAWidthFromDB"); | ||
// Use Alignment LA-offset | ||
const bool useLAAlignmentOffsets = | ||
p.existsAs<bool>("useLAAlignmentOffsets") ? p.getParameter<bool>("useLAAlignmentOffsets") : false; | ||
const bool useLAAlignmentOffsets = p.getParameter<bool>("useLAAlignmentOffsets"); | ||
char const* laLabel = ""; // standard LA, from calibration, label="" | ||
if (useLAAlignmentOffsets) { | ||
laLabel = "fromAlignment"; | ||
} | ||
|
||
auto magname = p.existsAs<edm::ESInputTag>("MagneticFieldRecord") | ||
? p.getParameter<edm::ESInputTag>("MagneticFieldRecord") | ||
: edm::ESInputTag(""); | ||
auto magname = p.getParameter<edm::ESInputTag>("MagneticFieldRecord"); | ||
UseErrorsFromTemplates_ = p.getParameter<bool>("UseErrorsFromTemplates"); | ||
|
||
pset_ = p; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be (eventually) replaced by a config struct There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @slava77 please provide an example There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is in line with #27010 (comment) |
||
|
@@ -98,4 +96,21 @@ std::unique_ptr<PixelClusterParameterEstimator> PixelCPEGenericESProducer::produ | |
lorentzAngleWidthProduct); | ||
} | ||
|
||
void PixelCPEGenericESProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { | ||
edm::ParameterSetDescription desc; | ||
|
||
// from PixelCPEBase | ||
PixelCPEBase::fillPSetDescription(desc); | ||
|
||
// from PixelCPEGeneric | ||
PixelCPEGeneric::fillPSetDescription(desc); | ||
|
||
// specific to PixelCPEGenericESProducer | ||
desc.add<std::string>("ComponentName", "PixelCPEGeneric"); | ||
desc.add<edm::ESInputTag>("MagneticFieldRecord", edm::ESInputTag("")); | ||
desc.add<bool>("useLAAlignmentOffsets", false); | ||
desc.add<bool>("DoLorentz", false); | ||
descriptions.add("_generic_default", desc); | ||
} | ||
|
||
DEFINE_FWK_EVENTSETUP_MODULE(PixelCPEGenericESProducer); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,7 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
PixelCPEGenericESProducer = cms.ESProducer("PixelCPEGenericESProducer", | ||
|
||
ComponentName = cms.string('PixelCPEGeneric'), | ||
Alpha2Order = cms.bool(True), | ||
PixelErrorParametrization = cms.string('NOTcmsim'), | ||
|
||
# Allows cuts to be optimized | ||
eff_charge_cut_lowX = cms.double(0.0), | ||
eff_charge_cut_lowY = cms.double(0.0), | ||
eff_charge_cut_highX = cms.double(1.0), | ||
eff_charge_cut_highY = cms.double(1.0), | ||
size_cutX = cms.double(3.0), | ||
size_cutY = cms.double(3.0), | ||
|
||
# Edge cluster errors in microns (determined by looking at residual RMS) | ||
EdgeClusterErrorX = cms.double( 50.0 ), | ||
EdgeClusterErrorY = cms.double( 85.0 ), | ||
|
||
# [email protected] | ||
inflate_errors = cms.bool(False), | ||
inflate_all_errors_no_trk_angle = cms.bool(False), | ||
|
||
# Can use errors predicted by the template code | ||
# If UseErrorsFromTemplates is False, must also set | ||
# TruncatePixelCharge, IrradiationBiasCorrection, DoCosmics and LoadTemplatesFromDB to be False | ||
UseErrorsFromTemplates = cms.bool(True), | ||
|
||
# When set True this gives a slight improvement in resolution at no cost | ||
TruncatePixelCharge = cms.bool(True), | ||
|
||
# Turn this ON later | ||
IrradiationBiasCorrection = cms.bool(False), | ||
|
||
# When set to True we use templates with extended angular acceptance | ||
DoCosmics = cms.bool(False), | ||
|
||
LoadTemplatesFromDB = cms.bool(True), | ||
|
||
# petar, for clusterProbability() from TTRHs | ||
ClusterProbComputationFlag = cms.int32(0), | ||
|
||
# new parameters added in 1/14, dk | ||
# LA defined by hand, FOR TESTING ONLY, not for production | ||
# 0.0 means that the offset is taken from DB | ||
#lAOffset = cms..double(0.0), | ||
#lAWidthBPix = cms.double(0.0), | ||
#lAWidthFPix = cms.double(0.0), | ||
|
||
# Flag to select the source of LA-Width | ||
# Normal = True, use LA from DB | ||
useLAWidthFromDB = cms.bool(True), | ||
# if lAWith=0 and useLAWidthFromDB=false than width is calculated from lAOffset. | ||
# Use the LA-Offsets from Alignment instead of our calibration | ||
useLAAlignmentOffsets = cms.bool(False), | ||
|
||
#MagneticFieldRecord: e.g. "" or "ParabolicMF" | ||
MagneticFieldRecord = cms.ESInputTag(""), | ||
) | ||
from RecoLocalTracker.SiPixelRecHits._generic_default_cfi import _generic_default | ||
PixelCPEGenericESProducer = _generic_default.clone() | ||
|
||
# This customizes the Run3 Pixel CPE generic reconstruction in order to activate the IrradiationBiasCorrection | ||
# because of the expected resolution loss due to radiation damage | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtosi the configuration of these producers looks somewhat outdated to me. I only fixed the patently useless parameters, though it would be good to revise what is done in the Tracking HLT DQM. I guess this can be left for a follow-up PR.