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();
755 if (!recHitPtr->isValid())
795 GblPoint &gblPoint) {
797 std::vector<double> theDoubleBufferX, theDoubleBufferY;
798 theDoubleBufferX.clear();
799 theDoubleBufferY.clear();
806 if (!recHitPtr->isValid())
824 std::vector<IntegratedCalibrationBase::ValuesIndexPair> derivs;
827 (*iCalib)->derivatives(derivs, *recHitPtr, tsos,
setup,
eventInfo);
828 for (
auto iValuesInd = derivs.begin(); iValuesInd != derivs.end(); ++iValuesInd) {
830 globalLabel =
thePedeLabels->calibrationLabel(*iCalib, iValuesInd->second);
831 if (globalLabel > 0 && globalLabel <= 2147483647) {
833 theDoubleBufferX.push_back(iValuesInd->first.first);
834 theDoubleBufferY.push_back(iValuesInd->first.second);
836 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addGlobalData" 837 <<
"Invalid label " << globalLabel <<
" <= 0 or > 2147483647";
842 if (numGlobals > 0) {
843 Eigen::Matrix<double, 2, Eigen::Dynamic> globalDer{2, numGlobals};
844 for (
unsigned int i = 0;
i < numGlobals; ++
i) {
845 globalDer(0,
i) = theDoubleBufferX[
i];
846 globalDer(1,
i) = theDoubleBufferY[
i];
859 std::vector<float> &globalDerivativesX,
860 std::vector<float> &globalDerivativesY,
861 std::vector<int> &globalLabels,
876 bool hasSplitParameters =
thePedeLabels->hasSplitParameters(ali);
877 const unsigned int alignableLabel =
thePedeLabels->alignableLabel(ali);
879 if (0 == alignableLabel) {
880 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::globalDerivativesHierarchy" 881 <<
"Label not found, skip Alignable.";
885 const std::vector<bool> &selPars =
params->selector();
889 for (
unsigned int iSel = 0; iSel < selPars.size(); ++iSel) {
892 if (hasSplitParameters ==
true) {
895 globalLabels.push_back(
thePedeLabels->parameterLabel(alignableLabel, iSel));
906 eventInfo, tsos, ali->
mother(), alidet, globalDerivativesX, globalDerivativesY, globalLabels, lowestParams);
914 std::vector<double> &globalDerivativesX,
915 std::vector<double> &globalDerivativesY,
916 std::vector<int> &globalLabels,
931 bool hasSplitParameters =
thePedeLabels->hasSplitParameters(ali);
932 const unsigned int alignableLabel =
thePedeLabels->alignableLabel(ali);
934 if (0 == alignableLabel) {
935 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::globalDerivativesHierarchy" 936 <<
"Label not found, skip Alignable.";
940 const std::vector<bool> &selPars =
params->selector();
945 for (
unsigned int iSel = 0; iSel < selPars.size(); ++iSel) {
947 if (hasSplitParameters ==
true) {
950 globalLabel =
thePedeLabels->parameterLabel(alignableLabel, iSel);
952 if (globalLabel > 0 && globalLabel <= 2147483647) {
953 globalLabels.push_back(globalLabel);
957 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::globalDerivativesHierarchy" 958 <<
"Invalid label " << globalLabel <<
" <= 0 or > 2147483647";
968 eventInfo, tsos, ali->
mother(), alidet, globalDerivativesX, globalDerivativesY, globalLabels, lowestParams);
976 std::vector<float> &globalDerivativesX,
977 std::vector<float> &globalDerivativesY,
978 std::vector<int> &globalLabels)
const {
979 std::vector<IntegratedCalibrationBase::ValuesIndexPair> derivs;
983 for (
auto iValuesInd = derivs.begin(); iValuesInd != derivs.end(); ++iValuesInd) {
985 globalLabels.push_back(
thePedeLabels->calibrationLabel(*iCalib, iValuesInd->second));
986 globalDerivativesX.push_back(iValuesInd->first.first);
987 globalDerivativesY.push_back(iValuesInd->first.second);
1030 if (
recHit->dimension() < 2) {
1032 }
else if (
recHit->detUnit()) {
1033 return recHit->detUnit()->type().isTrackerPixel();
1035 if (dynamic_cast<const ProjectedSiStripRecHit2D *>(
recHit->hit())) {
1052 bool okRead =
reader.read(alis, setUserVars);
1053 bool numMatch =
true;
1055 std::stringstream
out;
1056 out <<
"Read " << alis.size() <<
" alignables";
1062 out <<
", but problems in reading";
1064 out <<
", possibly overwriting previous settings";
1067 if (okRead && allEmpty) {
1069 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1070 }
else if (!alis.empty()) {
1071 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1073 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1079 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1085 for (
const auto &iAli : alignables) {
1088 const auto &parVec(
params->parameters());
1089 const auto &parCov(
params->covariance());
1090 for (
int i = 0;
i < parVec.num_row(); ++
i) {
1091 if (parVec[
i] != 0.)
1093 for (
int j =
i;
j < parCov.num_col(); ++
j) {
1094 if (parCov[
i][
j] != 0.)
1109 if (outFilePlain.empty()) {
1110 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1111 <<
"treeFile parameter empty => skip writing for 'loop' " <<
loop;
1122 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1123 <<
"Problem " << ioerr <<
" in writeAlignableOriginalPositions";
1126 }
else if (
loop == 1) {
1128 const std::vector<std::string> inFiles(
theConfig.
getParameter<std::vector<std::string> >(
"mergeTreeFiles"));
1129 const std::vector<std::string> binFiles(
theConfig.
getParameter<std::vector<std::string> >(
"mergeBinaryFiles"));
1130 if (inFiles.size() != binFiles.size()) {
1131 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1132 <<
"'vstring mergeTreeFiles' and 'vstring mergeBinaryFiles' " 1133 <<
"differ in size";
1140 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1141 <<
"Problem " << ioerr <<
" writing MillePedeVariables";
1147 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1148 <<
"Problem " << ioerr <<
" in writeOrigRigidBodyAlignmentParameters, " <<
loop;
1153 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1154 <<
"Problem " << ioerr <<
" in writeAlignableAbsolutePositions, " <<
loop;
1163 for (
const auto &iAli : alis) {
1166 throw cms::Exception(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::buildUserVariables" 1167 <<
"No parameters for alignable";
1171 for (
unsigned int iPar = 0; iPar < userVars->
size(); ++iPar) {
1182 thePedeLabels->alignableTracker()->objectIdProvider().typeToName(iAli->alignableObjectId()));
1183 params->setUserVariables(userVars);
1190 if (
mode ==
"full") {
1192 }
else if (
mode ==
"mille") {
1194 }
else if (
mode ==
"pede") {
1196 }
else if (
mode ==
"pedeSteer") {
1198 }
else if (
mode ==
"pedeRun") {
1200 }
else if (
mode ==
"pedeRead") {
1205 <<
"', use 'full', 'mille', 'pede', 'pedeRun', 'pedeSteer' or 'pedeRead'.";
1213 const std::vector<std::string> &inFiles)
const {
1217 for (std::vector<std::string>::const_iterator iFile = inFiles.begin(); iFile != inFiles.end(); ++iFile) {
1219 const std::vector<AlignmentUserVariables *> mpVars =
1222 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addHitStatistics" 1223 <<
"Error " << ierr <<
" reading from " <<
inFile <<
", tree " << fromIov
1224 <<
", or problems in addHits";
1227 for (std::vector<AlignmentUserVariables *>::const_iterator
i = mpVars.begin();
i != mpVars.end(); ++
i) {
1237 const std::vector<AlignmentUserVariables *> &mpVars)
const {
1238 bool allOk = (mpVars.size() == alis.size());
1239 std::vector<AlignmentUserVariables *>::const_iterator iUser = mpVars.begin();
1240 for (
auto iAli = alis.cbegin(); iAli != alis.cend() && iUser != mpVars.end(); ++iAli, ++iUser) {
1244 if (!mpVarNew || !mpVarOld || mpVarOld->
size() != mpVarNew->
size()) {
1257 template <
typename GlobalDerivativeMatrix>
1259 const std::vector<float> &globalDerivativesy,
1260 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM) {
1261 static_assert(GlobalDerivativeMatrix::RowsAtCompileTime == 2,
"global derivative matrix must have two rows");
1263 for (
size_t i = 0;
i < globalDerivativesx.size(); ++
i) {
1264 aGlobalDerivativesM(0,
i) = globalDerivativesx[
i];
1265 aGlobalDerivativesM(1,
i) = globalDerivativesy[
i];
1271 typename LocalDerivativeMatrix,
1272 typename ResidualMatrix,
1273 typename GlobalDerivativeMatrix>
1275 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM,
1276 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
1277 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM)
const {
1279 "'aLocalDerivativesM' and 'aHitResidualsM' must have the " 1280 "same underlying scalar type");
1282 "'aLocalDerivativesM' and 'aGlobalDerivativesM' must have the " 1283 "same underlying scalar type");
1285 Eigen::SelfAdjointEigenSolver<typename CovarianceMatrix::PlainObject> myDiag{aHitCovarianceM};
1287 auto aTranfoToDiagonalSystemInv =
1288 myDiag.eigenvectors().transpose().template cast<typename LocalDerivativeMatrix::Scalar>();
1290 aHitCovarianceM = myDiag.eigenvalues().asDiagonal();
1291 aLocalDerivativesM = aTranfoToDiagonalSystemInv * aLocalDerivativesM;
1292 aHitResidualsM = aTranfoToDiagonalSystemInv * aHitResidualsM;
1293 if (aGlobalDerivativesM.size() > 0) {
1295 aGlobalDerivativesM = aTranfoToDiagonalSystemInv * aGlobalDerivativesM;
1300 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
1303 unsigned int iVirtualMeas,
1304 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
1305 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
1306 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM) {
1309 const unsigned int xIndex = iVirtualMeas + refTrajPtr->numberOfHitMeas();
1311 aHitCovarianceM(0, 0) = refTrajPtr->measurementErrors()[xIndex][xIndex];
1312 aHitResidualsM(0, 0) = refTrajPtr->measurements()[xIndex];
1314 const auto &locDerivMatrix = refTrajPtr->derivatives();
1315 for (
int i = 0;
i < locDerivMatrix.num_col(); ++
i) {
1316 aLocalDerivativesM(0,
i) = locDerivMatrix[xIndex][
i];
1321 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
1323 unsigned int iTrajHit,
1324 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
1325 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
1326 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM) {
1329 const unsigned int xIndex = iTrajHit * 2;
1330 const unsigned int yIndex = iTrajHit * 2 + 1;
1332 aHitCovarianceM(0, 0) = refTrajPtr->measurementErrors()[xIndex][xIndex];
1333 aHitCovarianceM(0, 1) = refTrajPtr->measurementErrors()[xIndex][yIndex];
1334 aHitCovarianceM(1, 0) = refTrajPtr->measurementErrors()[yIndex][xIndex];
1335 aHitCovarianceM(1, 1) = refTrajPtr->measurementErrors()[yIndex][yIndex];
1337 aHitResidualsM(0, 0) = refTrajPtr->measurements()[xIndex] - refTrajPtr->trajectoryPositions()[xIndex];
1338 aHitResidualsM(1, 0) = refTrajPtr->measurements()[yIndex] - refTrajPtr->trajectoryPositions()[yIndex];
1340 const auto &locDerivMatrix = refTrajPtr->derivatives();
1341 for (
int i = 0;
i < locDerivMatrix.num_col(); ++
i) {
1342 aLocalDerivativesM(0,
i) = locDerivMatrix[xIndex][
i];
1343 aLocalDerivativesM(1,
i) = locDerivMatrix[yIndex][
i];
1349 unsigned int iTrajHit,
1350 const std::vector<int> &globalLabels,
1351 const std::vector<float> &globalDerivativesX,
1352 const std::vector<float> &globalDerivativesY) {
1355 if ((aRecHit)->dimension() == 1) {
1356 return this->
callMille1D(refTrajPtr, iTrajHit, globalLabels, globalDerivativesX);
1358 return this->
callMille2D(refTrajPtr, iTrajHit, globalLabels, globalDerivativesX, globalDerivativesY);
1364 unsigned int iTrajHit,
1365 const std::vector<int> &globalLabels,
1366 const std::vector<float> &globalDerivativesX) {
1368 const unsigned int xIndex = iTrajHit * 2;
1372 const int nLocal = locDerivMatrix.num_col();
1373 std::vector<float> localDerivatives(nLocal);
1374 for (
unsigned int i = 0;
i < localDerivatives.size(); ++
i) {
1375 localDerivatives[
i] = locDerivMatrix[xIndex][
i];
1379 float residX = refTrajPtr->measurements()[xIndex] - refTrajPtr->trajectoryPositions()[xIndex];
1380 float hitErrX = TMath::Sqrt(refTrajPtr->measurementErrors()[xIndex][xIndex]);
1383 const int nGlobal = globalDerivativesX.size();
1388 nLocal, &(localDerivatives[0]), nGlobal, &(globalDerivativesX[0]), &(globalLabels[0]), residX, hitErrX);
1392 aRecHit, &(localDerivatives[0]), nLocal, &(globalDerivativesX[0]), nGlobal, &(globalLabels[0]));
1393 theMonitor->fillResiduals(aRecHit, refTrajPtr->trajectoryStates()[iTrajHit], iTrajHit, residX, hitErrX,
false);
1401 unsigned int iTrajHit,
1402 const std::vector<int> &globalLabels,
1403 const std::vector<float> &globalDerivativesx,
1404 const std::vector<float> &globalDerivativesy) {
1407 if ((aRecHit)->dimension() != 2) {
1408 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::callMille2D" 1409 <<
"You try to call method for 2D hits for a " << (aRecHit)->
dimension()
1410 <<
"D Hit. Hit gets ignored!";
1414 Eigen::Matrix<double, 2, 2> aHitCovarianceM;
1415 Eigen::Matrix<float, 2, 1> aHitResidualsM;
1416 Eigen::Matrix<float, 2, Eigen::Dynamic> aLocalDerivativesM{2, refTrajPtr->derivatives().num_col()};
1418 this->
addRefTrackData2D(refTrajPtr, iTrajHit, aHitCovarianceM, aHitResidualsM, aLocalDerivativesM);
1419 Eigen::Matrix<float, 2, Eigen::Dynamic> aGlobalDerivativesM{2, globalDerivativesx.size()};
1425 const double corr = aHitCovarianceM(0, 1) /
sqrt(aHitCovarianceM(0, 0) * aHitCovarianceM(1, 1));
1429 switch (aRecHit->geographicalId().subdetId()) {
1433 this->
diagonalize(aHitCovarianceM, aLocalDerivativesM, aHitResidualsM, aGlobalDerivativesM);
1440 float newResidX = aHitResidualsM(0, 0);
1441 float newResidY = aHitResidualsM(1, 0);
1442 float newHitErrX = TMath::Sqrt(aHitCovarianceM(0, 0));
1443 float newHitErrY = TMath::Sqrt(aHitCovarianceM(1, 1));
1447 std::vector<float> newLocalDerivs(aLocalDerivativesM.size());
1448 Eigen::Map<Eigen::Matrix<float, 2, Eigen::Dynamic, Eigen::RowMajor> >(
1449 newLocalDerivs.data(), aLocalDerivativesM.rows(), aLocalDerivativesM.cols()) = aLocalDerivativesM;
1450 float *newLocalDerivsX = &(newLocalDerivs[0]);
1451 float *newLocalDerivsY = &(newLocalDerivs[aLocalDerivativesM.cols()]);
1455 std::vector<float> newGlobDerivs(aGlobalDerivativesM.size());
1456 Eigen::Map<Eigen::Matrix<float, 2, Eigen::Dynamic, Eigen::RowMajor> >(
1457 newGlobDerivs.data(), aGlobalDerivativesM.rows(), aGlobalDerivativesM.cols()) = aGlobalDerivativesM;
1458 float *newGlobDerivsX = &(newGlobDerivs[0]);
1459 float *newGlobDerivsY = &(newGlobDerivs[aGlobalDerivativesM.cols()]);
1461 const int nLocal = aLocalDerivativesM.cols();
1462 const int nGlobal = aGlobalDerivativesM.cols();
1464 if (diag && (newHitErrX > newHitErrY)) {
1468 std::swap(newLocalDerivsX, newLocalDerivsY);
1469 std::swap(newGlobDerivsX, newGlobDerivsY);
1474 theMille->mille(nLocal, newLocalDerivsX, nGlobal, newGlobDerivsX, &(globalLabels[0]), newResidX, newHitErrX);
1477 theMonitor->fillDerivatives(aRecHit, newLocalDerivsX, nLocal, newGlobDerivsX, nGlobal, &(globalLabels[0]));
1479 aRecHit, refTrajPtr->trajectoryStates()[iTrajHit], iTrajHit, newResidX, newHitErrX,
false);
1481 const bool isReal2DHit = this->
is2D(aRecHit);
1483 theMille->mille(nLocal, newLocalDerivsY, nGlobal, newGlobDerivsY, &(globalLabels[0]), newResidY, newHitErrY);
1485 theMonitor->fillDerivatives(aRecHit, newLocalDerivsY, nLocal, newGlobDerivsY, nGlobal, &(globalLabels[0]));
1487 aRecHit, refTrajPtr->trajectoryStates()[iTrajHit], iTrajHit, newResidY, newHitErrY,
true);
1491 return (isReal2DHit ? 2 : 1);
1496 unsigned int iVirtualMeas) {
1497 Eigen::Matrix<double, 1, 1> aHitCovarianceM;
1498 Eigen::Matrix<float, 1, 1> aHitResidualsM;
1499 Eigen::Matrix<float, 1, Eigen::Dynamic> aLocalDerivativesM{1, refTrajPtr->derivatives().num_col()};
1504 auto aGlobalDerivativesM = Eigen::Matrix<float, 1, 1>::Zero();
1506 float newResidX = aHitResidualsM(0, 0);
1507 float newHitErrX = TMath::Sqrt(aHitCovarianceM(0, 0));
1508 std::vector<float> newLocalDerivsX(aLocalDerivativesM.size());
1509 Eigen::Map<Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> >(
1510 newLocalDerivsX.data(), aLocalDerivativesM.rows(), aLocalDerivativesM.cols()) = aLocalDerivativesM;
1512 std::vector<float> newGlobDerivsX(aGlobalDerivativesM.size());
1513 Eigen::Map<Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> >(
1514 newGlobDerivsX.data(), aGlobalDerivativesM.rows(), aGlobalDerivativesM.cols()) = aGlobalDerivativesM;
1516 const int nLocal = aLocalDerivativesM.cols();
1517 const int nGlobal = 0;
1519 theMille->mille(nLocal, newLocalDerivsX.data(), nGlobal, newGlobDerivsX.data(), &nGlobal, newResidX, newHitErrX);
1526 TsosVectorCollection::const_iterator iTsoses = lasBeamTsoses.begin();
1527 for (TkFittedLasBeamCollection::const_iterator iBeam = lasBeams.begin(), iEnd = lasBeams.end(); iBeam != iEnd;
1528 ++iBeam, ++iTsoses) {
1530 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addLaserData" 1531 <<
"Beam " << iBeam->getBeamId() <<
" with " << iBeam->parameters().size()
1532 <<
" parameters and " << iBeam->getData().size() <<
" hits.\n There are " 1533 << iTsoses->size() <<
" TSOSes.";
1535 this->
addLasBeam(eventInfo, *iBeam, *iTsoses);
1542 const std::vector<TrajectoryStateOnSurface> &tsoses) {
1544 std::vector<float> lasLocalDerivsX;
1547 for (
unsigned int iHit = 0; iHit < tsoses.size(); ++iHit) {
1554 lasLocalDerivsX.clear();
1561 for (
unsigned int nFitParams = 0; nFitParams < static_cast<unsigned int>(lasBeam.
parameters().size());
1573 const float residual =
hit.localPosition().
x() - tsoses[iHit].localPosition().x();
1575 const float error = 0.003;
1577 theMille->mille(lasLocalDerivsX.size(),
1578 &(lasLocalDerivsX[0]),
1591 const bool doOutputOnStdout(pxbSurveyCfg.
getParameter<
bool>(
"doOutputOnStdout"));
1592 if (doOutputOnStdout) {
1593 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addPxbSurvey" 1594 <<
"# Output from addPxbSurvey follows below because " 1595 <<
"doOutputOnStdout is set to True";
1600 pxbSurveyCfg.
getParameter<
unsigned int>(
"toySurveySeed"));
1604 std::vector<SurveyPxbImageLocalFit> measurements;
1610 if (doOutputOnStdout) {
1611 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addPxbSurvey" 1612 <<
"Module " <<
i <<
": ";
1637 fidpointvec.push_back(fidpoint0inSurf1frame);
1638 fidpointvec.push_back(fidpoint1inSurf1frame);
1639 fidpointvec.push_back(fidpoint2);
1640 fidpointvec.push_back(fidpoint3);
1650 a = measurements[
i].getLocalParameters();
1654 if (doOutputOnStdout) {
1655 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addPxbSurvey" 1656 <<
"a: " <<
a[0] <<
", " <<
a[1] <<
", " <<
a[2] <<
", " <<
a[3]
1657 <<
" S= " <<
sqrt(
a[2] *
a[2] +
a[3] *
a[3]) <<
" phi= " << atan(
a[3] /
a[2])
1658 <<
" chi2= " <<
chi2 << std::endl;
1667 theMille->mille((
int)measurements[
i].getLocalDerivsSize(),
1668 measurements[
i].getLocalDerivsPtr(
j),
1669 (
int)measurements[
i].getGlobalDerivsSize(),
1670 measurements[
i].getGlobalDerivsPtr(
j),
1671 measurements[
i].getGlobalDerivsLabelPtr(
j),
1672 measurements[
i].getResiduum(
j),
1673 measurements[
i].getSigma(
j));
1683 if (runRangeSelection.empty())
1686 const auto runRanges =
1689 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)
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
void swap(Association< C > &lhs, Association< C > &rhs)
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_
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
key
prepare the HTCondor submission files and eventually submit them
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...)
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
Eigen::Matrix< float, EcalPulseShape::TEMPLATESAMPLES, EcalPulseShape::TEMPLATESAMPLES > CovarianceMatrix
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