CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
BasicTrajectoryState Class Referenceabstract

#include <BasicTrajectoryState.h>

Inheritance diagram for BasicTrajectoryState:
BasicMultiTrajectoryState BasicSingleTrajectoryState

Public Types

typedef BasicTrajectoryState BTSOS
 
using Components = std::vector< TrajectoryStateOnSurface >
 
typedef Proxy::pointer pointer
 
typedef ProxyBase11< BTSOSProxy
 
typedef
SurfaceSideDefinition::SurfaceSide 
SurfaceSide
 
typedef Surface SurfaceType
 

Public Member Functions

 BasicTrajectoryState ()
 
 BasicTrajectoryState (const SurfaceType &aSurface)
 construct invalid trajectory state (without parameters) More...
 
 BasicTrajectoryState (const FreeTrajectoryState &fts, const SurfaceType &aSurface, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
 
 BasicTrajectoryState (const FreeTrajectoryState &fts)
 
 BasicTrajectoryState (const LocalTrajectoryParameters &par, const LocalTrajectoryError &err, const SurfaceType &aSurface, const MagneticField *field, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
 
 BasicTrajectoryState (const LocalTrajectoryParameters &par, const SurfaceType &aSurface, const MagneticField *field, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
 
 BasicTrajectoryState (const GlobalTrajectoryParameters &par, const CartesianTrajectoryError &err, const SurfaceType &aSurface, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
 
 BasicTrajectoryState (const GlobalTrajectoryParameters &par, const CurvilinearTrajectoryError &err, const SurfaceType &aSurface, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
 
 BasicTrajectoryState (const GlobalTrajectoryParameters &par, const SurfaceType &aSurface, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
 
template<typename... Args>
 BasicTrajectoryState (double iweight, Args &&...args)
 
virtual bool canUpdateLocalParameters () const
 
const CartesianTrajectoryError cartesianError () const
 
TrackCharge charge () const
 
virtual pointer clone () const =0
 
virtual Components const & components () const =0
 
const CurvilinearTrajectoryErrorcurvilinearError () const
 
FreeTrajectoryState const * freeTrajectoryState (bool withErrors=true) const
 
GlobalVector globalDirection () const
 
GlobalVector globalMomentum () const
 
const GlobalTrajectoryParametersglobalParameters () const
 
GlobalPoint globalPosition () const
 
bool hasError () const
 
bool isValid () const
 
LocalVector localDirection () const
 
const LocalTrajectoryErrorlocalError () const
 
LocalVector localMomentum () const
 
const LocalTrajectoryParameterslocalParameters () const
 
LocalPoint localPosition () const
 
const MagneticFieldmagneticField () const
 
void rescaleError (double factor)
 
CurvilinearTrajectoryErrorsetCurvilinearError ()
 
double signedInverseMomentum () const
 
virtual bool singleState () const =0
 
const SurfaceTypesurface () const
 
SurfaceSide surfaceSide () const
 Position relative to material, defined relative to momentum vector. More...
 
double transverseCurvature () const
 
virtual void update (const LocalTrajectoryParameters &p, const SurfaceType &aSurface, const MagneticField *field, const SurfaceSide side)
 
virtual void update (const LocalTrajectoryParameters &p, const SurfaceSide side) final
 
virtual void update (double weight, const LocalTrajectoryParameters &p, const LocalTrajectoryError &err, const SurfaceType &aSurface, const MagneticField *field, const SurfaceSide side)
 
virtual void update (const LocalTrajectoryParameters &p, const LocalTrajectoryError &err, const SurfaceSide side) final
 
double weight () const
 
virtual ~BasicTrajectoryState ()
 

Static Public Member Functions

template<typename T , typename... Args>
static std::shared_ptr< BTSOSbuild (Args &&...args)
 
template<typename T , typename... Args>
static std::shared_ptr< BTSOSchurn (Args &&...args)
 

Private Member Functions

void checkCurvilinError () const
 
void createLocalError () const
 
void createLocalErrorFromCurvilinearError () const
 
void createLocalParameters () const
 
void missingError (char const *where) const
 

Static Private Member Functions

static void notValid ()
 

Private Attributes

FreeTrajectoryState theFreeState
 
LocalTrajectoryError theLocalError
 
LocalTrajectoryParameters theLocalParameters
 
bool theLocalParametersValid
 
ConstReferenceCountingPointer
< SurfaceType
theSurfaceP
 
SurfaceSide theSurfaceSide
 
bool theValid
 
double theWeight = 0.
 

Detailed Description

No so Abstract (anyore) base class for TrajectoryState. It is ReferenceCounted.

VI 8/12/2011 content of BasicSingleTrajectoryState moved here.... fully devirtualized

Definition at line 66 of file BasicTrajectoryState.h.

Member Typedef Documentation

Definition at line 68 of file BasicTrajectoryState.h.

Definition at line 282 of file BasicTrajectoryState.h.

Definition at line 70 of file BasicTrajectoryState.h.

Definition at line 69 of file BasicTrajectoryState.h.

Definition at line 71 of file BasicTrajectoryState.h.

Definition at line 72 of file BasicTrajectoryState.h.

Constructor & Destructor Documentation

BasicTrajectoryState::BasicTrajectoryState ( )
inline

Definition at line 76 of file BasicTrajectoryState.h.

BasicTrajectoryState::BasicTrajectoryState ( const SurfaceType aSurface)
explicit

construct invalid trajectory state (without parameters)

Definition at line 39 of file BasicTrajectoryState.cc.

BasicTrajectoryState::~BasicTrajectoryState ( )
virtual

Definition at line 38 of file BasicTrajectoryState.cc.

38 {}
BasicTrajectoryState::BasicTrajectoryState ( const FreeTrajectoryState fts,
const SurfaceType aSurface,
const SurfaceSide  side = SurfaceSideDefinition::atCenterOfSurface 
)
inline

Constructor from FTS and surface. For surfaces with material the side of the surface should be specified explicitely.

Definition at line 98 of file BasicTrajectoryState.h.

101  : theFreeState(fts),
105  theValid(true),
106  theSurfaceSide(side),
107  theSurfaceP(&aSurface),
108  theWeight(1.) {}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
BasicTrajectoryState::BasicTrajectoryState ( const FreeTrajectoryState fts)
inlineexplicit

Constructor from FTS: just a wrapper

Definition at line 112 of file BasicTrajectoryState.h.

113  : theFreeState(fts),
117  theValid(true),
118  theWeight(1.) {}
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
BasicTrajectoryState::BasicTrajectoryState ( const LocalTrajectoryParameters par,
const LocalTrajectoryError err,
const SurfaceType aSurface,
const MagneticField field,
const SurfaceSide  side = SurfaceSideDefinition::atCenterOfSurface 
)

Constructor from local parameters, errors and surface. For surfaces with material the side of the surface should be specified explicitely. For multi-states the weight should be specified explicitely.

Definition at line 68 of file BasicTrajectoryState.cc.

73  : theFreeState(makeFTS(par, aSurface, field)),
74  theLocalError(err),
75  theLocalParameters(par),
77  theValid(true),
78  theSurfaceSide(side),
79  theSurfaceP(&aSurface),
80  theWeight(1.) {}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
BasicTrajectoryState::BasicTrajectoryState ( const LocalTrajectoryParameters par,
const SurfaceType aSurface,
const MagneticField field,
const SurfaceSide  side = SurfaceSideDefinition::atCenterOfSurface 
)
inline

Constructor from local parameters, errors and surface. For surfaces with material the side of the surface should be specified explicitely.

Definition at line 133 of file BasicTrajectoryState.h.

137  : BasicTrajectoryState(par, InvalidError(), aSurface, field, side) {}
BasicTrajectoryState::BasicTrajectoryState ( const GlobalTrajectoryParameters par,
const CartesianTrajectoryError err,
const SurfaceType aSurface,
const SurfaceSide  side = SurfaceSideDefinition::atCenterOfSurface 
)
inline

Constructor from global parameters, errors and surface. For surfaces with material the side of the surface should be specified explicitely.

Definition at line 142 of file BasicTrajectoryState.h.

146  : theFreeState(par, err),
150  theValid(true),
151  theSurfaceSide(side),
152  theSurfaceP(&aSurface),
153  theWeight(1.) {}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
BasicTrajectoryState::BasicTrajectoryState ( const GlobalTrajectoryParameters par,
const CurvilinearTrajectoryError err,
const SurfaceType aSurface,
const SurfaceSide  side = SurfaceSideDefinition::atCenterOfSurface 
)
inline

Constructor from global parameters, errors and surface. For surfaces with material the side of the surface should be specified explicitely. For multi-states the weight should be specified explicitely.

Definition at line 159 of file BasicTrajectoryState.h.

163  : theFreeState(par, err),
167  theValid(true),
168  theSurfaceSide(side),
169  theSurfaceP(&aSurface),
170  theWeight(1.) {}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
BasicTrajectoryState::BasicTrajectoryState ( const GlobalTrajectoryParameters par,
const SurfaceType aSurface,
const SurfaceSide  side = SurfaceSideDefinition::atCenterOfSurface 
)
inline

Constructor from global parameters and surface. For surfaces with material the side of the surface should be specified explicitely.

Definition at line 175 of file BasicTrajectoryState.h.

178  : BasicTrajectoryState(par, InvalidError(), aSurface, side) {}
template<typename... Args>
BasicTrajectoryState::BasicTrajectoryState ( double  iweight,
Args &&...  args 
)
inline

Definition at line 182 of file BasicTrajectoryState.h.

References theWeight.

182  : BasicTrajectoryState(std::forward<Args>(args)...) {
183  theWeight = iweight;
184  }

Member Function Documentation

template<typename T , typename... Args>
static std::shared_ptr<BTSOS> BasicTrajectoryState::build ( Args &&...  args)
inlinestatic

Definition at line 86 of file BasicTrajectoryState.h.

References writedatasetfile::args.

86  {
87  return std::make_shared<T>(std::forward<Args>(args)...);
88  }
virtual bool BasicTrajectoryState::canUpdateLocalParameters ( ) const
inlinevirtual

Reimplemented in BasicMultiTrajectoryState.

Definition at line 257 of file BasicTrajectoryState.h.

257 { return true; }
const CartesianTrajectoryError BasicTrajectoryState::cartesianError ( ) const
inline

Definition at line 197 of file BasicTrajectoryState.h.

References FreeTrajectoryState::cartesianError(), freeTrajectoryState(), hasError(), missingError(), and UNLIKELY.

197  {
198  if UNLIKELY (!hasError()) {
199  missingError(" accesing cartesian error.");
200  return CartesianTrajectoryError();
201  }
202  return freeTrajectoryState(true)->cartesianError();
203  }
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
CartesianTrajectoryError cartesianError() const
void missingError(char const *where) const
#define UNLIKELY(x)
Definition: Likely.h:21
TrackCharge BasicTrajectoryState::charge ( void  ) const
inline

Definition at line 193 of file BasicTrajectoryState.h.

References FreeTrajectoryState::charge(), and theFreeState.

Referenced by PixelTrackBuilder::build().

193 { return theFreeState.charge(); }
TrackCharge charge() const
FreeTrajectoryState theFreeState
void BasicTrajectoryState::checkCurvilinError ( ) const
private

Definition at line 112 of file BasicTrajectoryState.cc.

References createLocalParameters(), globalParameters(), FreeTrajectoryState::hasCurvilinearError(), JacobianLocalToCurvilinear::jacobian(), LIKELY, localParameters(), magneticField(), LocalTrajectoryError::matrix(), FreeTrajectoryState::setCurvilinearError(), surface(), theFreeState, theLocalError, theLocalParametersValid, and UNLIKELY.

Referenced by freeTrajectoryState().

112  {
114  return;
115 
118 
120  const AlgebraicMatrix55& jac = loc2Curv.jacobian();
121  const AlgebraicSymMatrix55& cov = ROOT::Math::Similarity(jac, theLocalError.matrix());
122 
124 
125  verifyLocalErr(theLocalError, theFreeState);
126  verifyCurvErr(cov, theFreeState);
127 }
CurvilinearTrajectoryError & setCurvilinearError()
const MagneticField * magneticField() const
bool hasCurvilinearError() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
#define LIKELY(x)
Definition: Likely.h:20
void createLocalParameters() const
const SurfaceType & surface() const
const GlobalTrajectoryParameters & globalParameters() const
FreeTrajectoryState theFreeState
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const LocalTrajectoryParameters & localParameters() const
#define UNLIKELY(x)
Definition: Likely.h:21
LocalTrajectoryError theLocalError
template<typename T , typename... Args>
static std::shared_ptr<BTSOS> BasicTrajectoryState::churn ( Args &&...  args)
inlinestatic

Definition at line 91 of file BasicTrajectoryState.h.

References writedatasetfile::args.

91  {
92  return std::allocate_shared<T>(churn_allocator<T>(), std::forward<Args>(args)...);
93  }
virtual pointer BasicTrajectoryState::clone ( ) const
pure virtual
virtual Components const& BasicTrajectoryState::components ( ) const
pure virtual
void BasicTrajectoryState::createLocalError ( ) const
private

Definition at line 145 of file BasicTrajectoryState.cc.

References createLocalErrorFromCurvilinearError(), FreeTrajectoryState::hasCurvilinearError(), LIKELY, theFreeState, and theLocalError.

Referenced by localError().

145  {
148  else
150 }
bool hasCurvilinearError() const
#define LIKELY(x)
Definition: Likely.h:20
void createLocalErrorFromCurvilinearError() const
FreeTrajectoryState theFreeState
LocalTrajectoryError theLocalError
void BasicTrajectoryState::createLocalErrorFromCurvilinearError ( ) const
private

Definition at line 152 of file BasicTrajectoryState.cc.

References FreeTrajectoryState::curvilinearError(), globalParameters(), JacobianCurvilinearToLocal::jacobian(), localParameters(), magneticField(), CurvilinearTrajectoryError::matrix(), surface(), theFreeState, and theLocalError.

Referenced by createLocalError().

152  {
154  const AlgebraicMatrix55& jac = curv2Loc.jacobian();
155 
156  theLocalError = ROOT::Math::Similarity(jac, theFreeState.curvilinearError().matrix());
157 
158  verifyCurvErr(theFreeState.curvilinearError(), theFreeState);
159  verifyLocalErr(theLocalError, theFreeState);
160 }
const MagneticField * magneticField() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
const CurvilinearTrajectoryError & curvilinearError() const
const SurfaceType & surface() const
const GlobalTrajectoryParameters & globalParameters() const
FreeTrajectoryState theFreeState
const LocalTrajectoryParameters & localParameters() const
const AlgebraicSymMatrix55 & matrix() const
LocalTrajectoryError theLocalError
void BasicTrajectoryState::createLocalParameters ( ) const
private

Definition at line 130 of file BasicTrajectoryState.cc.

References FreeTrajectoryState::charge(), PV3DBase< T, PVType, FrameType >::mag(), FreeTrajectoryState::momentum(), FreeTrajectoryState::position(), FreeTrajectoryState::signedInverseMomentum(), surface(), theFreeState, theLocalParameters, theLocalParametersValid, GloballyPositioned< T >::toLocal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by checkCurvilinError(), and localParameters().

130  {
133  // believe p.z() never exactly equals 0.
134  bool isCharged = theFreeState.charge() != 0;
136  p.x() / p.z(),
137  p.y() / p.z(),
138  x.x(),
139  x.y(),
140  p.z() > 0. ? 1. : -1.,
141  isCharged);
143 }
T y() const
Definition: PV3DBase.h:60
TrackCharge charge() const
T mag() const
Definition: PV3DBase.h:64
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:61
GlobalVector momentum() const
GlobalPoint position() const
const SurfaceType & surface() const
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
T x() const
Definition: PV3DBase.h:59
double signedInverseMomentum() const
const CurvilinearTrajectoryError& BasicTrajectoryState::curvilinearError ( ) const
inline

Definition at line 204 of file BasicTrajectoryState.h.

References FreeTrajectoryState::curvilinearError(), freeTrajectoryState(), hasError(), missingError(), and UNLIKELY.

Referenced by PixelTrackBuilder::build().

204  {
205  if UNLIKELY (!hasError()) {
206  missingError(" accesing curvilinearerror.");
207  static const CurvilinearTrajectoryError crap;
208  return crap;
209  }
210  return freeTrajectoryState(true)->curvilinearError();
211  }
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
const CurvilinearTrajectoryError & curvilinearError() const
void missingError(char const *where) const
#define UNLIKELY(x)
Definition: Likely.h:21
FreeTrajectoryState const* BasicTrajectoryState::freeTrajectoryState ( bool  withErrors = true) const
inline

Definition at line 213 of file BasicTrajectoryState.h.

References checkCurvilinError(), hasError(), isValid(), notValid(), theFreeState, and UNLIKELY.

Referenced by cartesianError(), and curvilinearError().

213  {
214  if UNLIKELY (!isValid())
215  notValid();
216  if (withErrors && hasError()) { // this is the right thing
218  }
219  return &theFreeState;
220  }
if(conf_.getParameter< bool >("UseStripCablingDB"))
FreeTrajectoryState theFreeState
#define UNLIKELY(x)
Definition: Likely.h:21
GlobalVector BasicTrajectoryState::globalDirection ( ) const
inline

Definition at line 192 of file BasicTrajectoryState.h.

References FreeTrajectoryState::momentum(), theFreeState, and Vector3DBase< T, FrameTag >::unit().

192 { return theFreeState.momentum().unit(); }
GlobalVector momentum() const
Vector3DBase unit() const
Definition: Vector3DBase.h:54
FreeTrajectoryState theFreeState
GlobalVector BasicTrajectoryState::globalMomentum ( ) const
inline

Definition at line 191 of file BasicTrajectoryState.h.

References FreeTrajectoryState::momentum(), and theFreeState.

Referenced by PixelTrackBuilder::build().

191 { return theFreeState.momentum(); }
GlobalVector momentum() const
FreeTrajectoryState theFreeState
const GlobalTrajectoryParameters& BasicTrajectoryState::globalParameters ( void  ) const
inline

Definition at line 189 of file BasicTrajectoryState.h.

References FreeTrajectoryState::parameters(), and theFreeState.

Referenced by checkCurvilinError(), and createLocalErrorFromCurvilinearError().

189 { return theFreeState.parameters(); }
const GlobalTrajectoryParameters & parameters() const
FreeTrajectoryState theFreeState
GlobalPoint BasicTrajectoryState::globalPosition ( ) const
inline

Definition at line 190 of file BasicTrajectoryState.h.

References FreeTrajectoryState::position(), and theFreeState.

Referenced by PixelTrackBuilder::build().

190 { return theFreeState.position(); }
GlobalPoint position() const
FreeTrajectoryState theFreeState
bool BasicTrajectoryState::hasError ( void  ) const
inline
bool BasicTrajectoryState::isValid ( void  ) const
inline
LocalVector BasicTrajectoryState::localDirection ( ) const
inline

Definition at line 234 of file BasicTrajectoryState.h.

References localMomentum(), and Vector3DBase< T, FrameTag >::unit().

234 { return localMomentum().unit(); }
Vector3DBase unit() const
Definition: Vector3DBase.h:54
LocalVector localMomentum() const
const LocalTrajectoryError& BasicTrajectoryState::localError ( ) const
inline

Definition at line 236 of file BasicTrajectoryState.h.

References createLocalError(), hasError(), LocalTrajectoryError::invalid(), missingError(), theLocalError, and UNLIKELY.

236  {
237  if UNLIKELY (!hasError()) {
238  missingError(" accessing local error.");
239  return theLocalError;
240  }
243  return theLocalError;
244  }
void missingError(char const *where) const
#define UNLIKELY(x)
Definition: Likely.h:21
LocalTrajectoryError theLocalError
LocalVector BasicTrajectoryState::localMomentum ( ) const
inline

Definition at line 233 of file BasicTrajectoryState.h.

References localParameters(), and LocalTrajectoryParameters::momentum().

Referenced by localDirection().

233 { return localParameters().momentum(); }
LocalVector momentum() const
Momentum vector in the local frame.
const LocalTrajectoryParameters & localParameters() const
const LocalTrajectoryParameters& BasicTrajectoryState::localParameters ( ) const
inline

Definition at line 225 of file BasicTrajectoryState.h.

References createLocalParameters(), isValid(), notValid(), theLocalParameters, theLocalParametersValid, and UNLIKELY.

Referenced by checkCurvilinError(), createLocalErrorFromCurvilinearError(), localMomentum(), and localPosition().

225  {
226  if UNLIKELY (!isValid())
227  notValid();
231  }
if(conf_.getParameter< bool >("UseStripCablingDB"))
void createLocalParameters() const
LocalTrajectoryParameters theLocalParameters
#define UNLIKELY(x)
Definition: Likely.h:21
LocalPoint BasicTrajectoryState::localPosition ( ) const
inline

Definition at line 232 of file BasicTrajectoryState.h.

References localParameters(), and LocalTrajectoryParameters::position().

232 { return localParameters().position(); }
LocalPoint position() const
Local x and y position coordinates.
const LocalTrajectoryParameters & localParameters() const
const MagneticField* BasicTrajectoryState::magneticField ( ) const
inline
void BasicTrajectoryState::missingError ( char const *  where) const
private

Definition at line 101 of file BasicTrajectoryState.cc.

References LocalTrajectoryError::matrix(), theFreeState, theLocalError, and LocalTrajectoryError::valid().

Referenced by cartesianError(), curvilinearError(), localError(), and rescaleError().

101  {
102  std::stringstream form;
103  form << "BasicTrajectoryState: attempt to access errors when none available " << where
104  << ".\nfreestate pointer: " << theFreeState << "\nlocal error valid/values :" << theLocalError.valid() << "\n"
105  << theLocalError.matrix();
106 
107  edm::LogWarning("BasicTrajectoryState") << form.str();
108 
109  // throw TrajectoryStateException(form.str());
110 }
const AlgebraicSymMatrix55 & matrix() const
FreeTrajectoryState theFreeState
Log< level::Warning, false > LogWarning
LocalTrajectoryError theLocalError
void BasicTrajectoryState::notValid ( )
staticprivate

Definition at line 82 of file BasicTrajectoryState.cc.

Referenced by freeTrajectoryState(), and localParameters().

82  {
83  throw TrajectoryStateException("TrajectoryStateOnSurface is invalid and cannot return any parameters");
84 }
void BasicTrajectoryState::rescaleError ( double  factor)

Definition at line 220 of file BasicTrajectoryState.cc.

References hasError(), mps_fire::i, dqmiolumiharvest::j, magneticField(), LocalTrajectoryError::matrix(), missingError(), MagneticField::nominalValue(), FreeTrajectoryState::rescaleError(), theFreeState, theLocalError, UNLIKELY, and LocalTrajectoryError::valid().

220  {
221  if UNLIKELY (!hasError())
222  missingError(" trying to rescale");
223  theFreeState.rescaleError(factor);
224 
225  if (theLocalError.valid()) {
226  //do it by hand if the free state is not around.
227  bool zeroField = (magneticField()->nominalValue() == 0);
228  if UNLIKELY (zeroField) {
230  //scale the 0 indexed covariance by the square root of the factor
231  for (unsigned int i = 1; i != 5; ++i)
232  errors(i, 0) *= factor;
233  double factor_squared = factor * factor;
234  //scale all others by the scaled factor
235  for (unsigned int i = 1; i != 5; ++i)
236  for (unsigned int j = i; j != 5; ++j)
237  errors(i, j) *= factor_squared;
238  //term 0,0 is not scaled at all
240  } else
241  theLocalError *= (factor * factor);
242  }
243 }
const MagneticField * magneticField() const
int nominalValue() const
The nominal field value for this map in kGauss.
Definition: MagneticField.h:49
void rescaleError(double factor)
if(conf_.getParameter< bool >("UseStripCablingDB"))
const AlgebraicSymMatrix55 & matrix() const
FreeTrajectoryState theFreeState
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
void missingError(char const *where) const
#define UNLIKELY(x)
Definition: Likely.h:21
LocalTrajectoryError theLocalError
CurvilinearTrajectoryError& BasicTrajectoryState::setCurvilinearError ( )
inline

Definition at line 279 of file BasicTrajectoryState.h.

References FreeTrajectoryState::setCurvilinearError(), and theFreeState.

279 { return theFreeState.setCurvilinearError(); }
FreeTrajectoryState theFreeState
CurvilinearTrajectoryError & setCurvilinearError()
double BasicTrajectoryState::signedInverseMomentum ( ) const
inline

Definition at line 194 of file BasicTrajectoryState.h.

References FreeTrajectoryState::signedInverseMomentum(), and theFreeState.

FreeTrajectoryState theFreeState
double signedInverseMomentum() const
virtual bool BasicTrajectoryState::singleState ( ) const
pure virtual
const SurfaceType& BasicTrajectoryState::surface ( ) const
inline

Definition at line 246 of file BasicTrajectoryState.h.

References theSurfaceP.

Referenced by checkCurvilinError(), createLocalErrorFromCurvilinearError(), createLocalParameters(), and update().

246 { return *theSurfaceP; }
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
SurfaceSide BasicTrajectoryState::surfaceSide ( ) const
inline

Position relative to material, defined relative to momentum vector.

Definition at line 253 of file BasicTrajectoryState.h.

References theSurfaceSide.

253 { return theSurfaceSide; }
double BasicTrajectoryState::transverseCurvature ( ) const
inline

Definition at line 195 of file BasicTrajectoryState.h.

References theFreeState, and FreeTrajectoryState::transverseCurvature().

195 { return theFreeState.transverseCurvature(); }
FreeTrajectoryState theFreeState
double transverseCurvature() const
void BasicTrajectoryState::update ( const LocalTrajectoryParameters p,
const SurfaceType aSurface,
const MagneticField field,
const SurfaceSide  side 
)
virtual

Reimplemented in BasicMultiTrajectoryState.

Definition at line 173 of file BasicTrajectoryState.cc.

References AlCaHLTBitMon_ParallelJobs::p, theFreeState, theLocalError, theLocalParameters, theLocalParametersValid, theSurfaceP, theSurfaceSide, theValid, and theWeight.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), BasicMultiTrajectoryState::combine(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

176  {
178  if (&aSurface != &*theSurfaceP)
179  theSurfaceP.reset(&aSurface);
180  theSurfaceSide = side;
181  theWeight = 1.0;
183  theFreeState = makeFTS(p, aSurface, field);
184 
185  theValid = true;
187 }
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
void BasicTrajectoryState::update ( const LocalTrajectoryParameters p,
const SurfaceSide  side 
)
finalvirtual

Definition at line 163 of file BasicTrajectoryState.cc.

References magneticField(), GlobalTrajectoryParameters::magneticFieldInTesla(), AlCaHLTBitMon_ParallelJobs::p, FreeTrajectoryState::parameters(), surface(), theFreeState, theLocalError, theLocalParameters, theLocalParametersValid, theSurfaceSide, and theValid.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

163  {
165  theSurfaceSide = side;
168 
169  theValid = true;
171 }
const MagneticField * magneticField() const
const GlobalTrajectoryParameters & parameters() const
GlobalVector magneticFieldInTesla() const
const SurfaceType & surface() const
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
void BasicTrajectoryState::update ( double  weight,
const LocalTrajectoryParameters p,
const LocalTrajectoryError err,
const SurfaceType aSurface,
const MagneticField field,
const SurfaceSide  side 
)
virtual

Reimplemented in BasicMultiTrajectoryState.

Definition at line 189 of file BasicTrajectoryState.cc.

References submitPVValidationJobs::err, AlCaHLTBitMon_ParallelJobs::p, theFreeState, theLocalError, theLocalParameters, theLocalParametersValid, theSurfaceP, theSurfaceSide, theValid, theWeight, and weight().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

194  {
196  theLocalError = err;
197  if (&aSurface != &*theSurfaceP)
198  theSurfaceP.reset(&aSurface);
199  theSurfaceSide = side;
200  theWeight = weight;
201  theFreeState = makeFTS(p, aSurface, field);
202 
203  theValid = true;
205 }
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
void BasicTrajectoryState::update ( const LocalTrajectoryParameters p,
const LocalTrajectoryError err,
const SurfaceSide  side 
)
finalvirtual

Definition at line 207 of file BasicTrajectoryState.cc.

References submitPVValidationJobs::err, magneticField(), GlobalTrajectoryParameters::magneticFieldInTesla(), AlCaHLTBitMon_ParallelJobs::p, FreeTrajectoryState::parameters(), surface(), theFreeState, theLocalError, theLocalParameters, theLocalParametersValid, theSurfaceSide, and theValid.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

209  {
211  theLocalError = err;
212  theSurfaceSide = side;
215 
216  theValid = true;
218 }
const MagneticField * magneticField() const
const GlobalTrajectoryParameters & parameters() const
GlobalVector magneticFieldInTesla() const
const SurfaceType & surface() const
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
double BasicTrajectoryState::weight ( ) const
inline

Definition at line 248 of file BasicTrajectoryState.h.

References theWeight.

Referenced by BasicMultiTrajectoryState::combine(), and update().

248 { return theWeight; }

Member Data Documentation

FreeTrajectoryState BasicTrajectoryState::theFreeState
mutableprivate
LocalTrajectoryError BasicTrajectoryState::theLocalError
mutableprivate
LocalTrajectoryParameters BasicTrajectoryState::theLocalParameters
mutableprivate

Definition at line 304 of file BasicTrajectoryState.h.

Referenced by createLocalParameters(), localParameters(), and update().

bool BasicTrajectoryState::theLocalParametersValid
mutableprivate
ConstReferenceCountingPointer<SurfaceType> BasicTrajectoryState::theSurfaceP
private

Definition at line 310 of file BasicTrajectoryState.h.

Referenced by surface(), and update().

SurfaceSide BasicTrajectoryState::theSurfaceSide
private

Definition at line 309 of file BasicTrajectoryState.h.

Referenced by surfaceSide(), and update().

bool BasicTrajectoryState::theValid
mutableprivate

Definition at line 307 of file BasicTrajectoryState.h.

Referenced by isValid(), and update().

double BasicTrajectoryState::theWeight = 0.
private

Definition at line 312 of file BasicTrajectoryState.h.

Referenced by BasicTrajectoryState(), update(), and weight().