CMS 3D CMS Logo

MuonChamberResidual.cc
Go to the documentation of this file.
1 
7 
12 
15  DetId chamberId,
16  AlignableDetOrUnitPtr chamberAlignable)
17  : m_globalGeometry(globalGeometry),
18  m_navigator(navigator),
19  m_chamberId(chamberId),
20  m_chamberAlignable(chamberAlignable),
21  m_numHits(0),
22  m_type(-1),
23  m_sign(0.),
24  m_chi2(-999.),
25  m_ndof(-1),
26  m_residual(-999.),
27  m_residual_error(-999.),
28  m_resslope(-999.),
29  m_resslope_error(-999.),
30  m_trackdxdz(-999.),
31  m_trackdydz(-999.),
32  m_trackx(-999.),
33  m_tracky(-999.),
34  m_segdxdz(-999.),
35  m_segdydz(-999.),
36  m_segx(-999.),
37  m_segy(-999.),
38  m_ChambW(-999),
39  m_Chambl(-999) {}
40 
43 }
44 
47 }
48 
50 
52 
54 
55 double MuonChamberResidual::hitresid(int i) const {
56  assert(0 <= i && i < int(m_localIDs.size()));
57  return m_localResids[i];
58 }
59 
60 int MuonChamberResidual::hitlayer(int i) const { // only difference between DTs and CSCs is the DetId subclass
61  assert(0 <= i && i < int(m_localIDs.size()));
63  DTLayerId layerId(m_localIDs[i].rawId());
64  return 4 * (layerId.superlayer() - 1) + layerId.layer();
65  } else if (m_chamberId.subdetId() == MuonSubdetId::CSC) {
66  CSCDetId layerId(m_localIDs[i].rawId());
67  return layerId.layer();
68  } else
69  assert(false);
70 }
71 
73  assert(0 <= i && i < int(m_localIDs.size()));
76  return sqrt(pow(pos.x(), 2) + pow(pos.y(), 2)); // R for DTs
77  } else if (m_chamberId.subdetId() == MuonSubdetId::CSC) {
78  return m_globalGeometry->idToDet(m_localIDs[i])->position().z(); // Z for CSCs
79  } else
80  assert(false);
81 }
GeomDet::position
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
MuonChamberResidual::resslope
double resslope() const
Definition: MuonChamberResidual.h:56
MuonChamberResidual::m_chamberId
DetId m_chamberId
Definition: MuonChamberResidual.h:90
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
mps_fire.i
i
Definition: mps_fire.py:428
MuonChamberResidual::m_localIDs
std::vector< DetId > m_localIDs
Definition: MuonChamberResidual.h:94
MuonChamberResidual::global_hitresid
double global_hitresid(int i) const
Definition: MuonChamberResidual.cc:53
DTLayerId.h
HLT_FULL_cff.navigator
navigator
Definition: HLT_FULL_cff.py:13126
pos
Definition: PixelAliasList.h:18
cms::cuda::assert
assert(be >=bs)
DTSuperLayerId::superlayer
int superlayer() const
Return the superlayer number (deprecated method name)
Definition: DTSuperLayerId.h:42
MuonChamberResidual::segx
double segx() const
Definition: MuonChamberResidual.h:72
AlignableDetOrUnitPtr
Definition: AlignableDetOrUnitPtr.h:30
MuonChamberResidual::global_stubpos
align::GlobalPoint global_stubpos()
Definition: MuonChamberResidual.cc:45
CSCDetId.h
MuonChamberResidual::segy
double segy() const
Definition: MuonChamberResidual.h:73
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
MuonChamberResidual::global_residual
double global_residual() const
Definition: MuonChamberResidual.cc:49
DetId
Definition: DetId.h:17
MuonChamberResidual::residual
double residual() const
Definition: MuonChamberResidual.h:54
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
CSCDetId::layer
int layer() const
Definition: CSCDetId.h:56
edm::ESHandle< GlobalTrackingGeometry >
MuonChamberResidual::hitposition
double hitposition(int i) const
Definition: MuonChamberResidual.cc:72
AlignableSurface::toGlobal
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
Definition: AlignableSurface.cc:15
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
Alignable::surface
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:132
Point3DBase< Scalar, GlobalTag >
DTChamberId.h
MuonChamberResidual.h
AlignableNavigator
Definition: AlignableNavigator.h:25
DTLayerId
Definition: DTLayerId.h:12
MuonChamberResidual::MuonChamberResidual
MuonChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)
Definition: MuonChamberResidual.cc:13
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
MuonChamberResidual::hitlayer
int hitlayer(int i) const
Definition: MuonChamberResidual.cc:60
MuonChamberResidual::chamberAlignable
AlignableDetOrUnitPtr chamberAlignable() const
Definition: MuonChamberResidual.h:50
MuonChamberResidual::trackx
double trackx() const
Definition: MuonChamberResidual.h:64
CSCDetId
Definition: CSCDetId.h:26
MuonChamberResidual::signConvention
virtual double signConvention() const
Definition: MuonChamberResidual.h:46
MuonChamberResidual::global_trackpos
align::GlobalPoint global_trackpos()
Definition: MuonChamberResidual.cc:41
MuonChamberResidual::m_globalGeometry
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry
Definition: MuonChamberResidual.h:88
MuonChamberResidual::tracky
double tracky() const
Definition: MuonChamberResidual.h:65
MuonChamberResidual::m_localResids
std::vector< double > m_localResids
Definition: MuonChamberResidual.h:95
GlobalTrackingGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: GlobalTrackingGeometry.cc:44
MuonChamberResidual::hitresid
double hitresid(int i) const
Definition: MuonChamberResidual.cc:55
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
DTSuperLayerId.h
DTLayerId::layer
int layer() const
Return the layer number.
Definition: DTLayerId.h:42
MuonChamberResidual::global_resslope
double global_resslope() const
Definition: MuonChamberResidual.cc:51