CMS 3D CMS Logo

Typedefs | Functions | Variables
TrackQuality.cc File Reference
#include <algorithm>
#include <memory>
#include <vector>
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"
#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "DataFormats/MuonDetId/interface/DTLayerId.h"
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
#include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
#include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h"
#include "SimTracker/TrackHistory/interface/TrackQuality.h"

Go to the source code of this file.

Typedefs

typedef std::pair< TrackQuality::Layer::SubDet, short int > DetLayer
 

Functions

DetLayer getDetLayer (DetId detId, const TrackerTopology *tTopo)
 

Variables

static const int statePriorities []
 

Typedef Documentation

◆ DetLayer

typedef std::pair<TrackQuality::Layer::SubDet, short int> DetLayer

Definition at line 79 of file TrackQuality.cc.

Function Documentation

◆ getDetLayer()

DetLayer getDetLayer ( DetId  detId,
const TrackerTopology tTopo 
)

Definition at line 92 of file TrackQuality.cc.

References MuonSubdetId::CSC, DetId::det(), MuonSubdetId::DT, TrackQuality::Layer::Invalid, DTLayerId::layer(), CSCDetId::layer(), RPCDetId::layer(), phase1PixelTopology::layer, TrackerTopology::layer(), DetId::Muon, TrackQuality::Layer::MuonCSC, TrackQuality::Layer::MuonDT, TrackQuality::Layer::MuonRPCBarrel, TrackQuality::Layer::MuonRPCEndcap, HLT_2022v15_cff::region, MuonSubdetId::RPC, DetId::subdetId(), and DetId::Tracker.

Referenced by fastsim::SimplifiedGeometryFactory::createSimplifiedGeometry(), TrackQuality::evaluate(), and MeasurementByLayerGrouper::operator()().

92  {
94  short int layer = 0;
95 
96  switch (detId.det()) {
97  case DetId::Tracker:
98  layer = tTopo->layer(detId);
99  break;
100 
101  case DetId::Muon:
102  switch (detId.subdetId()) {
103  case MuonSubdetId::DT:
105  layer = DTLayerId(detId).layer();
106  break;
107 
108  case MuonSubdetId::CSC:
110  layer = CSCDetId(detId).layer();
111  break;
112 
113  case MuonSubdetId::RPC:
114  if (RPCDetId(detId).region())
116  else
118  layer = RPCDetId(detId).layer();
119  break;
120 
121  default:
122  /* should not get here */
123  ;
124  }
125  break;
126 
127  default:
128  /* should not get here */
129  ;
130  }
131 
132  return DetLayer(det, layer);
133 }
std::pair< TrackQuality::Layer::SubDet, short int > DetLayer
Definition: TrackQuality.cc:79
int layer() const
Definition: CSCDetId.h:56
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
unsigned int layer(const DetId &id) const
constexpr std::array< uint8_t, layerIndexSize > layer
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr int RPC
Definition: MuonSubdetId.h:13
int layer() const
Return the layer number.
Definition: DTLayerId.h:42
int layer() const
Definition: RPCDetId.h:85
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12

Variable Documentation

◆ statePriorities

const int statePriorities[]
static
Initial value:
= {
3,
5,
0,
7,
2,
4,
6,
1}

Definition at line 82 of file TrackQuality.cc.

Referenced by TrackQuality::evaluate().