CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
MeasurementTrackerImpl Class Referencefinal

#include <MeasurementTrackerImpl.h>

Inheritance diagram for MeasurementTrackerImpl:
MeasurementTracker MeasurementDetSystem

Classes

struct  BadStripCutsDet
 

Public Types

typedef std::unordered_map< unsigned int, MeasurementDet * > DetContainer
 
enum  QualityFlags {
  BadModules = 1, BadAPVFibers = 2, BadStrips = 4, MaskBad128StripBlocks = 8,
  BadROCs = 2
}
 
- Public Types inherited from MeasurementTracker
enum  QualityFlags {
  BadModules = 1, BadAPVFibers = 2, BadStrips = 4, MaskBad128StripBlocks = 8,
  BadROCs = 2
}
 

Public Member Functions

const DetContainerallDets () const
 For debug only. More...
 
const std::vector< TkDoubleSensMeasurementDet > & doubleSensGeomDets () const
 
const MeasurementDetfindDet (const DetId &id) const
 
const GeometricSearchTrackergeometricSearchTracker () const
 
const TrackerGeometrygeomTracker () const
 
const std::vector< TkGluedMeasurementDet > & gluedDets () const
 
MeasurementDetWithData idToDet (const DetId &id, const MeasurementTrackerEvent &data) const override
 MeasurementDetSystem interface (won't be overloaded anymore) More...
 
const MeasurementDetidToDetBare (const DetId &id, const MeasurementTrackerEvent &data) const
 
 MeasurementTrackerImpl (const BadStripCutsDet &badStripCuts, const PixelClusterParameterEstimator *pixelCPE, const StripClusterParameterEstimator *stripCPE, const SiStripRecHitMatcher *hitMatcher, const TrackerTopology *trackerTopology, const TrackerGeometry *trackerGeom, const GeometricSearchTracker *geometricSearchTracker, const SiStripQuality *stripQuality, int stripQualityFlags, int stripQualityDebugFlags, const SiPixelQuality *pixelQuality, const SiPixelFedCabling *pixelCabling, int pixelQualityFlags, int pixelQualityDebugFlags, const ClusterParameterEstimator< Phase2TrackerCluster1D > *phase2OTCPE=nullptr)
 
const Phase2OTMeasurementConditionSetphase2DetConditions () const override
 
const PxMeasurementConditionSetpixelDetConditions () const override
 
const std::vector< TkPixelMeasurementDet > & pixelDets () const
 
const std::vector< TkStackMeasurementDet > & stackDets () const
 
const StMeasurementConditionSetstripDetConditions () const override
 Provide templates to be filled in. More...
 
const std::vector< TkStripMeasurementDet > & stripDets () const
 
 ~MeasurementTrackerImpl () override
 
- Public Member Functions inherited from MeasurementTracker
const GeometricSearchTrackergeometricSearchTracker () const
 
const TrackerGeometrygeomTracker () const
 
 MeasurementTracker (TrackerGeometry const *trackerGeom, GeometricSearchTracker const *geometricSearchTracker)
 
 ~MeasurementTracker () override
 
- Public Member Functions inherited from MeasurementDetSystem
virtual ~MeasurementDetSystem ()=default
 

Protected Member Functions

void addDets (const TrackingGeometry::DetContainer &dets, bool subIsPixel, bool subIsOT)
 
void addDoubleSensGeomDet (const DoubleSensGeomDet *gd)
 
void addGluedDet (const GluedGeomDet *gd)
 
void addPhase2Det (const GeomDet *gd)
 
void addPixelDet (const GeomDet *gd)
 
void addStackDet (const StackGeomDet *gd)
 
void addStripDet (const GeomDet *gd)
 
bool checkDets ()
 
void initDoubleSensDet (TkDoubleSensMeasurementDet &det)
 
void initGluedDet (TkGluedMeasurementDet &det, const TrackerTopology *trackerTopology)
 
void initialize (const TrackerTopology *trackerTopology)
 
void initializePixelStatus (const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags)
 
void initializeStripStatus (const BadStripCutsDet &badStripCuts, const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
 
void initPhase2OTMeasurementConditionSet (std::vector< TkPhase2OTMeasurementDet > &phase2Dets)
 
void initPxMeasurementConditionSet (std::vector< TkPixelMeasurementDet > &pixelDets)
 
void initStackDet (TkStackMeasurementDet &det)
 
void initStMeasurementConditionSet (std::vector< TkStripMeasurementDet > &stripDets)
 

Protected Attributes

DetContainer theDetMap
 
std::vector< TkDoubleSensMeasurementDettheDoubleSensGeomDets
 
std::vector< TkGluedMeasurementDettheGluedDets
 
Phase2OTMeasurementConditionSet thePhase2DetConditions
 
std::vector< TkPhase2OTMeasurementDetthePhase2Dets
 
const SiPixelFedCablingthePixelCabling
 
std::vector< TkPixelMeasurementDetthePixelDets
 
PxMeasurementConditionSet thePxDetConditions
 
std::vector< TkStackMeasurementDettheStackDets
 
StMeasurementConditionSet theStDetConditions
 
std::vector< TkStripMeasurementDettheStripDets
 
- Protected Attributes inherited from MeasurementTracker
const GeometricSearchTrackertheGeometricSearchTracker
 
const TrackerGeometrytheTrackerGeom
 

Detailed Description

Definition at line 40 of file MeasurementTrackerImpl.h.

Member Typedef Documentation

◆ DetContainer

typedef std::unordered_map<unsigned int, MeasurementDet*> MeasurementTrackerImpl::DetContainer

Definition at line 97 of file MeasurementTrackerImpl.h.

Member Enumeration Documentation

◆ QualityFlags

Enumerator
BadModules 
BadAPVFibers 
BadStrips 
MaskBad128StripBlocks 
BadROCs 

Definition at line 42 of file MeasurementTrackerImpl.h.

Constructor & Destructor Documentation

◆ MeasurementTrackerImpl()

MeasurementTrackerImpl::MeasurementTrackerImpl ( const BadStripCutsDet badStripCuts,
const PixelClusterParameterEstimator pixelCPE,
const StripClusterParameterEstimator stripCPE,
const SiStripRecHitMatcher hitMatcher,
const TrackerTopology trackerTopology,
const TrackerGeometry trackerGeom,
const GeometricSearchTracker geometricSearchTracker,
const SiStripQuality stripQuality,
int  stripQualityFlags,
int  stripQualityDebugFlags,
const SiPixelQuality pixelQuality,
const SiPixelFedCabling pixelCabling,
int  pixelQualityFlags,
int  pixelQualityDebugFlags,
const ClusterParameterEstimator< Phase2TrackerCluster1D > *  phase2OTCPE = nullptr 
)

Definition at line 78 of file MeasurementTrackerImpl.cc.

References initialize(), initializePixelStatus(), and initializeStripStatus().

94  theStDetConditions(hitMatcher, stripCPE),
96  thePhase2DetConditions(phase2OTCPE) {
97  this->initialize(trackerTopology);
98  this->initializeStripStatus(badStripCuts, stripQuality, stripQualityFlags, stripQualityDebugFlags);
99  this->initializePixelStatus(pixelQuality, pixelCabling, pixelQualityFlags, pixelQualityDebugFlags);
100 }
StMeasurementConditionSet theStDetConditions
void initializePixelStatus(const SiPixelQuality *stripQuality, const SiPixelFedCabling *pixelCabling, int qualityFlags, int qualityDebugFlags)
void initialize(const TrackerTopology *trackerTopology)
void initializeStripStatus(const BadStripCutsDet &badStripCuts, const SiStripQuality *stripQuality, int qualityFlags, int qualityDebugFlags)
MeasurementTracker(TrackerGeometry const *trackerGeom, GeometricSearchTracker const *geometricSearchTracker)
const GeometricSearchTracker * geometricSearchTracker() const
PxMeasurementConditionSet thePxDetConditions
Phase2OTMeasurementConditionSet thePhase2DetConditions

◆ ~MeasurementTrackerImpl()

MeasurementTrackerImpl::~MeasurementTrackerImpl ( )
override

Definition at line 102 of file MeasurementTrackerImpl.cc.

102 {}

Member Function Documentation

◆ addDets()

void MeasurementTrackerImpl::addDets ( const TrackingGeometry::DetContainer dets,
bool  subIsPixel,
bool  subIsOT 
)
protected

Definition at line 225 of file MeasurementTrackerImpl.cc.

References addDoubleSensGeomDet(), addGluedDet(), addPhase2Det(), addPixelDet(), addStackDet(), addStripDet(), and GeomDet::isLeaf().

Referenced by initialize().

225  {
226  //in phase2, we can have composed subDetector made by Pixel or Strip
227  for (TrackerGeometry::DetContainer::const_iterator gd = dets.begin(); gd != dets.end(); gd++) {
228  const GeomDetUnit* gdu = dynamic_cast<const GeomDetUnit*>(*gd);
229 
230  //Pixel or Strip GeomDetUnit
231  if (gdu->isLeaf()) {
232  if (subIsPixel) {
233  if (!subIsOT) {
234  addPixelDet(*gd);
235  } else {
236  addPhase2Det(*gd);
237  }
238  } else {
239  addStripDet(*gd);
240  }
241  } else {
242  //Glued or Stack GeomDet
243  const GluedGeomDet* gluedDet = dynamic_cast<const GluedGeomDet*>(*gd);
244  const StackGeomDet* stackDet = dynamic_cast<const StackGeomDet*>(*gd);
245  const DoubleSensGeomDet* doubleSensGeomDet = dynamic_cast<const DoubleSensGeomDet*>(*gd);
246 
247  if ((gluedDet == nullptr && stackDet == nullptr && doubleSensGeomDet == nullptr) ||
248  (gluedDet != nullptr && stackDet != nullptr && doubleSensGeomDet != nullptr)) {
250  "MeasurementTracker ERROR: GeomDet neither DetUnit nor GluedDet nor StackDet nor DoubleSensGeomDet");
251  }
252  if (gluedDet != nullptr)
253  addGluedDet(gluedDet);
254  else if (stackDet != nullptr)
255  addStackDet(stackDet);
256  else
257  addDoubleSensGeomDet(doubleSensGeomDet);
258  }
259  }
260 }
virtual bool isLeaf() const
is a Unit
Definition: GeomDet.h:70
void addStripDet(const GeomDet *gd)
void addStackDet(const StackGeomDet *gd)
void addDoubleSensGeomDet(const DoubleSensGeomDet *gd)
void addPixelDet(const GeomDet *gd)
void addPhase2Det(const GeomDet *gd)
void addGluedDet(const GluedGeomDet *gd)

◆ addDoubleSensGeomDet()

void MeasurementTrackerImpl::addDoubleSensGeomDet ( const DoubleSensGeomDet gd)
protected

Definition at line 302 of file MeasurementTrackerImpl.cc.

References PxMeasurementConditionSet::pixelCPE(), theDoubleSensGeomDets, and thePxDetConditions.

Referenced by addDets().

302  {
304 }
std::vector< TkDoubleSensMeasurementDet > theDoubleSensGeomDets
PxMeasurementConditionSet thePxDetConditions
const PixelClusterParameterEstimator * pixelCPE() const

◆ addGluedDet()

void MeasurementTrackerImpl::addGluedDet ( const GluedGeomDet gd)
protected

Definition at line 292 of file MeasurementTrackerImpl.cc.

References StMeasurementConditionSet::matcher(), StMeasurementConditionSet::stripCPE(), theGluedDets, and theStDetConditions.

Referenced by addDets().

292  {
294 }
StMeasurementConditionSet theStDetConditions
const StripClusterParameterEstimator * stripCPE() const
const SiStripRecHitMatcher * matcher() const
std::vector< TkGluedMeasurementDet > theGluedDets

◆ addPhase2Det()

void MeasurementTrackerImpl::addPhase2Det ( const GeomDet gd)
protected

Definition at line 284 of file MeasurementTrackerImpl.cc.

References submitPVResolutionJobs::err, thePhase2DetConditions, and thePhase2Dets.

Referenced by addDets().

284  {
285  try {
287  } catch (MeasurementDetException& err) {
288  edm::LogError("MeasurementDet") << "Oops, got a MeasurementDetException: " << err.what();
289  }
290 }
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
Log< level::Error, false > LogError
Phase2OTMeasurementConditionSet thePhase2DetConditions

◆ addPixelDet()

void MeasurementTrackerImpl::addPixelDet ( const GeomDet gd)
protected

Definition at line 276 of file MeasurementTrackerImpl.cc.

References submitPVResolutionJobs::err, thePixelDets, and thePxDetConditions.

Referenced by addDets().

276  {
277  try {
279  } catch (MeasurementDetException& err) {
280  edm::LogError("MeasurementDet") << "Oops, got a MeasurementDetException: " << err.what();
281  }
282 }
Log< level::Error, false > LogError
std::vector< TkPixelMeasurementDet > thePixelDets
PxMeasurementConditionSet thePxDetConditions

◆ addStackDet()

void MeasurementTrackerImpl::addStackDet ( const StackGeomDet gd)
protected

Definition at line 296 of file MeasurementTrackerImpl.cc.

References PxMeasurementConditionSet::pixelCPE(), thePxDetConditions, and theStackDets.

Referenced by addDets().

296  {
297  //since the Stack will be composed by PS or 2S,
298  //both cluster parameter estimators are needed? - right now just the thePixelCPE is used.
300 }
std::vector< TkStackMeasurementDet > theStackDets
PxMeasurementConditionSet thePxDetConditions
const PixelClusterParameterEstimator * pixelCPE() const

◆ addStripDet()

void MeasurementTrackerImpl::addStripDet ( const GeomDet gd)
protected

Definition at line 268 of file MeasurementTrackerImpl.cc.

References submitPVResolutionJobs::err, theStDetConditions, and theStripDets.

Referenced by addDets().

268  {
269  try {
271  } catch (MeasurementDetException& err) {
272  edm::LogError("MeasurementDet") << "Oops, got a MeasurementDetException: " << err.what();
273  }
274 }
std::vector< TkStripMeasurementDet > theStripDets
StMeasurementConditionSet theStDetConditions
Log< level::Error, false > LogError

◆ allDets()

const DetContainer& MeasurementTrackerImpl::allDets ( ) const
inline

For debug only.

Definition at line 100 of file MeasurementTrackerImpl.h.

100 { return theDetMap; }

◆ checkDets()

bool MeasurementTrackerImpl::checkDets ( )
protected

Definition at line 262 of file MeasurementTrackerImpl.cc.

References TrackerGeometry::dets(), theDetMap, and MeasurementTracker::theTrackerGeom.

Referenced by initialize().

262  {
263  if (theTrackerGeom->dets().size() == theDetMap.size())
264  return true;
265  return false;
266 }
const TrackerGeometry * theTrackerGeom
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)

◆ doubleSensGeomDets()

const std::vector<TkDoubleSensMeasurementDet>& MeasurementTrackerImpl::doubleSensGeomDets ( ) const
inline

Definition at line 105 of file MeasurementTrackerImpl.h.

105 { return theDoubleSensGeomDets; }
std::vector< TkDoubleSensMeasurementDet > theDoubleSensGeomDets

◆ findDet()

const MeasurementDet* MeasurementTrackerImpl::findDet ( const DetId id) const
inline

Definition at line 86 of file MeasurementTrackerImpl.h.

Referenced by initDoubleSensDet(), initGluedDet(), and initStackDet().

86  {
87  auto it = theDetMap.find(id);
88  if (it != theDetMap.end()) {
89  return it->second;
90  } else {
91  //throw exception;
92  }
93 
94  return nullptr; //to avoid compile warning
95  }

◆ geometricSearchTracker()

const GeometricSearchTracker* MeasurementTrackerImpl::geometricSearchTracker ( ) const
inline

Definition at line 77 of file MeasurementTrackerImpl.h.

References MeasurementTracker::theGeometricSearchTracker.

77 { return theGeometricSearchTracker; }
const GeometricSearchTracker * theGeometricSearchTracker

◆ geomTracker()

const TrackerGeometry* MeasurementTrackerImpl::geomTracker ( ) const
inline

Definition at line 75 of file MeasurementTrackerImpl.h.

References MeasurementTracker::theTrackerGeom.

75 { return theTrackerGeom; }
const TrackerGeometry * theTrackerGeom

◆ gluedDets()

const std::vector<TkGluedMeasurementDet>& MeasurementTrackerImpl::gluedDets ( ) const
inline

Definition at line 103 of file MeasurementTrackerImpl.h.

103 { return theGluedDets; }
std::vector< TkGluedMeasurementDet > theGluedDets

◆ idToDet()

MeasurementDetWithData MeasurementTrackerImpl::idToDet ( const DetId id,
const MeasurementTrackerEvent data 
) const
inlineoverridevirtual

MeasurementDetSystem interface (won't be overloaded anymore)

Implements MeasurementTracker.

Definition at line 80 of file MeasurementTrackerImpl.h.

References data.

80  {
82  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
const MeasurementDet * idToDetBare(const DetId &id, const MeasurementTrackerEvent &data) const

◆ idToDetBare()

const MeasurementDet* MeasurementTrackerImpl::idToDetBare ( const DetId id,
const MeasurementTrackerEvent data 
) const
inline

Definition at line 84 of file MeasurementTrackerImpl.h.

84 { return findDet(id); }
const MeasurementDet * findDet(const DetId &id) const

◆ initDoubleSensDet()

void MeasurementTrackerImpl::initDoubleSensDet ( TkDoubleSensMeasurementDet det)
protected

Definition at line 330 of file MeasurementTrackerImpl.cc.

References findDet(), DoubleSensGeomDet::firstDet(), GeomDet::geographicalId(), TkDoubleSensMeasurementDet::init(), DoubleSensGeomDet::secondDet(), TkDoubleSensMeasurementDet::specificGeomDet(), and theDetMap.

Referenced by initialize().

330  {
331  const DoubleSensGeomDet& gd = det.specificGeomDet();
332  const MeasurementDet* firstDet = findDet(gd.firstDet()->geographicalId());
333  const MeasurementDet* secondDet = findDet(gd.secondDet()->geographicalId());
334  if (firstDet == nullptr || secondDet == nullptr) {
335  edm::LogError("MeasurementDet")
336  << "MeasurementTracker ERROR: DoubleSensDet components not found as MeasurementDets ";
337  throw MeasurementDetException("MeasurementTracker ERROR: DoubleSensDet components not found as MeasurementDets");
338  }
339  det.init(firstDet, secondDet);
340  theDetMap[gd.geographicalId()] = &det;
341 }
const GeomDetUnit * secondDet() const
const GeomDetUnit * firstDet() const
void init(const MeasurementDet *firstDet, const MeasurementDet *secondDet)
Log< level::Error, false > LogError
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
const MeasurementDet * findDet(const DetId &id) const
const DoubleSensGeomDet & specificGeomDet() const

◆ initGluedDet()

void MeasurementTrackerImpl::initGluedDet ( TkGluedMeasurementDet det,
const TrackerTopology trackerTopology 
)
protected

Definition at line 306 of file MeasurementTrackerImpl.cc.

References findDet(), GeomDet::geographicalId(), TkGluedMeasurementDet::init(), GluedGeomDet::monoDet(), TkGluedMeasurementDet::specificGeomDet(), GluedGeomDet::stereoDet(), and theDetMap.

Referenced by initialize().

306  {
307  const GluedGeomDet& gd = det.specificGeomDet();
308  const MeasurementDet* monoDet = findDet(gd.monoDet()->geographicalId());
309  const MeasurementDet* stereoDet = findDet(gd.stereoDet()->geographicalId());
310  if (monoDet == nullptr || stereoDet == nullptr) {
311  edm::LogError("MeasurementDet") << "MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
312  throw MeasurementDetException("MeasurementTracker ERROR: GluedDet components not found as MeasurementDets");
313  }
314  det.init(monoDet, stereoDet, trackerTopology);
315  theDetMap[gd.geographicalId()] = &det;
316 }
const GluedGeomDet & specificGeomDet() const
Log< level::Error, false > LogError
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:19
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
void init(const MeasurementDet *monoDet, const MeasurementDet *stereoDet, const TrackerTopology *tTopo)
const MeasurementDet * findDet(const DetId &id) const

◆ initialize()

void MeasurementTrackerImpl::initialize ( const TrackerTopology trackerTopology)
protected

Definition at line 104 of file MeasurementTrackerImpl.cc.

References addDets(), checkDets(), TrackerGeometry::detsPXB(), TrackerGeometry::detsPXF(), TrackerGeometry::detsTEC(), TrackerGeometry::detsTIB(), TrackerGeometry::detsTID(), TrackerGeometry::detsTOB(), TrackerGeometry::geomDetSubDetector(), mps_fire::i, StMeasurementConditionSet::id(), PxMeasurementConditionSet::id(), Phase2OTMeasurementConditionSet::id(), initDoubleSensDet(), initGluedDet(), initPhase2OTMeasurementConditionSet(), initPxMeasurementConditionSet(), initStackDet(), initStMeasurementConditionSet(), GeomDetEnumerators::isTrackerPixel(), theDetMap, theDoubleSensGeomDets, theGluedDets, thePhase2DetConditions, thePhase2Dets, thePixelDets, thePxDetConditions, theStackDets, theStDetConditions, theStripDets, and MeasurementTracker::theTrackerGeom.

Referenced by MeasurementTrackerImpl().

104  {
105  bool subIsPixel = false;
106  //FIXME:just temporary solution for phase2 :
107  //the OT is defined as PixelSubDetector!
108  bool subIsOT = false;
109 
110  //if the TkGeometry has the subDet vector filled, the theDetMap is filled, otherwise nothing should happen
111  if (!theTrackerGeom->detsPXB().empty()) {
113  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsPXB().front()->geographicalId().subdetId()));
114  addDets(theTrackerGeom->detsPXB(), subIsPixel, subIsOT);
115  }
116 
117  if (!theTrackerGeom->detsPXF().empty()) {
119  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsPXF().front()->geographicalId().subdetId()));
120  addDets(theTrackerGeom->detsPXF(), subIsPixel, subIsOT);
121  }
122 
123  subIsOT = true;
124 
125  if (!theTrackerGeom->detsTIB().empty()) {
127  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsTIB().front()->geographicalId().subdetId()));
128  addDets(theTrackerGeom->detsTIB(), subIsPixel, subIsOT);
129  }
130 
131  if (!theTrackerGeom->detsTID().empty()) {
133  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsTID().front()->geographicalId().subdetId()));
134  addDets(theTrackerGeom->detsTID(), subIsPixel, subIsOT);
135  }
136 
137  if (!theTrackerGeom->detsTOB().empty()) {
139  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsTOB().front()->geographicalId().subdetId()));
140  addDets(theTrackerGeom->detsTOB(), subIsPixel, subIsOT);
141  }
142 
143  if (!theTrackerGeom->detsTEC().empty()) {
145  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsTEC().front()->geographicalId().subdetId()));
146  addDets(theTrackerGeom->detsTEC(), subIsPixel, subIsOT);
147  }
148 
149  // fist all stripdets
150  sortTKD(theStripDets);
152  for (unsigned int i = 0; i != theStripDets.size(); ++i)
154 
155  // now the glued dets
156  sortTKD(theGluedDets);
157  for (unsigned int i = 0; i != theGluedDets.size(); ++i)
158  initGluedDet(theGluedDets[i], trackerTopology);
159 
160  // then the pixels
161  sortTKD(thePixelDets);
163  for (unsigned int i = 0; i != thePixelDets.size(); ++i)
165 
166  // then the phase2 dets
167  sortTKD(thePhase2Dets);
169  for (unsigned int i = 0; i != thePhase2Dets.size(); ++i)
171 
172  // and then the stack dets, at last
173  sortTKD(theStackDets);
174  for (unsigned int i = 0; i != theStackDets.size(); ++i)
176 
177  // and then the double sensor dets
178  sortTKD(theDoubleSensGeomDets);
179  for (unsigned int i = 0; i != theDoubleSensGeomDets.size(); ++i)
181 
182  if (!checkDets())
183  throw MeasurementDetException("Number of dets in MeasurementTracker not consistent with TrackerGeometry!");
184 }
const DetContainer & detsTIB() const
void initDoubleSensDet(TkDoubleSensMeasurementDet &det)
std::vector< TkStripMeasurementDet > theStripDets
const DetContainer & detsPXB() const
std::vector< TkStackMeasurementDet > theStackDets
StMeasurementConditionSet theStDetConditions
unsigned int id(int i) const
void addDets(const TrackingGeometry::DetContainer &dets, bool subIsPixel, bool subIsOT)
const TrackerGeometry * theTrackerGeom
const DetContainer & detsPXF() const
std::vector< TkPhase2OTMeasurementDet > thePhase2Dets
unsigned int id(int i) const
void initGluedDet(TkGluedMeasurementDet &det, const TrackerTopology *trackerTopology)
const DetContainer & detsTOB() const
std::vector< TkPixelMeasurementDet > thePixelDets
void initPhase2OTMeasurementConditionSet(std::vector< TkPhase2OTMeasurementDet > &phase2Dets)
void initStMeasurementConditionSet(std::vector< TkStripMeasurementDet > &stripDets)
unsigned int id(int i) const
std::vector< TkDoubleSensMeasurementDet > theDoubleSensGeomDets
std::vector< TkGluedMeasurementDet > theGluedDets
PxMeasurementConditionSet thePxDetConditions
Phase2OTMeasurementConditionSet thePhase2DetConditions
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
const DetContainer & detsTEC() const
void initPxMeasurementConditionSet(std::vector< TkPixelMeasurementDet > &pixelDets)
void initStackDet(TkStackMeasurementDet &det)
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
const DetContainer & detsTID() const

◆ initializePixelStatus()

void MeasurementTrackerImpl::initializePixelStatus ( const SiPixelQuality stripQuality,
const SiPixelFedCabling pixelCabling,
int  qualityFlags,
int  qualityDebugFlags 
)
protected

Definition at line 421 of file MeasurementTrackerImpl.cc.

References BadModules, BadROCs, mps_fire::i, createfilelist::int, quality, nano_mu_digi_cff::rawId, thePixelDets, MeasurementTracker::theTrackerGeom, and compareTotals::tot.

Referenced by MeasurementTrackerImpl().

424  {
425  if ((quality != nullptr) && (qualityFlags != 0)) {
426  edm::LogInfo("MeasurementTracker") << "qualityFlags = " << qualityFlags;
427  unsigned int on = 0, tot = 0, badrocs = 0;
428  for (std::vector<TkPixelMeasurementDet>::iterator i = thePixelDets.begin(); i != thePixelDets.end(); i++) {
429  uint32_t detid = ((*i).geomDet().geographicalId()).rawId();
430  if (qualityFlags & BadModules) {
431  bool isOn = quality->IsModuleUsable(detid);
432  (i)->setActive(isOn);
433  tot++;
434  on += (unsigned int)isOn;
435  if (qualityDebugFlags & BadModules) {
436  edm::LogInfo("MeasurementTracker")
437  << "MeasurementTrackerImpl::initializePixelStatus : detid " << detid << " is " << (isOn ? "on" : "off");
438  }
439  } else {
440  (i)->setActive(true);
441  }
442  if ((qualityFlags & BadROCs) && (quality->getBadRocs(detid) != 0)) {
443  std::vector<LocalPoint> badROCs = quality->getBadRocPositions(detid, *theTrackerGeom, pixelCabling);
444  badrocs += badROCs.size();
445  (i)->setBadRocPositions(badROCs);
446  } else {
447  (i)->clearBadRocPositions();
448  }
449  }
450  if (qualityDebugFlags & BadModules) {
451  edm::LogInfo("MeasurementTracker PixelModuleStatus")
452  << " Total modules: " << tot << ", active " << on << ", inactive " << (tot - on);
453  }
454  if (qualityDebugFlags & BadROCs) {
455  edm::LogInfo("MeasurementTracker PixelROCStatus") << " Total of bad ROCs: " << badrocs;
456  }
457  } else {
458  for (std::vector<TkPixelMeasurementDet>::iterator i = thePixelDets.begin(); i != thePixelDets.end(); i++) {
459  (i)->setActive(true); // module ON
460  }
461  }
462 }
const TrackerGeometry * theTrackerGeom
string quality
std::vector< TkPixelMeasurementDet > thePixelDets
Log< level::Info, false > LogInfo

◆ initializeStripStatus()

void MeasurementTrackerImpl::initializeStripStatus ( const BadStripCutsDet badStripCuts,
const SiStripQuality stripQuality,
int  qualityFlags,
int  qualityDebugFlags 
)
protected

Definition at line 343 of file MeasurementTrackerImpl.cc.

References BadAPVFibers, BadModules, HLTSiStripMonitoring_cff::badStripCuts, StMeasurementConditionSet::badStripCuts_, BadStrips, triggerObjects_cff::bit, StMeasurementConditionSet::getBadStripBlocks(), mps_fire::i, StMeasurementConditionSet::id(), createfilelist::int, dqmiolumiharvest::j, MaskBad128StripBlocks, StMeasurementConditionSet::nDet(), quality, FastTimerService_cff::range, StMeasurementConditionSet::set128StripStatus(), StMeasurementConditionSet::setActive(), StMeasurementConditionSet::setMaskBad128StripBlocks(), SiStripDetId::TEC, theStDetConditions, SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, and compareTotals::tot.

Referenced by MeasurementTrackerImpl().

346  {
347  if (qualityFlags & BadStrips) {
352  }
354 
355  if ((quality != nullptr) && (qualityFlags != 0)) {
356  edm::LogInfo("MeasurementTracker") << "qualityFlags = " << qualityFlags;
357  unsigned int on = 0, tot = 0;
358  unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
359  for (int i = 0; i != theStDetConditions.nDet(); i++) {
360  uint32_t detid = theStDetConditions.id(i);
361  if (qualityFlags & BadModules) {
362  bool isOn = quality->IsModuleUsable(detid);
364  tot++;
365  on += (unsigned int)isOn;
366  if (qualityDebugFlags & BadModules) {
367  edm::LogInfo("MeasurementTracker")
368  << "MeasurementTrackerImpl::initializeStripStatus : detid " << detid << " is " << (isOn ? "on" : "off");
369  }
370  } else {
372  }
373  // first turn all APVs and fibers ON
375  if (qualityFlags & BadAPVFibers) {
376  short badApvs = quality->getBadApvs(detid);
377  short badFibers = quality->getBadFibers(detid);
378  for (int j = 0; j < 6; j++) {
379  atot++;
380  if (badApvs & (1 << j)) {
382  aoff++;
383  }
384  }
385  for (int j = 0; j < 3; j++) {
386  ftot++;
387  if (badFibers & (1 << j)) {
389  theStDetConditions.set128StripStatus(i, false, 2 * j + 1);
390  foff++;
391  }
392  }
393  }
394  auto& badStrips = theStDetConditions.getBadStripBlocks(i);
395  badStrips.clear();
396  if (qualityFlags & BadStrips) {
397  SiStripBadStrip::Range range = quality->getRange(detid);
398  for (SiStripBadStrip::ContainerIterator bit = range.first; bit != range.second; ++bit) {
399  badStrips.push_back(quality->decode(*bit));
400  }
401  }
402  }
403  if (qualityDebugFlags & BadModules) {
404  edm::LogInfo("MeasurementTracker StripModuleStatus")
405  << " Total modules: " << tot << ", active " << on << ", inactive " << (tot - on);
406  }
407  if (qualityDebugFlags & BadAPVFibers) {
408  edm::LogInfo("MeasurementTracker StripAPVStatus")
409  << " Total APVs: " << atot << ", active " << (atot - aoff) << ", inactive " << (aoff);
410  edm::LogInfo("MeasurementTracker StripFiberStatus")
411  << " Total Fibers: " << ftot << ", active " << (ftot - foff) << ", inactive " << (foff);
412  }
413  } else {
414  for (int i = 0; i != theStDetConditions.nDet(); i++) {
415  theStDetConditions.setActive(i, true); // module ON
416  theStDetConditions.set128StripStatus(i, true); // all APVs and fibers ON
417  }
418  }
419 }
StMeasurementConditionSet theStDetConditions
static constexpr auto TID
Definition: SiStripDetId.h:38
std::vector< unsigned int >::const_iterator ContainerIterator
string quality
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)
unsigned int id(int i) const
static constexpr auto TOB
Definition: SiStripDetId.h:39
Log< level::Info, false > LogInfo
void setMaskBad128StripBlocks(bool maskThem)
static constexpr auto TIB
Definition: SiStripDetId.h:37
std::pair< ContainerIterator, ContainerIterator > Range
void set128StripStatus(int i, bool good, int idx=-1)
static constexpr auto TEC
Definition: SiStripDetId.h:40

◆ initPhase2OTMeasurementConditionSet()

void MeasurementTrackerImpl::initPhase2OTMeasurementConditionSet ( std::vector< TkPhase2OTMeasurementDet > &  phase2Dets)
protected

Definition at line 213 of file MeasurementTrackerImpl.cc.

References mps_fire::i, Phase2OTMeasurementConditionSet::id_, Phase2OTMeasurementConditionSet::init(), findQualityFiles::size, and thePhase2DetConditions.

Referenced by initialize().

213  {
214  // assume vector is full and ordered!
215  int size = phase2Dets.size();
217 
218  for (int i = 0; i != size; ++i) {
219  auto& mdet = phase2Dets[i];
220  mdet.setIndex(i);
221  thePhase2DetConditions.id_[i] = mdet.specificGeomDet().geographicalId().rawId();
222  }
223 }
size
Write out results.
std::vector< unsigned int > id_
Phase2OTMeasurementConditionSet thePhase2DetConditions

◆ initPxMeasurementConditionSet()

void MeasurementTrackerImpl::initPxMeasurementConditionSet ( std::vector< TkPixelMeasurementDet > &  pixelDets)
protected

Definition at line 201 of file MeasurementTrackerImpl.cc.

References mps_fire::i, PxMeasurementConditionSet::id_, PxMeasurementConditionSet::init(), pixelDets(), findQualityFiles::size, and thePxDetConditions.

Referenced by initialize().

201  {
202  // assume vector is full and ordered!
203  int size = pixelDets.size();
205 
206  for (int i = 0; i != size; ++i) {
207  auto& mdet = pixelDets[i];
208  mdet.setIndex(i);
209  thePxDetConditions.id_[i] = mdet.specificGeomDet().geographicalId().rawId();
210  }
211 }
size
Write out results.
std::vector< unsigned int > id_
PxMeasurementConditionSet thePxDetConditions
const std::vector< TkPixelMeasurementDet > & pixelDets() const

◆ initStackDet()

void MeasurementTrackerImpl::initStackDet ( TkStackMeasurementDet det)
protected

Definition at line 318 of file MeasurementTrackerImpl.cc.

References findDet(), GeomDet::geographicalId(), TkStackMeasurementDet::init(), StackGeomDet::lowerDet(), TkStackMeasurementDet::specificGeomDet(), theDetMap, and StackGeomDet::upperDet().

Referenced by initialize().

318  {
319  const StackGeomDet& gd = det.specificGeomDet();
320  const MeasurementDet* lowerDet = findDet(gd.lowerDet()->geographicalId());
321  const MeasurementDet* upperDet = findDet(gd.upperDet()->geographicalId());
322  if (lowerDet == nullptr || upperDet == nullptr) {
323  edm::LogError("MeasurementDet") << "MeasurementTracker ERROR: StackDet components not found as MeasurementDets ";
324  throw MeasurementDetException("MeasurementTracker ERROR: StackDet components not found as MeasurementDets");
325  }
326  det.init(lowerDet, upperDet);
327  theDetMap[gd.geographicalId()] = &det;
328 }
const GeomDetUnit * lowerDet() const
Definition: StackGeomDet.h:19
const GeomDetUnit * upperDet() const
Definition: StackGeomDet.h:20
Log< level::Error, false > LogError
void init(const MeasurementDet *lowerDet, const MeasurementDet *upperDet)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
const MeasurementDet * findDet(const DetId &id) const
const StackGeomDet & specificGeomDet() const

◆ initStMeasurementConditionSet()

void MeasurementTrackerImpl::initStMeasurementConditionSet ( std::vector< TkStripMeasurementDet > &  stripDets)
protected

Definition at line 186 of file MeasurementTrackerImpl.cc.

References mps_fire::i, StMeasurementConditionSet::id_, StMeasurementConditionSet::init(), findQualityFiles::size, stripDets(), DetId::subdetId(), StMeasurementConditionSet::subId_, theStDetConditions, and StMeasurementConditionSet::totalStrips_.

Referenced by initialize().

186  {
187  // assume vector is full and ordered!
188  int size = stripDets.size();
190  for (int i = 0; i != size; ++i) {
191  auto& mdet = stripDets[i];
192  mdet.setIndex(i);
193  //intialize the detId !
194  theStDetConditions.id_[i] = mdet.specificGeomDet().geographicalId().rawId();
196  //initalize the total number of strips
197  theStDetConditions.totalStrips_[i] = mdet.specificGeomDet().specificTopology().nstrips();
198  }
199 }
size
Write out results.
StMeasurementConditionSet theStDetConditions
std::vector< unsigned char > subId_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
std::vector< int > totalStrips_
const std::vector< TkStripMeasurementDet > & stripDets() const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
std::vector< unsigned int > id_

◆ phase2DetConditions()

const Phase2OTMeasurementConditionSet& MeasurementTrackerImpl::phase2DetConditions ( ) const
inlineoverridevirtual

Implements MeasurementTracker.

Definition at line 109 of file MeasurementTrackerImpl.h.

109 { return thePhase2DetConditions; }
Phase2OTMeasurementConditionSet thePhase2DetConditions

◆ pixelDetConditions()

const PxMeasurementConditionSet& MeasurementTrackerImpl::pixelDetConditions ( ) const
inlineoverridevirtual

Implements MeasurementTracker.

Definition at line 108 of file MeasurementTrackerImpl.h.

108 { return thePxDetConditions; }
PxMeasurementConditionSet thePxDetConditions

◆ pixelDets()

const std::vector<TkPixelMeasurementDet>& MeasurementTrackerImpl::pixelDets ( ) const
inline

Definition at line 102 of file MeasurementTrackerImpl.h.

Referenced by initPxMeasurementConditionSet().

102 { return thePixelDets; }
std::vector< TkPixelMeasurementDet > thePixelDets

◆ stackDets()

const std::vector<TkStackMeasurementDet>& MeasurementTrackerImpl::stackDets ( ) const
inline

Definition at line 104 of file MeasurementTrackerImpl.h.

104 { return theStackDets; }
std::vector< TkStackMeasurementDet > theStackDets

◆ stripDetConditions()

const StMeasurementConditionSet& MeasurementTrackerImpl::stripDetConditions ( ) const
inlineoverridevirtual

Provide templates to be filled in.

Implements MeasurementTracker.

Definition at line 107 of file MeasurementTrackerImpl.h.

107 { return theStDetConditions; }
StMeasurementConditionSet theStDetConditions

◆ stripDets()

const std::vector<TkStripMeasurementDet>& MeasurementTrackerImpl::stripDets ( ) const
inline

Definition at line 101 of file MeasurementTrackerImpl.h.

Referenced by initStMeasurementConditionSet().

101 { return theStripDets; }
std::vector< TkStripMeasurementDet > theStripDets

Member Data Documentation

◆ theDetMap

DetContainer MeasurementTrackerImpl::theDetMap
protected

◆ theDoubleSensGeomDets

std::vector<TkDoubleSensMeasurementDet> MeasurementTrackerImpl::theDoubleSensGeomDets
protected

Definition at line 123 of file MeasurementTrackerImpl.h.

Referenced by addDoubleSensGeomDet(), and initialize().

◆ theGluedDets

std::vector<TkGluedMeasurementDet> MeasurementTrackerImpl::theGluedDets
protected

Definition at line 121 of file MeasurementTrackerImpl.h.

Referenced by addGluedDet(), and initialize().

◆ thePhase2DetConditions

Phase2OTMeasurementConditionSet MeasurementTrackerImpl::thePhase2DetConditions
protected

◆ thePhase2Dets

std::vector<TkPhase2OTMeasurementDet> MeasurementTrackerImpl::thePhase2Dets
protected

Definition at line 120 of file MeasurementTrackerImpl.h.

Referenced by addPhase2Det(), and initialize().

◆ thePixelCabling

const SiPixelFedCabling* MeasurementTrackerImpl::thePixelCabling
protected

Definition at line 125 of file MeasurementTrackerImpl.h.

◆ thePixelDets

std::vector<TkPixelMeasurementDet> MeasurementTrackerImpl::thePixelDets
protected

Definition at line 118 of file MeasurementTrackerImpl.h.

Referenced by addPixelDet(), initialize(), and initializePixelStatus().

◆ thePxDetConditions

PxMeasurementConditionSet MeasurementTrackerImpl::thePxDetConditions
protected

◆ theStackDets

std::vector<TkStackMeasurementDet> MeasurementTrackerImpl::theStackDets
protected

Definition at line 122 of file MeasurementTrackerImpl.h.

Referenced by addStackDet(), and initialize().

◆ theStDetConditions

StMeasurementConditionSet MeasurementTrackerImpl::theStDetConditions
protected

◆ theStripDets

std::vector<TkStripMeasurementDet> MeasurementTrackerImpl::theStripDets
protected

Definition at line 119 of file MeasurementTrackerImpl.h.

Referenced by addStripDet(), and initialize().