00001
00002 #ifndef TRACKFIRSTCLEVEREXTRAPOLATOR_H
00003 #define TRACKFIRSTCLEVEREXTRAPOLATOR_H 1
00004
00005
00006 #include "TrackExtrapolators/TrackExtrapolator.h"
00007
00008
00009 #include "TrackTransportStep.h"
00010
00026 class TrackFirstCleverExtrapolator: public TrackExtrapolator
00027 {
00028
00029 public:
00031 TrackFirstCleverExtrapolator( const std::string& type,
00032 const std::string& name,
00033 const IInterface* parent);
00034
00036 virtual ~TrackFirstCleverExtrapolator();
00037
00039 virtual StatusCode initialize();
00040
00042 virtual StatusCode propagate(State& state, double zNew = 0,
00043 ParticleID partId = ParticleID(211));
00044
00045 private:
00046
00048 StatusCode createTransportSteps( double zStart,
00049 double zTarget,
00050 std::list<TrackTransportStep>& transList);
00051
00053 StatusCode thinScatter( State& state ,
00054 double radLength);
00055
00057 StatusCode thickScatter( State& state ,
00058 double tWall,
00059 double radLength);
00060
00062 StatusCode energyLoss( State& state,
00063 double tWall,
00064 const Material* aMaterial);
00065
00067 StatusCode electronEnergyLoss( State& state,
00068 double radLength);
00069
00071 ITrackExtrapolator* chooseMagFieldExtrapolator( const double zStart,
00072 const double zTarget);
00073
00074 bool m_upStream;
00075 int m_particleType;
00076 double m_tMax ;
00077 double m_eMax;
00078
00080 double m_zFieldStart;
00081 double m_zFieldStop;
00082 double m_shortDist;
00083
00085 std::string m_freeFieldExtrapolatorName;
00087 std::string m_shortFieldExtrapolatorName;
00089 std::string m_longFieldExtrapolatorName;
00090
00091 bool m_applyMultScattCorr;
00092 double m_fms2;
00093 double m_thickWall;
00094 bool m_applyEnergyLossCorr;
00095 double m_energyLoss;
00096 double m_maxStepSize;
00097 double m_minRadThreshold;
00098
00100 bool m_applyElectronEnergyLossCorr;
00101 double m_startElectronCorr;
00102 double m_stopElectronCorr;
00103
00105 ITrackExtrapolator* m_freeFieldExtrapolator;
00106 ITrackExtrapolator* m_shortFieldExtrapolator;
00107 ITrackExtrapolator* m_longFieldExtrapolator;
00108
00109 ITransportSvc* m_transportSvc;
00110
00112 void updateTransportMatrix( const HepMatrix& newStepF );
00113
00115 double zScatter(const double z1, const double z2 ) const;
00116
00117 };
00118
00119 inline ITrackExtrapolator*
00120 TrackFirstCleverExtrapolator::chooseMagFieldExtrapolator
00121 (const double zStart, const double zTarget)
00122 {
00123
00124 return (fabs(zTarget-zStart)< m_shortDist ? m_shortFieldExtrapolator : m_longFieldExtrapolator);
00125 }
00126
00127 inline void TrackFirstCleverExtrapolator::updateTransportMatrix
00128 (const HepMatrix& newStepF) {
00129
00130 m_F = newStepF* m_F;
00131 }
00132 #endif // TRACKFIRSTCLEVEREXTRAPOLATOR_H