52 class StrictWeakOrdering{
54 bool operator() ( uint32_t
p,
const uint32_t&
i)
const {
return p <
i;}
67 template<
typename TKD>
68 void sortTKD( std::vector<TKD*> & det) {
69 std::sort(det.begin(),det.end(),CmpTKD());
71 template<
typename TKD>
72 void sortTKD( std::vector<TKD> & det) {
73 std::sort(det.begin(),det.end(),CmpTKD());
86 int stripQualityFlags,
87 int stripQualityDebugFlags,
90 int pixelQualityFlags,
91 int pixelQualityDebugFlags) :
94 name_(conf.getParameter<std::
string>(
"ComponentName")),
95 theStDetConditions(hitMatcher,stripCPE),
96 thePxDetConditions(pixelCPE)
111 bool subIsPixel =
false;
174 int size = stripDets.size();
177 auto & mdet = stripDets[
i];
190 int size = pixelDets.size();
194 auto & mdet = pixelDets[
i];
206 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
207 gd != dets.end(); gd++) {
224 if ((gluedDet == 0 && stackDet == 0) || (gluedDet != 0 && stackDet != 0)) {
249 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
259 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
280 if (monoDet == 0 || stereoDet == 0) {
281 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
284 det.
init(monoDet,stereoDet);
293 if (lowerDet == 0 || upperDet == 0) {
294 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: StackDet components not found as MeasurementDets ";
297 det.
init(lowerDet,upperDet);
313 if ((quality != 0) && (qualityFlags != 0)) {
314 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
315 unsigned int on = 0, tot = 0;
316 unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
322 tot++; on += (
unsigned int) isOn;
323 if (qualityDebugFlags & BadModules) {
324 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializeStripStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
334 for (
int j = 0;
j < 6;
j++) {
336 if (badApvs & (1 <<
j)) {
341 for (
int j = 0;
j < 3;
j++) {
343 if (badFibers & (1 <<
j)) {
352 if (qualityFlags & BadStrips) {
355 badStrips.push_back(quality->
decode(*bit));
361 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
365 " Total APVs: " << atot <<
", active " << (atot-aoff) <<
", inactive " << (aoff);
367 " Total Fibers: " << ftot <<
", active " << (ftot-foff) <<
", inactive " << (foff);
379 if ((quality != 0) && (qualityFlags != 0)) {
380 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
381 unsigned int on = 0, tot = 0, badrocs = 0;
382 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
384 uint32_t detid = ((*i).geomDet().geographicalId()).rawId();
387 (
i)->setActive(isOn);
388 tot++; on += (
unsigned int) isOn;
389 if (qualityDebugFlags & BadModules) {
390 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializePixelStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
393 (
i)->setActive(
true);
397 badrocs += badROCs.size();
398 (
i)->setBadRocPositions(badROCs);
400 (
i)->clearBadRocPositions();
405 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
407 if (qualityDebugFlags &
BadROCs) {
408 edm::LogInfo(
"MeasurementTracker PixelROCStatus") <<
" Total of bad ROCs: " << badrocs ;
411 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
413 (
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
std::vector< TkStackMeasurementDet > theStackDets
StMeasurementConditionSet theStDetConditions
std::vector< unsigned int >::const_iterator ContainerIterator
void initializeStripStatus(const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
const TrackerGeometry * theTrackerGeom
void initGluedDet(TkGluedMeasurementDet &det)
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
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 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 addDets(const TrackingGeometry::DetContainer &dets, bool subIsPixel)
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_
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
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)
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
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
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
tuple size
Write out results.
void initStackDet(TkStackMeasurementDet &det)
const GeomDetUnit * stereoDet() const
data decode(const unsigned int &value) const
const DetContainer & detsTID() const