50 class StrictWeakOrdering{
52 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 name_(conf.getParameter<std::
string>(
"ComponentName")),
93 theStDetConditions(hitMatcher,stripCPE),
94 thePxDetConditions(pixelCPE)
149 int size = stripDets.size();
152 auto & mdet = stripDets[
i];
165 int size = pixelDets.size();
169 auto & mdet = pixelDets[
i];
180 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
181 gd != dets.end(); gd++) {
188 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
189 gd != dets.end(); gd++) {
217 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
227 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
241 if (monoDet == 0 || stereoDet == 0) {
242 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
245 det.
init(monoDet,stereoDet);
261 if ((quality != 0) && (qualityFlags != 0)) {
262 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
263 unsigned int on = 0, tot = 0;
264 unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
270 tot++; on += (
unsigned int) isOn;
271 if (qualityDebugFlags & BadModules) {
272 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializeStripStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
282 for (
int j = 0;
j < 6;
j++) {
284 if (badApvs & (1 <<
j)) {
289 for (
int j = 0;
j < 3;
j++) {
291 if (badFibers & (1 <<
j)) {
300 if (qualityFlags & BadStrips) {
303 badStrips.push_back(quality->
decode(*bit));
309 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
313 " Total APVs: " << atot <<
", active " << (atot-aoff) <<
", inactive " << (aoff);
315 " Total Fibers: " << ftot <<
", active " << (ftot-foff) <<
", inactive " << (foff);
327 if ((quality != 0) && (qualityFlags != 0)) {
328 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
329 unsigned int on = 0, tot = 0, badrocs = 0;
330 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
332 uint32_t
detid = ((*i).geomDet().geographicalId()).rawId();
335 (
i)->setActive(isOn);
336 tot++; on += (
unsigned int) isOn;
337 if (qualityDebugFlags & BadModules) {
338 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializePixelStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
341 (
i)->setActive(
true);
345 badrocs += badROCs.size();
346 (
i)->setBadRocPositions(badROCs);
348 (
i)->clearBadRocPositions();
353 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
355 if (qualityDebugFlags &
BadROCs) {
356 edm::LogInfo(
"MeasurementTracker PixelROCStatus") <<
" Total of bad ROCs: " << badrocs ;
359 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
361 (
i)->setActive(
true);
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)
unsigned int id(int i) const
std::vector< TkStripMeasurementDet > theStripDets
const GeomDetUnit * monoDet() const
const MeasurementDet * findDet(const DetId &id) const
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 addPixelDets(const TrackingGeometry::DetContainer &dets)
void addPixelDet(const GeomDet *gd)
void addStripDets(const TrackingGeometry::DetContainer &dets)
const GeomDet & fastGeomDet() const
uint32_t rawId() const
get the raw id
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 initStMeasurementConditionSet(std::vector< TkStripMeasurementDet > &stripDets)
const DetContainer & detsPXB() const
DetId geographicalId() const
The label of this GeomDet.
const StripClusterParameterEstimator * stripCPE() const
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 DetContainer & detsPXF() const
const DetContainer & detsTOB() const
BadStripCuts badStripCuts_[4]
void initPxMeasurementConditionSet(std::vector< TkPixelMeasurementDet > &pixelDets)
void set128StripStatus(int i, bool good, int idx=-1)
std::vector< GeomDet const * > DetContainer
tuple size
Write out results.
const GeomDetUnit * stereoDet() const
data decode(const unsigned int &value) const
const DetContainer & detsTID() const