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
[91X] SiPixelAli PCL payload creation thresholds from db - Consumer Code #18196
Changes from 12 commits
304696b
564bfcb
1ec44da
dc02821
9c46749
346f96a
1f70876
b559f4c
546b591
2882cdb
6347a3c
5540812
842a221
f4ad07e
cd22bfb
83550c9
3d6d7f2
9495d8e
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 |
---|---|---|
|
@@ -60,6 +60,9 @@ | |
#include "Geometry/Records/interface/TrackerTopologyRcd.h" | ||
#include "Geometry/Records/interface/IdealGeometryRecord.h" | ||
|
||
#include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" | ||
#include "CondFormats/DataRecord/interface/AlignPCLThresholdsRcd.h" | ||
|
||
#include "DataFormats/TrackerRecHit2D/interface/ProjectedSiStripRecHit2D.h" | ||
|
||
#include <fstream> | ||
|
@@ -195,6 +198,16 @@ void MillePedeAlignmentAlgorithm::initialize(const edm::EventSetup &setup, | |
setup.get<TrackerTopologyRcd>().get(tTopoHandle); | ||
const TrackerTopology* const tTopo = tTopoHandle.product(); | ||
|
||
//Retrieve the thresolds cuts from DB for the PCL | ||
if (runAtPCL_) { | ||
edm::ESHandle<AlignPCLThresholds> thresholdHandle; | ||
setup.get<AlignPCLThresholdsRcd>().get(thresholdHandle); | ||
theThresholds = thresholdHandle.product(); | ||
} else { | ||
theThresholds = new AlignPCLThresholds(); | ||
edm::LogInfo("MillePedeAlignmentAlgorithm")<<"Creating a fake AlignPCLThresholds objects. Irrelevant since the running mode is not PCL"<<std::endl; | ||
} | ||
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. @mmusich I think the else clause is redundant. You could just leave it as |
||
|
||
theAlignableNavigator = std::make_unique<AlignableNavigator>(extras, tracker, muon); | ||
theAlignmentParameterStore = store; | ||
theAlignables = theAlignmentParameterStore->alignables(); | ||
|
@@ -328,8 +341,13 @@ bool MillePedeAlignmentAlgorithm::storeAlignments() | |
{ | ||
if (isMode(myPedeRunBit)) { | ||
if (runAtPCL_) { | ||
|
||
auto myThresholds = new AlignPCLThresholds(); | ||
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. I recommend wrapping this into a call to |
||
myThresholds->setAlignPCLThresholds(theThresholds->getNrecords(),theThresholds->getThreshold_Map()); | ||
|
||
MillePedeFileReader mpReader(theConfig.getParameter<edm::ParameterSet>("MillePedeFileReader"), | ||
thePedeLabels); | ||
thePedeLabels, | ||
std::shared_ptr<const AlignPCLThresholds>(myThresholds)); | ||
mpReader.read(); | ||
return mpReader.storeAlignments(); | ||
} else { | ||
|
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.
@mmusich please move includes to the top of the file