94 theMode(this->decodeMode(theConfig.getUntrackedParameter<
std::
string>(
"mode"))),
95 theDir(theConfig.getUntrackedParameter<
std::
string>(
"fileDir")),
96 theAlignmentParameterStore(nullptr),
100 .getParameter<
std::
string>(
"TrajectoryFactoryName"),
103 theMinNumHits(
cfg.getParameter<unsigned
int>(
"minNumHits")),
104 theMaximalCor2D(
cfg.getParameter<double>(
"max2Dcorrelation")),
106 ignoreFirstIOVCheck_(
cfg.getUntrackedParameter<
bool>(
"ignoreFirstIOVCheck")),
107 enableAlignableUpdates_(
cfg.getUntrackedParameter<
bool>(
"enableAlignableUpdates")),
108 theLastWrittenIov(0),
109 theGblDoubleBinary(
cfg.getParameter<
bool>(
"doubleBinary")),
110 runAtPCL_(
cfg.getParameter<
bool>(
"runAtPCL")),
111 ignoreHitsWithoutGlobalDerivatives_(
cfg.getParameter<
bool>(
"ignoreHitsWithoutGlobalDerivatives")),
112 skipGlobalPositionRcdCheck_(
cfg.getParameter<
bool>(
"skipGlobalPositionRcdCheck")),
115 enforceSingleIOVInput_(!(enableAlignableUpdates_ && areIOVsSpecified())),
120 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm" 122 <<
"' with output directory '" <<
theDir <<
"'.";
144 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::initialize" 145 <<
"Running with AlignabeMuon not yet tested.";
155 std::ostringstream message;
157 if (iov_alignments.first().eventID().run() !=
MIN_VAL || iov_alignments.last().eventID().run() !=
MAX_VAL) {
159 <<
" with multiple IOVs in tag without specifying 'RunRangeSelection'.\n" 160 <<
"Validity range is " << iov_alignments.first().eventID().run() <<
" - " 161 << iov_alignments.last().eventID().run() <<
"\n";
164 if (iov_surfaces.first().eventID().run() !=
MIN_VAL || iov_surfaces.last().eventID().run() !=
MAX_VAL) {
166 <<
" with multiple IOVs in tag without specifying 'RunRangeSelection'.\n" 167 <<
"Validity range is " << iov_surfaces.first().eventID().run() <<
" - " 168 << iov_surfaces.last().eventID().run() <<
"\n";
171 if (iov_errors.first().eventID().run() !=
MIN_VAL || iov_errors.last().eventID().run() !=
MAX_VAL) {
173 <<
" with multiple IOVs in tag without specifying 'RunRangeSelection'.\n" 174 <<
"Validity range is " << iov_errors.first().eventID().run() <<
" - " 175 << iov_errors.last().eventID().run() <<
"\n";
179 throw cms::Exception(
"DatabaseError") <<
"@SUB=MillePedeAlignmentAlgorithm::initialize" << message.str();
190 storeThresholds(th->getNrecords(), th->getThreshold_Map(), th->getFloatMap());
212 if (!RunRangeSelectionVPSet.empty()) {
213 labelerPlugin =
"RunRangeDependentPedeLabeler";
214 if (pedeLabelerCfg.
exists(
"plugin")) {
216 if ((labelerPluginCfg !=
"PedeLabeler" && labelerPluginCfg !=
"RunRangeDependentPedeLabeler") ||
218 throw cms::Exception(
"BadConfig") <<
"MillePedeAlignmentAlgorithm::initialize" 219 <<
"both RunRangeSelection and generic labeler specified in config file. " 220 <<
"Please get rid of either one of them.\n";
224 if (pedeLabelerCfg.
exists(
"plugin")) {
229 if (!pedeLabelerCfg.
exists(
"plugin")) {
233 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::initialize" 234 <<
"Using plugin '" << labelerPlugin <<
"' to generate labels.";
252 const std::vector<edm::ParameterSet> mprespset(
254 if (!mprespset.empty()) {
255 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::initialize" 256 <<
"Apply " << mprespset.end() - mprespset.begin()
257 <<
" previous MillePede constants from 'pedeReaderInputs'.";
263 for (std::vector<edm::ParameterSet>::const_iterator iSet = mprespset.begin(), iE = mprespset.end(); iSet != iE;
269 <<
"MillePedeAlignmentAlgorithm::initialize: Problems reading input constants of " 270 <<
"pedeReaderInputs entry " << iSet - mprespset.begin() <<
'.';
286 throw cms::Exception(
"BadConfig") <<
"'vstring mergeTreeFiles' and 'vstring mergeBinaryFiles' must be empty for " 287 <<
"modes running mille.";
290 if (!moniFile.empty())
291 theMonitor = std::make_unique<MillePedeMonitor>(tTopo, (
theDir + moniFile).c_str());
319 theThresholds->setAlignPCLThresholds(nRecords, thresholdMap);
371 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::setParametersForRunRange" 372 <<
"Problems reading pede result, but applying!";
389 std::vector<std::string>
files;
393 const std::vector<std::string> plainFiles(
theConfig.
getParameter<std::vector<std::string> >(
"mergeBinaryFiles"));
398 filesForLogOutput +=
" " +
file +
",";
399 if (filesForLogOutput.length() != 0)
400 filesForLogOutput.pop_back();
401 edm::LogInfo(
"Alignment") <<
"Based on the config parameter mergeBinaryFiles, using the following " 402 <<
"files as input (assigned weights are indicated by ' -- <weight>'):" 403 << filesForLogOutput;
413 throw cms::Exception(
"BadConfig") <<
"@SUB=MillePedeAlignmentAlgorithm::terminate\n" 414 <<
"Last IOV of 'RunRangeSelection' has not been processed. " 415 <<
"Please reconfigure your source to process the runs at least up to " 443 const std::vector<std::string> &plainFiles,
const std::string &theDir) {
444 std::vector<std::string>
files;
445 for (
const auto &plainFile : plainFiles) {
451 char theNumberedInputFileName[200];
452 sprintf(theNumberedInputFileName, theInputFileName.c_str(), theNumber);
454 const auto endOfStrippedFileName = theCompleteInputFileName.rfind(
" --");
455 const auto strippedInputFileName = theCompleteInputFileName.substr(0, endOfStrippedFileName);
458 if (
stat(strippedInputFileName.c_str(), &
buffer) == 0) {
460 files.push_back(theCompleteInputFileName);
461 if (theNumberedInputFileName == theInputFileName) {
474 if (theNumber == 0 && (
files.empty() ||
files.back() != plainFile)) {
475 edm::LogWarning(
"Alignment") <<
"The input file '" << plainFile <<
"' does not exist.";
489 for (
const auto &iTrajTrack :
tracks) {
497 unsigned int refTrajCount = 0;
500 ++iRefTraj, ++refTrajCount) {
507 if (
theMonitor && (nHitXy.first || nHitXy.second)) {
509 const auto offset = tracksPerTraj * refTrajCount;
510 for (
unsigned int iTrack = 0; iTrack < tracksPerTraj; ++iTrack) {
521 std::pair<unsigned int, unsigned int> hitResultXy(0, 0);
522 if (refTrajPtr->isValid()) {
524 if (!refTrajPtr->gblInput().empty()) {
526 unsigned int iHit = 0;
527 unsigned int numPointsWithMeas = 0;
528 std::vector<GblPoint>::iterator itPoint;
529 auto theGblInput = refTrajPtr->gblInput();
530 for (
unsigned int iTraj = 0; iTraj < refTrajPtr->gblInput().size(); ++iTraj) {
531 for (itPoint = refTrajPtr->gblInput()[iTraj].first.begin(); itPoint < refTrajPtr->gblInput()[iTraj].first.end();
535 if (itPoint->numMeasurements() >= 1)
539 hitResultXy.first = numPointsWithMeas;
541 if (hitResultXy.first == 0 || hitResultXy.first <
theMinNumHits)
544 if (refTrajPtr->gblInput().size() == 1) {
546 GblTrajectory aGblTrajectory(refTrajPtr->gblInput()[0].first, refTrajPtr->nominalField() != 0);
554 if (aGblTrajectory.isValid() && aGblTrajectory.getNumPoints() >=
theMinNumHits)
557 if (refTrajPtr->gblInput().size() == 2) {
559 GblTrajectory aGblTrajectory(refTrajPtr->gblInput(),
560 refTrajPtr->gblExtDerivatives(),
561 refTrajPtr->gblExtMeasurements(),
562 refTrajPtr->gblExtPrecisions());
564 if (aGblTrajectory.isValid() && aGblTrajectory.getNumPoints() >=
theMinNumHits)
569 std::vector<AlignmentParameters *> parVec(refTrajPtr->recHits().size());
571 std::vector<bool> validHitVecY(refTrajPtr->recHits().size(),
false);
573 for (
unsigned int iHit = 0; iHit < refTrajPtr->recHits().size(); ++iHit) {
577 hitResultXy.first = 0;
582 validHitVecY[iHit] = (flagXY >= 2);
587 for (
unsigned int iVirtualMeas = 0; iVirtualMeas < refTrajPtr->numberOfVirtualMeas(); ++iVirtualMeas) {
592 if (hitResultXy.first == 0 || hitResultXy.first <
theMinNumHits) {
594 hitResultXy.first = hitResultXy.second = 0;
599 hitResultXy.second = this->
addHitCount(parVec, validHitVecY);
611 const std::vector<bool> &validHitVecY)
const {
613 unsigned int nHitY = 0;
614 for (
unsigned int iHit = 0; iHit < validHitVecY.size(); ++iHit) {
615 Alignable *ali = (parVec[iHit] ? parVec[iHit]->alignable() :
nullptr);
626 if (validHitVecY[iHit]) {
628 if (pars == parVec[iHit])
641 throw cms::Exception(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::beginRun\n" 642 <<
"Using data (run = " <<
run.run() <<
") prior to the first defined IOV (" 664 std::ostringstream message;
666 message <<
"Trying to cache tracker alignment payloads for a run (" <<
runNumber <<
") in an IOV (" <<
firstRun 667 <<
") that was already cached.\n" 668 <<
"The following records in your input database tag have an IOV " 669 <<
"boundary that does not match your IOV definition:\n";
670 if (geometryRcd.validityInterval().first().eventID().run() >
firstRun) {
671 message <<
" - IdealGeometryRecord '" << geometryRcd.key().name() <<
"' (since " 672 << geometryRcd.validityInterval().first().eventID().run() <<
")\n";
676 message <<
" - GlobalPositionRecord '" << globalPosRcd.
key().
name() <<
"' (since " 679 message <<
" --> ignored\n";
686 message <<
" - TrackerAlignmentRcd '" << alignmentRcd.
key().
name() <<
"' (since " 691 message <<
" - TrackerSurfaceDeformationRcd '" << surfaceRcd.
key().
name() <<
"' (since " 696 message <<
" - TrackerAlignmentErrorExtendedRcd '" << errorRcd.
key().
name() <<
"' (since " 702 throw cms::Exception(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::beginRun\n" << message.str();
763 if (!recHitPtr->isValid())
803 GblPoint &gblPoint) {
805 std::vector<double> theDoubleBufferX, theDoubleBufferY;
806 theDoubleBufferX.clear();
807 theDoubleBufferY.clear();
814 if (!recHitPtr->isValid())
832 std::vector<IntegratedCalibrationBase::ValuesIndexPair> derivs;
835 (*iCalib)->derivatives(derivs, *recHitPtr, tsos,
setup,
eventInfo);
836 for (
auto iValuesInd = derivs.begin(); iValuesInd != derivs.end(); ++iValuesInd) {
838 globalLabel =
thePedeLabels->calibrationLabel(*iCalib, iValuesInd->second);
839 if (globalLabel > 0 && globalLabel <= 2147483647) {
841 theDoubleBufferX.push_back(iValuesInd->first.first);
842 theDoubleBufferY.push_back(iValuesInd->first.second);
844 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addGlobalData" 845 <<
"Invalid label " << globalLabel <<
" <= 0 or > 2147483647";
850 if (numGlobals > 0) {
851 Eigen::Matrix<double, 2, Eigen::Dynamic> globalDer{2, numGlobals};
852 for (
unsigned int i = 0;
i < numGlobals; ++
i) {
853 globalDer(0,
i) = theDoubleBufferX[
i];
854 globalDer(1,
i) = theDoubleBufferY[
i];
867 std::vector<float> &globalDerivativesX,
868 std::vector<float> &globalDerivativesY,
869 std::vector<int> &globalLabels,
884 bool hasSplitParameters =
thePedeLabels->hasSplitParameters(ali);
885 const unsigned int alignableLabel =
thePedeLabels->alignableLabel(ali);
887 if (0 == alignableLabel) {
888 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::globalDerivativesHierarchy" 889 <<
"Label not found, skip Alignable.";
893 const std::vector<bool> &selPars =
params->selector();
897 for (
unsigned int iSel = 0; iSel < selPars.size(); ++iSel) {
900 if (hasSplitParameters ==
true) {
903 globalLabels.push_back(
thePedeLabels->parameterLabel(alignableLabel, iSel));
914 eventInfo, tsos, ali->
mother(), alidet, globalDerivativesX, globalDerivativesY, globalLabels, lowestParams);
922 std::vector<double> &globalDerivativesX,
923 std::vector<double> &globalDerivativesY,
924 std::vector<int> &globalLabels,
939 bool hasSplitParameters =
thePedeLabels->hasSplitParameters(ali);
940 const unsigned int alignableLabel =
thePedeLabels->alignableLabel(ali);
942 if (0 == alignableLabel) {
943 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::globalDerivativesHierarchy" 944 <<
"Label not found, skip Alignable.";
948 const std::vector<bool> &selPars =
params->selector();
953 for (
unsigned int iSel = 0; iSel < selPars.size(); ++iSel) {
955 if (hasSplitParameters ==
true) {
958 globalLabel =
thePedeLabels->parameterLabel(alignableLabel, iSel);
960 if (globalLabel > 0 && globalLabel <= 2147483647) {
961 globalLabels.push_back(globalLabel);
965 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::globalDerivativesHierarchy" 966 <<
"Invalid label " << globalLabel <<
" <= 0 or > 2147483647";
976 eventInfo, tsos, ali->
mother(), alidet, globalDerivativesX, globalDerivativesY, globalLabels, lowestParams);
984 std::vector<float> &globalDerivativesX,
985 std::vector<float> &globalDerivativesY,
986 std::vector<int> &globalLabels)
const {
987 std::vector<IntegratedCalibrationBase::ValuesIndexPair> derivs;
991 for (
auto iValuesInd = derivs.begin(); iValuesInd != derivs.end(); ++iValuesInd) {
993 globalLabels.push_back(
thePedeLabels->calibrationLabel(*iCalib, iValuesInd->second));
994 globalDerivativesX.push_back(iValuesInd->first.first);
995 globalDerivativesY.push_back(iValuesInd->first.second);
1038 if (
recHit->dimension() < 2) {
1040 }
else if (
recHit->detUnit()) {
1041 return recHit->detUnit()->type().isTrackerPixel();
1043 if (dynamic_cast<const ProjectedSiStripRecHit2D *>(
recHit->hit())) {
1060 bool okRead =
reader.read(alis, setUserVars);
1061 bool numMatch =
true;
1063 std::stringstream
out;
1064 out <<
"Read " << alis.size() <<
" alignables";
1070 out <<
", but problems in reading";
1072 out <<
", possibly overwriting previous settings";
1075 if (okRead && allEmpty) {
1077 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1078 }
else if (!alis.empty()) {
1079 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1081 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1087 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::readFromPede" <<
out.str();
1093 for (
const auto &iAli : alignables) {
1096 const auto &parVec(
params->parameters());
1097 const auto &parCov(
params->covariance());
1098 for (
int i = 0;
i < parVec.num_row(); ++
i) {
1099 if (parVec[
i] != 0.)
1101 for (
int j =
i;
j < parCov.num_col(); ++
j) {
1102 if (parCov[
i][
j] != 0.)
1117 if (outFilePlain.empty()) {
1118 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1119 <<
"treeFile parameter empty => skip writing for 'loop' " <<
loop;
1130 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1131 <<
"Problem " << ioerr <<
" in writeAlignableOriginalPositions";
1134 }
else if (
loop == 1) {
1136 const std::vector<std::string> inFiles(
theConfig.
getParameter<std::vector<std::string> >(
"mergeTreeFiles"));
1137 const std::vector<std::string> binFiles(
theConfig.
getParameter<std::vector<std::string> >(
"mergeBinaryFiles"));
1138 if (inFiles.size() != binFiles.size()) {
1139 edm::LogWarning(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1140 <<
"'vstring mergeTreeFiles' and 'vstring mergeBinaryFiles' " 1141 <<
"differ in size";
1148 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1149 <<
"Problem " << ioerr <<
" writing MillePedeVariables";
1155 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1156 <<
"Problem " << ioerr <<
" in writeOrigRigidBodyAlignmentParameters, " <<
loop;
1161 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::doIO" 1162 <<
"Problem " << ioerr <<
" in writeAlignableAbsolutePositions, " <<
loop;
1171 for (
const auto &iAli : alis) {
1174 throw cms::Exception(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::buildUserVariables" 1175 <<
"No parameters for alignable";
1179 for (
unsigned int iPar = 0; iPar < userVars->
size(); ++iPar) {
1190 thePedeLabels->alignableTracker()->objectIdProvider().typeToName(iAli->alignableObjectId()));
1191 params->setUserVariables(userVars);
1198 if (
mode ==
"full") {
1200 }
else if (
mode ==
"mille") {
1202 }
else if (
mode ==
"pede") {
1204 }
else if (
mode ==
"pedeSteer") {
1206 }
else if (
mode ==
"pedeRun") {
1208 }
else if (
mode ==
"pedeRead") {
1213 <<
"', use 'full', 'mille', 'pede', 'pedeRun', 'pedeSteer' or 'pedeRead'.";
1221 const std::vector<std::string> &inFiles)
const {
1225 for (std::vector<std::string>::const_iterator iFile = inFiles.begin(); iFile != inFiles.end(); ++iFile) {
1227 const std::vector<AlignmentUserVariables *> mpVars =
1230 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addHitStatistics" 1231 <<
"Error " << ierr <<
" reading from " <<
inFile <<
", tree " << fromIov
1232 <<
", or problems in addHits";
1235 for (std::vector<AlignmentUserVariables *>::const_iterator
i = mpVars.begin();
i != mpVars.end(); ++
i) {
1245 const std::vector<AlignmentUserVariables *> &mpVars)
const {
1246 bool allOk = (mpVars.size() == alis.size());
1247 std::vector<AlignmentUserVariables *>::const_iterator iUser = mpVars.begin();
1248 for (
auto iAli = alis.cbegin(); iAli != alis.cend() && iUser != mpVars.end(); ++iAli, ++iUser) {
1252 if (!mpVarNew || !mpVarOld || mpVarOld->
size() != mpVarNew->
size()) {
1265 template <
typename GlobalDerivativeMatrix>
1267 const std::vector<float> &globalDerivativesy,
1268 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM) {
1269 static_assert(GlobalDerivativeMatrix::RowsAtCompileTime == 2,
"global derivative matrix must have two rows");
1271 for (
size_t i = 0;
i < globalDerivativesx.size(); ++
i) {
1272 aGlobalDerivativesM(0,
i) = globalDerivativesx[
i];
1273 aGlobalDerivativesM(1,
i) = globalDerivativesy[
i];
1279 typename LocalDerivativeMatrix,
1280 typename ResidualMatrix,
1281 typename GlobalDerivativeMatrix>
1283 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM,
1284 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
1285 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM)
const {
1287 "'aLocalDerivativesM' and 'aHitResidualsM' must have the " 1288 "same underlying scalar type");
1290 "'aLocalDerivativesM' and 'aGlobalDerivativesM' must have the " 1291 "same underlying scalar type");
1293 Eigen::SelfAdjointEigenSolver<typename CovarianceMatrix::PlainObject> myDiag{aHitCovarianceM};
1295 auto aTranfoToDiagonalSystemInv =
1296 myDiag.eigenvectors().transpose().template cast<typename LocalDerivativeMatrix::Scalar>();
1298 aHitCovarianceM = myDiag.eigenvalues().asDiagonal();
1299 aLocalDerivativesM = aTranfoToDiagonalSystemInv * aLocalDerivativesM;
1300 aHitResidualsM = aTranfoToDiagonalSystemInv * aHitResidualsM;
1301 if (aGlobalDerivativesM.size() > 0) {
1303 aGlobalDerivativesM = aTranfoToDiagonalSystemInv * aGlobalDerivativesM;
1308 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
1311 unsigned int iVirtualMeas,
1312 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
1313 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
1314 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM) {
1317 const unsigned int xIndex = iVirtualMeas + refTrajPtr->numberOfHitMeas();
1319 aHitCovarianceM(0, 0) = refTrajPtr->measurementErrors()[xIndex][xIndex];
1320 aHitResidualsM(0, 0) = refTrajPtr->measurements()[xIndex];
1322 const auto &locDerivMatrix = refTrajPtr->derivatives();
1323 for (
int i = 0;
i < locDerivMatrix.num_col(); ++
i) {
1324 aLocalDerivativesM(0,
i) = locDerivMatrix[xIndex][
i];
1329 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
1331 unsigned int iTrajHit,
1332 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
1333 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
1334 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM) {
1337 const unsigned int xIndex = iTrajHit * 2;
1338 const unsigned int yIndex = iTrajHit * 2 + 1;
1340 aHitCovarianceM(0, 0) = refTrajPtr->measurementErrors()[xIndex][xIndex];
1341 aHitCovarianceM(0, 1) = refTrajPtr->measurementErrors()[xIndex][yIndex];
1342 aHitCovarianceM(1, 0) = refTrajPtr->measurementErrors()[yIndex][xIndex];
1343 aHitCovarianceM(1, 1) = refTrajPtr->measurementErrors()[yIndex][yIndex];
1345 aHitResidualsM(0, 0) = refTrajPtr->measurements()[xIndex] - refTrajPtr->trajectoryPositions()[xIndex];
1346 aHitResidualsM(1, 0) = refTrajPtr->measurements()[yIndex] - refTrajPtr->trajectoryPositions()[yIndex];
1348 const auto &locDerivMatrix = refTrajPtr->derivatives();
1349 for (
int i = 0;
i < locDerivMatrix.num_col(); ++
i) {
1350 aLocalDerivativesM(0,
i) = locDerivMatrix[xIndex][
i];
1351 aLocalDerivativesM(1,
i) = locDerivMatrix[yIndex][
i];
1357 unsigned int iTrajHit,
1358 const std::vector<int> &globalLabels,
1359 const std::vector<float> &globalDerivativesX,
1360 const std::vector<float> &globalDerivativesY) {
1363 if ((aRecHit)->dimension() == 1) {
1364 return this->
callMille1D(refTrajPtr, iTrajHit, globalLabels, globalDerivativesX);
1366 return this->
callMille2D(refTrajPtr, iTrajHit, globalLabels, globalDerivativesX, globalDerivativesY);
1372 unsigned int iTrajHit,
1373 const std::vector<int> &globalLabels,
1374 const std::vector<float> &globalDerivativesX) {
1376 const unsigned int xIndex = iTrajHit * 2;
1380 const int nLocal = locDerivMatrix.num_col();
1381 std::vector<float> localDerivatives(nLocal);
1382 for (
unsigned int i = 0;
i < localDerivatives.size(); ++
i) {
1383 localDerivatives[
i] = locDerivMatrix[xIndex][
i];
1387 float residX = refTrajPtr->measurements()[xIndex] - refTrajPtr->trajectoryPositions()[xIndex];
1388 float hitErrX = TMath::Sqrt(refTrajPtr->measurementErrors()[xIndex][xIndex]);
1391 const int nGlobal = globalDerivativesX.size();
1396 nLocal, &(localDerivatives[0]), nGlobal, &(globalDerivativesX[0]), &(globalLabels[0]), residX, hitErrX);
1400 aRecHit, &(localDerivatives[0]), nLocal, &(globalDerivativesX[0]), nGlobal, &(globalLabels[0]));
1401 theMonitor->fillResiduals(aRecHit, refTrajPtr->trajectoryStates()[iTrajHit], iTrajHit, residX, hitErrX,
false);
1409 unsigned int iTrajHit,
1410 const std::vector<int> &globalLabels,
1411 const std::vector<float> &globalDerivativesx,
1412 const std::vector<float> &globalDerivativesy) {
1415 if ((aRecHit)->dimension() != 2) {
1416 edm::LogError(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::callMille2D" 1417 <<
"You try to call method for 2D hits for a " << (aRecHit)->
dimension()
1418 <<
"D Hit. Hit gets ignored!";
1422 Eigen::Matrix<double, 2, 2> aHitCovarianceM;
1423 Eigen::Matrix<float, 2, 1> aHitResidualsM;
1424 Eigen::Matrix<float, 2, Eigen::Dynamic> aLocalDerivativesM{2, refTrajPtr->derivatives().num_col()};
1426 this->
addRefTrackData2D(refTrajPtr, iTrajHit, aHitCovarianceM, aHitResidualsM, aLocalDerivativesM);
1427 Eigen::Matrix<float, 2, Eigen::Dynamic> aGlobalDerivativesM{2, globalDerivativesx.size()};
1433 const double corr = aHitCovarianceM(0, 1) /
sqrt(aHitCovarianceM(0, 0) * aHitCovarianceM(1, 1));
1437 switch (aRecHit->geographicalId().subdetId()) {
1441 this->
diagonalize(aHitCovarianceM, aLocalDerivativesM, aHitResidualsM, aGlobalDerivativesM);
1448 float newResidX = aHitResidualsM(0, 0);
1449 float newResidY = aHitResidualsM(1, 0);
1450 float newHitErrX = TMath::Sqrt(aHitCovarianceM(0, 0));
1451 float newHitErrY = TMath::Sqrt(aHitCovarianceM(1, 1));
1455 std::vector<float> newLocalDerivs(aLocalDerivativesM.size());
1456 Eigen::Map<Eigen::Matrix<float, 2, Eigen::Dynamic, Eigen::RowMajor> >(
1457 newLocalDerivs.data(), aLocalDerivativesM.rows(), aLocalDerivativesM.cols()) = aLocalDerivativesM;
1458 float *newLocalDerivsX = &(newLocalDerivs[0]);
1459 float *newLocalDerivsY = &(newLocalDerivs[aLocalDerivativesM.cols()]);
1463 std::vector<float> newGlobDerivs(aGlobalDerivativesM.size());
1464 Eigen::Map<Eigen::Matrix<float, 2, Eigen::Dynamic, Eigen::RowMajor> >(
1465 newGlobDerivs.data(), aGlobalDerivativesM.rows(), aGlobalDerivativesM.cols()) = aGlobalDerivativesM;
1466 float *newGlobDerivsX = &(newGlobDerivs[0]);
1467 float *newGlobDerivsY = &(newGlobDerivs[aGlobalDerivativesM.cols()]);
1469 const int nLocal = aLocalDerivativesM.cols();
1470 const int nGlobal = aGlobalDerivativesM.cols();
1472 if (diag && (newHitErrX > newHitErrY)) {
1476 std::swap(newLocalDerivsX, newLocalDerivsY);
1477 std::swap(newGlobDerivsX, newGlobDerivsY);
1482 theMille->mille(nLocal, newLocalDerivsX, nGlobal, newGlobDerivsX, &(globalLabels[0]), newResidX, newHitErrX);
1485 theMonitor->fillDerivatives(aRecHit, newLocalDerivsX, nLocal, newGlobDerivsX, nGlobal, &(globalLabels[0]));
1487 aRecHit, refTrajPtr->trajectoryStates()[iTrajHit], iTrajHit, newResidX, newHitErrX,
false);
1489 const bool isReal2DHit = this->
is2D(aRecHit);
1491 theMille->mille(nLocal, newLocalDerivsY, nGlobal, newGlobDerivsY, &(globalLabels[0]), newResidY, newHitErrY);
1493 theMonitor->fillDerivatives(aRecHit, newLocalDerivsY, nLocal, newGlobDerivsY, nGlobal, &(globalLabels[0]));
1495 aRecHit, refTrajPtr->trajectoryStates()[iTrajHit], iTrajHit, newResidY, newHitErrY,
true);
1499 return (isReal2DHit ? 2 : 1);
1504 unsigned int iVirtualMeas) {
1505 Eigen::Matrix<double, 1, 1> aHitCovarianceM;
1506 Eigen::Matrix<float, 1, 1> aHitResidualsM;
1507 Eigen::Matrix<float, 1, Eigen::Dynamic> aLocalDerivativesM{1, refTrajPtr->derivatives().num_col()};
1512 auto aGlobalDerivativesM = Eigen::Matrix<float, 1, 1>::Zero();
1514 float newResidX = aHitResidualsM(0, 0);
1515 float newHitErrX = TMath::Sqrt(aHitCovarianceM(0, 0));
1516 std::vector<float> newLocalDerivsX(aLocalDerivativesM.size());
1517 Eigen::Map<Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> >(
1518 newLocalDerivsX.data(), aLocalDerivativesM.rows(), aLocalDerivativesM.cols()) = aLocalDerivativesM;
1520 std::vector<float> newGlobDerivsX(aGlobalDerivativesM.size());
1521 Eigen::Map<Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> >(
1522 newGlobDerivsX.data(), aGlobalDerivativesM.rows(), aGlobalDerivativesM.cols()) = aGlobalDerivativesM;
1524 const int nLocal = aLocalDerivativesM.cols();
1525 const int nGlobal = 0;
1527 theMille->mille(nLocal, newLocalDerivsX.data(), nGlobal, newGlobDerivsX.data(), &nGlobal, newResidX, newHitErrX);
1534 TsosVectorCollection::const_iterator iTsoses = lasBeamTsoses.begin();
1535 for (TkFittedLasBeamCollection::const_iterator iBeam = lasBeams.begin(), iEnd = lasBeams.end(); iBeam != iEnd;
1536 ++iBeam, ++iTsoses) {
1538 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addLaserData" 1539 <<
"Beam " << iBeam->getBeamId() <<
" with " << iBeam->parameters().size()
1540 <<
" parameters and " << iBeam->getData().size() <<
" hits.\n There are " 1541 << iTsoses->size() <<
" TSOSes.";
1543 this->
addLasBeam(eventInfo, *iBeam, *iTsoses);
1550 const std::vector<TrajectoryStateOnSurface> &tsoses) {
1552 std::vector<float> lasLocalDerivsX;
1555 for (
unsigned int iHit = 0; iHit < tsoses.size(); ++iHit) {
1562 lasLocalDerivsX.clear();
1569 for (
unsigned int nFitParams = 0; nFitParams < static_cast<unsigned int>(lasBeam.
parameters().size());
1581 const float residual =
hit.localPosition().
x() - tsoses[iHit].localPosition().x();
1583 const float error = 0.003;
1585 theMille->mille(lasLocalDerivsX.size(),
1586 &(lasLocalDerivsX[0]),
1599 const bool doOutputOnStdout(pxbSurveyCfg.
getParameter<
bool>(
"doOutputOnStdout"));
1600 if (doOutputOnStdout) {
1601 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addPxbSurvey" 1602 <<
"# Output from addPxbSurvey follows below because " 1603 <<
"doOutputOnStdout is set to True";
1608 pxbSurveyCfg.
getParameter<
unsigned int>(
"toySurveySeed"));
1612 std::vector<SurveyPxbImageLocalFit> measurements;
1618 if (doOutputOnStdout) {
1619 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addPxbSurvey" 1620 <<
"Module " <<
i <<
": ";
1645 fidpointvec.push_back(fidpoint0inSurf1frame);
1646 fidpointvec.push_back(fidpoint1inSurf1frame);
1647 fidpointvec.push_back(fidpoint2);
1648 fidpointvec.push_back(fidpoint3);
1658 a = measurements[
i].getLocalParameters();
1662 if (doOutputOnStdout) {
1663 edm::LogInfo(
"Alignment") <<
"@SUB=MillePedeAlignmentAlgorithm::addPxbSurvey" 1664 <<
"a: " <<
a[0] <<
", " <<
a[1] <<
", " <<
a[2] <<
", " <<
a[3]
1665 <<
" S= " <<
sqrt(
a[2] *
a[2] +
a[3] *
a[3]) <<
" phi= " << atan(
a[3] /
a[2])
1666 <<
" chi2= " <<
chi2 << std::endl;
1675 theMille->mille((
int)measurements[
i].getLocalDerivsSize(),
1676 measurements[
i].getLocalDerivsPtr(
j),
1677 (
int)measurements[
i].getGlobalDerivsSize(),
1678 measurements[
i].getGlobalDerivsPtr(
j),
1679 measurements[
i].getGlobalDerivsLabelPtr(
j),
1680 measurements[
i].getResiduum(
j),
1681 measurements[
i].getSigma(
j));
1691 if (runRangeSelection.empty())
1694 const auto runRanges =
1697 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
void increaseHitsY(unsigned int add=1)
increase hits for y-measurement
void endLuminosityBlock(const edm::EventSetup &) override
called at end of luminosity block
const edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcd > siPixelQualityToken_
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
const std::string & fullPath() const
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::shared_ptr< SiPixelQuality > pixelQuality
std::unique_ptr< Mille > theMille