}
//
}
+
+//__________________________________________________________________
+AliITSUTrackHyp::AliITSUTrackHyp(const AliKalmanTrack &src)
+ : AliKalmanTrack(src)
+ , fNLayers(0)
+ , fITSLabel(0)
+ , fESDTrack(0)
+ , fWinner(0)
+ , fTPCSeed(0)
+ , fLayerSeeds(0)
+{
+ // copy c-tor. from KalmanTrack
+ //
+}
+
+//__________________________________________________________________
+AliITSUTrackHyp::AliITSUTrackHyp(const AliESDtrack &src)
+ : AliKalmanTrack()
+ , fNLayers(0)
+ , fITSLabel(0)
+ , fESDTrack(0)
+ , fWinner(0)
+ , fTPCSeed(0)
+ , fLayerSeeds(0)
+{
+ // copy c-tor. from ESD track: take only kinematics, mass and time integral
+ AliExternalTrackParam::operator=((const AliExternalTrackParam&)src);
+ SetMass(src.GetMass());
+ if (src.IsOn(AliESDtrack::kTIME)) {
+ StartTimeIntegral();
+ SetIntegratedLength(src.GetIntegratedLength());
+ double times[AliPID::kSPECIES];
+ src.GetIntegratedTimes(times);
+ SetIntegratedTimes(times);
+ }
+ //
+}
+
//__________________________________________________________________
void AliITSUTrackHyp::InitFrom(const AliITSUTrackHyp *src)
{
//
}
+//__________________________________________________________________
+AliITSUTrackHyp &AliITSUTrackHyp::operator=(const AliKalmanTrack &src)
+{
+ // copy kinematics only
+ if (this == &src) return *this;
+ AliKalmanTrack::operator=(src);
+ return *this;
+ //
+}
+
+//__________________________________________________________________
+AliITSUTrackHyp &AliITSUTrackHyp::operator=(const AliESDtrack &src)
+{
+ // copy oparator from ESD track: take only kinematics, mass and time integral
+ AliExternalTrackParam::operator=((const AliExternalTrackParam&)src);
+ SetMass(src.GetMass());
+ if (src.IsOn(AliESDtrack::kTIME)) {
+ StartTimeIntegral();
+ SetIntegratedLength(src.GetIntegratedLength());
+ double times[AliPID::kSPECIES];
+ src.GetIntegratedTimes(times);
+ SetIntegratedTimes(times);
+ }
+ //
+ return *this;
+}
+
+
//__________________________________________________________________
void AliITSUTrackHyp::Print(Option_t* opt) const
{
enum {kSkip=BIT(14)};
AliITSUTrackHyp(Int_t nlr=0);
AliITSUTrackHyp(const AliITSUTrackHyp& src);
+ AliITSUTrackHyp(const AliKalmanTrack& src);
+ AliITSUTrackHyp(const AliESDtrack& src);
AliITSUTrackHyp &operator=(const AliITSUTrackHyp &src);
+ AliITSUTrackHyp &operator=(const AliESDtrack &src);
+ AliITSUTrackHyp &operator=(const AliKalmanTrack &src);
virtual ~AliITSUTrackHyp();
//
void InitFrom(const AliITSUTrackHyp *src);
//
void SetChi2(Double_t chi2) {fChi2 = chi2;}
Double_t Update(const AliCluster* c);
+ Bool_t Update(Double_t p[2],Double_t cov[3]) {return AliExternalTrackParam::Update(p,cov);}
+ Double_t GetPredictedChi2(Double_t p[2],Double_t cov[3]) const {return AliExternalTrackParam::GetPredictedChi2(p,cov);}
+ Double_t GetPredictedChi2(const AliExternalTrackParam *t) const {return AliExternalTrackParam::GetPredictedChi2(t);}
AliExternalTrackParam* GetTPCSeed() const {return fTPCSeed;}
void SetTPCSeed(AliExternalTrackParam* seed) {fTPCSeed = seed;}
//
virtual Double_t GetPredictedChi2(const AliCluster *c) const;
+
virtual Bool_t PropagateTo(Double_t xr, Double_t x0, Double_t rho);
virtual Bool_t Update(const AliCluster* c, Double_t chi2, Int_t index);
virtual Int_t GetNumberOfClusters() const;
{
double dxs = xyzTrk[0] - xyzVtx[0];
double dys = xyzTrk[1] - xyzVtx[1];
- double dzs = xyzTrk[2] - xyzVtx[2];
+ // double dzs = xyzTrk[2] - xyzVtx[2];
// RS: for large segment steps d use approximation of cicrular arc s by
// s = 2R*asin(d/2R) = d/p asin(p) \approx d/p (p + 1/6 p^3) = d (1+1/6 p^2)
// where R is the track radius, p = d/2R = 2C*d (C is the abs curvature)
double fcarc = 1.+crv*crv*dst/6.;
dst *= fcarc*fcarc;
}
- dst += dzs*dzs;
+ // RS: temporary hack since we don't have SPD vertex:
+ // dst += dzs*dzs;
+ dst *= 1+fCurrESDtrack->GetTgl()*fCurrESDtrack->GetTgl();
dst = Sqrt(dst);
}
//
if ( trStat & AliESDtrack::kITSrefit ) continue; // already done
if ( (trStat & AliESDtrack::kTPCout) && !(trStat & AliESDtrack::kTPCrefit) ) continue;
//
- fCurrHyp = GetTrackHyp(itr);
- fCurrHyp->AliExternalTrackParam::operator=(*fCurrESDtrack); // fetch current ESDtrack kinematics
+ fCurrHyp = GetTrackHyp(itr);
fCurrMass = fCurrHyp->GetMass();
+ *fCurrHyp = *fCurrESDtrack; // fetch current ESDtrack kinematics
//
int nclFit = 0;
double chi2 = RefitTrack(fCurrHyp,fITS->GetRMin(),nclFit);
}
//______________________________________________________________________________
-Double_t AliITSUTrackerGlo::RefitTrack(AliExternalTrackParam* trc, Double_t rDest, Int_t &nclFit, Int_t stopCond)
+Double_t AliITSUTrackerGlo::RefitTrack(AliITSUTrackHyp* trc, Double_t rDest, Int_t &nclFit, Int_t stopCond)
{
// refit track till radius rDest. The cluster,mass info is taken from fCurrHyp (and its winner seed)
// if stopCond<0 : propagate till last cluster then stop
Int_t clInfo[2*AliITSUAux::kMaxLayers];
Int_t nCl = fCurrHyp->FetchClusterInfo(clInfo);
fCurrMass = fCurrHyp->GetMass();
- AliExternalTrackParam tmpTr(*trc);
+ AliITSUTrackHyp tmpTr(*(AliKalmanTrack*)trc);
double chi2 = 0;
int iclLr[2],nclLr;
nclFit = 0;
printf("AfterRefit: "); tmpTr.Print();
}
if (++nclFit==nCl && stopCond<0) {
- *trc = tmpTr;
+ *trc = (AliKalmanTrack&)tmpTr;
return chi2; // it was requested to not propagate after last update
}
}
if (!tmpTr.GetXatLabR(rDest,rDest,GetBz(),0) || !PropagateSeed(&tmpTr,rDest,fCurrMass, 100, kFALSE)) {
return (stopCond>0) ? -chi2 : chi2; // rDest was obligatory
}
- *trc=tmpTr;
+ *trc = (AliKalmanTrack&)tmpTr;
if (AliDebugLevelClass()>2) {
printf("After refit (now at lr %d): ",lrStop); trc->Print();
}
// check seed backward propagation chi2 and matching to TPC
double bz0 = GetBz();
double rDest = fITS->GetRITSTPCRef(); // reference radius for comparison
- static AliExternalTrackParam trback;
- trback = *seed;
+ AliITSUTrackHyp trback;
+ trback.AliExternalTrackParam::operator=(*seed);
trback.ResetCovariance(10000);
int nclFit = 0;
double chi2sa = RefitTrack(&trback,rDest,nclFit,1);
Bool_t GoToEntranceToLayer(AliExternalTrackParam* seed, AliITSURecoLayer* lr, Int_t dir, Bool_t check=kFALSE);
Bool_t PropagateSeed(AliITSUSeed *seed, Double_t xToGo, Double_t mass, Double_t maxStep=1.0, Bool_t matCorr=kTRUE);
Bool_t PropagateSeed(AliExternalTrackParam *seed, Double_t xToGo, Double_t mass, Double_t maxStep=1.0, Bool_t matCorr=kTRUE);
- Double_t RefitTrack(AliExternalTrackParam* trc, Double_t r, Int_t& nclFit, Int_t stopCond=0);
+ Double_t RefitTrack(AliITSUTrackHyp* trc, Double_t r, Int_t& nclFit, Int_t stopCond=0);
Int_t GetTrackingPhase() const {return fTrackPhaseID;}
//