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/TrackerCommon/interface/TrackerTopology.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "DataFormats/SiStripDetId/interface/StripSubdetector.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

DetLayer getDetLayer (DetId detId, const TrackerTopology *tTopo)
 

Variables

static const int statePriorities []
 

Typedef Documentation

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

Definition at line 82 of file TrackQuality.cc.

Function Documentation

DetLayer getDetLayer ( DetId  detId,
const TrackerTopology tTopo 
)

Definition at line 97 of file TrackQuality.cc.

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

Referenced by TrackQuality::evaluate().

98 {
100  short int layer = 0;
101 
102  switch (detId.det())
103  {
104  case DetId::Tracker:
105  layer=tTopo->layer(detId);
106  break;
107 
108  case DetId::Muon:
109  switch (detId.subdetId())
110  {
111  case MuonSubdetId::DT:
113  layer = DTLayerId(detId).layer();
114  break;
115 
116  case MuonSubdetId::CSC:
118  layer = CSCDetId(detId).layer();
119  break;
120 
121  case MuonSubdetId::RPC:
122  if (RPCDetId(detId).region())
124  else
126  layer = RPCDetId(detId).layer();
127  break;
128 
129  default:
130  /* should not get here */
131  ;
132  }
133  break;
134 
135  default:
136  /* should not get here */
137  ;
138  }
139 
140  return DetLayer(det, layer);
141 }
std::pair< TrackQuality::Layer::SubDet, short int > DetLayer
Definition: TrackQuality.cc:82
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 layer(const DetId &id) const
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

Variable Documentation

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

Definition at line 85 of file TrackQuality.cc.