49 class StrictWeakOrdering {
51 bool operator()(uint32_t
p,
const uint32_t&
i)
const {
return p <
i; }
63 template <
typename TKD>
64 void sortTKD(std::vector<TKD*>& det) {
65 std::sort(det.begin(), det.end(), CmpTKD());
67 template <
typename TKD>
68 void sortTKD(std::vector<TKD>& det) {
69 std::sort(det.begin(), det.end(), CmpTKD());
82 int stripQualityFlags,
83 int stripQualityDebugFlags,
86 int pixelQualityFlags,
87 int pixelQualityDebugFlags,
90 theStDetConditions(hitMatcher, stripCPE),
92 thePhase2DetConditions(phase2OTCPE) {
101 bool subIsPixel =
false;
104 bool subIsOT =
false;
181 for (
int i = 0;
i !=
size; ++
i) {
197 for (
int i = 0;
i !=
size; ++
i) {
206 int size = phase2Dets.size();
209 for (
int i = 0;
i !=
size; ++
i) {
210 auto& mdet = phase2Dets[
i];
218 for (TrackerGeometry::DetContainer::const_iterator gd = dets.begin(); gd != dets.end(); gd++) {
237 if ((gluedDet ==
nullptr && stackDet ==
nullptr) || (gluedDet !=
nullptr && stackDet !=
nullptr)) {
240 if (gluedDet !=
nullptr)
242 else if (stackDet !=
nullptr)
258 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " <<
err.what();
266 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " <<
err.what();
274 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " <<
err.what();
292 if (monoDet ==
nullptr || stereoDet ==
nullptr) {
293 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
296 det.
init(monoDet, stereoDet, trackerTopology);
304 if (lowerDet ==
nullptr || upperDet ==
nullptr) {
305 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: StackDet components not found as MeasurementDets ";
308 det.
init(lowerDet, upperDet);
315 int qualityDebugFlags) {
326 unsigned int on = 0,
tot = 0;
327 unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
334 on += (
unsigned int)isOn;
337 <<
"MeasurementTrackerImpl::initializeStripStatus : detid " <<
detid <<
" is " << (isOn ?
"on" :
"off");
347 for (
int j = 0;
j < 6;
j++) {
349 if (badApvs & (1 <<
j)) {
354 for (
int j = 0;
j < 3;
j++) {
356 if (badFibers & (1 <<
j)) {
374 <<
" Total modules: " <<
tot <<
", active " <<
on <<
", inactive " << (
tot -
on);
378 <<
" Total APVs: " << atot <<
", active " << (atot - aoff) <<
", inactive " << (aoff);
380 <<
" Total Fibers: " << ftot <<
", active " << (ftot - foff) <<
", inactive " << (foff);
393 int qualityDebugFlags) {
396 unsigned int on = 0,
tot = 0, badrocs = 0;
398 uint32_t
detid = ((*i).geomDet().geographicalId()).
rawId();
401 (
i)->setActive(isOn);
403 on += (
unsigned int)isOn;
406 <<
"MeasurementTrackerImpl::initializePixelStatus : detid " <<
detid <<
" is " << (isOn ?
"on" :
"off");
409 (
i)->setActive(
true);
413 badrocs += badROCs.size();
414 (
i)->setBadRocPositions(badROCs);
416 (
i)->clearBadRocPositions();
421 <<
" Total modules: " <<
tot <<
", active " <<
on <<
", inactive " << (
tot -
on);
423 if (qualityDebugFlags &
BadROCs) {
424 edm::LogInfo(
"MeasurementTracker PixelROCStatus") <<
" Total of bad ROCs: " << badrocs;
428 (
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