CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Functions | Variables
TrackQuality.cc File Reference
#include <algorithm>
#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/SiPixelDetId/interface/PixelSubdetector.h"
#include "DataFormats/SiPixelDetId/interface/PXBDetId.h"
#include "DataFormats/SiPixelDetId/interface/PXFDetId.h"
#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
#include "DataFormats/SiStripDetId/interface/TIBDetId.h"
#include "DataFormats/SiStripDetId/interface/TIDDetId.h"
#include "DataFormats/SiStripDetId/interface/TOBDetId.h"
#include "DataFormats/SiStripDetId/interface/TECDetId.h"
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
#include "DataFormats/MuonDetId/interface/DTLayerId.h"
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
#include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.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

static DetLayer getDetLayer (DetId detId)
 

Variables

static const int statePriorities []
 

Typedef Documentation

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

Definition at line 86 of file TrackQuality.cc.

Function Documentation

static DetLayer getDetLayer ( DetId  detId)
static

Definition at line 101 of file TrackQuality.cc.

References MuonSubdetId::CSC, CSCDetId, DetId::det(), PXFDetId::disk(), MuonSubdetId::DT, DTLayerId, TrackQuality::Layer::Invalid, PXBDetId::layer(), TOBDetId::layer(), TIBDetId::layer(), DetId::Muon, TrackQuality::Layer::MuonCSC, TrackQuality::Layer::MuonDT, TrackQuality::Layer::MuonRPCBarrel, TrackQuality::Layer::MuonRPCEndcap, PixelSubdetector::PixelBarrel, TrackQuality::Layer::PixelBarrel, PixelSubdetector::PixelEndcap, TrackQuality::Layer::PixelForward, MuonSubdetId::RPC, RPCDetId, TrackQuality::Layer::StripTEC, TrackQuality::Layer::StripTIB, TrackQuality::Layer::StripTID, TrackQuality::Layer::StripTOB, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, DetId::Tracker, TIDDetId::wheel(), and TECDetId::wheel().

Referenced by TrackQuality::evaluate().

102 {
104  short int layer = 0;
105 
106  switch (detId.det())
107  {
108  case DetId::Tracker:
109  switch (detId.subdetId())
110  {
113  layer = PXBDetId(detId).layer();
114  break;
115 
118  layer = PXFDetId(detId).disk();
119  break;
120 
123  layer = TIBDetId(detId).layer();
124  break;
125 
128  layer = TIDDetId(detId).wheel();
129  break;
130 
133  layer = TOBDetId(detId).layer();
134  break;
135 
138  layer = TECDetId(detId).wheel();
139  break;
140 
141  default:
142  /* should not get here */
143  ;
144  }
145  break;
146 
147  case DetId::Muon:
148  switch (detId.subdetId())
149  {
150  case MuonSubdetId::DT:
152  layer = DTLayerId(detId).layer();
153  break;
154 
155  case MuonSubdetId::CSC:
157  layer = CSCDetId(detId).layer();
158  break;
159 
160  case MuonSubdetId::RPC:
161  if (RPCDetId(detId).region())
163  else
165  layer = RPCDetId(detId).layer();
166  break;
167 
168  default:
169  /* should not get here */
170  ;
171  }
172  break;
173 
174  default:
175  /* should not get here */
176  ;
177  }
178 
179  return DetLayer(det, layer);
180 }
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
std::pair< TrackQuality::Layer::SubDet, short int > DetLayer
Definition: TrackQuality.cc:86
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
static const int CSC
Definition: MuonSubdetId.h:15
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
static const int RPC
Definition: MuonSubdetId.h:16
static const int DT
Definition: MuonSubdetId.h:14
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50

Variable Documentation

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

Definition at line 89 of file TrackQuality.cc.