CMS 3D CMS Logo

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

#include <BasicTrajectoryState.h>

Inheritance diagram for BasicTrajectoryState:
ReferenceCountedPoolAllocated BlockWipedPoolAllocated GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO >

Public Types

typedef BasicTrajectoryState BTSOS
 
typedef ProxyBase< BTSOS,
CopyUsingClone< BTSOS > > 
Proxy
 
typedef
ReferenceCountingPointer
< BasicTrajectoryState
RCPtr
 
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 GlobalTrajectoryParameters &par, const SurfaceType &aSurface, 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, double weight=1.)
 
 BasicTrajectoryState (const GlobalTrajectoryParameters &par, const CurvilinearTrajectoryError &err, const SurfaceType &aSurface, double weight)
 
 BasicTrajectoryState (const LocalTrajectoryParameters &par, const SurfaceType &aSurface, const MagneticField *field, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
 
 BasicTrajectoryState (const LocalTrajectoryParameters &par, const LocalTrajectoryError &err, const SurfaceType &aSurface, const MagneticField *field, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface, double weight=1.)
 
 BasicTrajectoryState (const LocalTrajectoryParameters &par, const LocalTrajectoryError &err, const SurfaceType &aSurface, const MagneticField *field, double weight)
 
virtual bool canUpdateLocalParameters () const
 
const CartesianTrajectoryError cartesianError () const
 
TrackCharge charge () const
 
virtual BasicTrajectoryStateclone () const =0
 
virtual std::vector
< TrajectoryStateOnSurface
components () const
 
const CurvilinearTrajectoryErrorcurvilinearError () const
 
FreeTrajectoryStatefreeTrajectoryState (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)
 
double signedInverseMomentum () const
 
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 LocalTrajectoryError &err, const SurfaceType &aSurface, const MagneticField *field, const SurfaceSide side, double weight)
 
double weight () const
 
virtual ~BasicTrajectoryState ()
 
- Public Member Functions inherited from ReferenceCountedPoolAllocated
void addReference () const
 
const
ReferenceCountedPoolAllocated
operator= (const ReferenceCountedPoolAllocated &)
 
 ReferenceCountedPoolAllocated ()
 
 ReferenceCountedPoolAllocated (const ReferenceCountedPoolAllocated &iRHS)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~ReferenceCountedPoolAllocated ()
 
- Public Member Functions inherited from BlockWipedPoolAllocated
virtual ~BlockWipedPoolAllocated ()
 

Private Member Functions

void checkCurvilinError () const
 
void createLocalError () const
 
void createLocalErrorFromCurvilinearError () const dso_internal
 
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
 

Friends

class ProxyBase< BTSOS, CopyUsingClone< BTSOS > >
 
class ReferenceCountingPointer< BasicTrajectoryState >
 

Additional Inherited Members

- Static Public Member Functions inherited from BlockWipedPoolAllocated
static BlockWipedAllocatorallocator (size_t s)
 
static void operator delete (void *p, size_t s)
 
static void * operator new (size_t s, void *p)
 
static void * operator new (size_t s)
 
static BlockWipedAllocator::Stat stat (size_t s)
 
static void usePool ()
 
- Static Public Attributes inherited from ReferenceCountedPoolAllocated
static int s_alive =0
 
static int s_referenced =0
 
- Static Public Attributes inherited from BlockWipedPoolAllocated
static int s_alive =0
 
static bool s_usePool =false
 

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 79 of file BasicTrajectoryState.h.

Member Typedef Documentation

Definition at line 82 of file BasicTrajectoryState.h.

Definition at line 83 of file BasicTrajectoryState.h.

Definition at line 84 of file BasicTrajectoryState.h.

Definition at line 85 of file BasicTrajectoryState.h.

Definition at line 86 of file BasicTrajectoryState.h.

Constructor & Destructor Documentation

BasicTrajectoryState::BasicTrajectoryState ( )
inline

Definition at line 94 of file BasicTrajectoryState.h.

BasicTrajectoryState::BasicTrajectoryState ( const SurfaceType aSurface)
explicit

construct invalid trajectory state (without parameters)

Definition at line 176 of file BasicTrajectoryState.cc.

BasicTrajectoryState::~BasicTrajectoryState ( )
virtual

Definition at line 40 of file BasicTrajectoryState.cc.

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

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

Definition at line 55 of file BasicTrajectoryState.cc.

57  :
58  theFreeState(fts),
62  theValid(true),
63  theSurfaceSide(side),
64  theSurfaceP( &aSurface),
65  theWeight(1.)
66 {}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
BasicTrajectoryState::BasicTrajectoryState ( const GlobalTrajectoryParameters par,
const SurfaceType aSurface,
const SurfaceSide  side = SurfaceSideDefinition::atCenterOfSurface 
)

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

Definition at line 69 of file BasicTrajectoryState.cc.

71  :
72  theFreeState(par),
76  theValid(true),
77  theSurfaceSide(side),
78  theSurfaceP( &aSurface),
79  theWeight(1.)
80 {}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
BasicTrajectoryState::BasicTrajectoryState ( const GlobalTrajectoryParameters par,
const CartesianTrajectoryError err,
const SurfaceType aSurface,
const SurfaceSide  side = SurfaceSideDefinition::atCenterOfSurface 
)

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

Definition at line 83 of file BasicTrajectoryState.cc.

86  :
87  theFreeState(par, err),
91  theValid(true),
92  theSurfaceSide(side),
93  theSurfaceP( &aSurface),
94  theWeight(1.)
95 {}
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,
double  weight = 1. 
)

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 98 of file BasicTrajectoryState.cc.

102  :
103  theFreeState(par, err),
107  theValid(true),
108  theSurfaceSide(side),
109  theSurfaceP( &aSurface),
111 {}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
BasicTrajectoryState::BasicTrajectoryState ( const GlobalTrajectoryParameters par,
const CurvilinearTrajectoryError err,
const SurfaceType aSurface,
double  weight 
)

Constructor from global parameters, errors and surface. For multi-states the weight should be specified explicitely. For backward compatibility without specification of the side of the surface.

Definition at line 114 of file BasicTrajectoryState.cc.

117  :
118  theFreeState(par, err),
122  theValid(true),
124  theSurfaceP( &aSurface),
126 {}
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 
)

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

Definition at line 129 of file BasicTrajectoryState.cc.

132  :
133  theFreeState(makeFTS(par,aSurface,field)),
135  theLocalParameters(par),
137  theValid(true),
138  theSurfaceSide(side),
139  theSurfaceP( &aSurface),
140  theWeight(1.)
141 {}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
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,
double  weight = 1. 
)

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 144 of file BasicTrajectoryState.cc.

149  :
150  theFreeState(makeFTS(par,aSurface,field)),
151  theLocalError(err),
152  theLocalParameters(par),
154  theValid(true),
155  theSurfaceSide(side),
156  theSurfaceP( &aSurface),
158 {}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
BasicTrajectoryState::BasicTrajectoryState ( const LocalTrajectoryParameters par,
const LocalTrajectoryError err,
const SurfaceType aSurface,
const MagneticField field,
double  weight 
)

Constructor from local parameters, errors and surface. For multi-states the weight should be specified explicitely. For backward compatibility without specification of the side of the surface.

Definition at line 161 of file BasicTrajectoryState.cc.

165  :
166  theFreeState(makeFTS(par,aSurface,field)),
167  theLocalError(err),
168  theLocalParameters(par),
170  theValid(true),
172  theSurfaceP( &aSurface),
173  theWeight(weight){}
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError

Member Function Documentation

virtual bool BasicTrajectoryState::canUpdateLocalParameters ( ) const
inlinevirtual

Reimplemented in GCC11_FINAL< T, TOPO >.

Definition at line 268 of file BasicTrajectoryState.h.

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

Definition at line 191 of file BasicTrajectoryState.h.

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

191  {
192  if unlikely(!hasError()) {
193  missingError(" accesing cartesian error.");
194  return CartesianTrajectoryError();
195  }
196  return freeTrajectoryState(true)->cartesianError();
197  }
FreeTrajectoryState * freeTrajectoryState(bool withErrors=true) const
CartesianTrajectoryError cartesianError() const
#define unlikely(x)
Definition: Likely.h:21
void missingError(char const *where) const
TrackCharge BasicTrajectoryState::charge ( void  ) const
inline

Definition at line 181 of file BasicTrajectoryState.h.

References FreeTrajectoryState::charge(), and theFreeState.

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

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

220  {
222 
224 
226  const AlgebraicMatrix55& jac = loc2Curv.jacobian();
227  const AlgebraicSymMatrix55 &cov = ROOT::Math::Similarity(jac, theLocalError.matrix());
228 
229  theFreeState.setCurvilinearError( cov );
230 
231  verifyLocalErr(theLocalError);
232  verifyCurvErr(cov);
233 }
const MagneticField * magneticField() const
bool hasCurvilinearError() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
#define unlikely(x)
Definition: Likely.h:21
void createLocalParameters() const
const SurfaceType & surface() const
const GlobalTrajectoryParameters & globalParameters() const
FreeTrajectoryState theFreeState
string const
Definition: compareJSON.py:14
const LocalTrajectoryParameters & localParameters() const
#define likely(x)
Definition: Likely.h:20
LocalTrajectoryError theLocalError
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
virtual BasicTrajectoryState* BasicTrajectoryState::clone ( ) const
pure virtual

Implemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

std::vector< TrajectoryStateOnSurface > BasicTrajectoryState::components ( ) const
virtual
void BasicTrajectoryState::createLocalError ( ) const
private

Definition at line 249 of file BasicTrajectoryState.cc.

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

Referenced by localError().

249  {
252  else theLocalError = InvalidError();
253 }
void createLocalErrorFromCurvilinearError() const dso_internal
bool hasCurvilinearError() const
FreeTrajectoryState theFreeState
#define likely(x)
Definition: Likely.h:20
LocalTrajectoryError theLocalError
void BasicTrajectoryState::createLocalErrorFromCurvilinearError ( ) const
private

Definition at line 256 of file BasicTrajectoryState.cc.

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

Referenced by createLocalError().

256  {
257 
259  const AlgebraicMatrix55& jac = curv2Loc.jacobian();
260 
261  const AlgebraicSymMatrix55 &cov =
262  ROOT::Math::Similarity(jac, theFreeState.curvilinearError().matrix());
263  // cout<<"Clocal via curvilinear error"<<endl;
265 
266  verifyCurvErr(theFreeState.curvilinearError());
267  verifyLocalErr(theLocalError);
268 
269 }
const MagneticField * magneticField() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const CurvilinearTrajectoryError & curvilinearError() const
const SurfaceType & surface() const
const GlobalTrajectoryParameters & globalParameters() const
FreeTrajectoryState theFreeState
const LocalTrajectoryParameters & localParameters() const
const AlgebraicSymMatrix55 & matrix() const
LocalTrajectoryError theLocalError
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
void BasicTrajectoryState::createLocalParameters ( ) const
private

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

238  {
241 // believe p.z() never exactly equals 0.
242  bool isCharged = theFreeState.charge()!=0;
245  p.x()/p.z(), p.y()/p.z(), x.x(), x.y(), p.z()>0. ? 1.:-1., isCharged);
247 }
T y() const
Definition: PV3DBase.h:63
TrackCharge charge() const
T mag() const
Definition: PV3DBase.h:67
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:64
GlobalVector momentum() const
GlobalPoint position() const
const SurfaceType & surface() const
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
Definition: DDAxes.h:10
T x() const
Definition: PV3DBase.h:62
double signedInverseMomentum() const
const CurvilinearTrajectoryError& BasicTrajectoryState::curvilinearError ( ) const
inline

Definition at line 198 of file BasicTrajectoryState.h.

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

198  {
199  if unlikely(!hasError()) {
200  missingError(" accesing curvilinearerror.");
201  static CurvilinearTrajectoryError crap;
202  return crap;
203  }
204  return freeTrajectoryState(true)->curvilinearError();
205  }
FreeTrajectoryState * freeTrajectoryState(bool withErrors=true) const
const CurvilinearTrajectoryError & curvilinearError() const
#define unlikely(x)
Definition: Likely.h:21
void missingError(char const *where) const
FreeTrajectoryState* BasicTrajectoryState::freeTrajectoryState ( bool  withErrors = true) const
inline

Definition at line 209 of file BasicTrajectoryState.h.

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

Referenced by cartesianError(), and curvilinearError().

209  {
210  if unlikely(!isValid()) notValid();
211  if(withErrors && hasError()) { // this is the right thing
213  }
214  return &theFreeState;
215  }
#define unlikely(x)
Definition: Likely.h:21
FreeTrajectoryState theFreeState
if(dp >Float(M_PI)) dp-
GlobalVector BasicTrajectoryState::globalDirection ( ) const
inline

Definition at line 178 of file BasicTrajectoryState.h.

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

178  {
179  return theFreeState.momentum().unit();
180  }
GlobalVector momentum() const
Vector3DBase unit() const
Definition: Vector3DBase.h:57
FreeTrajectoryState theFreeState
GlobalVector BasicTrajectoryState::globalMomentum ( ) const
inline

Definition at line 175 of file BasicTrajectoryState.h.

References FreeTrajectoryState::momentum(), and theFreeState.

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

Definition at line 169 of file BasicTrajectoryState.h.

References FreeTrajectoryState::parameters(), and theFreeState.

Referenced by checkCurvilinError(), and createLocalErrorFromCurvilinearError().

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

Definition at line 172 of file BasicTrajectoryState.h.

References FreeTrajectoryState::position(), and theFreeState.

172  {
173  return theFreeState.position();
174  }
GlobalPoint position() const
FreeTrajectoryState theFreeState
bool BasicTrajectoryState::hasError ( void  ) const
inline
bool BasicTrajectoryState::isValid ( void  ) const
inline

Definition at line 165 of file BasicTrajectoryState.h.

References theValid.

Referenced by freeTrajectoryState(), and localParameters().

165 { return theValid; }
LocalVector BasicTrajectoryState::localDirection ( ) const
inline

Definition at line 233 of file BasicTrajectoryState.h.

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

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

Definition at line 237 of file BasicTrajectoryState.h.

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

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

Definition at line 230 of file BasicTrajectoryState.h.

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

Referenced by localDirection().

230  {
231  return localParameters().momentum();
232  }
LocalVector momentum() const
Momentum vector in the local frame.
const LocalTrajectoryParameters & localParameters() const
const LocalTrajectoryParameters& BasicTrajectoryState::localParameters ( ) const
inline
LocalPoint BasicTrajectoryState::localPosition ( ) const
inline

Definition at line 227 of file BasicTrajectoryState.h.

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

227  {
228  return localParameters().position();
229  }
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 206 of file BasicTrajectoryState.cc.

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

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

206  {
207  std::stringstream form;
208  form<<"BasicTrajectoryState: attempt to access errors when none available "
209  <<where<<".\nfreestate pointer: " <<theFreeState
210  <<"\nlocal error valid/values :"<< theLocalError.valid() << "\n"
211  << theLocalError.matrix();
212 
213  edm::LogWarning("BasicTrajectoryState") << form.str();
214 
215  // throw TrajectoryStateException(form.str());
216 }
const AlgebraicSymMatrix55 & matrix() const
FreeTrajectoryState theFreeState
LocalTrajectoryError theLocalError
void BasicTrajectoryState::notValid ( )
staticprivate

Definition at line 188 of file BasicTrajectoryState.cc.

Referenced by freeTrajectoryState(), and localParameters().

188  {
189  throw TrajectoryStateException("TrajectoryStateOnSurface is invalid and cannot return any parameters");
190 }
void BasicTrajectoryState::rescaleError ( double  factor)

Definition at line 309 of file BasicTrajectoryState.cc.

References benchmark_cfg::errors, hasError(), i, j, magneticField(), LocalTrajectoryError::matrix(), missingError(), MagneticField::nominalValue(), FreeTrajectoryState::rescaleError(), theFreeState, theLocalError, unlikely, and LocalTrajectoryError::valid().

309  {
310  if unlikely(!hasError()) missingError(" trying to rescale");
311  theFreeState.rescaleError(factor);
312 
313  if (theLocalError.valid()){
314  //do it by hand if the free state is not around.
315  bool zeroField = (magneticField()->nominalValue()==0);
316  if unlikely(zeroField){
318  //scale the 0 indexed covariance by the square root of the factor
319  for (unsigned int i=1;i!=5;++i) errors(i,0)*=factor;
320  double factor_squared=factor*factor;
321  //scale all others by the scaled factor
322  for (unsigned int i=1;i!=5;++i) for (unsigned int j=i;j!=5;++j) errors(i,j)*=factor_squared;
323  //term 0,0 is not scaled at all
325  }
326  else theLocalError *= (factor*factor);
327  }
328 }
int i
Definition: DBlmapReader.cc:9
const MagneticField * magneticField() const
int nominalValue() const
The nominal field value for this map in kGauss.
Definition: MagneticField.h:57
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
void rescaleError(double factor)
#define unlikely(x)
Definition: Likely.h:21
int j
Definition: DBlmapReader.cc:9
const AlgebraicSymMatrix55 & matrix() const
FreeTrajectoryState theFreeState
void missingError(char const *where) const
if(dp >Float(M_PI)) dp-
LocalTrajectoryError theLocalError
double BasicTrajectoryState::signedInverseMomentum ( ) const
inline

Definition at line 184 of file BasicTrajectoryState.h.

References FreeTrajectoryState::signedInverseMomentum(), and theFreeState.

184  {
186  }
FreeTrajectoryState theFreeState
double signedInverseMomentum() const
const SurfaceType& BasicTrajectoryState::surface ( ) const
inline

Definition at line 246 of file BasicTrajectoryState.h.

References theSurfaceP.

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

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

Position relative to material, defined relative to momentum vector.

Definition at line 257 of file BasicTrajectoryState.h.

References theSurfaceSide.

257  {
258  return theSurfaceSide;
259  }
double BasicTrajectoryState::transverseCurvature ( ) const
inline

Definition at line 187 of file BasicTrajectoryState.h.

References theFreeState, and FreeTrajectoryState::transverseCurvature().

187  {
189  }
FreeTrajectoryState theFreeState
double transverseCurvature() const
void BasicTrajectoryState::update ( const LocalTrajectoryParameters p,
const SurfaceType aSurface,
const MagneticField field,
const SurfaceSide  side 
)
virtual

Reimplemented in GCC11_FINAL< T, TOPO >.

Definition at line 273 of file BasicTrajectoryState.cc.

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

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

277 {
279  if (&aSurface != &*theSurfaceP) theSurfaceP.reset(&aSurface);
280  theSurfaceSide = side;
281  theWeight = 1.0;
283  theFreeState=makeFTS(p,aSurface,field);
284 
285  theValid = true;
287 }
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
void BasicTrajectoryState::update ( const LocalTrajectoryParameters p,
const LocalTrajectoryError err,
const SurfaceType aSurface,
const MagneticField field,
const SurfaceSide  side,
double  weight 
)
virtual

Reimplemented in GCC11_FINAL< T, TOPO >.

Definition at line 290 of file BasicTrajectoryState.cc.

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

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

296 {
298  theLocalError = err;
299  if (&aSurface != &*theSurfaceP) theSurfaceP.reset(&aSurface);
300  theSurfaceSide = side;
301  theWeight = weight;
302  theFreeState=makeFTS(p,aSurface,field);
303 
304  theValid = true;
306 }
ConstReferenceCountingPointer< SurfaceType > theSurfaceP
FreeTrajectoryState theFreeState
LocalTrajectoryParameters theLocalParameters
LocalTrajectoryError theLocalError
double BasicTrajectoryState::weight ( void  ) const
inline

Friends And Related Function Documentation

friend class ProxyBase< BTSOS, CopyUsingClone< BTSOS > >
friend

Definition at line 89 of file BasicTrajectoryState.h.

Definition at line 90 of file BasicTrajectoryState.h.

Member Data Documentation

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

Definition at line 306 of file BasicTrajectoryState.h.

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

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

Definition at line 313 of file BasicTrajectoryState.h.

Referenced by surface(), and update().

SurfaceSide BasicTrajectoryState::theSurfaceSide
private

Definition at line 312 of file BasicTrajectoryState.h.

Referenced by surfaceSide(), and update().

bool BasicTrajectoryState::theValid
mutableprivate

Definition at line 309 of file BasicTrajectoryState.h.

Referenced by isValid(), and update().

double BasicTrajectoryState::theWeight
private

Definition at line 315 of file BasicTrajectoryState.h.

Referenced by update(), and weight().