Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:12

0001 #include "TkMeasurementDetSet.h"
0002 
0003 void StMeasurementConditionSet::init(int size) {
0004   activeThisPeriod_.resize(size, true);
0005   id_.resize(size);
0006   subId_.resize(size);
0007   totalStrips_.resize(size);
0008 
0009   bad128Strip_.resize(size * 6);
0010   hasAny128StripBad_.resize(size);
0011   badStripBlocks_.resize(size);
0012 }
0013 
0014 void StMeasurementConditionSet::set128StripStatus(int i, bool good, int idx) {
0015   int offset = nbad128 * i;
0016   if (idx == -1) {
0017     std::fill(bad128Strip_.begin() + offset, bad128Strip_.begin() + offset + 6, !good);
0018     hasAny128StripBad_[i] = !good;
0019   } else {
0020     bad128Strip_[offset + idx] = !good;
0021     if (good == false) {
0022       hasAny128StripBad_[i] = false;
0023     } else {  // this should not happen, as usually you turn on all fibers
0024               // and then turn off the bad ones, and not vice-versa,
0025               // so I don't care if it's not optimized
0026       hasAny128StripBad_[i] = true;
0027       for (int j = 0; i < (totalStrips_[j] >> 7); j++) {
0028         if (bad128Strip_[j + offset] == false) {
0029           hasAny128StripBad_[i] = false;
0030           break;
0031         }
0032       }
0033     }
0034   }
0035 }
0036 
0037 void PxMeasurementConditionSet::init(int size) {
0038   activeThisPeriod_.resize(size, true);
0039   id_.resize(size);
0040 }
0041 
0042 void Phase2OTMeasurementConditionSet::init(int size) {
0043   activeThisPeriod_.resize(size, true);
0044   id_.resize(size);
0045 }