|
const int | binariesAmount () const |
|
const mpPCLresults | getResults () const |
|
const AlignPCLThresholds::threshold_map | getThresholdMap () const |
|
const std::array< double, 6 > & | getTXobs () const |
|
const std::array< double, 6 > & | getTXobsErr () const |
|
const std::array< double, 6 > & | getTYobs () const |
|
const std::array< double, 6 > & | getTYobsErr () const |
|
const std::array< double, 6 > & | getTZobs () const |
|
const std::array< double, 6 > & | getTZobsErr () const |
|
const std::array< double, 6 > & | getXobs () const |
|
const std::array< double, 6 > & | getXobsErr () const |
|
const std::array< double, 6 > & | getYobs () const |
|
const std::array< double, 6 > & | getYobsErr () const |
|
const std::array< double, 6 > & | getZobs () const |
|
const std::array< double, 6 > & | getZobsErr () const |
|
| MillePedeFileReader (const edm::ParameterSet &, const std::shared_ptr< const PedeLabelerBase > &, const std::shared_ptr< const AlignPCLThresholds > &) |
|
void | read () |
|
bool | storeAlignments () |
|
virtual | ~MillePedeFileReader ()=default |
|
|
int | binariesAmount_ {0} |
|
int | exitCode_ {-1} |
|
std::string | exitMessage_ {""} |
|
const std::string | millePedeEndFile_ |
|
const std::string | millePedeLogFile_ |
|
const std::string | millePedeResFile_ |
|
int | Nrec_ {0} |
|
const std::shared_ptr< const PedeLabelerBase > | pedeLabeler_ |
|
const std::shared_ptr< const AlignPCLThresholds > | theThresholds_ |
|
std::array< double, 6 > | tXobs_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | tXobsErr_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | tYobs_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | tYobsErr_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | tZobs_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | tZobsErr_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::bitset< 4 > | updateBits_ |
|
bool | updateDB_ {false} |
|
bool | vetoUpdateDB_ {false} |
|
std::array< double, 6 > | Xobs_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | XobsErr_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | Yobs_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | YobsErr_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | Zobs_ = {{0., 0., 0., 0., 0., 0.}} |
|
std::array< double, 6 > | ZobsErr_ = {{0., 0., 0., 0., 0., 0.}} |
|
Definition at line 57 of file MillePedeFileReader.h.
Definition at line 235 of file MillePedeFileReader.cc.
239 const auto& tns =
pedeLabeler_->alignableTracker()->trackerNameSpace();
243 switch (tns.tpb().halfBarrelNumber(alignable->
id())) {
249 throw cms::Exception(
"LogicError") <<
"@SUB=MillePedeFileReader::getHLS\n"
250 <<
"Found a pixel half-barrel number that should not exist: "
251 << tns.tpb().halfBarrelNumber(alignable->
id());
254 switch (tns.tpe().endcapNumber(alignable->
id())) {
256 switch (tns.tpe().halfCylinderNumber(alignable->
id())) {
262 throw cms::Exception(
"LogicError") <<
"@SUB=MillePedeFileReader::getHLS\n"
263 <<
"Found a pixel half-cylinder number that should not exist: "
264 << tns.tpe().halfCylinderNumber(alignable->
id());
267 switch (tns.tpe().halfCylinderNumber(alignable->
id())) {
273 throw cms::Exception(
"LogicError") <<
"@SUB=MillePedeFileReader::getHLS\n"
274 <<
"Found a pixel half-cylinder number that should not exist: "
275 << tns.tpe().halfCylinderNumber(alignable->
id());
279 <<
"@SUB=MillePedeFileReader::getHLS\n"
280 <<
"Found a pixel endcap number that should not exist: " << tns.tpe().endcapNumber(alignable->
id());
References Alignable::alignableObjectId(), Exception, Alignable::id(), NotInPCL, pedeLabeler_, align::TPBHalfBarrel, TPBHalfBarrelXminus, TPBHalfBarrelXplus, align::TPEHalfCylinder, TPEHalfCylinderXminusZminus, TPEHalfCylinderXminusZplus, TPEHalfCylinderXplusZminus, and TPEHalfCylinderXplusZplus.
Referenced by readMillePedeResultFile().
void MillePedeFileReader::readMillePedeResultFile |
( |
| ) |
|
|
private |
Definition at line 100 of file MillePedeFileReader.cc.
102 std::map<std::string, std::array<float, 6> > cutoffs_;
103 std::map<std::string, std::array<float, 6> > significances_;
104 std::map<std::string, std::array<float, 6> > thresholds_;
105 std::map<std::string, std::array<float, 6> > errors_;
107 std::vector<std::string> alignables_ =
theThresholds_->getAlignableList();
108 for (
auto& ali : alignables_) {
117 std::ifstream resFile;
120 if (resFile.is_open()) {
121 edm::LogInfo(
"MillePedeFileReader") <<
"Reading millepede result-file";
124 getline(resFile,
line);
126 while (getline(resFile,
line)) {
127 std::istringstream iss(
line);
129 std::vector<std::string> tokens;
131 while (iss >>
token) {
132 tokens.push_back(
token);
135 if (tokens.size() > 4 ) {
136 auto alignableLabel = std::stoul(tokens[0]);
137 auto alignableIndex = alignableLabel % 10 - 1;
138 const auto alignable =
pedeLabeler_->alignableFromLabel(alignableLabel);
140 double ObsMove = std::stof(tokens[3]) *
multiplier_[alignableIndex];
141 double ObsErr = std::stof(tokens[4]) *
multiplier_[alignableIndex];
143 auto det =
getHLS(alignable);
144 int detIndex = static_cast<int>(det);
145 auto coord = static_cast<AlignPCLThresholds::coordType>(alignableIndex);
151 Xobs_[detIndex] = ObsMove;
155 Yobs_[detIndex] = ObsMove;
159 Zobs_[detIndex] = ObsMove;
163 tXobs_[detIndex] = ObsMove;
167 tYobs_[detIndex] = ObsMove;
171 tZobs_[detIndex] = ObsMove;
175 edm::LogError(
"MillePedeFileReader") <<
"Currently not able to handle DOF " << coord << std::endl;
183 <<
" alignableLabel: " << alignableLabel <<
" with alignableIndex " << alignableIndex <<
" detIndex"
185 <<
" i.e. detLabel: " <<
detLabel <<
" (" << coord <<
")\n"
186 <<
" has movement: " << ObsMove <<
" +/- " << ObsErr <<
"\n"
187 <<
" cutoff (cutoffs_[" <<
detLabel <<
"][" << coord <<
"]): " << cutoffs_[
detLabel][alignableIndex] <<
"\n"
188 <<
" significance (significances_[" <<
detLabel <<
"][" << coord
189 <<
"]): " << significances_[
detLabel][alignableIndex] <<
"\n"
190 <<
" error thresolds (errors_[" <<
detLabel <<
"][" << coord <<
"]): " << errors_[
detLabel][alignableIndex]
192 <<
" max movement (thresholds_[" <<
detLabel <<
"][" << coord
193 <<
"]): " << thresholds_[
detLabel][alignableIndex] <<
"\n"
194 <<
"=============" << std::endl;
198 <<
" Exceeding maximum thresholds for movement: " <<
std::abs(ObsMove)
199 <<
" for" <<
detLabel <<
"(" << coord <<
")";
209 <<
" Exceeding maximum thresholds for error: " <<
std::abs(ObsErr)
210 <<
" for" <<
detLabel <<
"(" << coord <<
")";
215 if (
std::abs(ObsMove / ObsErr) < significances_[
detLabel][alignableIndex]) {
222 <<
"This correction: " << ObsMove <<
"+/-" << ObsErr <<
" for " <<
detLabel <<
"(" << coord
223 <<
") will trigger a new Tracker Alignment payload!";
228 edm::LogError(
"MillePedeFileReader") <<
"Could not read millepede result-file.";
References funct::abs(), clustersummarymultiplicityprod_cfi::detLabel, getHLS(), getStringFromHLS(), mps_splice::line, millePedeResFile_, multiplier_, NotInPCL, Nrec_, pedeLabeler_, AlCaHLTBitMon_QueryRunRegistry::string, AlignPCLThresholds::theta_X, AlignPCLThresholds::theta_Y, AlignPCLThresholds::theta_Z, theThresholds_, unpackBuffers-CaloStage2::token, tXobs_, tXobsErr_, tYobs_, tYobsErr_, tZobs_, tZobsErr_, updateBits_, updateDB_, vetoUpdateDB_, AlignPCLThresholds::X, Xobs_, XobsErr_, AlignPCLThresholds::Y, Yobs_, YobsErr_, AlignPCLThresholds::Z, Zobs_, and ZobsErr_.
Referenced by read().