Main Page
Namespaces
Classes
Package Documentation
TrackPropagation
SteppingHelixPropagator
src
SteppingHelixStateInfo.cc
Go to the documentation of this file.
1
7
//
8
// Original Author: Vyacheslav Krutelyov
9
// Created: Wed Jan 3 16:01:24 CST 2007
10
//
11
//
12
13
#include "
DataFormats/GeometryVector/interface/GlobalVector.h
"
14
#include "
DataFormats/GeometryVector/interface/GlobalPoint.h
"
15
#include "
TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h
"
16
17
#include "
TrackPropagation/SteppingHelixPropagator/interface/SteppingHelixStateInfo.h
"
18
#include "
TrackingTools/AnalyticalJacobians/interface/JacobianCartesianToCurvilinear.h
"
19
20
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
21
22
#include "
DataFormats/GeometrySurface/interface/TangentPlane.h
"
23
24
const
std::string
SteppingHelixStateInfo::ResultName
[MAX_RESULT] = {
25
"RESULT_OK"
,
26
"RESULT_FAULT"
,
27
"RESULT_RANGEOUT"
,
28
"RESULT_INACC"
,
29
"RESULT_NOT_IMPLEMENTED"
,
30
"RESULT_UNDEFINED"
31
};
32
33
SteppingHelixStateInfo::SteppingHelixStateInfo
(
const
FreeTrajectoryState
& fts):
34
path_
(0), radPath_(0),
dir
(0), magVol(0), isYokeVol(
false
), field(0), dEdx(0), dEdXPrime(0), radX0(1e12),
35
status_(
UNDEFINED
)
36
{
37
p3
.set(fts.
momentum
().
x
(), fts.
momentum
().
y
(), fts.
momentum
().
z
());
38
r3
.set(fts.
position
().
x
(), fts.
position
().
y
(), fts.
position
().
z
());
39
q
= fts.
charge
();
40
41
if
(fts.
hasError
()){
42
covCurv
= fts.
curvilinearError
().
matrix
();
43
hasErrorPropagated_
=
true
;
44
}
else
{
45
covCurv
=
AlgebraicSymMatrix55
();
46
hasErrorPropagated_
=
false
;
47
}
48
static
const
std::string
metname
=
"SteppingHelixPropagator"
;
49
if
(fts.
hasError
()){
50
LogTrace
(metname)<<
"Created SHPStateInfo from FTS\n"
<<fts;
51
// LogTrace(metname)<<"and cartesian error of\n"<<fts.cartesianError().matrix();
52
}
53
else
LogTrace
(metname)<<
"Created SHPStateInfo from FTS without errors"
;
54
55
isComplete
=
false
;
56
isValid_
=
true
;
57
}
58
59
TrajectoryStateOnSurface
SteppingHelixStateInfo::getStateOnSurface
(
const
Surface
& surf,
bool
returnTangentPlane
)
const
{
60
static
const
std::string
metname
=
"SteppingHelixPropagator"
;
61
if
(!
isValid
())
LogTrace
(metname)<<
"Return TSOS is invalid"
;
62
else
LogTrace
(metname)<<
"Return TSOS is valid"
;
63
if
(!
isValid
())
return
TrajectoryStateOnSurface
();
64
GlobalVector
p3GV(
p3
.x(),
p3
.y(),
p3
.z());
65
GlobalPoint
r3GP(
r3
.x(),
r3
.y(),
r3
.z());
66
GlobalTrajectoryParameters
tPars(r3GP, p3GV,
q
,
field
);
67
// CartesianTrajectoryError tCov(cov);
68
69
// CurvilinearTrajectoryError tCCov(ROOT::Math::Similarity(JacobianCartesianToCurvilinear(tPars).jacobian(), cov));
70
CurvilinearTrajectoryError
tCCov(
covCurv
);
71
72
FreeTrajectoryState
fts(tPars, tCCov);
73
if
(!
hasErrorPropagated_
) fts =
FreeTrajectoryState
(tPars);
74
75
76
SurfaceSideDefinition::SurfaceSide
side =
SurfaceSideDefinition::atCenterOfSurface
;
77
if
(
dir
> 0 ) side =
SurfaceSideDefinition::beforeSurface
;
78
if
(
dir
< 0 ) side =
SurfaceSideDefinition::afterSurface
;
79
return
TrajectoryStateOnSurface
(fts, returnTangentPlane ? *surf.
tangentPlane
(fts.
position
()) : surf, side);
80
}
81
82
83
void
SteppingHelixStateInfo::getFreeState
(
FreeTrajectoryState
& fts)
const
{
84
if
(
isValid
()){
85
GlobalVector
p3GV(
p3
.x(),
p3
.y(),
p3
.z());
86
GlobalPoint
r3GP(
r3
.x(),
r3
.y(),
r3
.z());
87
GlobalTrajectoryParameters
tPars(r3GP, p3GV,
q
,
field
);
88
// CartesianTrajectoryError tCov(cov);
89
// CurvilinearTrajectoryError tCCov(ROOT::Math::Similarity(JacobianCartesianToCurvilinear(tPars).jacobian(), cov));
90
CurvilinearTrajectoryError
tCCov(
covCurv
);
91
92
fts = (
hasErrorPropagated_
)
93
?
FreeTrajectoryState
(tPars, tCCov) :
FreeTrajectoryState
(tPars);
94
// ? FreeTrajectoryState(tPars, tCov, tCCov) : FreeTrajectoryState(tPars);
95
// if (fts.hasError()) fts.curvilinearError(); //call it so it gets created
96
}
97
}
SteppingHelixStateInfo::isComplete
bool isComplete
Definition:
SteppingHelixStateInfo.h:108
MessageLogger.h
Surface::tangentPlane
virtual ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const =0
Surface
Definition:
Surface.h:42
metname
const std::string metname
Definition:
MuonSeedOrcaPatternRecognition.cc:44
funct::false
false
Definition:
Factorize.h:34
Vector3DBase< float, GlobalTag >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
SteppingHelixStateInfo::getFreeState
void getFreeState(FreeTrajectoryState &fts) const
convert internal structure into the fts
Definition:
SteppingHelixStateInfo.cc:83
GlobalTrajectoryParameters
Definition:
GlobalTrajectoryParameters.h:15
SteppingHelixStateInfo.h
PV3DBase::y
T y() const
Definition:
PV3DBase.h:63
SteppingHelixStateInfo::covCurv
AlgebraicSymMatrix55 covCurv
Definition:
SteppingHelixStateInfo.h:92
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition:
AlgebraicROOTObjects.h:23
SurfaceSideDefinition::afterSurface
Definition:
SurfaceSideDefinition.h:8
FreeTrajectoryState::charge
TrackCharge charge() const
Definition:
FreeTrajectoryState.h:90
SteppingHelixPropagator_cfi.returnTangentPlane
returnTangentPlane
Definition:
SteppingHelixPropagator_cfi.py:22
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:17
FreeTrajectoryState::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition:
FreeTrajectoryState.h:121
SurfaceSideDefinition::SurfaceSide
SurfaceSide
Definition:
SurfaceSideDefinition.h:8
FreeTrajectoryState
Definition:
FreeTrajectoryState.h:29
SteppingHelixStateInfo::getStateOnSurface
TrajectoryStateOnSurface getStateOnSurface(const Surface &surf, bool returnTangentPlane=false) const
Definition:
SteppingHelixStateInfo.cc:59
PV3DBase::z
T z() const
Definition:
PV3DBase.h:64
SteppingHelixStateInfo::hasErrorPropagated_
bool hasErrorPropagated_
Definition:
SteppingHelixStateInfo.h:110
SteppingHelixStateInfo::dir
double dir
Definition:
SteppingHelixStateInfo.h:96
TangentPlane.h
JacobianCartesianToCurvilinear.h
SteppingHelixStateInfo::p3
Vector p3
Definition:
SteppingHelixStateInfo.h:90
LogTrace
#define LogTrace(id)
Definition:
PFTrackAlgoTools.cc:504
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition:
FreeTrajectoryState.h:87
SteppingHelixStateInfo::field
const MagneticField * field
Definition:
SteppingHelixStateInfo.h:101
GlobalVector.h
SteppingHelixStateInfo::SteppingHelixStateInfo
SteppingHelixStateInfo()
Definition:
SteppingHelixStateInfo.h:52
FreeTrajectoryState::position
GlobalPoint position() const
Definition:
FreeTrajectoryState.h:84
FreeTrajectoryState::hasError
bool hasError() const
Definition:
FreeTrajectoryState.h:104
path_
std::string & path_
Definition:
PluginManager.cc:242
SurfaceSideDefinition::atCenterOfSurface
Definition:
SurfaceSideDefinition.h:8
Point3DBase< float, GlobalTag >
SteppingHelixStateInfo::q
int q
Definition:
SteppingHelixStateInfo.h:89
CurvilinearTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition:
CurvilinearTrajectoryError.h:64
SteppingHelixStateInfo::isValid_
bool isValid_
Definition:
SteppingHelixStateInfo.h:109
SurfaceSideDefinition::beforeSurface
Definition:
SurfaceSideDefinition.h:8
pftools::UNDEFINED
Definition:
CalibrationProvenance.h:17
dir
dbl *** dir
Definition:
mlp_gen.cc:35
CurvilinearTrajectoryError
Definition:
CurvilinearTrajectoryError.h:27
PV3DBase::x
T x() const
Definition:
PV3DBase.h:62
SteppingHelixStateInfo::ResultName
static const std::string ResultName[MAX_RESULT]
Definition:
SteppingHelixStateInfo.h:50
FreeTrajectoryState.h
SteppingHelixStateInfo::r3
Point r3
Definition:
SteppingHelixStateInfo.h:91
GlobalPoint.h
SteppingHelixStateInfo::isValid
bool isValid() const
Definition:
SteppingHelixStateInfo.h:68
Generated for CMSSW Reference Manual by
1.8.11