Skip to content
Snippets Groups Projects
Commit a7f7e204 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'remove_unneeded_include' into 'master'

Prefer not to include interfaces from one to another as such. Factor out the part that is needed

See merge request atlas/athena!14747
parents bd07e9cd b0dd5104
No related branches found
No related tags found
No related merge requests found
/*
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
/* /*
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 @@ ...@@ -17,11 +17,10 @@
#include "TrkParameters/TrackParameters.h" #include "TrkParameters/TrackParameters.h"
#include "TrkNeutralParameters/NeutralParameters.h" #include "TrkNeutralParameters/NeutralParameters.h"
#include "TrkSurfaces/BoundaryCheck.h" #include "TrkSurfaces/BoundaryCheck.h"
#include "ITimedExtrapolator.h"
#include "TrkExUtils/TrackSurfaceIntersection.h" #include "TrkExUtils/TrackSurfaceIntersection.h"
#include "TrkExUtils/ExtrapolationCache.h" #include "TrkExUtils/ExtrapolationCache.h"
#include "TrkExUtils/TargetSurfaces.h" #include "TrkExUtils/TargetSurfaces.h"
#include "HelperStructs.h"
// STL // STL
#include <utility> #include <utility>
......
/* /*
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 @@ ...@@ -17,67 +17,10 @@
#include "TrkParameters/TrackParameters.h" #include "TrkParameters/TrackParameters.h"
#include "TrkExUtils/MaterialUpdateMode.h" #include "TrkExUtils/MaterialUpdateMode.h"
#include "TrkDetDescrUtils/GeometrySignature.h" #include "TrkDetDescrUtils/GeometrySignature.h"
#include "HelperStructs.h"
#include <utility> #include <utility>
namespace Trk { 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); static const InterfaceID IID_ITimedExtrapolator("ITimedExtrapolator", 1, 0);
......
/* /*
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 @@ ...@@ -17,7 +17,7 @@
#include "TrkExUtils/MaterialUpdateMode.h" #include "TrkExUtils/MaterialUpdateMode.h"
#include "TrkParameters/TrackParameters.h" #include "TrkParameters/TrackParameters.h"
#include "TrkDetDescrUtils/GeometrySignature.h" #include "TrkDetDescrUtils/GeometrySignature.h"
#include "ITimedExtrapolator.h" #include "HelperStructs.h"
namespace Trk { namespace Trk {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment