CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Friends

SteppingHelixStateInfo Class Reference

#include <SteppingHelixStateInfo.h>

List of all members.

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
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 (const FreeTrajectoryState &fts)
 SteppingHelixStateInfo ()

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

Date:
2009/09/08 20:44:31
Revision:
1.16
Author:
Vyacheslav Krutelyov (slava77)

Implementation part of the stepping helix propagator state data structure

Date:
2009/09/08 20:44:32
Revision:
1.13
Author:
Vyacheslav Krutelyov (slava77)

Definition at line 35 of file SteppingHelixStateInfo.h.


Member Typedef Documentation

typedef CLHEP::Hep3Vector SteppingHelixStateInfo::Point

Definition at line 39 of file SteppingHelixStateInfo.h.

typedef CLHEP::Hep3Vector SteppingHelixStateInfo::Vector

Definition at line 38 of file SteppingHelixStateInfo.h.


Member Enumeration Documentation

Enumerator:
OK 
FAULT 
APPROX 
RANGEOUT 
INACC 
NOT_IMPLEMENTED 
WRONG_VOLUME 
UNDEFINED 
MAX_RESULT 

Definition at line 41 of file SteppingHelixStateInfo.h.


Constructor & Destructor Documentation

SteppingHelixStateInfo::SteppingHelixStateInfo ( ) [inline]

Definition at line 55 of file SteppingHelixStateInfo.h.

                          : 
    path_(0), radPath_(0), dir(0), magVol(0), field(0), dEdx(0), dEdXPrime(0), radX0(1e12),
    isComplete(0), isValid_(0), hasErrorPropagated_(0), status_(UNDEFINED) {}
SteppingHelixStateInfo::SteppingHelixStateInfo ( const FreeTrajectoryState fts)

Definition at line 36 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, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

                                                                            : 
  path_(0), radPath_(0), dir(0), magVol(0), field(0), dEdx(0), dEdXPrime(0), radX0(1e12),
  status_(UNDEFINED)
{
  p3.set(fts.momentum().x(), fts.momentum().y(), fts.momentum().z());
  r3.set(fts.position().x(), fts.position().y(), fts.position().z());
  q = fts.charge();

  if (fts.hasError()){
    covCurv = fts.curvilinearError().matrix();
    hasErrorPropagated_ = true;
  } else {
    covCurv = AlgebraicSymMatrix55();
    hasErrorPropagated_ = false;
  }
  static const std::string metname = "SteppingHelixPropagator";
  if (fts.hasError()){ 
    LogTrace(metname)<<"Created SHPStateInfo from FTS\n"<<fts;
    //    LogTrace(metname)<<"and cartesian error of\n"<<fts.cartesianError().matrix();
  }
  else LogTrace(metname)<<"Created SHPStateInfo from FTS without errors";

  isComplete = false;
  isValid_ = true;
}

Member Function Documentation

int SteppingHelixStateInfo::charge ( void  ) const [inline]

Definition at line 67 of file SteppingHelixStateInfo.h.

References q.

{return q;}
void SteppingHelixStateInfo::getFreeState ( FreeTrajectoryState fts) const

convert internal structure into the fts

Definition at line 86 of file SteppingHelixStateInfo.cc.

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

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

                                                                        {
  if (isValid()){
    GlobalVector p3GV(p3.x(), p3.y(), p3.z());
    GlobalPoint r3GP(r3.x(), r3.y(), r3.z());
    GlobalTrajectoryParameters tPars(r3GP, p3GV, q, field);
    //    CartesianTrajectoryError tCov(cov);
    //    CurvilinearTrajectoryError tCCov(ROOT::Math::Similarity(JacobianCartesianToCurvilinear(tPars).jacobian(), cov));
    CurvilinearTrajectoryError tCCov(covCurv);
    
    fts = (hasErrorPropagated_ ) 
      ? FreeTrajectoryState(tPars, tCCov) : FreeTrajectoryState(tPars);
    //      ? FreeTrajectoryState(tPars, tCov, tCCov) : FreeTrajectoryState(tPars);
    //    if (fts.hasError()) fts.curvilinearError(); //call it so it gets created
  }
}
TrajectoryStateOnSurface SteppingHelixStateInfo::getStateOnSurface ( const Surface surf,
bool  returnTangentPlane = false 
) const

Definition at line 62 of file SteppingHelixStateInfo.cc.

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

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

                                                                                                                     {
  static const std::string metname = "SteppingHelixPropagator";
  if (! isValid()) LogTrace(metname)<<"Return TSOS is invalid";
  else LogTrace(metname)<<"Return TSOS is valid";
  if (! isValid()) return TrajectoryStateOnSurface();
  GlobalVector p3GV(p3.x(), p3.y(), p3.z());
  GlobalPoint r3GP(r3.x(), r3.y(), r3.z());
  GlobalTrajectoryParameters tPars(r3GP, p3GV, q, field);
  //  CartesianTrajectoryError tCov(cov);

  //  CurvilinearTrajectoryError tCCov(ROOT::Math::Similarity(JacobianCartesianToCurvilinear(tPars).jacobian(), cov));
  CurvilinearTrajectoryError tCCov(covCurv);

  FreeTrajectoryState fts(tPars, tCCov);
  if (! hasErrorPropagated_) fts = FreeTrajectoryState(tPars);


  SurfaceSideDefinition::SurfaceSide side = SurfaceSideDefinition::atCenterOfSurface;
  if ( dir > 0 ) side =  SurfaceSideDefinition::beforeSurface;
  if ( dir < 0 ) side =  SurfaceSideDefinition::afterSurface;
  return TrajectoryStateOnSurface(fts, returnTangentPlane ? *surf.tangentPlane(fts.position()) : surf, side);
}
bool SteppingHelixStateInfo::hasErrorPropagated ( ) const [inline]

Definition at line 72 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 ( void  ) const [inline]
double SteppingHelixStateInfo::radPath ( ) const [inline]
Result SteppingHelixStateInfo::status ( void  ) const [inline]

Definition at line 74 of file SteppingHelixStateInfo.h.

References status_.

{return status_;}

Friends And Related Function Documentation

friend class SteppingHelixPropagator [friend]

Definition at line 36 of file SteppingHelixStateInfo.h.


Member Data Documentation

double SteppingHelixStateInfo::dEdx [protected]
double SteppingHelixStateInfo::dir [protected]
double SteppingHelixStateInfo::path_ [protected]
int SteppingHelixStateInfo::q [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 53 of file SteppingHelixStateInfo.h.

Referenced by SteppingHelixPropagator::propagate().

Definition at line 115 of file SteppingHelixStateInfo.h.

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