53 class StrictWeakOrdering{
55 bool operator() ( uint32_t
p,
const uint32_t&
i)
const {
return p <
i;}
68 template<
typename TKD>
69 void sortTKD( std::vector<TKD*> & det) {
70 std::sort(det.begin(),det.end(),CmpTKD());
72 template<
typename TKD>
73 void sortTKD( std::vector<TKD> & det) {
74 std::sort(det.begin(),det.end(),CmpTKD());
87 int stripQualityFlags,
88 int stripQualityDebugFlags,
91 int pixelQualityFlags,
92 int pixelQualityDebugFlags,
96 name_(conf.getParameter<
std::
string>(
"ComponentName")),
97 theStDetConditions(hitMatcher,stripCPE),
98 thePxDetConditions(pixelCPE),
99 thePhase2DetConditions(phase2OTCPE)
114 bool subIsPixel =
false;
117 bool subIsOT =
false;
188 int size = stripDets.size();
191 auto & mdet = stripDets[
i];
204 int size = pixelDets.size();
208 auto & mdet = pixelDets[
i];
217 int size = phase2Dets.size();
221 auto & mdet = phase2Dets[
i];
230 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
231 gd != dets.end(); gd++) {
252 if ((gluedDet == 0 && stackDet == 0) || (gluedDet != 0 && stackDet != 0)) {
277 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
287 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
297 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
318 if (monoDet == 0 || stereoDet == 0) {
319 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
322 det.
init(monoDet,stereoDet);
331 if (lowerDet == 0 || upperDet == 0) {
332 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: StackDet components not found as MeasurementDets ";
335 det.
init(lowerDet,upperDet);
351 if ((quality != 0) && (qualityFlags != 0)) {
352 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
353 unsigned int on = 0, tot = 0;
354 unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
360 tot++; on += (
unsigned int) isOn;
361 if (qualityDebugFlags & BadModules) {
362 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializeStripStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
372 for (
int j = 0; j < 6; j++) {
374 if (badApvs & (1 << j)) {
379 for (
int j = 0; j < 3; j++) {
381 if (badFibers & (1 << j)) {
390 if (qualityFlags & BadStrips) {
393 badStrips.push_back(quality->
decode(*bit));
399 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
403 " Total APVs: " << atot <<
", active " << (atot-aoff) <<
", inactive " << (aoff);
405 " Total Fibers: " << ftot <<
", active " << (ftot-foff) <<
", inactive " << (foff);
417 if ((quality != 0) && (qualityFlags != 0)) {
418 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
419 unsigned int on = 0, tot = 0, badrocs = 0;
420 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
422 uint32_t detid = ((*i).geomDet().geographicalId()).rawId();
425 (
i)->setActive(isOn);
426 tot++; on += (
unsigned int) isOn;
427 if (qualityDebugFlags & BadModules) {
428 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializePixelStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
431 (
i)->setActive(
true);
435 badrocs += badROCs.size();
436 (
i)->setBadRocPositions(badROCs);
438 (
i)->clearBadRocPositions();
443 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
445 if (qualityDebugFlags &
BadROCs) {
446 edm::LogInfo(
"MeasurementTracker PixelROCStatus") <<
" Total of bad ROCs: " << badrocs ;
449 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
451 (
i)->setActive(
true);
const GeomDetUnit * lowerDet() const
virtual char const * what() const
T getParameter(std::string const &) const
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
short getBadFibers(const uint32_t &detid) const
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet)
void addStripDet(const GeomDet *gd)
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
const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
std::vector< TkStackMeasurementDet > theStackDets
StMeasurementConditionSet theStDetConditions
std::vector< unsigned int >::const_iterator ContainerIterator
void initializeStripStatus(const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
void addDets(const TrackingGeometry::DetContainer &dets, bool subIsPixel, bool subIsOT)
const TrackerGeometry * theTrackerGeom
void initGluedDet(TkGluedMeasurementDet &det)
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
unsigned int id(int i) const
void addPixelDet(const GeomDet *gd)
const GeomDet & fastGeomDet() const
uint32_t rawId() const
get the raw id
void init(const MeasurementDet *lowerDet, const MeasurementDet *upperDet)
std::vector< unsigned char > subId_
unsigned int id(int i) const
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 initStMeasurementConditionSet(std::vector< TkStripMeasurementDet > &stripDets)
const DetContainer & detsPXB() const
DetId geographicalId() const
The label of this GeomDet.
const StripClusterParameterEstimator * stripCPE() const
virtual bool isLeaf() const
is a Unit
const edm::ParameterSet & pset_
std::vector< unsigned int > id_
const std::vector< TkPixelMeasurementDet > & pixelDets() const
bool IsModuleUsable(const uint32_t &detid) const
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
virtual ~MeasurementTrackerImpl()
std::vector< int > totalStrips_
const DetContainer & detsTIB() const
void addPhase2Det(const GeomDet *gd)
MeasurementTrackerImpl(const edm::ParameterSet &conf, const PixelClusterParameterEstimator *pixelCPE, const StripClusterParameterEstimator *stripCPE, const SiStripRecHitMatcher *hitMatcher, 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)
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
bool isTrackerPixel(const GeomDetEnumerators::SubDetector m)
short getBadRocs(const uint32_t &detid) const
PxMeasurementConditionSet thePxDetConditions
Phase2OTMeasurementConditionSet thePhase2DetConditions
const Range getRange(const uint32_t detID) const
std::pair< ContainerIterator, ContainerIterator > Range
const GeomDetUnit * upperDet() const
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)
std::vector< GeomDet const * > DetContainer
void initStackDet(TkStackMeasurementDet &det)
const GeomDetUnit * stereoDet() const
data decode(const unsigned int &value) const
const DetContainer & detsTID() const