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),
94 thePhase2DetConditions(phase2OTCPE) {
103 bool subIsPixel =
false;
106 bool subIsOT =
false;
183 for (
int i = 0;
i !=
size; ++
i) {
199 for (
int i = 0;
i !=
size; ++
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;
333 bool isOn =
quality->IsModuleUsable(detid);
336 on += (
unsigned int)isOn;
339 <<
"MeasurementTrackerImpl::initializeStripStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
347 short badApvs =
quality->getBadApvs(detid);
348 short badFibers =
quality->getBadFibers(detid);
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)) {
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();
402 bool isOn =
quality->IsModuleUsable(detid);
403 (
i)->setActive(isOn);
405 on += (
unsigned int)isOn;
408 <<
"MeasurementTrackerImpl::initializePixelStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
411 (
i)->setActive(
true);
413 if ((qualityFlags &
BadROCs) && (
quality->getBadRocs(detid) != 0)) {
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 DetContainer & detsTIB() const
virtual bool isLeaf() const
is a Unit
void addStripDet(const GeomDet *gd)
~MeasurementTrackerImpl() override
void addStackDet(const StackGeomDet *gd)
const GeomDetUnit * lowerDet() const
std::vector< TkStripMeasurementDet > theStripDets
const DetContainer & detsPXB() const
std::vector< TkStackMeasurementDet > theStackDets
StMeasurementConditionSet theStDetConditions
static constexpr auto TID
const GeomDetUnit * upperDet() const
unsigned int id(int i) const
std::vector< unsigned int >::const_iterator ContainerIterator
void addDets(const TrackingGeometry::DetContainer &dets, bool subIsPixel, bool subIsOT)
const TrackerGeometry * theTrackerGeom
const DetContainer & detsPXF() const
const StripClusterParameterEstimator * stripCPE() const
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
const GluedGeomDet & specificGeomDet() const
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
Log< level::Error, false > LogError
void addPixelDet(const GeomDet *gd)
const SiStripRecHitMatcher * matcher() const
std::vector< const GeomDet * > DetContainer
void init(const MeasurementDet *lowerDet, const MeasurementDet *upperDet)
std::vector< unsigned char > subId_
unsigned int id(int i) const
void initGluedDet(TkGluedMeasurementDet &det, const TrackerTopology *trackerTopology)
const DetContainer & detsTOB() const
std::vector< TkPixelMeasurementDet > thePixelDets
void initializePixelStatus(const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags)
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...
std::vector< BadStripBlock > & getBadStripBlocks(int i)
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=nullptr)
void initialize(const TrackerTopology *trackerTopology)
void initStMeasurementConditionSet(std::vector< TkStripMeasurementDet > &stripDets)
unsigned int id(int i) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< unsigned int > id_
DetId geographicalId() const
The label of this GeomDet.
static constexpr auto TOB
std::vector< int > totalStrips_
void initializeStripStatus(const BadStripCutsDet &badStripCuts, const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
const std::vector< TkStripMeasurementDet > & stripDets() const
const GeomDetUnit * monoDet() const
void addPhase2Det(const GeomDet *gd)
Log< level::Info, false > LogInfo
Detector identifier class for the strip tracker.
void setMaskBad128StripBlocks(bool maskThem)
std::vector< unsigned int > id_
void addGluedDet(const GluedGeomDet *gd)
constexpr uint32_t rawId() const
get the raw id
std::vector< unsigned int > id_
const GeomDet & fastGeomDet() const
const GeomDetUnit * stereoDet() const
std::vector< TkGluedMeasurementDet > theGluedDets
static constexpr auto TIB
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet, const TrackerTopology *tTopo)
PxMeasurementConditionSet thePxDetConditions
Phase2OTMeasurementConditionSet thePhase2DetConditions
const MeasurementDet * findDet(const DetId &id) const
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
std::pair< ContainerIterator, ContainerIterator > Range
const std::vector< TkPixelMeasurementDet > & pixelDets() const
const DetContainer & detsTEC() const
BadStripCuts badStripCuts_[4]
const StackGeomDet & specificGeomDet() const
void initPxMeasurementConditionSet(std::vector< TkPixelMeasurementDet > &pixelDets)
void set128StripStatus(int i, bool good, int idx=-1)
const PixelClusterParameterEstimator * pixelCPE() const
void initStackDet(TkStackMeasurementDet &det)
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
static constexpr auto TEC
const DetContainer & detsTID() const