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)
138 int size = stripDets.size();
141 auto & mdet = stripDets[
i];
154 int size = pixelDets.size();
158 auto & mdet = pixelDets[
i];
169 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
170 gd != dets.end(); gd++) {
177 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
178 gd != dets.end(); gd++) {
206 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
216 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
230 if (monoDet == 0 || stereoDet == 0) {
231 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
234 det.
init(monoDet,stereoDet);
250 if ((quality != 0) && (qualityFlags != 0)) {
251 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
252 unsigned int on = 0, tot = 0;
253 unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
259 tot++; on += (
unsigned int) isOn;
260 if (qualityDebugFlags & BadModules) {
261 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializeStripStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
271 for (
int j = 0;
j < 6;
j++) {
273 if (badApvs & (1 <<
j)) {
278 for (
int j = 0;
j < 3;
j++) {
280 if (badFibers & (1 <<
j)) {
289 if (qualityFlags & BadStrips) {
292 badStrips.push_back(quality->
decode(*bit));
298 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
302 " Total APVs: " << atot <<
", active " << (atot-aoff) <<
", inactive " << (aoff);
304 " Total Fibers: " << ftot <<
", active " << (ftot-foff) <<
", inactive " << (foff);
316 if ((quality != 0) && (qualityFlags != 0)) {
317 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
318 unsigned int on = 0, tot = 0, badrocs = 0;
319 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
321 uint32_t
detid = ((*i).geomDet().geographicalId()).rawId();
324 (
i)->setActive(isOn);
325 tot++; on += (
unsigned int) isOn;
326 if (qualityDebugFlags & BadModules) {
327 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializePixelStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
330 (
i)->setActive(
true);
334 badrocs += badROCs.size();
335 (
i)->setBadRocPositions(badROCs);
337 (
i)->clearBadRocPositions();
342 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
344 if (qualityDebugFlags &
BadROCs) {
345 edm::LogInfo(
"MeasurementTracker PixelROCStatus") <<
" Total of bad ROCs: " << badrocs ;
348 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
350 (
i)->setActive(
true);
virtual char const * what() const
T getParameter(std::string const &) 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
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