-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Use Lorentz Angle from data base for pixel template CPE's in case of error #33495
Changes from 3 commits
c1aedd1
f27884f
dbfc9d5
1745048
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 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -34,16 +34,17 @@ class PixelCPEClusterRepairESProducer : public edm::ESProducer { | |||||||||||||||||
edm::ESGetToken<SiPixel2DTemplateDBObject, SiPixel2DTemplateDBObjectESProducerRcd> templateDBobject2DToken_; | ||||||||||||||||||
|
||||||||||||||||||
edm::ParameterSet pset_; | ||||||||||||||||||
bool DoLorentz_; | ||||||||||||||||||
bool doLorentzFromAlignment_; | ||||||||||||||||||
bool useLAFromDB_; | ||||||||||||||||||
}; | ||||||||||||||||||
|
||||||||||||||||||
using namespace edm; | ||||||||||||||||||
|
||||||||||||||||||
PixelCPEClusterRepairESProducer::PixelCPEClusterRepairESProducer(const edm::ParameterSet& p) { | ||||||||||||||||||
std::string myname = p.getParameter<std::string>("ComponentName"); | ||||||||||||||||||
|
||||||||||||||||||
//DoLorentz_ = p.getParameter<bool>("DoLorentz"); // True when LA from alignment is used | ||||||||||||||||||
DoLorentz_ = p.getParameter<bool>("DoLorentz"); | ||||||||||||||||||
useLAFromDB_ = p.getParameter<bool>("useLAFromDB"); | ||||||||||||||||||
doLorentzFromAlignment_ = p.getParameter<bool>("doLorentzFromAlignment"); | ||||||||||||||||||
|
||||||||||||||||||
pset_ = p; | ||||||||||||||||||
auto c = setWhatProduced(this, myname); | ||||||||||||||||||
|
@@ -52,11 +53,15 @@ PixelCPEClusterRepairESProducer::PixelCPEClusterRepairESProducer(const edm::Para | |||||||||||||||||
hTTToken_ = c.consumes(); | ||||||||||||||||||
templateDBobjectToken_ = c.consumes(); | ||||||||||||||||||
templateDBobject2DToken_ = c.consumes(); | ||||||||||||||||||
if (DoLorentz_) { | ||||||||||||||||||
|
||||||||||||||||||
char const* laLabel = ""; // standard LA, from calibration, label="" | ||||||||||||||||||
lorentzAngleToken_ = c.consumes(edm::ESInputTag("", laLabel)); | ||||||||||||||||||
|
||||||||||||||||||
if (doLorentzFromAlignment_) { | ||||||||||||||||||
lorentzAngleToken_ = c.consumes(edm::ESInputTag("", "fromAlignment")); | ||||||||||||||||||
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.
Suggested change
this is matching the actual use case in 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. Ok I updated to your suggestion |
||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
//std::cout<<" from ES Producer Templates "<<myname<<" "<<DoLorentz_<<std::endl; //dk | ||||||||||||||||||
//std::cout<<" from ES Producer Templates "<<myname<<" "<<DoLorentz_<<std::endl; //dk | ||||||||||||||||||
} | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
PixelCPEClusterRepairESProducer::~PixelCPEClusterRepairESProducer() {} | ||||||||||||||||||
|
@@ -79,10 +84,11 @@ void PixelCPEClusterRepairESProducer::fillDescriptions(edm::ConfigurationDescrip | |||||||||||||||||
|
||||||||||||||||||
std::unique_ptr<PixelClusterParameterEstimator> PixelCPEClusterRepairESProducer::produce( | ||||||||||||||||||
const TkPixelCPERecord& iRecord) { | ||||||||||||||||||
// Normal, default LA actually is NOT needed | ||||||||||||||||||
// null is ok becuse LA is not use by templates in this mode | ||||||||||||||||||
// Normal, default LA is used in case of template failure, load it unless | ||||||||||||||||||
// turned off | ||||||||||||||||||
// if turned off, null is ok, becomes zero | ||||||||||||||||||
const SiPixelLorentzAngle* lorentzAngleProduct = nullptr; | ||||||||||||||||||
if (DoLorentz_) { // LA correction from alignment | ||||||||||||||||||
if (useLAFromDB_ || doLorentzFromAlignment_) { | ||||||||||||||||||
lorentzAngleProduct = &iRecord.get(lorentzAngleToken_); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,9 +45,9 @@ PixelCPEGenericESProducer::PixelCPEGenericESProducer(const edm::ParameterSet& p) | |
// Use LA-width from DB. If both (upper and this) are false LA-width is calcuated from LA-offset | ||
useLAWidthFromDB_ = p.getParameter<bool>("useLAWidthFromDB"); | ||
// Use Alignment LA-offset | ||
const bool useLAAlignmentOffsets = p.getParameter<bool>("useLAAlignmentOffsets"); | ||
const bool doLorentzFromAlignment = p.getParameter<bool>("doLorentzFromAlignment"); | ||
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. there is a commented out cout on L70 which is using 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. Ok I removed the cout |
||
char const* laLabel = ""; // standard LA, from calibration, label="" | ||
if (useLAAlignmentOffsets) { | ||
if (doLorentzFromAlignment) { | ||
laLabel = "fromAlignment"; | ||
} | ||
|
||
|
@@ -108,8 +108,6 @@ void PixelCPEGenericESProducer::fillDescriptions(edm::ConfigurationDescriptions& | |
// 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); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -30,35 +30,41 @@ class PixelCPETemplateRecoESProducer : public edm::ESProducer { | |||||||||||||||||
edm::ESGetToken<SiPixelTemplateDBObject, SiPixelTemplateDBObjectESProducerRcd> templateDBobjectToken_; | ||||||||||||||||||
|
||||||||||||||||||
edm::ParameterSet pset_; | ||||||||||||||||||
bool DoLorentz_; | ||||||||||||||||||
bool doLorentzFromAlignment_; | ||||||||||||||||||
bool useLAFromDB_; | ||||||||||||||||||
}; | ||||||||||||||||||
|
||||||||||||||||||
using namespace edm; | ||||||||||||||||||
|
||||||||||||||||||
PixelCPETemplateRecoESProducer::PixelCPETemplateRecoESProducer(const edm::ParameterSet& p) { | ||||||||||||||||||
std::string myname = p.getParameter<std::string>("ComponentName"); | ||||||||||||||||||
|
||||||||||||||||||
//DoLorentz_ = p.getParameter<bool>("DoLorentz"); // True when LA from alignment is used | ||||||||||||||||||
DoLorentz_ = p.getParameter<bool>("DoLorentz"); | ||||||||||||||||||
useLAFromDB_ = p.getParameter<bool>("useLAFromDB"); | ||||||||||||||||||
doLorentzFromAlignment_ = p.getParameter<bool>("doLorentzFromAlignment"); | ||||||||||||||||||
|
||||||||||||||||||
pset_ = p; | ||||||||||||||||||
auto c = setWhatProduced(this, myname); | ||||||||||||||||||
magfieldToken_ = c.consumes(); | ||||||||||||||||||
pDDToken_ = c.consumes(); | ||||||||||||||||||
hTTToken_ = c.consumes(); | ||||||||||||||||||
templateDBobjectToken_ = c.consumes(); | ||||||||||||||||||
if (DoLorentz_) { | ||||||||||||||||||
|
||||||||||||||||||
char const* laLabel = ""; // standard LA, from calibration, label="" | ||||||||||||||||||
lorentzAngleToken_ = c.consumes(edm::ESInputTag("", laLabel)); | ||||||||||||||||||
|
||||||||||||||||||
if (doLorentzFromAlignment_) { | ||||||||||||||||||
lorentzAngleToken_ = c.consumes(edm::ESInputTag("", "fromAlignment")); | ||||||||||||||||||
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. (copied from PixelCPEClusterRepairESProducer.cc)
Suggested change
this is matching the actual use case in 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. Ok I updated to your suggestion |
||||||||||||||||||
} | ||||||||||||||||||
//std::cout<<" from ES Producer Templates "<<myname<<" "<<DoLorentz_<<std::endl; //dk | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
std::unique_ptr<PixelClusterParameterEstimator> PixelCPETemplateRecoESProducer::produce( | ||||||||||||||||||
const TkPixelCPERecord& iRecord) { | ||||||||||||||||||
// Normal, deafult LA actually is NOT needed | ||||||||||||||||||
// null is ok becuse LA is not use by templates in this mode | ||||||||||||||||||
// Normal, default LA is used in case of template failure, load it unless | ||||||||||||||||||
// turned off | ||||||||||||||||||
// if turned off, null is ok, becomes zero | ||||||||||||||||||
const SiPixelLorentzAngle* lorentzAngleProduct = nullptr; | ||||||||||||||||||
if (DoLorentz_) { // LA correction from alignment | ||||||||||||||||||
if (useLAFromDB_ || doLorentzFromAlignment_) { | ||||||||||||||||||
lorentzAngleProduct = &iRecord.get(lorentzAngleToken_); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -81,7 +87,6 @@ void PixelCPETemplateRecoESProducer::fillDescriptions(edm::ConfigurationDescript | |||||||||||||||||
|
||||||||||||||||||
// specific to PixelCPETemplateRecoESProducer | ||||||||||||||||||
desc.add<std::string>("ComponentName", "PixelCPETemplateReco"); | ||||||||||||||||||
desc.add<bool>("DoLorentz", true); | ||||||||||||||||||
descriptions.add("_templates_default", desc); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,7 +106,8 @@ PixelCPEBase::PixelCPEBase(edm::ParameterSet const& conf, | |
|
||
// For Templates only | ||
// Compute the Lorentz shifts for this detector element for templates (from Alignment) | ||
DoLorentz_ = conf.getParameter<bool>("DoLorentz"); | ||
doLorentzFromAlignment_ = conf.getParameter<bool>("doLorentzFromAlignment"); | ||
useLAFromDB_ = conf.getParameter<bool>("useLAFromDB"); | ||
|
||
LogDebug("PixelCPEBase") << " LA constants - " << lAOffset_ << " " << lAWidthBPix_ << " " << lAWidthFPix_ | ||
<< endl; //dk | ||
|
@@ -194,7 +195,8 @@ void PixelCPEBase::fillDetParams() { | |
p.bx = Bfield.x(); | ||
|
||
//--- Compute the Lorentz shifts for this detector element | ||
if ((theFlag_ == 0) || DoLorentz_) { // do always for generic and if(DOLorentz) for templates | ||
if ((theFlag_ == 0) || useLAFromDB_ || | ||
doLorentzFromAlignment_) { // do always for generic and if(DOLorentz) for templates | ||
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. the comment about |
||
p.driftDirection = driftDirection(p, Bfield); | ||
computeLorentzShifts(p); | ||
} | ||
|
@@ -470,4 +472,6 @@ void PixelCPEBase::fillPSetDescription(edm::ParameterSetDescription& desc) { | |
desc.add<double>("lAOffset", 0.0); | ||
desc.add<double>("lAWidthBPix", 0.0); | ||
desc.add<double>("lAWidthFPix", 0.0); | ||
desc.add<bool>("doLorentzFromAlignment", false); | ||
desc.add<bool>("useLAFromDB", true); | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -324,6 +324,11 @@ void PixelCPEClusterRepair::callTempReco1D(DetParam const& theDetParam, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// We have a boolean denoting whether the reco failed or not | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.hasFilledProb_ = false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// In case of template reco failure, these are the lorentz drift corrections | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// to be applied | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
float lorentzshiftX = 0.5f * theDetParam.lorentzShiftInCmX; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
float lorentzshiftY = 0.5f * theDetParam.lorentzShiftInCmY; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// ****************************************************************** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//--- Call normal TemplateReco | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -363,30 +368,24 @@ void PixelCPEClusterRepair::callTempReco1D(DetParam const& theDetParam, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.probabilityX_ = theClusterParam.probabilityY_ = theClusterParam.probabilityQ_ = 0.f; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.qBin_ = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Template reco has failed, compute position estimates based on cluster center of gravity + Lorentz drift | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Future improvement would be to call generic reco instead | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Gavril: what do we do in this case ? For now, just return the cluster center of gravity in microns | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// In the x case, apply a rough Lorentz drift average correction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// To do: call PixelCPEGeneric whenever PixelTempReco1D fails | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
float lorentz_drift = -999.9; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (!GeomDetEnumerators::isEndcap(theDetParam.thePart)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lorentz_drift = 60.0f; // in microns | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lorentz_drift = 10.0f; // in microns | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// GG: trk angles needed to correct for bows/kinks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (theClusterParam.with_track_angle) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templXrec_ = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localX(theClusterParam.theCluster->x(), theClusterParam.loc_trk_pred) - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lorentz_drift * micronsToCm; // rough Lorentz drift correction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localX(theClusterParam.theCluster->x(), theClusterParam.loc_trk_pred) + lorentzshiftX; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templYrec_ = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localY(theClusterParam.theCluster->y(), theClusterParam.loc_trk_pred); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localY(theClusterParam.theCluster->y(), theClusterParam.loc_trk_pred) + lorentzshiftY; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
edm::LogError("PixelCPEClusterRepair") << "@SUB = PixelCPEClusterRepair::localPosition" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<< "Should never be here. PixelCPEClusterRepair should always be called " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"with track angles. This is a bad error !!! "; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templXrec_ = theDetParam.theTopol->localX(theClusterParam.theCluster->x()) - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lorentz_drift * micronsToCm; // rough Lorentz drift correction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templYrec_ = theDetParam.theTopol->localY(theClusterParam.theCluster->y()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templXrec_ = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localX(theClusterParam.theCluster->x(), theClusterParam.loc_trk_pred) + lorentzshiftX; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templYrec_ = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localY(theClusterParam.theCluster->y(), theClusterParam.loc_trk_pred) + lorentzshiftY; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. the implementation seems identical except for the error message
Suggested change
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. Looking into it further, the loc_trk_pred should not be used when with_track_angle is false (never used in standard reconstruction) so the two cases are different and I updated the PR to match this. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//--- Template Reco succeeded. The probabilities are filled. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -423,6 +422,11 @@ void PixelCPEClusterRepair::callTempReco2D(DetParam const& theDetParam, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// We have a boolean denoting whether the reco failed or not | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.hasFilledProb_ = false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// In case of template reco failure, these are the lorentz drift corrections | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// to be applied | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
float lorentzshiftX = 0.5f * theDetParam.lorentzShiftInCmX; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
float lorentzshiftY = 0.5f * theDetParam.lorentzShiftInCmY; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// ****************************************************************** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//--- Call 2D TemplateReco | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -482,29 +486,26 @@ void PixelCPEClusterRepair::callTempReco2D(DetParam const& theDetParam, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.probabilityX_ = theClusterParam.probabilityY_ = theClusterParam.probabilityQ_ = 0.f; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.qBin_ = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// GG: what do we do in this case? For now, just return the cluster center of gravity in microns | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// In the x case, apply a rough Lorentz drift average correction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
float lorentz_drift = -999.9; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (!GeomDetEnumerators::isEndcap(theDetParam.thePart)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lorentz_drift = 60.0f; // in microns // &&& replace with a constant (globally) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lorentz_drift = 10.0f; // in microns | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// GG: trk angles needed to correct for bows/kinks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// 2D Template reco has failed, compute position estimates based on cluster center of gravity + Lorentz drift | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// Future improvement would be to call generic reco instead | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (theClusterParam.with_track_angle) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templXrec_ = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localX(theClusterParam.theCluster->x(), theClusterParam.loc_trk_pred) - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lorentz_drift * micronsToCm; // rough Lorentz drift correction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localX(theClusterParam.theCluster->x(), theClusterParam.loc_trk_pred) + lorentzshiftX; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templYrec_ = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localY(theClusterParam.theCluster->y(), theClusterParam.loc_trk_pred); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localY(theClusterParam.theCluster->y(), theClusterParam.loc_trk_pred) + lorentzshiftY; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
edm::LogError("PixelCPEClusterRepair") << "@SUB = PixelCPEClusterRepair::localPosition" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<< "Should never be here. PixelCPEClusterRepair should always be called " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"with track angles. This is a bad error !!! "; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templXrec_ = theDetParam.theTopol->localX(theClusterParam.theCluster->x()) - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lorentz_drift * micronsToCm; // rough Lorentz drift correction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templYrec_ = theDetParam.theTopol->localY(theClusterParam.theCluster->y()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templXrec_ = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localX(theClusterParam.theCluster->x(), theClusterParam.loc_trk_pred) + lorentzshiftX; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.templYrec_ = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theDetParam.theTopol->localY(theClusterParam.theCluster->y(), theClusterParam.loc_trk_pred) + lorentzshiftY; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. it looks like the same code is repeated here as well as in the 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. Same comment/ change as above |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//--- Template Reco succeeded. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
theClusterParam.hasFilledProb_ = true; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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.
there is no matching update in the
::fillDescriptions
method.There is a comment that
DoLorentz
was specific to this ES producer; since it's no longer needed, please remove it or mark it as obsoleteThere 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.
Ok I removed the the line from the fillDescriptions method