Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F11222517
TrajectoryStateOnSurface.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Subscribers
None
TrajectoryStateOnSurface.h
View Options
#ifndef TrajectoryStateOnSurface_H
#define TrajectoryStateOnSurface_H
#include
"TrackingTools/TrajectoryState/interface/BasicTrajectoryState.h"
#include
"TrackingTools/TrajectoryState/interface/SurfaceSideDefinition.h"
#include
"TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
#include
"DataFormats/GeometrySurface/interface/Surface.h"
#include
<iosfwd>
/** As the class name suggests, this class encapsulates the state of a
* trajectory on a surface.
* The class is a reference counting proxy to the actual state, in other words
* it takes no more space than a pointer. Therefore it should be used by value.
*/
class
TrajectoryStateOnSurface
:
private
BasicTrajectoryState
::
Proxy
{
typedef
BasicTrajectoryState
::
Proxy
Base
;
public
:
// construct
TrajectoryStateOnSurface
()
{}
/// Constructor from one of the basic states
TrajectoryStateOnSurface
(
BasicTrajectoryState
*
p
)
:
Base
(
p
)
{}
/** Constructor from FTS and surface. For surfaces with material
* the side of the surface should be specified explicitely.
*/
TrajectoryStateOnSurface
(
const
FreeTrajectoryState
&
fts
,
const
Surface
&
aSurface
,
const
SurfaceSide
side
=
atCenterOfSurface
);
/** Constructor from global parameters and surface. For surfaces with material
* the side of the surface should be specified explicitely.
*/
TrajectoryStateOnSurface
(
const
GlobalTrajectoryParameters
&
gp
,
const
Surface
&
aSurface
,
const
SurfaceSide
side
=
atCenterOfSurface
);
/** Constructor from global parameters, errors and surface. For surfaces
* with material the side of the surface should be specified explicitely.
*/
TrajectoryStateOnSurface
(
const
GlobalTrajectoryParameters
&
gp
,
const
CartesianTrajectoryError
&
err
,
const
Surface
&
aSurface
,
const
SurfaceSide
side
=
atCenterOfSurface
);
/** 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.
*/
TrajectoryStateOnSurface
(
const
GlobalTrajectoryParameters
&
gp
,
const
CurvilinearTrajectoryError
&
err
,
const
Surface
&
aSurface
,
const
SurfaceSide
side
=
atCenterOfSurface
,
double
weight
=
1.
);
/** 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.
*/
TrajectoryStateOnSurface
(
const
GlobalTrajectoryParameters
&
gp
,
const
CurvilinearTrajectoryError
&
err
,
const
Surface
&
aSurface
,
double
weight
);
/** Constructor from local parameters, errors and surface. For surfaces
* with material the side of the surface should be specified explicitely.
*/
TrajectoryStateOnSurface
(
const
LocalTrajectoryParameters
&
p
,
const
Surface
&
aSurface
,
const
MagneticField
*
field
,
const
SurfaceSide
side
=
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.
*/
TrajectoryStateOnSurface
(
const
LocalTrajectoryParameters
&
p
,
const
LocalTrajectoryError
&
err
,
const
Surface
&
aSurface
,
const
MagneticField
*
field
,
const
SurfaceSide
side
=
atCenterOfSurface
,
double
weight
=
1.
);
/** 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.
*/
TrajectoryStateOnSurface
(
const
LocalTrajectoryParameters
&
p
,
const
LocalTrajectoryError
&
err
,
const
Surface
&
aSurface
,
const
MagneticField
*
field
,
double
weight
);
virtual
~
TrajectoryStateOnSurface
()
{}
bool
isValid
()
const
{
return
Base
::
isValid
()
&&
data
().
isValid
();
}
bool
hasError
()
const
{
return
data
().
hasError
();
}
FreeTrajectoryState
*
freeState
(
bool
withErrors
=
true
)
const
{
return
data
().
freeTrajectoryState
();
}
FreeTrajectoryState
*
freeTrajectoryState
(
bool
withErrors
=
true
)
const
{
return
freeState
();
}
const
MagneticField
*
magneticField
()
const
{
return
data
().
magneticField
();
}
const
GlobalTrajectoryParameters
&
globalParameters
()
const
{
return
data
().
globalParameters
();
}
GlobalPoint
globalPosition
()
const
{
return
data
().
globalPosition
();
}
GlobalVector
globalMomentum
()
const
{
return
data
().
globalMomentum
();
}
GlobalVector
globalDirection
()
const
{
return
data
().
globalDirection
();
}
TrackCharge
charge
()
const
{
return
data
().
charge
();
}
double
signedInverseMomentum
()
const
{
return
data
().
signedInverseMomentum
();
}
double
transverseCurvature
()
const
{
return
data
().
transverseCurvature
();
}
const
CartesianTrajectoryError
&
cartesianError
()
const
{
return
data
().
cartesianError
();
}
const
CurvilinearTrajectoryError
&
curvilinearError
()
const
{
return
data
().
curvilinearError
();
}
const
LocalTrajectoryParameters
&
localParameters
()
const
{
return
data
().
localParameters
();
}
LocalPoint
localPosition
()
const
{
return
data
().
localPosition
();
}
LocalVector
localMomentum
()
const
{
return
data
().
localMomentum
();
}
LocalVector
localDirection
()
const
{
return
data
().
localDirection
();
}
const
LocalTrajectoryError
&
localError
()
const
{
return
data
().
localError
();
}
const
Surface
&
surface
()
const
{
return
data
().
surface
();
}
double
weight
()
const
{
return
data
().
weight
();}
void
rescaleError
(
double
factor
)
{
unsharedData
().
rescaleError
(
factor
);
}
std
::
vector
<
TrajectoryStateOnSurface
>
components
()
const
{
return
data
().
components
();
}
/*
std::vector<TrajectoryStateOnSurface> components() const {
std::vector<BasicTrajectoryState::RCPtr> c( data().components());
std::vector<TrajectoryStateOnSurface> result;
result.reserve(c.size());
for (std::vector<BasicTrajectoryState::RCPtr>::iterator i=c.begin();
i != c.end(); i++) result.push_back(&(**i));
return result;
}
*/
/// Position relative to material, defined relative to momentum vector.
SurfaceSide
surfaceSide
()
const
{
return
data
().
surfaceSide
();
}
};
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
TrajectoryStateOnSurface
&
tsos
);
#endif
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Wed, May 14, 12:02 PM (1 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5106626
Default Alt Text
TrajectoryStateOnSurface.h (6 KB)
Attached To
rRAVESVN ravesvn
Event Timeline
Log In to Comment