59 template<
typename TKD>
60 void sortTKD( std::vector<TKD*> & det) {
61 std::sort(det.begin(),det.end(),CmpTKD());
63 template<
typename TKD>
64 void sortTKD( std::vector<TKD> & det) {
65 std::sort(det.begin(),det.end(),CmpTKD());
78 int stripQualityFlags,
79 int stripQualityDebugFlags,
82 int pixelQualityFlags,
83 int pixelQualityDebugFlags) :
86 name_(conf.getParameter<std::
string>(
"ComponentName")),
87 theStDetConditions(hitMatcher,stripCPE),
88 thePxDetConditions(pixelCPE)
132 int size = stripDets.size();
135 auto & mdet = stripDets[
i];
148 int size = pixelDets.size();
152 auto & mdet = pixelDets[
i];
163 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
164 gd != dets.end(); gd++) {
171 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
172 gd != dets.end(); gd++) {
200 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
210 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
224 if (monoDet == 0 || stereoDet == 0) {
225 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
228 det.
init(monoDet,stereoDet);
244 if ((quality != 0) && (qualityFlags != 0)) {
245 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
246 unsigned int on = 0, tot = 0;
247 unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
253 tot++; on += (
unsigned int) isOn;
254 if (qualityDebugFlags & BadModules) {
255 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializeStripStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
265 for (
int j = 0;
j < 6;
j++) {
267 if (badApvs & (1 <<
j)) {
272 for (
int j = 0;
j < 3;
j++) {
274 if (badFibers & (1 <<
j)) {
283 if (qualityFlags & BadStrips) {
286 badStrips.push_back(quality->
decode(*bit));
292 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
296 " Total APVs: " << atot <<
", active " << (atot-aoff) <<
", inactive " << (aoff);
298 " Total Fibers: " << ftot <<
", active " << (ftot-foff) <<
", inactive " << (foff);
310 if ((quality != 0) && (qualityFlags != 0)) {
311 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
312 unsigned int on = 0, tot = 0, badrocs = 0;
313 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
315 uint32_t
detid = ((*i).geomDet().geographicalId()).rawId();
318 (
i)->setActive(isOn);
319 tot++; on += (
unsigned int) isOn;
320 if (qualityDebugFlags & BadModules) {
321 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializePixelStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
324 (
i)->setActive(
true);
328 badrocs += badROCs.size();
329 (
i)->setBadRocPositions(badROCs);
331 (
i)->clearBadRocPositions();
336 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
338 if (qualityDebugFlags &
BadROCs) {
339 edm::LogInfo(
"MeasurementTracker PixelROCStatus") <<
" Total of bad ROCs: " << badrocs ;
342 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
344 (
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