CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Friends
SteppingHelixStateInfo Class Reference

#include <SteppingHelixStateInfo.h>

Classes

struct  VolumeBounds
 

Public Types

typedef CLHEP::Hep3Vector Point
 
enum  Result {
  OK = 0, FAULT, APPROX, RANGEOUT,
  INACC, NOT_IMPLEMENTED, WRONG_VOLUME, UNDEFINED,
  MAX_RESULT
}
 
typedef CLHEP::Hep3Vector Vector
 

Public Member Functions

int charge () const
 
void getFreeState (FreeTrajectoryState &fts) const
 convert internal structure into the fts More...
 
TrajectoryStateOnSurface getStateOnSurface (const Surface &surf, bool returnTangentPlane=false) const
 
bool hasErrorPropagated () const
 
bool isValid () const
 
GlobalVector momentum () const
 
double path () const
 
GlobalPoint position () const
 
double radPath () const
 
Result status () const
 
 SteppingHelixStateInfo ()
 
 SteppingHelixStateInfo (const FreeTrajectoryState &fts)
 

Static Public Attributes

static const std::string ResultName [MAX_RESULT]
 

Protected Attributes

Vector bf
 
Vector bfGradLoc
 
AlgebraicSymMatrix55 covCurv
 
double dEdx
 
double dEdXPrime
 
double dir
 
const MagneticFieldfield
 
bool hasErrorPropagated_
 
bool isComplete
 
bool isValid_
 
bool isYokeVol
 
const MagVolumemagVol
 
AlgebraicSymMatrix55 matDCovCurv
 
Vector p3
 
double path_
 
int q
 
Point r3
 
double radPath_
 
double radX0
 
VolumeBounds rzLims
 
Result status_
 

Friends

class SteppingHelixPropagator
 

Detailed Description

Holder of SteppingHelixState information

Author
Vyacheslav Krutelyov (slava77)

Implementation part of the stepping helix propagator state data structure

Author
Vyacheslav Krutelyov (slava77)

Definition at line 27 of file SteppingHelixStateInfo.h.

Member Typedef Documentation

◆ Point

typedef CLHEP::Hep3Vector SteppingHelixStateInfo::Point

Definition at line 32 of file SteppingHelixStateInfo.h.

◆ Vector

typedef CLHEP::Hep3Vector SteppingHelixStateInfo::Vector

Definition at line 31 of file SteppingHelixStateInfo.h.

Member Enumeration Documentation

◆ Result

Constructor & Destructor Documentation

◆ SteppingHelixStateInfo() [1/2]

SteppingHelixStateInfo::SteppingHelixStateInfo ( )
inline

Definition at line 38 of file SteppingHelixStateInfo.h.

◆ SteppingHelixStateInfo() [2/2]

SteppingHelixStateInfo::SteppingHelixStateInfo ( const FreeTrajectoryState fts)

Definition at line 27 of file SteppingHelixStateInfo.cc.

References FreeTrajectoryState::charge(), covCurv, FreeTrajectoryState::curvilinearError(), FreeTrajectoryState::hasError(), hasErrorPropagated_, isComplete, isValid_, LogTrace, CurvilinearTrajectoryError::matrix(), metname, FreeTrajectoryState::momentum(), p3, FreeTrajectoryState::position(), q, r3, AlCaHLTBitMon_QueryRunRegistry::string, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

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),
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 }
const CurvilinearTrajectoryError & curvilinearError() const
T z() const
Definition: PV3DBase.h:61
const std::string metname
AlgebraicSymMatrix55 covCurv
#define LogTrace(id)
GlobalPoint position() const
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
TrackCharge charge() const
GlobalVector momentum() const
const MagneticField * field
const AlgebraicSymMatrix55 & matrix() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55

Member Function Documentation

◆ charge()

int SteppingHelixStateInfo::charge ( void  ) const
inline

Definition at line 61 of file SteppingHelixStateInfo.h.

References q.

◆ getFreeState()

void SteppingHelixStateInfo::getFreeState ( FreeTrajectoryState fts) const

convert internal structure into the fts

Definition at line 88 of file SteppingHelixStateInfo.cc.

References covCurv, field, hasErrorPropagated_, isValid(), p3, q, and r3.

Referenced by SteppingHelixPropagator::propagateWithPath().

88  {
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 }
AlgebraicSymMatrix55 covCurv
const MagneticField * field

◆ getStateOnSurface()

TrajectoryStateOnSurface SteppingHelixStateInfo::getStateOnSurface ( const Surface surf,
bool  returnTangentPlane = false 
) const

Definition at line 60 of file SteppingHelixStateInfo.cc.

References SurfaceSideDefinition::afterSurface, SurfaceSideDefinition::atCenterOfSurface, SurfaceSideDefinition::beforeSurface, covCurv, dir, field, hasErrorPropagated_, isValid(), LogTrace, metname, p3, FreeTrajectoryState::position(), q, r3, HLT_2022v12_cff::returnTangentPlane, AlCaHLTBitMon_QueryRunRegistry::string, and Surface::tangentPlane().

Referenced by CaloDetIdAssociator::crossedElement(), MuonSimHitProducer::produce(), and SteppingHelixPropagator::propagateWithPath().

60  {
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 }
virtual ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const =0
const std::string metname
AlgebraicSymMatrix55 covCurv
#define LogTrace(id)
const MagneticField * field

◆ hasErrorPropagated()

bool SteppingHelixStateInfo::hasErrorPropagated ( ) const
inline

Definition at line 66 of file SteppingHelixStateInfo.h.

References hasErrorPropagated_.

◆ isValid()

bool SteppingHelixStateInfo::isValid ( void  ) const
inline

◆ momentum()

GlobalVector SteppingHelixStateInfo::momentum ( ) const
inline

◆ path()

double SteppingHelixStateInfo::path ( ) const
inline

◆ position()

GlobalPoint SteppingHelixStateInfo::position ( ) const
inline

◆ radPath()

double SteppingHelixStateInfo::radPath ( ) const
inline

◆ status()

Result SteppingHelixStateInfo::status ( void  ) const
inline

Definition at line 68 of file SteppingHelixStateInfo.h.

References status_.

68 { return status_; }

Friends And Related Function Documentation

◆ SteppingHelixPropagator

friend class SteppingHelixPropagator
friend

Definition at line 28 of file SteppingHelixStateInfo.h.

Member Data Documentation

◆ bf

Vector SteppingHelixStateInfo::bf
protected

◆ bfGradLoc

Vector SteppingHelixStateInfo::bfGradLoc
protected

Definition at line 93 of file SteppingHelixStateInfo.h.

◆ covCurv

AlgebraicSymMatrix55 SteppingHelixStateInfo::covCurv
protected

◆ dEdx

double SteppingHelixStateInfo::dEdx
protected

◆ dEdXPrime

double SteppingHelixStateInfo::dEdXPrime
protected

◆ dir

double SteppingHelixStateInfo::dir
protected

◆ field

const MagneticField* SteppingHelixStateInfo::field
protected

◆ hasErrorPropagated_

bool SteppingHelixStateInfo::hasErrorPropagated_
protected

◆ isComplete

bool SteppingHelixStateInfo::isComplete
protected

◆ isValid_

bool SteppingHelixStateInfo::isValid_
protected

◆ isYokeVol

bool SteppingHelixStateInfo::isYokeVol
protected

◆ magVol

const MagVolume* SteppingHelixStateInfo::magVol
protected

◆ matDCovCurv

AlgebraicSymMatrix55 SteppingHelixStateInfo::matDCovCurv
protected

◆ p3

Vector SteppingHelixStateInfo::p3
protected

◆ path_

double SteppingHelixStateInfo::path_
protected

◆ q

int SteppingHelixStateInfo::q
protected

◆ r3

Point SteppingHelixStateInfo::r3
protected

◆ radPath_

double SteppingHelixStateInfo::radPath_
protected

◆ radX0

double SteppingHelixStateInfo::radX0
protected

◆ ResultName

const std::string SteppingHelixStateInfo::ResultName
static
Initial value:
= {
"RESULT_OK", "RESULT_FAULT", "RESULT_RANGEOUT", "RESULT_INACC", "RESULT_NOT_IMPLEMENTED", "RESULT_UNDEFINED"}

Definition at line 36 of file SteppingHelixStateInfo.h.

Referenced by SteppingHelixPropagator::propagate().

◆ rzLims

VolumeBounds SteppingHelixStateInfo::rzLims
protected

◆ status_

Result SteppingHelixStateInfo::status_
protected

Definition at line 107 of file SteppingHelixStateInfo.h.

Referenced by SteppingHelixPropagator::propagate(), and status().