CMS 3D CMS Logo

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 
16 
19 
21 
23 
25  "RESULT_OK", "RESULT_FAULT", "RESULT_RANGEOUT", "RESULT_INACC", "RESULT_NOT_IMPLEMENTED", "RESULT_UNDEFINED"};
26 
28  : path_(0),
29  radPath_(0),
30  dir(0),
31  magVol(nullptr),
32  isYokeVol(false),
33  field(nullptr),
34  dEdx(0),
35  dEdXPrime(0),
36  radX0(1e12),
37  status_(UNDEFINED) {
38  p3.set(fts.momentum().x(), fts.momentum().y(), fts.momentum().z());
39  r3.set(fts.position().x(), fts.position().y(), fts.position().z());
40  q = fts.charge();
41 
42  if (fts.hasError()) {
44  hasErrorPropagated_ = true;
45  } else {
47  hasErrorPropagated_ = false;
48  }
49  static const std::string metname = "SteppingHelixPropagator";
50  if (fts.hasError()) {
51  LogTrace(metname) << "Created SHPStateInfo from FTS\n" << fts;
52  // LogTrace(metname)<<"and cartesian error of\n"<<fts.cartesianError().matrix();
53  } else
54  LogTrace(metname) << "Created SHPStateInfo from FTS without errors";
55 
56  isComplete = false;
57  isValid_ = true;
58 }
59 
61  static const std::string metname = "SteppingHelixPropagator";
62  if (!isValid())
63  LogTrace(metname) << "Return TSOS is invalid";
64  else
65  LogTrace(metname) << "Return TSOS is valid";
66  if (!isValid())
67  return TrajectoryStateOnSurface();
68  GlobalVector p3GV(p3.x(), p3.y(), p3.z());
69  GlobalPoint r3GP(r3.x(), r3.y(), r3.z());
70  GlobalTrajectoryParameters tPars(r3GP, p3GV, q, field);
71  // CartesianTrajectoryError tCov(cov);
72 
73  // CurvilinearTrajectoryError tCCov(ROOT::Math::Similarity(JacobianCartesianToCurvilinear(tPars).jacobian(), cov));
75 
76  FreeTrajectoryState fts(tPars, tCCov);
78  fts = FreeTrajectoryState(tPars);
79 
81  if (dir > 0)
83  if (dir < 0)
85  return TrajectoryStateOnSurface(fts, returnTangentPlane ? *surf.tangentPlane(fts.position()) : surf, side);
86 }
87 
89  if (isValid()) {
90  GlobalVector p3GV(p3.x(), p3.y(), p3.z());
91  GlobalPoint r3GP(r3.x(), r3.y(), r3.z());
92  GlobalTrajectoryParameters tPars(r3GP, p3GV, q, field);
93  // CartesianTrajectoryError tCov(cov);
94  // CurvilinearTrajectoryError tCCov(ROOT::Math::Similarity(JacobianCartesianToCurvilinear(tPars).jacobian(), cov));
96 
97  fts = (hasErrorPropagated_) ? FreeTrajectoryState(tPars, tCCov) : FreeTrajectoryState(tPars);
98  // ? FreeTrajectoryState(tPars, tCov, tCCov) : FreeTrajectoryState(tPars);
99  // if (fts.hasError()) fts.curvilinearError(); //call it so it gets created
100  }
101 }
virtual ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const =0
const std::string metname
void getFreeState(FreeTrajectoryState &fts) const
convert internal structure into the fts
#define nullptr
T y() const
Definition: PV3DBase.h:60
AlgebraicSymMatrix55 covCurv
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
TrajectoryStateOnSurface getStateOnSurface(const Surface &surf, bool returnTangentPlane=false) const
T z() const
Definition: PV3DBase.h:61
#define LogTrace(id)
GlobalVector momentum() const
const MagneticField * field
GlobalPoint position() const
std::string & path_
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const AlgebraicSymMatrix55 & matrix() const
T x() const
Definition: PV3DBase.h:59
static const std::string ResultName[MAX_RESULT]