// 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
#include "TVector3.h"
#include "AliLog.h"
-#include "AliTracker.h"
#include "AliESDtrack.h"
#include "AliEMCALTrack.h"
// Sets to meaningless values the indexes corresponding to
// ESD seed track and matched cluster.
//
+
}
//
//------------------------------------------------------------------------------
//
// parameters are chosen according to static variable fUseOuterParams
- Double_t alpha, x, params[5], cov[15];
+ Double_t alpha=0., x=0., 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();
//
//------------------------------------------------------------------------------
//
-AliEMCALTrack& AliEMCALTrack::operator=(const AliEMCALTrack &t)
-{
- //
- // Assignment operator
- // Works like copy constructor
- //
-
- fClusterIndex = t.fClusterIndex;
- fClusterDist = t.fClusterDist;
-
- fMass = t.fMass;
-
- fSeedIndex = t.fSeedIndex;
- fSeedLabel = t.fSeedLabel;
+AliEMCALTrack& AliEMCALTrack::operator=(const AliEMCALTrack &source)
+{ // assignment operator; use copy ctor
+ if (&source == this) return *this;
- return *this;
+ new (this) AliEMCALTrack(source);
+ return *this;
}
//
//------------------------------------------------------------------------------
AliEMCALTrack *that = (AliEMCALTrack*)obj;
- Double_t thisP[3], thisVal, thatP[3], thatVal;
+ Double_t thisP[3], thisVal=0., thatP[3], thatVal=0.;
if (fgSortByPt) {
this->GetPxPyPz(thisP);
//
//------------------------------------------------------------------------------
//
-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)
{
//
// the local track reference frame is adjusted accordingly.
//
- Double_t y;
+ Double_t y=0.;
Double_t field = GetBz();
Double_t width = TMath::Pi() / 9.0; // width of TPC/TRD/EMCAL sector (= 20 deg)
Double_t ymax = TMath::Abs(xk * TMath::Tan(0.5 * width)); // max allowed Y in local coords at distance xk
if (TMath::Abs(y) <= ymax) return SimplePropagation(xk, d, x0);
// otherwise, try change a sector to find one where the propagation is ok
- Int_t i, incr, istart, nloops;
+ Int_t i=0, incr=0, istart=0, nloops=0;
Double_t alpha = GetAlpha();
incr = (y > ymax) ? 1 : -1;
if (alpha < 0.0) alpha += TMath::TwoPi();
//
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::CorrectForMeanMaterial(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());
}