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

Enumerator
OK 
FAULT 
APPROX 
RANGEOUT 
INACC 
NOT_IMPLEMENTED 
WRONG_VOLUME 
UNDEFINED 
MAX_RESULT 

Definition at line 34 of file SteppingHelixStateInfo.h.

Constructor & Destructor Documentation

◆ SteppingHelixStateInfo() [1/2]

SteppingHelixStateInfo::SteppingHelixStateInfo ( )
inline

Definition at line 38 of file SteppingHelixStateInfo.h.

39  : path_(0),
40  radPath_(0),
41  dir(0),
42  magVol(nullptr),
43  isYokeVol(false),
44  field(nullptr),
45  dEdx(0),
46  dEdXPrime(0),
47  radX0(1e12),
48  isComplete(false),
49  isValid_(false),
50  hasErrorPropagated_(false),
51  status_(UNDEFINED) {}

◆ SteppingHelixStateInfo() [2/2]

SteppingHelixStateInfo::SteppingHelixStateInfo ( const FreeTrajectoryState fts)

Definition at line 27 of file SteppingHelixStateInfo.cc.

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 }

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().

Member Function Documentation

◆ charge()

int SteppingHelixStateInfo::charge ( void  ) const
inline

Definition at line 61 of file SteppingHelixStateInfo.h.

61 { return q; }

References q.

◆ getFreeState()

void SteppingHelixStateInfo::getFreeState ( FreeTrajectoryState fts) const

convert internal structure into the fts

Definition at line 88 of file SteppingHelixStateInfo.cc.

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 }

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

Referenced by SteppingHelixPropagator::propagateWithPath().

◆ getStateOnSurface()

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

Definition at line 60 of file SteppingHelixStateInfo.cc.

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 }

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

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

◆ hasErrorPropagated()

bool SteppingHelixStateInfo::hasErrorPropagated ( ) const
inline

Definition at line 66 of file SteppingHelixStateInfo.h.

66 { return hasErrorPropagated_; }

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.

68 { return status_; }

References 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().

Vector3DBase
Definition: Vector3DBase.h:8
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
SteppingHelixStateInfo::RANGEOUT
Definition: SteppingHelixStateInfo.h:34
FreeTrajectoryState::hasError
bool hasError() const
Definition: FreeTrajectoryState.h:77
SteppingHelixStateInfo::radX0
double radX0
Definition: SteppingHelixStateInfo.h:101
SteppingHelixStateInfo::dEdXPrime
double dEdXPrime
Definition: SteppingHelixStateInfo.h:100
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
SteppingHelixStateInfo::hasErrorPropagated_
bool hasErrorPropagated_
Definition: SteppingHelixStateInfo.h:105
SteppingHelixStateInfo::radPath_
double radPath_
Definition: SteppingHelixStateInfo.h:90
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
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
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
SteppingHelixStateInfo::dir
double dir
Definition: SteppingHelixStateInfo.h:91
SteppingHelixStateInfo::magVol
const MagVolume * magVol
Definition: SteppingHelixStateInfo.h:94
SurfaceSideDefinition::atCenterOfSurface
Definition: SurfaceSideDefinition.h:8
SteppingHelixStateInfo::OK
Definition: SteppingHelixStateInfo.h:34
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
SteppingHelixStateInfo::UNDEFINED
Definition: SteppingHelixStateInfo.h:34
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::INACC
Definition: SteppingHelixStateInfo.h:34
SteppingHelixStateInfo::q
int q
Definition: SteppingHelixStateInfo.h:84
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
SteppingHelixStateInfo::FAULT
Definition: SteppingHelixStateInfo.h:34
Point3DBase< float, GlobalTag >
SteppingHelixStateInfo::MAX_RESULT
Definition: SteppingHelixStateInfo.h:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Surface::tangentPlane
virtual ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const =0
SteppingHelixStateInfo::APPROX
Definition: SteppingHelixStateInfo.h:34
SteppingHelixStateInfo::isValid_
bool isValid_
Definition: SteppingHelixStateInfo.h:104
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
SteppingHelixStateInfo::r3
Point r3
Definition: SteppingHelixStateInfo.h:86
SteppingHelixStateInfo::path_
double path_
Definition: SteppingHelixStateInfo.h:89
SteppingHelixStateInfo::dEdx
double dEdx
Definition: SteppingHelixStateInfo.h:99
SteppingHelixStateInfo::isValid
bool isValid() const
Definition: SteppingHelixStateInfo.h:65
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
HLT_FULL_cff.returnTangentPlane
returnTangentPlane
Definition: HLT_FULL_cff.py:6578
SteppingHelixStateInfo::isYokeVol
bool isYokeVol
Definition: SteppingHelixStateInfo.h:95
SteppingHelixStateInfo::covCurv
AlgebraicSymMatrix55 covCurv
Definition: SteppingHelixStateInfo.h:87
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
SteppingHelixStateInfo::NOT_IMPLEMENTED
Definition: SteppingHelixStateInfo.h:34
SteppingHelixStateInfo::WRONG_VOLUME
Definition: SteppingHelixStateInfo.h:34
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
CurvilinearTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: CurvilinearTrajectoryError.h:61
SteppingHelixStateInfo::field
const MagneticField * field
Definition: SteppingHelixStateInfo.h:96
SteppingHelixStateInfo::status_
Result status_
Definition: SteppingHelixStateInfo.h:107
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40