//-----------------------------------------------------------------
// Implementation of the ESD track class
// ESD = Event Summary Data
-// This is the class to deal with during the phisical analysis of data
+// This is the class to deal with during the phisics analysis of data
// Origin: Iouri Belikov, CERN
// e-mail: Jouri.Belikov@cern.ch
//-----------------------------------------------------------------
fPHOSpos[0]=fPHOSpos[1]=fPHOSpos[2]=0.;
fEMCALpos[0]=fEMCALpos[1]=fEMCALpos[2]=0.;
Int_t i;
- for (i=0; i<5; i++) { fRp[i]=0.; fCp[i]=0.; fIp[i]=0.; fOp[i]=0.; fTp[i]=0.;}
- for (i=0; i<15; i++) { fRc[i]=0.; fCc[i]=0.; fIc[i]=0.; fOc[i]=0.; fTc[i]=0.; }
+ for (i=0; i<5; i++) {
+ fRp[i]=fCp[i]=fIp[i]=fOp[i]=fXp[i]=fTp[i]=0.;
+ }
+ for (i=0; i<15; i++) {
+ fRc[i]=fCc[i]=fIc[i]=fOc[i]=fXc[i]=fTc[i]=0.;
+ }
for (i=0; i<6; i++) { fITSindex[i]=0; }
for (i=0; i<180; i++){ fTPCindex[i]=0; }
for (i=0; i<130; i++) { fTRDindex[i]=0; }
}
//_______________________________________________________________________
-Bool_t AliESDtrack::UpdateTrackParams(AliKalmanTrack *t, ULong_t flags) {
+Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags) {
//
// This function updates track's running parameters
//
+ Bool_t rc=kTRUE;
+
SetStatus(flags);
fLabel=t->GetLabel();
break;
case kTRDout:
- { //requested by the PHOS/EMCAL ("temporary solution")
- Int_t i;
- Double_t x=460.,buf[15];
- if (t->PropagateTo(x,30.,0.)) {
- fOalpha=t->GetAlpha();
- t->GetExternalParameters(x,buf); fOx=x;
- for (i=0; i<5; i++) fOp[i]=buf[i];
- t->GetExternalCovariance(buf);
- for (i=0; i<15; i++) fOc[i]=buf[i];
- }
- x=450.;
- if (t->PropagateTo(x,30.,0.)) {
- fXalpha=t->GetAlpha();
- t->GetExternalParameters(x,buf); fXx=x;
- for (i=0; i<5; i++) fXp[i]=buf[i];
- t->GetExternalCovariance(buf);
- for (i=0; i<15; i++) fXc[i]=buf[i];
- }
- }
+ //requested by the PHOS/EMCAL ("temporary solution")
+ fOalpha=t->GetAlpha();
+ fOx=460.;
+ rc=GetExternalParametersAt(fOx,fOp);
+ t->GetExternalCovariance(fOc); //can be done better
+
+ fXalpha=t->GetAlpha();
+ fXx=450.;
+ rc=GetExternalParametersAt(fXx,fXp);
+ t->GetExternalCovariance(fXc); //can be done better
+
case kTRDin: case kTRDrefit:
fTRDLabel = t->GetLabel();
return kFALSE;
}
- return kTRUE;
+ return rc;
}
//_______________________________________________________________________
x=fRx;
for (Int_t i=0; i<5; i++) p[i]=fRp[i];
}
+
+//_______________________________________________________________________
+Bool_t AliESDtrack::GetExternalParametersAt(Double_t x, Double_t p[5]) const {
+ //---------------------------------------------------------------------
+ // This function returns external representation of the track parameters
+ // at the position given by the first argument
+ //---------------------------------------------------------------------
+ Double_t dx=x-fRx;
+ Double_t f1=fRp[2], f2=f1 + dx*fRp[4]/AliKalmanTrack::GetConvConst();
+
+ if (TMath::Abs(f2) >= 0.9999) return kFALSE;
+
+ Double_t r1=TMath::Sqrt(1.- f1*f1), r2=TMath::Sqrt(1.- f2*f2);
+ p[0] = fRp[0] + dx*(f1+f2)/(r1+r2);
+ p[1] = fRp[1] + dx*(f1+f2)/(f1*r2 + f2*r1)*fRp[3];
+ p[2] = f2;
+ p[3] = fRp[3];
+ p[4] = fRp[4];
+
+ return kTRUE;
+}
+
//_______________________________________________________________________
void AliESDtrack::GetExternalCovariance(Double_t cov[15]) const {
//---------------------------------------------------------------------
//-------------------------------------------------------------------------
// Class AliESDtrack
-// This is the class to deal with during the physical analysis of data
+// This is the class to deal with during the physics analysis of data
//
// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
//-------------------------------------------------------------------------
virtual ~AliESDtrack();
void SetStatus(ULong_t flags) {fFlags|=flags;}
void ResetStatus(ULong_t flags) {fFlags&=~flags;}
- Bool_t UpdateTrackParams(AliKalmanTrack *t, ULong_t flags);
+ Bool_t UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags);
void SetIntegratedLength(Double_t l) {fTrackLength=l;}
void SetIntegratedTimes(const Double_t *times);
void SetESDpid(const Double_t *p);
Int_t GetLabel() const {return fLabel;}
Double_t GetAlpha() const {return fRalpha;}
void GetExternalParameters(Double_t &x, Double_t p[5]) const;
+ Bool_t GetExternalParametersAt(Double_t x, Double_t p[5]) const;
void GetExternalCovariance(Double_t cov[15]) const;
Double_t GetIntegratedLength() const {return fTrackLength;}
void GetIntegratedTimes(Double_t *times) const;
Double_t fTc[15]; // external cov. matrix of the track parameters
//Track parameters at the radius of the PHOS
- Double_t fOalpha; // Track rotation angle
- Double_t fOx; // x-coordinate of the track reference plane
- Double_t fOp[5]; // external track parameters
- Double_t fOc[15]; // external cov. matrix of the track parameters
+ Double_t fOalpha; //! Track rotation angle
+ Double_t fOx; //! x-coordinate of the track reference plane
+ Double_t fOp[5]; //! external track parameters
+ Double_t fOc[15]; //! external cov. matrix of the track parameters
//Track parameters at the radius of the EMCAL
- Double_t fXalpha; // Track rotation angle
- Double_t fXx; // x-coordinate of the track reference plane
- Double_t fXp[5]; // external track parameters
- Double_t fXc[15]; // external cov. matrix of the track parameters
+ Double_t fXalpha; //! Track rotation angle
+ Double_t fXx; //! x-coordinate of the track reference plane
+ Double_t fXp[5]; //! external track parameters
+ Double_t fXc[15]; //! external cov. matrix of the track parameters
// ITS related track information
Float_t fITSchi2; // chi2 in the ITS
Float_t fRICHsignal; // detector's PID signal (beta for RICH)
Float_t fRICHr[kSPECIES];// "detector response probabilities" (for the PID)
- ClassDef(AliESDtrack,7) //ESDtrack
+ ClassDef(AliESDtrack,8) //ESDtrack
};
#endif