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,
87 name_(conf.getParameter<std::
string>(
"ComponentName")),
88 theStDetConditions(hitMatcher,stripCPE,isRegional),
89 thePxDetConditions(pixelCPE)
133 int size = stripDets.size();
136 auto & mdet = stripDets[
i];
149 int size = pixelDets.size();
153 auto & mdet = pixelDets[
i];
164 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
165 gd != dets.end(); gd++) {
172 for (TrackerGeometry::DetContainer::const_iterator gd=dets.begin();
173 gd != dets.end(); gd++) {
201 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
211 edm::LogError(
"MeasurementDet") <<
"Oops, got a MeasurementDetException: " << err.
what() ;
225 if (monoDet == 0 || stereoDet == 0) {
226 edm::LogError(
"MeasurementDet") <<
"MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
229 det.init(monoDet,stereoDet);
245 if ((quality != 0) && (qualityFlags != 0)) {
246 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
247 unsigned int on = 0, tot = 0;
248 unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
254 tot++; on += (
unsigned int) isOn;
255 if (qualityDebugFlags & BadModules) {
256 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializeStripStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
266 for (
int j = 0;
j < 6;
j++) {
268 if (badApvs & (1 <<
j)) {
273 for (
int j = 0;
j < 3;
j++) {
275 if (badFibers & (1 <<
j)) {
284 if (qualityFlags & BadStrips) {
287 badStrips.push_back(quality->
decode(*bit));
293 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
297 " Total APVs: " << atot <<
", active " << (atot-aoff) <<
", inactive " << (aoff);
299 " Total Fibers: " << ftot <<
", active " << (ftot-foff) <<
", inactive " << (foff);
311 if ((quality != 0) && (qualityFlags != 0)) {
312 edm::LogInfo(
"MeasurementTracker") <<
"qualityFlags = " << qualityFlags;
313 unsigned int on = 0, tot = 0, badrocs = 0;
314 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
316 uint32_t
detid = ((*i).geomDet().geographicalId()).rawId();
319 (
i)->setActive(isOn);
320 tot++; on += (
unsigned int) isOn;
321 if (qualityDebugFlags & BadModules) {
322 edm::LogInfo(
"MeasurementTracker")<<
"MeasurementTrackerImpl::initializePixelStatus : detid " << detid <<
" is " << (isOn ?
"on" :
"off");
325 (
i)->setActive(
true);
329 badrocs += badROCs.size();
330 (
i)->setBadRocPositions(badROCs);
332 (
i)->clearBadRocPositions();
337 " Total modules: " << tot <<
", active " << on <<
", inactive " << (tot - on);
339 if (qualityDebugFlags &
BadROCs) {
340 edm::LogInfo(
"MeasurementTracker PixelROCStatus") <<
" Total of bad ROCs: " << badrocs ;
343 for (std::vector<TkPixelMeasurementDet>::iterator
i=
thePixelDets.begin();
345 (
i)->setActive(
true);
virtual char const * what() const
T getParameter(std::string const &) const
short getBadFibers(const uint32_t &detid) const
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)
std::vector< GeomDet * > DetContainer
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
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, bool isRegional=false)
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...
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
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_
const Range getRange(const uint32_t &detID) const
std::vector< TkGluedMeasurementDet > theGluedDets
short getBadRocs(const uint32_t &detid) const
PxMeasurementConditionSet thePxDetConditions
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)
tuple size
Write out results.
const GeomDetUnit * stereoDet() const
data decode(const unsigned int &value) const
const DetContainer & detsTID() const