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 76 of file MeasurementTrackerImpl.cc.

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

92  theStDetConditions(hitMatcher, stripCPE),
94  thePhase2DetConditions(phase2OTCPE) {
95  this->initialize(trackerTopology);
96  this->initializeStripStatus(badStripCuts, stripQuality, stripQualityFlags, stripQualityDebugFlags);
97  this->initializePixelStatus(pixelQuality, pixelCabling, pixelQualityFlags, pixelQualityDebugFlags);
98 }
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 100 of file MeasurementTrackerImpl.cc.

100 {}

Member Function Documentation

◆ addDets()

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

Definition at line 223 of file MeasurementTrackerImpl.cc.

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

Referenced by initialize().

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

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

Referenced by addDets().

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

◆ addGluedDet()

void MeasurementTrackerImpl::addGluedDet ( const GluedGeomDet gd)
protected

Definition at line 290 of file MeasurementTrackerImpl.cc.

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

Referenced by addDets().

290  {
292 }
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 282 of file MeasurementTrackerImpl.cc.

References submitPVResolutionJobs::err, thePhase2DetConditions, and thePhase2Dets.

Referenced by addDets().

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

◆ addPixelDet()

void MeasurementTrackerImpl::addPixelDet ( const GeomDet gd)
protected

Definition at line 274 of file MeasurementTrackerImpl.cc.

References submitPVResolutionJobs::err, thePixelDets, and thePxDetConditions.

Referenced by addDets().

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

◆ addStackDet()

void MeasurementTrackerImpl::addStackDet ( const StackGeomDet gd)
protected

Definition at line 294 of file MeasurementTrackerImpl.cc.

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

Referenced by addDets().

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

◆ addStripDet()

void MeasurementTrackerImpl::addStripDet ( const GeomDet gd)
protected

Definition at line 266 of file MeasurementTrackerImpl.cc.

References submitPVResolutionJobs::err, theStDetConditions, and theStripDets.

Referenced by addDets().

266  {
267  try {
269  } catch (MeasurementDetException& err) {
270  edm::LogError("MeasurementDet") << "Oops, got a MeasurementDetException: " << err.what();
271  }
272 }
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 260 of file MeasurementTrackerImpl.cc.

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

Referenced by initialize().

260  {
261  if (theTrackerGeom->dets().size() == theDetMap.size())
262  return true;
263  return false;
264 }
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 328 of file MeasurementTrackerImpl.cc.

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

Referenced by initialize().

328  {
329  const DoubleSensGeomDet& gd = det.specificGeomDet();
330  const MeasurementDet* firstDet = findDet(gd.firstDet()->geographicalId());
331  const MeasurementDet* secondDet = findDet(gd.secondDet()->geographicalId());
332  if (firstDet == nullptr || secondDet == nullptr) {
333  edm::LogError("MeasurementDet")
334  << "MeasurementTracker ERROR: DoubleSensDet components not found as MeasurementDets ";
335  throw MeasurementDetException("MeasurementTracker ERROR: DoubleSensDet components not found as MeasurementDets");
336  }
337  det.init(firstDet, secondDet);
338  theDetMap[gd.geographicalId()] = &det;
339 }
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 304 of file MeasurementTrackerImpl.cc.

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

Referenced by initialize().

304  {
305  const GluedGeomDet& gd = det.specificGeomDet();
306  const MeasurementDet* monoDet = findDet(gd.monoDet()->geographicalId());
307  const MeasurementDet* stereoDet = findDet(gd.stereoDet()->geographicalId());
308  if (monoDet == nullptr || stereoDet == nullptr) {
309  edm::LogError("MeasurementDet") << "MeasurementTracker ERROR: GluedDet components not found as MeasurementDets ";
310  throw MeasurementDetException("MeasurementTracker ERROR: GluedDet components not found as MeasurementDets");
311  }
312  det.init(monoDet, stereoDet, trackerTopology);
313  theDetMap[gd.geographicalId()] = &det;
314 }
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 102 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().

102  {
103  bool subIsPixel = false;
104  //FIXME:just temporary solution for phase2 :
105  //the OT is defined as PixelSubDetector!
106  bool subIsOT = false;
107 
108  //if the TkGeometry has the subDet vector filled, the theDetMap is filled, otherwise nothing should happen
109  if (!theTrackerGeom->detsPXB().empty()) {
111  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsPXB().front()->geographicalId().subdetId()));
112  addDets(theTrackerGeom->detsPXB(), subIsPixel, subIsOT);
113  }
114 
115  if (!theTrackerGeom->detsPXF().empty()) {
117  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsPXF().front()->geographicalId().subdetId()));
118  addDets(theTrackerGeom->detsPXF(), subIsPixel, subIsOT);
119  }
120 
121  subIsOT = true;
122 
123  if (!theTrackerGeom->detsTIB().empty()) {
125  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsTIB().front()->geographicalId().subdetId()));
126  addDets(theTrackerGeom->detsTIB(), subIsPixel, subIsOT);
127  }
128 
129  if (!theTrackerGeom->detsTID().empty()) {
131  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsTID().front()->geographicalId().subdetId()));
132  addDets(theTrackerGeom->detsTID(), subIsPixel, subIsOT);
133  }
134 
135  if (!theTrackerGeom->detsTOB().empty()) {
137  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsTOB().front()->geographicalId().subdetId()));
138  addDets(theTrackerGeom->detsTOB(), subIsPixel, subIsOT);
139  }
140 
141  if (!theTrackerGeom->detsTEC().empty()) {
143  theTrackerGeom->geomDetSubDetector(theTrackerGeom->detsTEC().front()->geographicalId().subdetId()));
144  addDets(theTrackerGeom->detsTEC(), subIsPixel, subIsOT);
145  }
146 
147  // fist all stripdets
148  sortTKD(theStripDets);
150  for (unsigned int i = 0; i != theStripDets.size(); ++i)
152 
153  // now the glued dets
154  sortTKD(theGluedDets);
155  for (unsigned int i = 0; i != theGluedDets.size(); ++i)
156  initGluedDet(theGluedDets[i], trackerTopology);
157 
158  // then the pixels
159  sortTKD(thePixelDets);
161  for (unsigned int i = 0; i != thePixelDets.size(); ++i)
163 
164  // then the phase2 dets
165  sortTKD(thePhase2Dets);
167  for (unsigned int i = 0; i != thePhase2Dets.size(); ++i)
169 
170  // and then the stack dets, at last
171  sortTKD(theStackDets);
172  for (unsigned int i = 0; i != theStackDets.size(); ++i)
174 
175  // and then the double sensor dets
176  sortTKD(theDoubleSensGeomDets);
177  for (unsigned int i = 0; i != theDoubleSensGeomDets.size(); ++i)
179 
180  if (!checkDets())
181  throw MeasurementDetException("Number of dets in MeasurementTracker not consistent with TrackerGeometry!");
182 }
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 419 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().

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

344  {
345  if (qualityFlags & BadStrips) {
350  }
352 
353  if ((quality != nullptr) && (qualityFlags != 0)) {
354  edm::LogInfo("MeasurementTracker") << "qualityFlags = " << qualityFlags;
355  unsigned int on = 0, tot = 0;
356  unsigned int foff = 0, ftot = 0, aoff = 0, atot = 0;
357  for (int i = 0; i != theStDetConditions.nDet(); i++) {
358  uint32_t detid = theStDetConditions.id(i);
359  if (qualityFlags & BadModules) {
360  bool isOn = quality->IsModuleUsable(detid);
362  tot++;
363  on += (unsigned int)isOn;
364  if (qualityDebugFlags & BadModules) {
365  edm::LogInfo("MeasurementTracker")
366  << "MeasurementTrackerImpl::initializeStripStatus : detid " << detid << " is " << (isOn ? "on" : "off");
367  }
368  } else {
370  }
371  // first turn all APVs and fibers ON
373  if (qualityFlags & BadAPVFibers) {
374  short badApvs = quality->getBadApvs(detid);
375  short badFibers = quality->getBadFibers(detid);
376  for (int j = 0; j < 6; j++) {
377  atot++;
378  if (badApvs & (1 << j)) {
380  aoff++;
381  }
382  }
383  for (int j = 0; j < 3; j++) {
384  ftot++;
385  if (badFibers & (1 << j)) {
387  theStDetConditions.set128StripStatus(i, false, 2 * j + 1);
388  foff++;
389  }
390  }
391  }
392  auto& badStrips = theStDetConditions.getBadStripBlocks(i);
393  badStrips.clear();
394  if (qualityFlags & BadStrips) {
395  SiStripBadStrip::Range range = quality->getRange(detid);
396  for (SiStripBadStrip::ContainerIterator bit = range.first; bit != range.second; ++bit) {
397  badStrips.push_back(quality->decode(*bit));
398  }
399  }
400  }
401  if (qualityDebugFlags & BadModules) {
402  edm::LogInfo("MeasurementTracker StripModuleStatus")
403  << " Total modules: " << tot << ", active " << on << ", inactive " << (tot - on);
404  }
405  if (qualityDebugFlags & BadAPVFibers) {
406  edm::LogInfo("MeasurementTracker StripAPVStatus")
407  << " Total APVs: " << atot << ", active " << (atot - aoff) << ", inactive " << (aoff);
408  edm::LogInfo("MeasurementTracker StripFiberStatus")
409  << " Total Fibers: " << ftot << ", active " << (ftot - foff) << ", inactive " << (foff);
410  }
411  } else {
412  for (int i = 0; i != theStDetConditions.nDet(); i++) {
413  theStDetConditions.setActive(i, true); // module ON
414  theStDetConditions.set128StripStatus(i, true); // all APVs and fibers ON
415  }
416  }
417 }
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 211 of file MeasurementTrackerImpl.cc.

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

Referenced by initialize().

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

◆ initPxMeasurementConditionSet()

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

Definition at line 199 of file MeasurementTrackerImpl.cc.

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

Referenced by initialize().

199  {
200  // assume vector is full and ordered!
201  int size = pixelDets.size();
203 
204  for (int i = 0; i != size; ++i) {
205  auto& mdet = pixelDets[i];
206  mdet.setIndex(i);
207  thePxDetConditions.id_[i] = mdet.specificGeomDet().geographicalId().rawId();
208  }
209 }
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 316 of file MeasurementTrackerImpl.cc.

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

Referenced by initialize().

316  {
317  const StackGeomDet& gd = det.specificGeomDet();
318  const MeasurementDet* lowerDet = findDet(gd.lowerDet()->geographicalId());
319  const MeasurementDet* upperDet = findDet(gd.upperDet()->geographicalId());
320  if (lowerDet == nullptr || upperDet == nullptr) {
321  edm::LogError("MeasurementDet") << "MeasurementTracker ERROR: StackDet components not found as MeasurementDets ";
322  throw MeasurementDetException("MeasurementTracker ERROR: StackDet components not found as MeasurementDets");
323  }
324  det.init(lowerDet, upperDet);
325  theDetMap[gd.geographicalId()] = &det;
326 }
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 184 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().

184  {
185  // assume vector is full and ordered!
186  int size = stripDets.size();
188  for (int i = 0; i != size; ++i) {
189  auto& mdet = stripDets[i];
190  mdet.setIndex(i);
191  //intialize the detId !
192  theStDetConditions.id_[i] = mdet.specificGeomDet().geographicalId().rawId();
194  //initalize the total number of strips
195  theStDetConditions.totalStrips_[i] = mdet.specificGeomDet().specificTopology().nstrips();
196  }
197 }
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().