|
|
Go to the documentation of this file.
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++) {
221 const GeomDetUnit* gdu = dynamic_cast<const GeomDetUnit*>(*gd);
236 const GluedGeomDet* gluedDet = dynamic_cast<const GluedGeomDet*>(*gd);
237 const StackGeomDet* stackDet = dynamic_cast<const StackGeomDet*>(*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)) {
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();
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);
void initialize(const TrackerTopology *trackerTopology)
void initPhase2OTMeasurementConditionSet(std::vector< TkPhase2OTMeasurementDet > &phase2Dets)
void addGluedDet(const GluedGeomDet *gd)
Phase2OTMeasurementConditionSet thePhase2DetConditions
std::vector< unsigned int > id_
void initializePixelStatus(const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags)
unsigned int id(int i) const
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)
PxMeasurementConditionSet thePxDetConditions
const GeomDetUnit * monoDet() const
const GeomDetUnit * upperDet() const
std::vector< TkGluedMeasurementDet > theGluedDets
std::vector< int > totalStrips_
Log< level::Info, false > LogInfo
const DetContainer & detsPXB() const
const PixelClusterParameterEstimator * pixelCPE() const
void initializeStripStatus(const BadStripCutsDet &badStripCuts, const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
std::vector< TkStripMeasurementDet > theStripDets
std::pair< ContainerIterator, ContainerIterator > Range
const DetContainer & detsTOB() const
void addPhase2Det(const GeomDet *gd)
BadStripCuts badStripCuts_[4]
const StripClusterParameterEstimator * stripCPE() const
unsigned int id(int i) const
const SiStripRecHitMatcher * matcher() const
std::vector< TkStackMeasurementDet > theStackDets
void init(const MeasurementDet *lowerDet, const MeasurementDet *upperDet)
const MeasurementDet * findDet(const DetId &id) const
const DetContainer & detsPXF() const
const GeomDetUnit * lowerDet() const
void addDets(const TrackingGeometry::DetContainer &dets, bool subIsPixel, bool subIsOT)
static constexpr auto TEC
const DetContainer & detsTID() 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.
void setMaskBad128StripBlocks(bool maskThem)
void addStripDet(const GeomDet *gd)
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
std::vector< BadStripBlock > & getBadStripBlocks(int i)
std::vector< unsigned char > subId_
void addPixelDet(const GeomDet *gd)
std::vector< const GeomDet * > DetContainer
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
std::vector< TkPixelMeasurementDet > thePixelDets
const DetContainer & detsTIB() const
static constexpr auto TOB
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
const std::vector< TkPixelMeasurementDet > & pixelDets() const
Log< level::Error, false > LogError
const StackGeomDet & specificGeomDet() const
void initStMeasurementConditionSet(std::vector< TkStripMeasurementDet > &stripDets)
void initStackDet(TkStackMeasurementDet &det)
void initPxMeasurementConditionSet(std::vector< TkPixelMeasurementDet > &pixelDets)
StMeasurementConditionSet theStDetConditions
static constexpr auto TID
const GeomDetUnit * stereoDet() const
~MeasurementTrackerImpl() override
constexpr uint32_t rawId() const
get the raw id
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet, const TrackerTopology *tTopo)
void setActive(int i, bool active)
Turn on/off the module for reconstruction, for the full run or lumi (using info from DB,...
const DetContainer & detsTEC() const
void initGluedDet(TkGluedMeasurementDet &det, const TrackerTopology *trackerTopology)
void addStackDet(const StackGeomDet *gd)
static constexpr auto TIB
const std::vector< TkStripMeasurementDet > & stripDets() const
Detector identifier class for the strip tracker.
unsigned int id(int i) const
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
std::vector< unsigned int > id_
const GeomDet & fastGeomDet() const
void set128StripStatus(int i, bool good, int idx=-1)
std::vector< unsigned int > id_
virtual bool isLeaf() const
is a Unit
std::vector< unsigned int >::const_iterator ContainerIterator
const TrackerGeometry * theTrackerGeom
const GluedGeomDet & specificGeomDet() const