CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 32 of file SteppingHelixStateInfo.h.

Member Typedef Documentation

typedef CLHEP::Hep3Vector SteppingHelixStateInfo::Point

Definition at line 36 of file SteppingHelixStateInfo.h.

typedef CLHEP::Hep3Vector SteppingHelixStateInfo::Vector

Definition at line 35 of file SteppingHelixStateInfo.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

SteppingHelixStateInfo::SteppingHelixStateInfo ( )
inline
SteppingHelixStateInfo::SteppingHelixStateInfo ( const FreeTrajectoryState fts)

Definition at line 33 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().

33  :
34  path_(0), radPath_(0), dir(0), magVol(0), isYokeVol(false), field(0), dEdx(0), dEdXPrime(0), radX0(1e12),
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()){
43  hasErrorPropagated_ = true;
44  } else {
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 }
const std::string metname
T y() const
Definition: PV3DBase.h:63
AlgebraicSymMatrix55 covCurv
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
T z() const
Definition: PV3DBase.h:64
#define LogTrace(id)
GlobalVector momentum() const
const MagneticField * field
GlobalPoint position() const
const AlgebraicSymMatrix55 & matrix() const
T x() const
Definition: PV3DBase.h:62

Member Function Documentation

int SteppingHelixStateInfo::charge ( void  ) const
inline

Definition at line 64 of file SteppingHelixStateInfo.h.

References q.

void SteppingHelixStateInfo::getFreeState ( FreeTrajectoryState fts) const

convert internal structure into the fts

Definition at line 83 of file SteppingHelixStateInfo.cc.

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

Referenced by CachedTrajectory::propagate(), and SteppingHelixPropagator::propagateWithPath().

83  {
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));
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 }
AlgebraicSymMatrix55 covCurv
const MagneticField * field
TrajectoryStateOnSurface SteppingHelixStateInfo::getStateOnSurface ( const Surface surf,
bool  returnTangentPlane = false 
) const

Definition at line 59 of file SteppingHelixStateInfo.cc.

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

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

59  {
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));
71 
72  FreeTrajectoryState fts(tPars, tCCov);
73  if (! hasErrorPropagated_) fts = FreeTrajectoryState(tPars);
74 
75 
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 }
virtual ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const =0
const std::string metname
AlgebraicSymMatrix55 covCurv
#define LogTrace(id)
const MagneticField * field
bool SteppingHelixStateInfo::hasErrorPropagated ( ) const
inline

Definition at line 69 of file SteppingHelixStateInfo.h.

References hasErrorPropagated_.

bool SteppingHelixStateInfo::isValid ( void  ) const
inline
GlobalVector SteppingHelixStateInfo::momentum ( ) const
inline
double SteppingHelixStateInfo::path ( ) const
inline
GlobalPoint SteppingHelixStateInfo::position ( ) const
inline
double SteppingHelixStateInfo::radPath ( ) const
inline
Result SteppingHelixStateInfo::status ( void  ) const
inline

Definition at line 71 of file SteppingHelixStateInfo.h.

References status_.

Friends And Related Function Documentation

friend class SteppingHelixPropagator
friend

Definition at line 33 of file SteppingHelixStateInfo.h.

Member Data Documentation

Vector SteppingHelixStateInfo::bf
protected
Vector SteppingHelixStateInfo::bfGradLoc
protected

Definition at line 98 of file SteppingHelixStateInfo.h.

AlgebraicSymMatrix55 SteppingHelixStateInfo::covCurv
protected
double SteppingHelixStateInfo::dEdx
protected
double SteppingHelixStateInfo::dEdXPrime
protected
double SteppingHelixStateInfo::dir
protected
const MagneticField* SteppingHelixStateInfo::field
protected
bool SteppingHelixStateInfo::hasErrorPropagated_
protected
bool SteppingHelixStateInfo::isComplete
protected
bool SteppingHelixStateInfo::isValid_
protected
bool SteppingHelixStateInfo::isYokeVol
protected
const MagVolume* SteppingHelixStateInfo::magVol
protected
AlgebraicSymMatrix55 SteppingHelixStateInfo::matDCovCurv
protected
Vector SteppingHelixStateInfo::p3
protected
double SteppingHelixStateInfo::path_
protected
int SteppingHelixStateInfo::q
protected
Point SteppingHelixStateInfo::r3
protected
double SteppingHelixStateInfo::radPath_
protected
double SteppingHelixStateInfo::radX0
protected
const std::string SteppingHelixStateInfo::ResultName
static
Initial value:
= {
"RESULT_OK",
"RESULT_FAULT",
"RESULT_RANGEOUT",
"RESULT_INACC",
"RESULT_NOT_IMPLEMENTED",
"RESULT_UNDEFINED"
}

Definition at line 50 of file SteppingHelixStateInfo.h.

Referenced by SteppingHelixPropagator::propagate().

VolumeBounds SteppingHelixStateInfo::rzLims
protected
Result SteppingHelixStateInfo::status_
protected

Definition at line 112 of file SteppingHelixStateInfo.h.

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