diff --git a/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/HelperStructs.h b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/HelperStructs.h new file mode 100644 index 0000000000000000000000000000000000000000..f5c5f1d252f10b5e004b726865e2dc221ff22660 --- /dev/null +++ b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/HelperStructs.h @@ -0,0 +1,68 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + */ + +#ifndef TRKEXINTERFACES_HELPERSTRUCTS_H +#define TRKEXINTERFACES_HELPERSTRUCTS_H +namespace Trk { + +struct HitInfo +{ + const Trk::TrackParameters* trackParms; // intersection + float time; // timing + int detID; // sensitive detector id + float deposit; // interaction energy deposit (secondaries subtracted) + + /** + * Constructor + */ + HitInfo( const Trk::TrackParameters* parms, float time, int id, float deposit ) : + trackParms(parms), time(time), detID(id), deposit(deposit) + {} +}; + +struct PathLimit +{ + float x0Max; // path limit after which sampled process occurs + float x0Collected; // x0 traversed so far + float l0Collected; // l0 traversed so far + float weightedZ; // type of material traversed (divide by collected x0 to get average Z) + int process; // type of pre-sampled material process + + /** + * Constructor + */ + PathLimit( float pathLimit, int proc) : + x0Max(pathLimit), x0Collected(0.0), l0Collected(0.0),weightedZ(0.0), process(proc) + {} + + /** + * collected material update + */ + void updateMat( float dX0, float Z, float dL0) { + x0Collected += dX0; weightedZ += dX0*Z; + l0Collected += dL0>0. ? dL0 : dX0/0.37/Z; // use approximation if l0 not available + } +}; + +struct TimeLimit +{ + float tMax; // pre-sampled life-time + float time; // timing + int process; // type of pre-sampled decay process + + /** + * Constructor + */ + TimeLimit( float timeMax, float time, int proc) : + tMax(timeMax), time(time), process(proc) + {} + + /** + * timing update + */ + void updateTime( float dt) { time += dt; } +}; +} + +#endif diff --git a/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/IPropagator.h b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/IPropagator.h index 8cf9f2d3aabc65d03f497ef484cb762d7bca0d19..a789b51e9fb36b87cf12b9b2819c8e5428a0d1ae 100755 --- a/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/IPropagator.h +++ b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/IPropagator.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -17,11 +17,10 @@ #include "TrkParameters/TrackParameters.h" #include "TrkNeutralParameters/NeutralParameters.h" #include "TrkSurfaces/BoundaryCheck.h" -#include "ITimedExtrapolator.h" #include "TrkExUtils/TrackSurfaceIntersection.h" #include "TrkExUtils/ExtrapolationCache.h" #include "TrkExUtils/TargetSurfaces.h" - +#include "HelperStructs.h" // STL #include <utility> diff --git a/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/ITimedExtrapolator.h b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/ITimedExtrapolator.h index e664c4cda18c243ab12bfac452503615ff7a859a..4f666e1d00cf8a2ccf53587ca08aa12bff8cb70c 100755 --- a/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/ITimedExtrapolator.h +++ b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/ITimedExtrapolator.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -17,67 +17,10 @@ #include "TrkParameters/TrackParameters.h" #include "TrkExUtils/MaterialUpdateMode.h" #include "TrkDetDescrUtils/GeometrySignature.h" +#include "HelperStructs.h" #include <utility> namespace Trk { - - struct HitInfo - { - const Trk::TrackParameters* trackParms; // intersection - float time; // timing - int detID; // sensitive detector id - float deposit; // interaction energy deposit (secondaries subtracted) - - /** - * Constructor - */ - HitInfo( const Trk::TrackParameters* parms, float time, int id, float deposit ) : - trackParms(parms), time(time), detID(id), deposit(deposit) - {} - }; - - struct PathLimit - { - float x0Max; // path limit after which sampled process occurs - float x0Collected; // x0 traversed so far - float l0Collected; // l0 traversed so far - float weightedZ; // type of material traversed (divide by collected x0 to get average Z) - int process; // type of pre-sampled material process - - /** - * Constructor - */ - PathLimit( float pathLimit, int proc) : - x0Max(pathLimit), x0Collected(0.0), l0Collected(0.0),weightedZ(0.0), process(proc) - {} - - /** - * collected material update - */ - void updateMat( float dX0, float Z, float dL0) { - x0Collected += dX0; weightedZ += dX0*Z; - l0Collected += dL0>0. ? dL0 : dX0/0.37/Z; // use approximation if l0 not available - } - }; - - struct TimeLimit - { - float tMax; // pre-sampled life-time - float time; // timing - int process; // type of pre-sampled decay process - - /** - * Constructor - */ - TimeLimit( float timeMax, float time, int proc) : - tMax(timeMax), time(time), process(proc) - {} - - /** - * timing update - */ - void updateTime( float dt) { time += dt; } - }; static const InterfaceID IID_ITimedExtrapolator("ITimedExtrapolator", 1, 0); diff --git a/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/ITimedMatEffUpdator.h b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/ITimedMatEffUpdator.h index 8c8cf9a5f60a24ae91df3e27766be205be5449cb..fada940644e74f9fbf46bef084dcd85223bf3056 100755 --- a/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/ITimedMatEffUpdator.h +++ b/Tracking/TrkExtrapolation/TrkExInterfaces/TrkExInterfaces/ITimedMatEffUpdator.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -17,7 +17,7 @@ #include "TrkExUtils/MaterialUpdateMode.h" #include "TrkParameters/TrackParameters.h" #include "TrkDetDescrUtils/GeometrySignature.h" -#include "ITimedExtrapolator.h" +#include "HelperStructs.h" namespace Trk {