51 class StrictWeakOrdering {
53 bool operator()(uint32_t
p,
const uint32_t&
i)
const {
return p <
i; }
65 template <
typename TKD>
66 void sortTKD(std::vector<TKD*>& det) {
67 std::sort(det.begin(), det.end(), CmpTKD());
69 template <
typename TKD>
70 void sortTKD(std::vector<TKD>& det) {
71 std::sort(det.begin(), det.end(), CmpTKD());
84 int stripQualityFlags,
85 int stripQualityDebugFlags,
88 int pixelQualityFlags,
89 int pixelQualityDebugFlags,
92 theStDetConditions(hitMatcher, stripCPE),
93 thePxDetConditions(pixelCPE),
94 thePhase2DetConditions(phase2OTCPE) {
103 bool subIsPixel =
false;
106 bool subIsOT =
false;
181 int size = stripDets.size();
183 for (
int i = 0;
i !=
size; ++
i) {
184 auto& mdet = stripDets[
i];
196 int size = pixelDets.size();
199 for (
int i = 0;
i !=
size; ++
i) {
200 auto& mdet = pixelDets[
i];
208 int size = phase2Dets.size();
211 for (
int i = 0;
i !=
size; ++
i) {
212 auto& mdet = phase2Dets[
i];
220 for (TrackerGeometry::DetContainer::const_iterator gd = dets.begin(); gd != dets.end(); gd++) {
239 if ((gluedDet ==
nullptr && stackDet ==
nullptr) || (gluedDet !=
nullptr && stackDet !=
nullptr)) {
242 if (gluedDet !=
nullptr)
260 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what();
268 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what();
276 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what();
294 if (monoDet ==
nullptr || stereoDet ==
nullptr) {
295 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
298 det.
init(monoDet, stereoDet, trackerTopology);
306 if (lowerDet ==
nullptr || upperDet ==
nullptr) {
307 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: StackDet components not found as MeasurementDets ";
310 det.
init(lowerDet, upperDet);
317 int qualityDebugFlags) {
326 if ((quality !=
nullptr) && (qualityFlags != 0)) {
327 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
328 unsigned int on = 0, tot = 0;
329 unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
336 on += (
unsigned int)isOn;
337 if (qualityDebugFlags & BadModules) {
339 <<
"MeasurementTrackerImpl::initializeStripStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
349 for (
int j = 0;
j < 6;
j++) {
351 if (badApvs & (1 <<
j)) {
356 for (
int j = 0;
j < 3;
j++) {
358 if (badFibers & (1 <<
j)) {
367 if (qualityFlags & BadStrips) {
370 badStrips.push_back(quality->
decode(*bit));
376 <<
" Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
380 <<
" Total APVs: " << atot <<
", active " << (atot - aoff) <<
", inactive " << (aoff);
382 <<
" Total Fibers: " << ftot <<
", active " << (ftot - foff) <<
", inactive " << (foff);
395 int qualityDebugFlags) {
396 if ((quality !=
nullptr) && (qualityFlags != 0)) {
397 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
398 unsigned int on = 0, tot = 0, badrocs = 0;
400 uint32_t detid = ((*i).geomDet().geographicalId()).rawId();
403 (
i)->setActive(isOn);
405 on += (
unsigned int)isOn;
406 if (qualityDebugFlags & BadModules) {
408 <<
"MeasurementTrackerImpl::initializePixelStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
411 (
i)->setActive(
true);
415 badrocs += badROCs.size();
416 (
i)->setBadRocPositions(badROCs);
418 (
i)->clearBadRocPositions();
423 <<
" Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
425 if (qualityDebugFlags &
BadROCs) {
426 edm::LogInfo(
"MeasurementTracker PixelROCStatus") <<
" Total of bad ROCs: " << badrocs;
430 (
i)->setActive(
true);
const GeomDetUnit * lowerDet() const
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
short getBadFibers(const uint32_t &detid) const
void addStripDet(const GeomDet *gd)
~MeasurementTrackerImpl() override
void addStackDet(const StackGeomDet *gd)
unsigned int id(int i) const
std::vector< TkStripMeasurementDet > theStripDets
const GeomDetUnit * monoDet() const
const MeasurementDet * findDet(const DetId &id) const
std::vector< TkStackMeasurementDet > theStackDets
MeasurementTrackerImpl(const BadStripCutsDet &badStripCuts, const PixelClusterParameterEstimator *pixelCPE, const StripClusterParameterEstimator *stripCPE, const SiStripRecHitMatcher *hitMatcher, const TrackerTopology *trackerTopology, const TrackerGeometry *trackerGeom, const GeometricSearchTracker *geometricSearchTracker, const SiStripQuality *stripQuality, int stripQualityFlags, int stripQualityDebugFlags, const SiPixelQuality *pixelQuality, const SiPixelFedCabling *pixelCabling, int pixelQualityFlags, int pixelQualityDebugFlags, const ClusterParameterEstimator< Phase2TrackerCluster1D > *phase2OTCPE=0)
StMeasurementConditionSet theStDetConditions
static constexpr auto TID
std::vector< unsigned int >::const_iterator ContainerIterator
void addDets(const TrackingGeometry::DetContainer &dets, bool subIsPixel, bool subIsOT)
const TrackerGeometry * theTrackerGeom
constexpr uint32_t rawId() const
get the raw id
char const * what() const override
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
unsigned int id(int i) const
void addPixelDet(const GeomDet *gd)
const GeomDet & fastGeomDet() const
std::vector< const GeomDet * > DetContainer
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
void init(const MeasurementDet *lowerDet, const MeasurementDet *upperDet)
std::vector< unsigned char > subId_
unsigned int id(int i) const
StMeasurementConditionSet::BadStripCuts tib
void initGluedDet(TkGluedMeasurementDet &det, const TrackerTopology *trackerTopology)
const SiStripRecHitMatcher * matcher() const
const DetContainer & detsTEC() const
const std::vector< TkStripMeasurementDet > & stripDets() const
short getBadApvs(const uint32_t &detid) const
bool IsModuleUsable(const uint32_t &detid) const
std::vector< TkPixelMeasurementDet > thePixelDets
void initializePixelStatus(const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags)
const std::vector< LocalPoint > getBadRocPositions(const uint32_t &detid, const TrackerGeometry &theTracker, const SiPixelFedCabling *map) const
void initPhase2OTMeasurementConditionSet(std::vector< TkPhase2OTMeasurementDet > &phase2Dets)
void setActive(int i, bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB...
const GluedGeomDet & specificGeomDet() const
std::vector< BadStripBlock > & getBadStripBlocks(int i)
void initialize(const TrackerTopology *trackerTopology)
void initStMeasurementConditionSet(std::vector< TkStripMeasurementDet > &stripDets)
const DetContainer & detsPXB() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
DetId geographicalId() const
The label of this GeomDet.
const StripClusterParameterEstimator * stripCPE() const
virtual bool isLeaf() const
is a Unit
std::vector< unsigned int > id_
const std::vector< TkPixelMeasurementDet > & pixelDets() const
bool IsModuleUsable(const uint32_t &detid) const
static constexpr auto TOB
std::vector< int > totalStrips_
void initializeStripStatus(const BadStripCutsDet &badStripCuts, const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
const DetContainer & detsTIB() const
StMeasurementConditionSet::BadStripCuts tec
void addPhase2Det(const GeomDet *gd)
Detector identifier class for the strip tracker.
void setMaskBad128StripBlocks(bool maskThem)
std::vector< unsigned int > id_
void addGluedDet(const GluedGeomDet *gd)
std::vector< unsigned int > id_
std::vector< TkGluedMeasurementDet > theGluedDets
short getBadRocs(const uint32_t &detid) const
static constexpr auto TIB
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet, const TrackerTopology *tTopo)
PxMeasurementConditionSet thePxDetConditions
Phase2OTMeasurementConditionSet thePhase2DetConditions
StMeasurementConditionSet::BadStripCuts tob
const Range getRange(const uint32_t detID) const
std::pair< ContainerIterator, ContainerIterator > Range
const GeomDetUnit * upperDet() const
StMeasurementConditionSet::BadStripCuts tid
const DetContainer & detsPXF() const
const DetContainer & detsTOB() const
const StackGeomDet & specificGeomDet() const
const PixelClusterParameterEstimator * pixelCPE() const
BadStripCuts badStripCuts_[4]
void initPxMeasurementConditionSet(std::vector< TkPixelMeasurementDet > &pixelDets)
void set128StripStatus(int i, bool good, int idx=-1)
void initStackDet(TkStackMeasurementDet &det)
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
static constexpr auto TEC
const GeomDetUnit * stereoDet() const
data decode(const unsigned int &value) const
const DetContainer & detsTID() const