93 theMode(this->decodeMode(theConfig.getUntrackedParameter<
std::
string>(
"mode"))),
94 theDir(theConfig.getUntrackedParameter<
std::
string>(
"fileDir")),
95 theAlignmentParameterStore(nullptr),
99 .getParameter<
std::
string>(
"TrajectoryFactoryName"),
102 theMinNumHits(
cfg.getParameter<unsigned
int>(
"minNumHits")),
103 theMaximalCor2D(
cfg.getParameter<double>(
"max2Dcorrelation")),
105 ignoreFirstIOVCheck_(
cfg.getUntrackedParameter<
bool>(
"ignoreFirstIOVCheck")),
106 enableAlignableUpdates_(
cfg.getUntrackedParameter<
bool>(
"enableAlignableUpdates")),
107 theLastWrittenIov(0),
108 theGblDoubleBinary(
cfg.getParameter<
bool>(
"doubleBinary")),
109 runAtPCL_(
cfg.getParameter<
bool>(
"runAtPCL")),
110 ignoreHitsWithoutGlobalDerivatives_(
cfg.getParameter<
bool>(
"ignoreHitsWithoutGlobalDerivatives")),
111 skipGlobalPositionRcdCheck_(
cfg.getParameter<
bool>(
"skipGlobalPositionRcdCheck")),
114 enforceSingleIOVInput_(!(enableAlignableUpdates_ && areIOVsSpecified())),
118 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm" 120 <<
"' with output directory '" <<
theDir <<
"'.";
142 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::initialize" 143 <<
"Running with AlignabeMuon not yet tested.";
153 std::ostringstream message;
155 if (iov_alignments.first().eventID().run() !=
MIN_VAL || iov_alignments.last().eventID().run() !=
MAX_VAL) {
157 <<
" with multiple IOVs in tag without specifying 'RunRangeSelection'.\n" 158 <<
"Validity range is " << iov_alignments.first().eventID().run() <<
" - " 159 << iov_alignments.last().eventID().run() <<
"\n";
162 if (iov_surfaces.first().eventID().run() !=
MIN_VAL || iov_surfaces.last().eventID().run() !=
MAX_VAL) {
164 <<
" with multiple IOVs in tag without specifying 'RunRangeSelection'.\n" 165 <<
"Validity range is " << iov_surfaces.first().eventID().run() <<
" - " 166 << iov_surfaces.last().eventID().run() <<
"\n";
169 if (iov_errors.first().eventID().run() !=
MIN_VAL || iov_errors.last().eventID().run() !=
MAX_VAL) {
171 <<
" with multiple IOVs in tag without specifying 'RunRangeSelection'.\n" 172 <<
"Validity range is " << iov_errors.first().eventID().run() <<
" - " 173 << iov_errors.last().eventID().run() <<
"\n";
177 throw cms::Exception(
"DatabaseError") <<
"@SUB=MillePedeAlignmentAlgorithm::initialize" << message.str();
188 storeThresholds(th->getNrecords(), th->getThreshold_Map(), th->getFloatMap());
205 if (!RunRangeSelectionVPSet.empty()) {
206 labelerPlugin =
"RunRangeDependentPedeLabeler";
207 if (pedeLabelerCfg.
exists(
"plugin")) {
209 if ((labelerPluginCfg !=
"PedeLabeler" && labelerPluginCfg !=
"RunRangeDependentPedeLabeler") ||
211 throw cms::Exception(
"BadConfig") <<
"MillePedeAlignmentAlgorithm::initialize" 212 <<
"both RunRangeSelection and generic labeler specified in config file. " 213 <<
"Please get rid of either one of them.\n";
217 if (pedeLabelerCfg.
exists(
"plugin")) {
222 if (!pedeLabelerCfg.
exists(
"plugin")) {
226 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::initialize" 227 <<
"Using plugin '" << labelerPlugin <<
"' to generate labels.";
245 const std::vector<edm::ParameterSet> mprespset(
247 if (!mprespset.empty()) {
248 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::initialize" 249 <<
"Apply " << mprespset.end() - mprespset.begin()
250 <<
" previous MillePede constants from 'pedeReaderInputs'.";
256 for (std::vector<edm::ParameterSet>::const_iterator iSet = mprespset.begin(), iE = mprespset.end(); iSet != iE;
262 <<
"MillePedeAlignmentAlgorithm::initialize: Problems reading input constants of " 263 <<
"pedeReaderInputs entry " << iSet - mprespset.begin() <<
'.';
279 throw cms::Exception(
"BadConfig") <<
"'vstring mergeTreeFiles' and 'vstring mergeBinaryFiles' must be empty for " 280 <<
"modes running mille.";
283 if (!moniFile.empty())
284 theMonitor = std::make_unique<MillePedeMonitor>(tTopo, (
theDir + moniFile).c_str());
312 theThresholds->setAlignPCLThresholds(nRecords, thresholdMap);
363 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::setParametersForRunRange" 364 <<
"Problems reading pede result, but applying!";
381 std::vector<std::string>
files;
385 const std::vector<std::string> plainFiles(
theConfig.
getParameter<std::vector<std::string> >(
"mergeBinaryFiles"));
390 filesForLogOutput +=
" " +
file +
",";
391 if (filesForLogOutput.length() != 0)
392 filesForLogOutput.pop_back();
393 edm::LogInfo(
"Alignment") <<
"Based on the config parameter mergeBinaryFiles, using the following " 394 <<
"files as input (assigned weights are indicated by ' -- <weight>'):" 395 << filesForLogOutput;
405 throw cms::Exception(
"BadConfig") <<
"@SUB=MillePedeAlignmentAlgorithm::terminate\n" 406 <<
"Last IOV of 'RunRangeSelection' has not been processed. " 407 <<
"Please reconfigure your source to process the runs at least up to " 435 const std::vector<std::string> &plainFiles,
const std::string &theDir) {
436 std::vector<std::string>
files;
437 for (
const auto &plainFile : plainFiles) {
443 char theNumberedInputFileName[200];
444 sprintf(theNumberedInputFileName, theInputFileName.c_str(), theNumber);
446 const auto endOfStrippedFileName = theCompleteInputFileName.rfind(
" --");
447 const auto strippedInputFileName = theCompleteInputFileName.substr(0, endOfStrippedFileName);
450 if (
stat(strippedInputFileName.c_str(), &
buffer) == 0) {
452 files.push_back(theCompleteInputFileName);
453 if (theNumberedInputFileName == theInputFileName) {
466 if (theNumber == 0 && (
files.empty() ||
files.back() != plainFile)) {
467 edm::LogWarning(
"Alignment") <<
"The input file '" << plainFile <<
"' does not exist.";
481 for (
const auto &iTrajTrack :
tracks) {
489 unsigned int refTrajCount = 0;
492 ++iRefTraj, ++refTrajCount) {
499 if (
theMonitor && (nHitXy.first || nHitXy.second)) {
501 const auto offset = tracksPerTraj * refTrajCount;
502 for (
unsigned int iTrack = 0; iTrack < tracksPerTraj; ++iTrack) {
513 std::pair<unsigned int, unsigned int> hitResultXy(0, 0);
514 if (refTrajPtr->isValid()) {
516 if (!refTrajPtr->gblInput().empty()) {
518 unsigned int iHit = 0;
519 unsigned int numPointsWithMeas = 0;
520 std::vector<GblPoint>::iterator itPoint;
521 auto theGblInput = refTrajPtr->gblInput();
522 for (
unsigned int iTraj = 0; iTraj < refTrajPtr->gblInput().size(); ++iTraj) {
523 for (itPoint = refTrajPtr->gblInput()[iTraj].first.begin(); itPoint < refTrajPtr->gblInput()[iTraj].first.end();
527 if (itPoint->numMeasurements() >= 1)
531 hitResultXy.first = numPointsWithMeas;
533 if (hitResultXy.first == 0 || hitResultXy.first <
theMinNumHits)
536 if (refTrajPtr->gblInput().size() == 1) {
538 GblTrajectory aGblTrajectory(refTrajPtr->gblInput()[0].first, refTrajPtr->nominalField() != 0);
546 if (aGblTrajectory.isValid() && aGblTrajectory.getNumPoints() >=
theMinNumHits)
549 if (refTrajPtr->gblInput().size() == 2) {
551 GblTrajectory aGblTrajectory(refTrajPtr->gblInput(),
552 refTrajPtr->gblExtDerivatives(),
553 refTrajPtr->gblExtMeasurements(),
554 refTrajPtr->gblExtPrecisions());
556 if (aGblTrajectory.isValid() && aGblTrajectory.getNumPoints() >=
theMinNumHits)
561 std::vector<AlignmentParameters *> parVec(refTrajPtr->recHits().size());
563 std::vector<bool> validHitVecY(refTrajPtr->recHits().size(),
false);
565 for (
unsigned int iHit = 0; iHit < refTrajPtr->recHits().size(); ++iHit) {
569 hitResultXy.first = 0;
574 validHitVecY[iHit] = (flagXY >= 2);
579 for (
unsigned int iVirtualMeas = 0; iVirtualMeas < refTrajPtr->numberOfVirtualMeas(); ++iVirtualMeas) {
584 if (hitResultXy.first == 0 || hitResultXy.first <
theMinNumHits) {
586 hitResultXy.first = hitResultXy.second = 0;
591 hitResultXy.second = this->
addHitCount(parVec, validHitVecY);
603 const std::vector<bool> &validHitVecY)
const {
605 unsigned int nHitY = 0;
606 for (
unsigned int iHit = 0; iHit < validHitVecY.size(); ++iHit) {
607 Alignable *ali = (parVec[iHit] ? parVec[iHit]->alignable() :
nullptr);
618 if (validHitVecY[iHit]) {
620 if (pars == parVec[iHit])
633 throw cms::Exception(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::beginRun\n" 634 <<
"Using data (run = " <<
run.run() <<
") prior to the first defined IOV (" 656 std::ostringstream message;
658 message <<
"Trying to cache tracker alignment payloads for a run (" <<
runNumber <<
") in an IOV (" <<
firstRun 659 <<
") that was already cached.\n" 660 <<
"The following records in your input database tag have an IOV " 661 <<
"boundary that does not match your IOV definition:\n";
662 if (geometryRcd.validityInterval().first().eventID().run() >
firstRun) {
663 message <<
" - IdealGeometryRecord '" << geometryRcd.key().name() <<
"' (since " 664 << geometryRcd.validityInterval().first().eventID().run() <<
")\n";
668 message <<
" - GlobalPositionRecord '" << globalPosRcd.
key().
name() <<
"' (since " 671 message <<
" --> ignored\n";
678 message <<
" - TrackerAlignmentRcd '" << alignmentRcd.
key().
name() <<
"' (since " 683 message <<
" - TrackerSurfaceDeformationRcd '" << surfaceRcd.
key().
name() <<
"' (since " 688 message <<
" - TrackerAlignmentErrorExtendedRcd '" << errorRcd.
key().
name() <<
"' (since " 694 throw cms::Exception(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::beginRun\n" << message.str();
751 if (!recHitPtr->isValid())
791 GblPoint &gblPoint) {
793 std::vector<double> theDoubleBufferX, theDoubleBufferY;
794 theDoubleBufferX.clear();
795 theDoubleBufferY.clear();
802 if (!recHitPtr->isValid())
820 std::vector<IntegratedCalibrationBase::ValuesIndexPair> derivs;
823 (*iCalib)->derivatives(derivs, *recHitPtr, tsos,
setup,
eventInfo);
824 for (
auto iValuesInd = derivs.begin(); iValuesInd != derivs.end(); ++iValuesInd) {
826 globalLabel =
thePedeLabels->calibrationLabel(*iCalib, iValuesInd->second);
827 if (globalLabel > 0 && globalLabel <= 2147483647) {
829 theDoubleBufferX.push_back(iValuesInd->first.first);
830 theDoubleBufferY.push_back(iValuesInd->first.second);
832 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addGlobalData" 833 <<
"Invalid label " << globalLabel <<
" <= 0 or > 2147483647";
838 if (numGlobals > 0) {
839 Eigen::Matrix<double, 2, Eigen::Dynamic> globalDer{2, numGlobals};
840 for (
unsigned int i = 0;
i < numGlobals; ++
i) {
841 globalDer(0,
i) = theDoubleBufferX[
i];
842 globalDer(1,
i) = theDoubleBufferY[
i];
855 std::vector<float> &globalDerivativesX,
856 std::vector<float> &globalDerivativesY,
857 std::vector<int> &globalLabels,
872 bool hasSplitParameters =
thePedeLabels->hasSplitParameters(ali);
873 const unsigned int alignableLabel =
thePedeLabels->alignableLabel(ali);
875 if (0 == alignableLabel) {
876 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::globalDerivativesHierarchy" 877 <<
"Label not found, skip Alignable.";
881 const std::vector<bool> &selPars =
params->selector();
885 for (
unsigned int iSel = 0; iSel < selPars.size(); ++iSel) {
888 if (hasSplitParameters ==
true) {
891 globalLabels.push_back(
thePedeLabels->parameterLabel(alignableLabel, iSel));
902 eventInfo, tsos, ali->
mother(), alidet, globalDerivativesX, globalDerivativesY, globalLabels, lowestParams);
910 std::vector<double> &globalDerivativesX,
911 std::vector<double> &globalDerivativesY,
912 std::vector<int> &globalLabels,
927 bool hasSplitParameters =
thePedeLabels->hasSplitParameters(ali);
928 const unsigned int alignableLabel =
thePedeLabels->alignableLabel(ali);
930 if (0 == alignableLabel) {
931 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::globalDerivativesHierarchy" 932 <<
"Label not found, skip Alignable.";
936 const std::vector<bool> &selPars =
params->selector();
941 for (
unsigned int iSel = 0; iSel < selPars.size(); ++iSel) {
943 if (hasSplitParameters ==
true) {
946 globalLabel =
thePedeLabels->parameterLabel(alignableLabel, iSel);
948 if (globalLabel > 0 && globalLabel <= 2147483647) {
949 globalLabels.push_back(globalLabel);
953 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::globalDerivativesHierarchy" 954 <<
"Invalid label " << globalLabel <<
" <= 0 or > 2147483647";
964 eventInfo, tsos, ali->
mother(), alidet, globalDerivativesX, globalDerivativesY, globalLabels, lowestParams);
972 std::vector<float> &globalDerivativesX,
973 std::vector<float> &globalDerivativesY,
974 std::vector<int> &globalLabels)
const {
975 std::vector<IntegratedCalibrationBase::ValuesIndexPair> derivs;
979 for (
auto iValuesInd = derivs.begin(); iValuesInd != derivs.end(); ++iValuesInd) {
981 globalLabels.push_back(
thePedeLabels->calibrationLabel(*iCalib, iValuesInd->second));
982 globalDerivativesX.push_back(iValuesInd->first.first);
983 globalDerivativesY.push_back(iValuesInd->first.second);
1026 if (
recHit->dimension() < 2) {
1028 }
else if (
recHit->detUnit()) {
1029 return recHit->detUnit()->type().isTrackerPixel();
1031 if (dynamic_cast<const ProjectedSiStripRecHit2D *>(
recHit->hit())) {
1048 bool okRead =
reader.read(alis, setUserVars);
1049 bool numMatch =
true;
1051 std::stringstream
out;
1052 out <<
"Read " << alis.size() <<
" alignables";
1058 out <<
", but problems in reading";
1060 out <<
", possibly overwriting previous settings";
1063 if (okRead && allEmpty) {
1065 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1066 }
else if (!alis.empty()) {
1067 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1069 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1075 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1081 for (
const auto &iAli : alignables) {
1084 const auto &parVec(
params->parameters());
1085 const auto &parCov(
params->covariance());
1086 for (
int i = 0;
i < parVec.num_row(); ++
i) {
1087 if (parVec[
i] != 0.)
1089 for (
int j =
i;
j < parCov.num_col(); ++
j) {
1090 if (parCov[
i][
j] != 0.)
1105 if (outFilePlain.empty()) {
1106 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1107 <<
"treeFile parameter empty => skip writing for 'loop' " <<
loop;
1118 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1119 <<
"Problem " << ioerr <<
" in writeAlignableOriginalPositions";
1122 }
else if (
loop == 1) {
1124 const std::vector<std::string> inFiles(
theConfig.
getParameter<std::vector<std::string> >(
"mergeTreeFiles"));
1125 const std::vector<std::string> binFiles(
theConfig.
getParameter<std::vector<std::string> >(
"mergeBinaryFiles"));
1126 if (inFiles.size() != binFiles.size()) {
1127 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1128 <<
"'vstring mergeTreeFiles' and 'vstring mergeBinaryFiles' " 1129 <<
"differ in size";
1136 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1137 <<
"Problem " << ioerr <<
" writing MillePedeVariables";
1143 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1144 <<
"Problem " << ioerr <<
" in writeOrigRigidBodyAlignmentParameters, " <<
loop;
1149 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1150 <<
"Problem " << ioerr <<
" in writeAlignableAbsolutePositions, " <<
loop;
1159 for (
const auto &iAli : alis) {
1162 throw cms::Exception(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::buildUserVariables" 1163 <<
"No parameters for alignable";
1167 for (
unsigned int iPar = 0; iPar < userVars->
size(); ++iPar) {
1178 thePedeLabels->alignableTracker()->objectIdProvider().typeToName(iAli->alignableObjectId()));
1179 params->setUserVariables(userVars);
1186 if (
mode ==
"full") {
1188 }
else if (
mode ==
"mille") {
1190 }
else if (
mode ==
"pede") {
1192 }
else if (
mode ==
"pedeSteer") {
1194 }
else if (
mode ==
"pedeRun") {
1196 }
else if (
mode ==
"pedeRead") {
1201 <<
"', use 'full', 'mille', 'pede', 'pedeRun', 'pedeSteer' or 'pedeRead'.";
1209 const std::vector<std::string> &inFiles)
const {
1213 for (std::vector<std::string>::const_iterator iFile = inFiles.begin(); iFile != inFiles.end(); ++iFile) {
1215 const std::vector<AlignmentUserVariables *> mpVars =
1218 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addHitStatistics" 1219 <<
"Error " << ierr <<
" reading from " <<
inFile <<
", tree " << fromIov
1220 <<
", or problems in addHits";
1223 for (std::vector<AlignmentUserVariables *>::const_iterator
i = mpVars.begin();
i != mpVars.end(); ++
i) {
1233 const std::vector<AlignmentUserVariables *> &mpVars)
const {
1234 bool allOk = (mpVars.size() == alis.size());
1235 std::vector<AlignmentUserVariables *>::const_iterator iUser = mpVars.begin();
1236 for (
auto iAli = alis.cbegin(); iAli != alis.cend() && iUser != mpVars.end(); ++iAli, ++iUser) {
1240 if (!mpVarNew || !mpVarOld || mpVarOld->
size() != mpVarNew->
size()) {
1253 template <
typename GlobalDerivativeMatrix>
1255 const std::vector<float> &globalDerivativesy,
1256 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM) {
1257 static_assert(GlobalDerivativeMatrix::RowsAtCompileTime == 2,
"global derivative matrix must have two rows");
1259 for (
size_t i = 0;
i < globalDerivativesx.size(); ++
i) {
1260 aGlobalDerivativesM(0,
i) = globalDerivativesx[
i];
1261 aGlobalDerivativesM(1,
i) = globalDerivativesy[
i];
1267 typename LocalDerivativeMatrix,
1268 typename ResidualMatrix,
1269 typename GlobalDerivativeMatrix>
1271 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM,
1272 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
1273 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM)
const {
1275 "'aLocalDerivativesM' and 'aHitResidualsM' must have the " 1276 "same underlying scalar type");
1278 "'aLocalDerivativesM' and 'aGlobalDerivativesM' must have the " 1279 "same underlying scalar type");
1281 Eigen::SelfAdjointEigenSolver<typename CovarianceMatrix::PlainObject> myDiag{aHitCovarianceM};
1283 auto aTranfoToDiagonalSystemInv =
1284 myDiag.eigenvectors().transpose().template cast<typename LocalDerivativeMatrix::Scalar>();
1286 aHitCovarianceM = myDiag.eigenvalues().asDiagonal();
1287 aLocalDerivativesM = aTranfoToDiagonalSystemInv * aLocalDerivativesM;
1288 aHitResidualsM = aTranfoToDiagonalSystemInv * aHitResidualsM;
1289 if (aGlobalDerivativesM.size() > 0) {
1291 aGlobalDerivativesM = aTranfoToDiagonalSystemInv * aGlobalDerivativesM;
1296 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
1299 unsigned int iVirtualMeas,
1300 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
1301 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
1302 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM) {
1305 const unsigned int xIndex = iVirtualMeas + refTrajPtr->numberOfHitMeas();
1307 aHitCovarianceM(0, 0) = refTrajPtr->measurementErrors()[xIndex][xIndex];
1308 aHitResidualsM(0, 0) = refTrajPtr->measurements()[xIndex];
1310 const auto &locDerivMatrix = refTrajPtr->derivatives();
1311 for (
int i = 0;
i < locDerivMatrix.num_col(); ++
i) {
1312 aLocalDerivativesM(0,
i) = locDerivMatrix[xIndex][
i];
1317 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
1319 unsigned int iTrajHit,
1320 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
1321 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
1322 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM) {
1325 const unsigned int xIndex = iTrajHit * 2;
1326 const unsigned int yIndex = iTrajHit * 2 + 1;
1328 aHitCovarianceM(0, 0) = refTrajPtr->measurementErrors()[xIndex][xIndex];
1329 aHitCovarianceM(0, 1) = refTrajPtr->measurementErrors()[xIndex][yIndex];
1330 aHitCovarianceM(1, 0) = refTrajPtr->measurementErrors()[yIndex][xIndex];
1331 aHitCovarianceM(1, 1) = refTrajPtr->measurementErrors()[yIndex][yIndex];
1333 aHitResidualsM(0, 0) = refTrajPtr->measurements()[xIndex] - refTrajPtr->trajectoryPositions()[xIndex];
1334 aHitResidualsM(1, 0) = refTrajPtr->measurements()[yIndex] - refTrajPtr->trajectoryPositions()[yIndex];
1336 const auto &locDerivMatrix = refTrajPtr->derivatives();
1337 for (
int i = 0;
i < locDerivMatrix.num_col(); ++
i) {
1338 aLocalDerivativesM(0,
i) = locDerivMatrix[xIndex][
i];
1339 aLocalDerivativesM(1,
i) = locDerivMatrix[yIndex][
i];
1345 unsigned int iTrajHit,
1346 const std::vector<int> &globalLabels,
1347 const std::vector<float> &globalDerivativesX,
1348 const std::vector<float> &globalDerivativesY) {
1351 if ((aRecHit)->dimension() == 1) {
1352 return this->
callMille1D(refTrajPtr, iTrajHit, globalLabels, globalDerivativesX);
1354 return this->
callMille2D(refTrajPtr, iTrajHit, globalLabels, globalDerivativesX, globalDerivativesY);
1360 unsigned int iTrajHit,
1361 const std::vector<int> &globalLabels,
1362 const std::vector<float> &globalDerivativesX) {
1364 const unsigned int xIndex = iTrajHit * 2;
1368 const int nLocal = locDerivMatrix.num_col();
1369 std::vector<float> localDerivatives(nLocal);
1370 for (
unsigned int i = 0;
i < localDerivatives.size(); ++
i) {
1371 localDerivatives[
i] = locDerivMatrix[xIndex][
i];
1375 float residX = refTrajPtr->measurements()[xIndex] - refTrajPtr->trajectoryPositions()[xIndex];
1376 float hitErrX = TMath::Sqrt(refTrajPtr->measurementErrors()[xIndex][xIndex]);
1379 const int nGlobal = globalDerivativesX.size();
1384 nLocal, &(localDerivatives[0]), nGlobal, &(globalDerivativesX[0]), &(globalLabels[0]), residX, hitErrX);
1388 aRecHit, &(localDerivatives[0]), nLocal, &(globalDerivativesX[0]), nGlobal, &(globalLabels[0]));
1389 theMonitor->fillResiduals(aRecHit, refTrajPtr->trajectoryStates()[iTrajHit], iTrajHit, residX, hitErrX,
false);
1397 unsigned int iTrajHit,
1398 const std::vector<int> &globalLabels,
1399 const std::vector<float> &globalDerivativesx,
1400 const std::vector<float> &globalDerivativesy) {
1403 if ((aRecHit)->dimension() != 2) {
1404 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::callMille2D" 1405 <<
"You try to call method for 2D hits for a " << (aRecHit)->
dimension()
1406 <<
"D Hit. Hit gets ignored!";
1410 Eigen::Matrix<double, 2, 2> aHitCovarianceM;
1411 Eigen::Matrix<float, 2, 1> aHitResidualsM;
1412 Eigen::Matrix<float, 2, Eigen::Dynamic> aLocalDerivativesM{2, refTrajPtr->derivatives().num_col()};
1414 this->
addRefTrackData2D(refTrajPtr, iTrajHit, aHitCovarianceM, aHitResidualsM, aLocalDerivativesM);
1415 Eigen::Matrix<float, 2, Eigen::Dynamic> aGlobalDerivativesM{2, globalDerivativesx.size()};
1421 const double corr = aHitCovarianceM(0, 1) /
sqrt(aHitCovarianceM(0, 0) * aHitCovarianceM(1, 1));
1425 switch (aRecHit->geographicalId().subdetId()) {
1429 this->
diagonalize(aHitCovarianceM, aLocalDerivativesM, aHitResidualsM, aGlobalDerivativesM);
1436 float newResidX = aHitResidualsM(0, 0);
1437 float newResidY = aHitResidualsM(1, 0);
1438 float newHitErrX = TMath::Sqrt(aHitCovarianceM(0, 0));
1439 float newHitErrY = TMath::Sqrt(aHitCovarianceM(1, 1));
1443 std::vector<float> newLocalDerivs(aLocalDerivativesM.size());
1444 Eigen::Map<Eigen::Matrix<float, 2, Eigen::Dynamic, Eigen::RowMajor> >(
1445 newLocalDerivs.data(), aLocalDerivativesM.rows(), aLocalDerivativesM.cols()) = aLocalDerivativesM;
1446 float *newLocalDerivsX = &(newLocalDerivs[0]);
1447 float *newLocalDerivsY = &(newLocalDerivs[aLocalDerivativesM.cols()]);
1451 std::vector<float> newGlobDerivs(aGlobalDerivativesM.size());
1452 Eigen::Map<Eigen::Matrix<float, 2, Eigen::Dynamic, Eigen::RowMajor> >(
1453 newGlobDerivs.data(), aGlobalDerivativesM.rows(), aGlobalDerivativesM.cols()) = aGlobalDerivativesM;
1454 float *newGlobDerivsX = &(newGlobDerivs[0]);
1455 float *newGlobDerivsY = &(newGlobDerivs[aGlobalDerivativesM.cols()]);
1457 const int nLocal = aLocalDerivativesM.cols();
1458 const int nGlobal = aGlobalDerivativesM.cols();
1460 if (diag && (newHitErrX > newHitErrY)) {
1464 std::swap(newLocalDerivsX, newLocalDerivsY);
1465 std::swap(newGlobDerivsX, newGlobDerivsY);
1470 theMille->mille(nLocal, newLocalDerivsX, nGlobal, newGlobDerivsX, &(globalLabels[0]), newResidX, newHitErrX);
1473 theMonitor->fillDerivatives(aRecHit, newLocalDerivsX, nLocal, newGlobDerivsX, nGlobal, &(globalLabels[0]));
1475 aRecHit, refTrajPtr->trajectoryStates()[iTrajHit], iTrajHit, newResidX, newHitErrX,
false);
1477 const bool isReal2DHit = this->
is2D(aRecHit);
1479 theMille->mille(nLocal, newLocalDerivsY, nGlobal, newGlobDerivsY, &(globalLabels[0]), newResidY, newHitErrY);
1481 theMonitor->fillDerivatives(aRecHit, newLocalDerivsY, nLocal, newGlobDerivsY, nGlobal, &(globalLabels[0]));
1483 aRecHit, refTrajPtr->trajectoryStates()[iTrajHit], iTrajHit, newResidY, newHitErrY,
true);
1487 return (isReal2DHit ? 2 : 1);
1492 unsigned int iVirtualMeas) {
1493 Eigen::Matrix<double, 1, 1> aHitCovarianceM;
1494 Eigen::Matrix<float, 1, 1> aHitResidualsM;
1495 Eigen::Matrix<float, 1, Eigen::Dynamic> aLocalDerivativesM{1, refTrajPtr->derivatives().num_col()};
1500 auto aGlobalDerivativesM = Eigen::Matrix<float, 1, 1>::Zero();
1502 float newResidX = aHitResidualsM(0, 0);
1503 float newHitErrX = TMath::Sqrt(aHitCovarianceM(0, 0));
1504 std::vector<float> newLocalDerivsX(aLocalDerivativesM.size());
1505 Eigen::Map<Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> >(
1506 newLocalDerivsX.data(), aLocalDerivativesM.rows(), aLocalDerivativesM.cols()) = aLocalDerivativesM;
1508 std::vector<float> newGlobDerivsX(aGlobalDerivativesM.size());
1509 Eigen::Map<Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> >(
1510 newGlobDerivsX.data(), aGlobalDerivativesM.rows(), aGlobalDerivativesM.cols()) = aGlobalDerivativesM;
1512 const int nLocal = aLocalDerivativesM.cols();
1513 const int nGlobal = 0;
1515 theMille->mille(nLocal, newLocalDerivsX.data(), nGlobal, newGlobDerivsX.data(), &nGlobal, newResidX, newHitErrX);
1522 TsosVectorCollection::const_iterator iTsoses = lasBeamTsoses.begin();
1523 for (TkFittedLasBeamCollection::const_iterator iBeam = lasBeams.begin(), iEnd = lasBeams.end(); iBeam != iEnd;
1524 ++iBeam, ++iTsoses) {
1526 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addLaserData" 1527 <<
"Beam " << iBeam->getBeamId() <<
" with " << iBeam->parameters().size()
1528 <<
" parameters and " << iBeam->getData().size() <<
" hits.\n There are " 1529 << iTsoses->size() <<
" TSOSes.";
1531 this->
addLasBeam(eventInfo, *iBeam, *iTsoses);
1538 const std::vector<TrajectoryStateOnSurface> &tsoses) {
1540 std::vector<float> lasLocalDerivsX;
1543 for (
unsigned int iHit = 0; iHit < tsoses.size(); ++iHit) {
1550 lasLocalDerivsX.clear();
1557 for (
unsigned int nFitParams = 0; nFitParams < static_cast<unsigned int>(lasBeam.
parameters().size());
1569 const float residual =
hit.localPosition().
x() - tsoses[iHit].localPosition().x();
1571 const float error = 0.003;
1573 theMille->mille(lasLocalDerivsX.size(),
1574 &(lasLocalDerivsX[0]),
1587 const bool doOutputOnStdout(pxbSurveyCfg.
getParameter<
bool>(
"doOutputOnStdout"));
1588 if (doOutputOnStdout) {
1589 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addPxbSurvey" 1590 <<
"# Output from addPxbSurvey follows below because " 1591 <<
"doOutputOnStdout is set to True";
1596 pxbSurveyCfg.
getParameter<
unsigned int>(
"toySurveySeed"));
1600 std::vector<SurveyPxbImageLocalFit> measurements;
1606 if (doOutputOnStdout) {
1607 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addPxbSurvey" 1608 <<
"Module " <<
i <<
": ";
1633 fidpointvec.push_back(fidpoint0inSurf1frame);
1634 fidpointvec.push_back(fidpoint1inSurf1frame);
1635 fidpointvec.push_back(fidpoint2);
1636 fidpointvec.push_back(fidpoint3);
1646 a = measurements[
i].getLocalParameters();
1650 if (doOutputOnStdout) {
1651 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addPxbSurvey" 1652 <<
"a: " <<
a[0] <<
", " <<
a[1] <<
", " <<
a[2] <<
", " <<
a[3]
1653 <<
" S= " <<
sqrt(
a[2] *
a[2] +
a[3] *
a[3]) <<
" phi= " << atan(
a[3] /
a[2])
1654 <<
" chi2= " <<
chi2 << std::endl;
1663 theMille->mille((
int)measurements[
i].getLocalDerivsSize(),
1664 measurements[
i].getLocalDerivsPtr(
j),
1665 (
int)measurements[
i].getGlobalDerivsSize(),
1666 measurements[
i].getGlobalDerivsPtr(
j),
1667 measurements[
i].getGlobalDerivsLabelPtr(
j),
1668 measurements[
i].getResiduum(
j),
1669 measurements[
i].getSigma(
j));
1679 if (runRangeSelection.empty())
1682 const auto runRanges =
1685 return !(runRanges.empty());
bool processesEvents() override
Returns whether MP should process events in the current configuration.
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
const TimeTypeSpecs timeTypeSpecs[]
std::vector< int > theIntBuffer
std::shared_ptr< AlignPCLThresholdsHG > theThresholds
const ConstTrajTrackPairCollection & trajTrackPairs() const
T getParameter(std::string const &) const
void resetParameters(void)
reset parameters, correlations, user variables
const IOVSyncValue & first() const
const align::RunNumber firstIOV_
AlignmentParameters * alignmentParameters() const
Get the AlignmentParameters.
bool supportsCalibrations() override
Returns whether MP supports calibrations.
Alignable * mother() const
Return pointer to container alignable (if any)
std::unordered_map< std::string, std::vector< float > > param_map
std::unique_ptr< MillePedeMonitor > theMonitor
void increaseHitsX(unsigned int add=1)
increase hits for x-measurement
bool setParametersForRunRange(const RunRange &runrange) override
void globalDerivativesCalibration(const TransientTrackingRecHit::ConstRecHitPointer &recHit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, const EventInfo &eventInfo, std::vector< float > &globalDerivativesX, std::vector< float > &globalDerivativesY, std::vector< int > &globalLabels) const
adding derivatives from integrated calibrations
bool addCalibrations(const std::vector< IntegratedCalibrationBase *> &iCals) override
Pass integrated calibrations to Millepede (they are not owned by Millepede!)
const bool enableAlignableUpdates_
Derivative< X, A >::type derivative(const A &_)
virtual void endRun(const EventInfo &, const EndRunInfo &, const edm::EventSetup &)
Run on run products, e.g. TkLAS.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
std::vector< coord_t > fidpoint_t
def create(alignables, pedeDump, additionalData, outputFile, config)
std::map< std::string, AlignPCLThreshold > threshold_map
std::string fullPath() const
void increaseHitsY(unsigned int add=1)
increase hits for y-measurement
void endLuminosityBlock(const edm::EventSetup &) override
called at end of luminosity block
static constexpr auto TID
TrajectoryFactoryBase::ReferenceTrajectoryCollection RefTrajColl
std::vector< ParameterSet > VParameterSet
std::unique_ptr< TrajectoryFactoryBase > theTrajectoryFactory
bool theDoSurveyPixelBarrel
bool areEmptyParams(const align::Alignables &alignables) const
std::unique_ptr< gbl::MilleBinary > theBinary
bool exists(std::string const ¶meterName) const
checks if a parameter exists
int addGlobalData(const edm::EventSetup &setup, const EventInfo &eventInfo, const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iHit, gbl::GblPoint &gblPoint)
align::RunNumber RunNumber
unsigned int theMinNumHits
void restoreCachedTransformations(void)
restore the previously cached position, rotation and other parameters
std::shared_ptr< PedeLabelerBase > thePedeLabels
bool globalDerivativesHierarchy(const EventInfo &eventInfo, const TrajectoryStateOnSurface &tsos, Alignable *ali, const AlignableDetOrUnitPtr &alidet, std::vector< float > &globalDerivativesX, std::vector< float > &globalDerivativesY, std::vector< int > &globalLabels, AlignmentParameters *&lowestParams) const
recursively adding derivatives and labels, false if problems
const align::Alignables & alignables(void) const
get all alignables
void applyParameters(void)
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet.
std::vector< std::string > getExistingFormattedFiles(const std::vector< std::string > &plainFiles, const std::string &theDir)
bool areIOVsSpecified() const
bool isMode(unsigned int testMode) const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
int callMille2D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesx, const std::vector< float > &globalDerivativesy)
math::Error< 5 >::type CovarianceMatrix
Log< level::Error, false > LogError
const std::vector< SiStripLaserRecHit2D > & getData(void) const
access the collection of hits
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void writeMillePedeVariables(const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
const bool ignoreFirstIOVCheck_
const bool ignoreHitsWithoutGlobalDerivatives_
void writeAlignableOriginalPositions(const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr) override
write Alignable original (before misalignment) absolute positions
void addLasBeam(const EventInfo &eventInfo, const TkFittedLasBeam &lasBeam, const std::vector< TrajectoryStateOnSurface > &tsoses)
align::Alignables theAlignables
define event information passed to algorithms
T getUntrackedParameter(std::string const &, T const &) const
int callMille(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesX, const std::vector< float > &globalDerivativesY)
calls callMille1D or callMille2D
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
U second(std::pair< T, U > const &p)
void beginLuminosityBlock(const edm::EventSetup &) override
called at begin of luminosity block (resets Mille binary in mille mode)
std::vector< align::RunNumber > cachedRuns_
std::string doDice(const fidpoint_t &fidpointvec, const idPair_t &id, const bool rotate=false)
unsigned int hitsX() const
get number of hits for x-measurement
int callMille1D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesX)
calls Mille for 1D hits
void addLaserData(const EventInfo &eventInfo, const TkFittedLasBeamCollection &tkLasBeams, const TsosVectorCollection &tkLasBeamTsoses)
int addMeasurementData(const edm::EventSetup &setup, const EventInfo &eventInfo, const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iHit, AlignmentParameters *¶ms)
virtual bool storeThresholds(const int &nRecords, const AlignPCLThresholdsHG::threshold_map &thresholdMap, const AlignPCLThresholdsHG::param_map &floatMap)
Container::value_type value_type
void beginRun(const edm::Run &run, const edm::EventSetup &setup, bool changed) override
called at begin of run
CLHEP::HepMatrix AlgebraicMatrix
RunRanges makeNonOverlappingRunRanges(const edm::VParameterSet &runRanges, const RunNumber &defaultRun)
bool is2D(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
true if hit belongs to 2D detector (currently tracker specific)
void makeGlobDerivMatrix(const std::vector< float > &globalDerivativesx, const std::vector< float > &globalDerivativesy, Eigen::MatrixBase< GlobalDerivativeMatrix > &aGlobalDerivativesM)
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
void writeOrigRigidBodyAlignmentParameters(const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr) override
write RigidBodyAlignmentParameters as applied on top of original positions
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
RunRanges makeUniqueRunRanges(const edm::VParameterSet &runRanges, const RunNumber &defaultRun)
const AlgebraicMatrix & derivatives() const
matrix of local derivatives: columns are parameters, rows are hits
std::shared_ptr< PixelTopologyMap > pixelTopologyMap
const edm::ESGetToken< AlignPCLThresholdsHG, AlignPCLThresholdsHGRcd > aliThrToken_
AlignmentParameterStore * theAlignmentParameterStore
directory for all kind of files
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
bool addHitStatistics(int fromLoop, const std::string &outFile, const std::vector< std::string > &inFiles) const
void diagonalize(Eigen::MatrixBase< CovarianceMatrix > &aHitCovarianceM, Eigen::MatrixBase< LocalDerivativeMatrix > &aLocalDerivativesM, Eigen::MatrixBase< ResidualMatrix > &aHitResidualsM, Eigen::MatrixBase< GlobalDerivativeMatrix > &aGlobalDerivativesM) const
std::vector< AlignmentUserVariables * > readMillePedeVariables(const align::Alignables &alivec, const char *filename, int iter, int &ierr)
edm::ParameterSet theConfig
bool addHits(const align::Alignables &alis, const std::vector< AlignmentUserVariables *> &mpVars) const
void addRefTrackVirtualMeas1D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iVirtualMeas, Eigen::MatrixBase< CovarianceMatrix > &aHitCovarianceM, Eigen::MatrixBase< ResidualMatrix > &aHitResidualsM, Eigen::MatrixBase< LocalDerivativeMatrix > &aLocalDerivativesM)
adds data for a specific virtual measurement from reference trajectory
void addRefTrackData2D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, Eigen::MatrixBase< CovarianceMatrix > &aHitCovarianceM, Eigen::MatrixBase< ResidualMatrix > &aHitResidualsM, Eigen::MatrixBase< LocalDerivativeMatrix > &aLocalDerivativesM)
adds data from reference trajectory from a specific Hit
unsigned int decodeMode(const std::string &mode) const
unsigned int addHitCount(const std::vector< AlignmentParameters *> &parVec, const std::vector< bool > &validHitVecY) const
std::unique_ptr< PedeSteerer > thePedeSteer
bool storeAlignments() override
Returns whether MP produced results to be stored.
void terminate() override
Called at end of job.
const bool skipGlobalPositionRcdCheck_
unsigned int getBeamId(void) const
return the full beam identifier
void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store) override
Called at beginning of job.
std::vector< ConstRecHitPointer > ConstRecHitContainer
unsigned int firstFixedParameter() const
Log< level::Info, false > LogInfo
void addVirtualMeas(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iVirtualMeas)
adds data for virtual measurements from reference trajectory
bool readFromPede(const edm::ParameterSet &mprespset, bool setUserVars, const RunRange &runrange)
read pede input defined by 'psetName', flag to create/not create MillePedeVariables ...
std::pair< unsigned int, unsigned int > addReferenceTrajectory(const edm::EventSetup &setup, const EventInfo &eventInfo, const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr)
fill mille for a trajectory, returning number of x/y hits ([0,0] if 'bad' trajectory) ...
void buildUserVariables(const align::Alignables &alignables) const
add MillePedeVariables for each AlignmentParameters (exception if no parameters...)
auto const & tracks
cannot be loose
std::vector< float > theFloatBufferX
void addUntrackedParameter(std::string const &name, T const &value)
std::vector< IntegratedCalibrationBase * > theCalibrations
Class to hold one picture of the BPix survey.
std::vector< value_t > localpars_t
void writeAlignableAbsolutePositions(const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr) override
write Alignable current absolute positions
std::vector< Alignable * > Alignables
const EventID & eventID() const
void run(const edm::EventSetup &setup, const EventInfo &eventInfo) override
Run the algorithm on trajectories and tracks.
align::RunNumber lastProcessedRun_
const bool enforceSingleIOVInput_
~MillePedeAlignmentAlgorithm() override
Destructor.
MillePedeAlignmentAlgorithm(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Constructor.
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
std::vector< TkFittedLasBeam > TkFittedLasBeamCollection
void cacheTransformations(void)
cache the current position, rotation and other parameters
std::vector< float > theFloatBufferY
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
unsigned int size() const
number of parameters
static const count_t nMsrmts
EventSetupRecordKey key() const override
eventInfo
add run, event number and lumi section
void addPxbSurvey(const edm::ParameterSet &pxbSurveyCfg)
add measurement data from PXB survey
std::unique_ptr< AlignableNavigator > theAlignableNavigator
Log< level::Warning, false > LogWarning
const std::vector< Scalar > & parameters() const
parallel to derivatives()
const align::RunRanges uniqueRunRanges_
unsigned int doIO(int loop) const
std::vector< std::vector< TrajectoryStateOnSurface > > TsosVectorCollection
define run information passed to algorithms (in endRun)
unsigned int hitsY() const
get number of hits for y-measurement
Constructor of the full muon geometry.
uint32_t dimension(pat::CandKinResolution::Parametrization parametrization)
Returns the number of free parameters in a parametrization (3 or 4)
ValidityInterval validityInterval() const
const char * name() const
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection
void throwException(const std::string &message, const std::string &methodName)
bool setAllDefault(unsigned int nParam)
set default values for all data concerning nParam (false if nParam out of range)
static constexpr auto TEC
std::unique_ptr< Mille > theMille