X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALTrack.cxx;h=6b9218712bf3eccf608f662cb86c6f703b1ac184;hb=e2c14c6e829044a38e9a99af5fb883f0867ce68e;hp=5902791f2fe122ea115a68ca10cfa15b2f7888e5;hpb=b0001dd8b57b584aeb6adf3b31857757071165af;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALTrack.cxx b/EMCAL/AliEMCALTrack.cxx index 5902791f2fe..6b9218712bf 100755 --- a/EMCAL/AliEMCALTrack.cxx +++ b/EMCAL/AliEMCALTrack.cxx @@ -12,7 +12,7 @@ // about the suitability of this software for any purpose. It is // provided "as is" without express or implied warranty. //======================================================================== -// +// // Class AliEMCALTrack // --------------------- // A class implementing a track which is propagated to EMCAL and @@ -30,7 +30,6 @@ #include "TVector3.h" #include "AliLog.h" -#include "AliTracker.h" #include "AliESDtrack.h" #include "AliEMCALTrack.h" @@ -56,6 +55,7 @@ AliEMCALTrack::AliEMCALTrack() // Sets to meaningless values the indexes corresponding to // ESD seed track and matched cluster. // + } // //------------------------------------------------------------------------------ @@ -75,8 +75,13 @@ AliEMCALTrack::AliEMCALTrack(const AliESDtrack& t) // parameters are chosen according to static variable fUseOuterParams Double_t alpha, x, params[5], cov[15]; if (fgUseOuterParams) { - t.GetOuterExternalParameters(alpha, x, params); - t.GetOuterExternalCovariance(cov); + if(t.GetOuterParam()){ + t.GetOuterExternalParameters(alpha, x, params); + t.GetOuterExternalCovariance(cov); + } + else{ // no outer param available leave the default as is + return; + } } else { alpha = t.GetAlpha(); @@ -122,7 +127,6 @@ AliEMCALTrack& AliEMCALTrack::operator=(const AliEMCALTrack &t) fSeedIndex = t.fSeedIndex; fSeedLabel = t.fSeedLabel; - return *this; } // @@ -160,25 +164,6 @@ Int_t AliEMCALTrack::Compare(const TObject *obj) const // //------------------------------------------------------------------------------ // -Double_t AliEMCALTrack::GetBz() const -{ - // - // Returns Z-component of the magnetic field in kG. - // In case it B is not constant, its value is returned - // at the current position of the track (local X,Y,Z) - // - - // if magnetic field is constant... - if (AliTracker::UniformField()) return AliTracker::GetBz(); - - // ...else: - Double_t r[3]; - GetXYZ(r); - return AliTracker::GetBz(r); -} -// -//------------------------------------------------------------------------------ -// Bool_t AliEMCALTrack::PropagateTo(Double_t xk, Double_t d, Double_t x0) { // @@ -283,16 +268,18 @@ Bool_t AliEMCALTrack::PropagateToGlobal(Double_t x, Double_t y, Double_t z, Doub // Bool_t AliEMCALTrack::SimplePropagation(Double_t xk, Double_t d, Double_t x0) { - // - // Recall base class method for track propagation. - // - - Double_t field = GetBz(); - - // propagation... - if (!AliExternalTrackParam::PropagateTo(xk, field)) return kFALSE; + // + // Recall base class method for track propagation. + // + + Double_t field[3]; + + GetBxByBz(field); - // EL correction is computed only if requested... - if (!fgCorrectForEL) return kTRUE; - return AliExternalTrackParam::CorrectForMaterial(d, x0, GetMass()); + // propagation... + if (!AliExternalTrackParam::PropagateToBxByBz(xk, field)) return kFALSE; + + // EL correction is computed only if requested... + if (!fgCorrectForEL) return kTRUE; + return AliExternalTrackParam::CorrectForMeanMaterial(d, x0, GetMass()); }