Alignment
MuonAlignmentAlgorithms
src
MuonTrackDT2ChamberResidual.cc
Go to the documentation of this file.
1
/*
2
* $Id: $
3
*/
4
5
#include "
Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h
"
6
7
MuonTrackDT2ChamberResidual::MuonTrackDT2ChamberResidual
(
edm::ESHandle<GlobalTrackingGeometry>
globalGeometry,
8
AlignableNavigator
*
navigator
,
9
DetId
chamberId,
10
AlignableDetOrUnitPtr
chamberAlignable)
11
:
MuonChamberResidual
(globalGeometry,
navigator
, chamberId, chamberAlignable) {
12
m_type
=
MuonChamberResidual::kDT2
;
13
align::GlobalVector
zDirection(0., 0., 1.);
14
m_sign
=
m_globalGeometry
->
idToDet
(
m_chamberId
)->
toLocal
(zDirection).
y
() > 0. ? 1. : -1.;
15
}
16
17
void
MuonTrackDT2ChamberResidual::setSegmentResidual
(
const
reco::MuonChamberMatch
*trk,
18
const
reco::MuonSegmentMatch
*seg) {
19
DTRecSegment4DRef
segmentDT = seg->
dtSegmentRef
;
20
if
(segmentDT.
get
() !=
nullptr
) {
21
const
DTRecSegment4D
*segment = segmentDT.
get
();
22
assert
(segment->
hasZed
());
23
const
DTSLRecSegment2D
*zSeg = (*segment).zSegment();
24
m_numHits
= zSeg->recHits().size();
25
m_ndof
= zSeg->degreesOfFreedom();
26
m_chi2
= zSeg->chi2();
27
//std::cout<<"z seg position = "<<zSeg->localPosition()<<" numhits="<<m_numHits<<std::endl;
28
}
29
30
m_residual
= trk->
y
- seg->
y
;
31
m_residual_error
=
sqrt
(
pow
(trk->
yErr
, 2) +
pow
(seg->
yErr
, 2));
32
m_resslope
= trk->
dYdZ
- seg->
dYdZ
;
33
m_resslope_error
=
sqrt
(
pow
(trk->
dYdZErr
, 2) +
pow
(seg->
dYdZErr
, 2));
34
35
m_trackx
= trk->
x
;
36
m_tracky
= trk->
y
;
37
m_trackdxdz
= trk->
dXdZ
;
38
m_trackdydz
= trk->
dYdZ
;
39
40
m_segx
= seg->
x
;
41
m_segy
= seg->
y
;
42
m_segdxdz
= seg->
dXdZ
;
43
m_segdydz
= seg->
dYdZ
;
44
45
//std::cout<<"d2 res "<<m_residual<<"+-"<<m_residual_error<<" "<<m_resslope<<"+-"<<m_resslope_error<<std::endl;
46
//std::cout<<"d2 trk "<<m_trackx<<" "<<m_tracky<<" "<<m_trackdxdz<<" "<<m_trackdydz<<std::endl;
47
//std::cout<<"d2 seg "<<m_segx<<" "<<m_segy<<" "<<m_segdxdz<<" "<<m_segdydz<<std::endl;
48
}
Vector3DBase< Scalar, GlobalTag >
MuonChamberResidual::m_resslope_error
double m_resslope_error
Definition:
MuonChamberResidual.h:107
DTSLRecSegment2D
Definition:
DTSLRecSegment2D.h:15
MuonChamberResidual::m_chamberId
DetId m_chamberId
Definition:
MuonChamberResidual.h:90
DTRecSegment4D
Definition:
DTRecSegment4D.h:23
MuonChamberResidual::m_segy
double m_segy
Definition:
MuonChamberResidual.h:115
MuonChamberResidual::m_segdxdz
double m_segdxdz
Definition:
MuonChamberResidual.h:112
reco::MuonChamberMatch::x
float x
Definition:
MuonChamberMatch.h:19
HLT_FULL_cff.navigator
navigator
Definition:
HLT_FULL_cff.py:13108
MuonChamberResidual::m_segx
double m_segx
Definition:
MuonChamberResidual.h:114
MuonChamberResidual::m_residual
double m_residual
Definition:
MuonChamberResidual.h:104
MuonChamberResidual::m_chi2
double m_chi2
Definition:
MuonChamberResidual.h:102
reco::MuonChamberMatch::dYdZ
float dYdZ
Definition:
MuonChamberMatch.h:24
edm::Ref::get
T const * get() const
Returns C++ pointer to the item.
Definition:
Ref.h:232
cms::cuda::assert
assert(be >=bs)
reco::MuonSegmentMatch::dtSegmentRef
DTRecSegment4DRef dtSegmentRef
Definition:
MuonSegmentMatch.h:50
MuonTrackDT2ChamberResidual::MuonTrackDT2ChamberResidual
MuonTrackDT2ChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)
Definition:
MuonTrackDT2ChamberResidual.cc:7
reco::MuonSegmentMatch::y
float y
Definition:
MuonSegmentMatch.h:35
AlignableDetOrUnitPtr
Definition:
AlignableDetOrUnitPtr.h:30
edm::Ref< DTRecSegment4DCollection >
DetId
Definition:
DetId.h:17
reco::MuonSegmentMatch
Definition:
MuonSegmentMatch.h:12
MuonChamberResidual::m_segdydz
double m_segdydz
Definition:
MuonChamberResidual.h:113
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
edm::ESHandle< GlobalTrackingGeometry >
GeomDet::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition:
GeomDet.h:58
AlignableNavigator
Definition:
AlignableNavigator.h:25
reco::MuonSegmentMatch::dYdZ
float dYdZ
Definition:
MuonSegmentMatch.h:39
reco::MuonChamberMatch::dYdZErr
float dYdZErr
Definition:
MuonChamberMatch.h:26
reco::MuonChamberMatch::dXdZ
float dXdZ
Definition:
MuonChamberMatch.h:23
MuonChamberResidual::kDT2
Definition:
MuonChamberResidual.h:28
MuonChamberResidual::m_trackdydz
double m_trackdydz
Definition:
MuonChamberResidual.h:109
MuonTrackDT2ChamberResidual::setSegmentResidual
void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) override
Definition:
MuonTrackDT2ChamberResidual.cc:17
MuonChamberResidual::m_type
int m_type
Definition:
MuonChamberResidual.h:100
MuonChamberResidual::m_ndof
int m_ndof
Definition:
MuonChamberResidual.h:103
PV3DBase::y
T y() const
Definition:
PV3DBase.h:60
MuonChamberResidual
Definition:
MuonChamberResidual.h:26
MuonChamberResidual::m_trackx
double m_trackx
Definition:
MuonChamberResidual.h:110
MuonChamberResidual::m_sign
double m_sign
Definition:
MuonChamberResidual.h:101
reco::MuonChamberMatch
Definition:
MuonChamberMatch.h:10
MuonChamberResidual::m_resslope
double m_resslope
Definition:
MuonChamberResidual.h:106
reco::MuonChamberMatch::yErr
float yErr
Definition:
MuonChamberMatch.h:22
reco::MuonSegmentMatch::dXdZ
float dXdZ
Definition:
MuonSegmentMatch.h:38
MuonChamberResidual::m_tracky
double m_tracky
Definition:
MuonChamberResidual.h:111
MuonChamberResidual::m_globalGeometry
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry
Definition:
MuonChamberResidual.h:88
DTRecSegment4D::hasZed
bool hasZed() const
Does it have the Z projection?
Definition:
DTRecSegment4D.h:93
MuonChamberResidual::m_numHits
int m_numHits
Definition:
MuonChamberResidual.h:93
GlobalTrackingGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition:
GlobalTrackingGeometry.cc:44
reco::MuonChamberMatch::y
float y
Definition:
MuonChamberMatch.h:20
MuonChamberResidual::m_residual_error
double m_residual_error
Definition:
MuonChamberResidual.h:105
reco::MuonSegmentMatch::yErr
float yErr
Definition:
MuonSegmentMatch.h:37
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition:
Power.h:29
MuonChamberResidual::m_trackdxdz
double m_trackdxdz
Definition:
MuonChamberResidual.h:108
reco::MuonSegmentMatch::x
float x
Definition:
MuonSegmentMatch.h:34
reco::MuonSegmentMatch::dYdZErr
float dYdZErr
Definition:
MuonSegmentMatch.h:41
MuonTrackDT2ChamberResidual.h
Generated for CMSSW Reference Manual by
1.8.16