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 }
JacobianCartesianToCurvilinear.h
Vector3DBase
Definition: Vector3DBase.h:8
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
SteppingHelixStateInfo::getFreeState
void getFreeState(FreeTrajectoryState &fts) const
convert internal structure into the fts
Definition: SteppingHelixStateInfo.cc:88
FreeTrajectoryState.h
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
FreeTrajectoryState::hasError
bool hasError() const
Definition: FreeTrajectoryState.h:77
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
SteppingHelixStateInfo::hasErrorPropagated_
bool hasErrorPropagated_
Definition: SteppingHelixStateInfo.h:105
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
SteppingHelixStateInfo::ResultName
static const std::string ResultName[MAX_RESULT]
Definition: SteppingHelixStateInfo.h:36
Surface
Definition: Surface.h:36
SurfaceSideDefinition::SurfaceSide
SurfaceSide
Definition: SurfaceSideDefinition.h:8
SteppingHelixStateInfo::p3
Vector p3
Definition: SteppingHelixStateInfo.h:85
SurfaceSideDefinition::afterSurface
Definition: SurfaceSideDefinition.h:8
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
SteppingHelixStateInfo::dir
double dir
Definition: SteppingHelixStateInfo.h:91
SurfaceSideDefinition::atCenterOfSurface
Definition: SurfaceSideDefinition.h:8
plot_hgcal_utils.dEdx
dEdx
Definition: plot_hgcal_utils.py:213
SteppingHelixStateInfo::getStateOnSurface
TrajectoryStateOnSurface getStateOnSurface(const Surface &surf, bool returnTangentPlane=false) const
Definition: SteppingHelixStateInfo.cc:60
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
SteppingHelixStateInfo::isComplete
bool isComplete
Definition: SteppingHelixStateInfo.h:103
FreeTrajectoryState::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: FreeTrajectoryState.h:89
SurfaceSideDefinition::beforeSurface
Definition: SurfaceSideDefinition.h:8
SteppingHelixStateInfo::q
int q
Definition: SteppingHelixStateInfo.h:84
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
Point3DBase< float, GlobalTag >
Surface::tangentPlane
virtual ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const =0
SteppingHelixStateInfo::isValid_
bool isValid_
Definition: SteppingHelixStateInfo.h:104
HTXS::UNDEFINED
Definition: HiggsTemplateCrossSections.h:12
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
SteppingHelixStateInfo::r3
Point r3
Definition: SteppingHelixStateInfo.h:86
SteppingHelixStateInfo::isValid
bool isValid() const
Definition: SteppingHelixStateInfo.h:65
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TangentPlane.h
SteppingHelixStateInfo.h
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
HLT_FULL_cff.returnTangentPlane
returnTangentPlane
Definition: HLT_FULL_cff.py:6577
GlobalVector.h
SteppingHelixStateInfo::covCurv
AlgebraicSymMatrix55 covCurv
Definition: SteppingHelixStateInfo.h:87
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
path_
std::string & path_
Definition: PluginManager.cc:221
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
GlobalPoint.h
CurvilinearTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: CurvilinearTrajectoryError.h:61
SteppingHelixStateInfo::field
const MagneticField * field
Definition: SteppingHelixStateInfo.h:96
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40
SteppingHelixStateInfo::SteppingHelixStateInfo
SteppingHelixStateInfo()
Definition: SteppingHelixStateInfo.h:38