34 std::pair<IntegratedCalibrationBase*, unsigned int>
41 if (label >= iCal->second && label < iCal->
second + iCal->first->numParameters()) {
44 return std::make_pair(iCal->first, label - iCal->second);
47 edm::LogError(
"LogicError") <<
"@SUB=PedeLabelerBase::calibrationParamFromLabel"
48 <<
"Label " << label <<
"larger than first calibration's label, "
49 <<
"but no calibration fits!";
53 return std::pair<IntegratedCalibrationBase*, unsigned int>(0,0);
62 nextId += iCal->first->numParameters();
77 unsigned int paramNum)
const
80 throw cms::Exception(
"LogicError") <<
"PedeLabelerBase::calibrationLabel: "
81 <<
"nullPtr passed!\n";
86 if (iCal->first == calib) {
87 if (paramNum < iCal->
first->numParameters()) {
88 return iCal->second + paramNum;
91 <<
"@SUB=PedeLabelerBase::calibrationLabel" <<
"IntegratedCalibration "
92 << calib->
name() <<
" has only " << iCal->first->numParameters()
93 <<
" parameters, but " << paramNum <<
"requested!";
99 <<
"@SUB=PedeLabelerBase::calibrationLabel" <<
"IntegratedCalibration "
100 << calib->
name() <<
" not known or too few parameters.";
111 for (
auto iCal = iCals.begin(); iCal != iCals.end(); ++iCal) {
114 nextId += (*iCal)->numParameters();
117 <<
"@SUB=PedeLabelerBase::addCalibrations" <<
"Ignoring nullPtr.";
const TimeTypeSpecs timeTypeSpecs[]
AlignmentAlgorithmBase::RunNumber RunNumber
std::vector< std::pair< IntegratedCalibrationBase *, unsigned int > > theCalibrationLabels
pairs of calibrations and their first label
static const unsigned int theMinLabel
const std::string & name() const
name of this calibration
virtual unsigned int firstNonAlignableLabel() const
static const unsigned int theMaxNumParam
PedeLabelerBase(const TopLevelAlignables &alignables, const edm::ParameterSet &config)
constructor from three Alignables (null pointers allowed )
U second(std::pair< T, U > const &p)
MVATrainerComputer * calib
unsigned int parameterInstanceOffset() const
offset in labels between consecutive parameter instances of Alignable*s
static const unsigned int theParamInstanceOffset
virtual unsigned int calibrationLabel(const IntegratedCalibrationBase *calib, unsigned int paramNum) const
label for parameter 'paramNum' (counted from 0) of an integrated calibration
virtual unsigned int firstFreeLabel() const
virtual void addCalibrations(const std::vector< IntegratedCalibrationBase * > &iCals)
tell labeler to treat also integrated calibrations
virtual std::pair< IntegratedCalibrationBase *, unsigned int > calibrationParamFromLabel(unsigned int label) const
virtual unsigned int maxNumberOfParameterInstances() const =0
returns the maximum number of instances for any parameter of an Alignable*