Skip to content

Commit

Permalink
version from Alex with ExB correction, produces pt bias, not to be used
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed May 23, 2014
1 parent 6107975 commit 22f08bd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 23 deletions.
18 changes: 10 additions & 8 deletions TRD/AliTRDrecoParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
// tracklet params
memcpy(fdzdxCorrFactor, ref.fdzdxCorrFactor, 2*sizeof(Double_t));
memcpy(fdzdxCorrRCbias, ref.fdzdxCorrRCbias, 2*sizeof(Double_t));
memcpy(fYcorrTailCancel, ref.fdzdxCorrRCbias, 6*sizeof(Double_t));
memcpy(fYcorrTailCancel, ref.fdzdxCorrRCbias, 8*sizeof(Double_t));
memcpy(fS2Ycorr, ref.fS2Ycorr, 2*sizeof(Double_t));
}

Expand Down Expand Up @@ -215,7 +215,7 @@ AliTRDrecoParam& AliTRDrecoParam::operator=(const AliTRDrecoParam &ref)
// tracklet params
memcpy(fdzdxCorrFactor, ref.fdzdxCorrFactor, 2*sizeof(Double_t));
memcpy(fdzdxCorrRCbias, ref.fdzdxCorrRCbias, 2*sizeof(Double_t));
memcpy(fYcorrTailCancel, ref.fdzdxCorrRCbias, 6*sizeof(Double_t));
memcpy(fYcorrTailCancel, ref.fdzdxCorrRCbias, 8*sizeof(Double_t));
memcpy(fS2Ycorr, ref.fS2Ycorr, 2*sizeof(Double_t));
return *this;
}
Expand Down Expand Up @@ -355,9 +355,10 @@ void AliTRDrecoParam::SetTrackletParams(Double_t *par)
fYcorrTailCancel[0][0] = par[5]; fYcorrTailCancel[0][1] = par[6]; // opposite sign !RC
fYcorrTailCancel[1][0] = par[7]; fYcorrTailCancel[1][1] = par[8]; // same sign !RC
fYcorrTailCancel[2][0] = par[9]; fYcorrTailCancel[2][1] = par[10]; // RC
fYcorrTailCancel[3][0] = par[11];fYcorrTailCancel[3][1] = par[12]; // RC
// inflation factor of error parameterization in r-phi due to wrong estimation of residuals.
fS2Ycorr[0] = par[11]; // opposite sign,
fS2Ycorr[1] = par[12]; // same sign
fS2Ycorr[0] = par[13]; // opposite sign,
fS2Ycorr[1] = par[14]; // same sign

} else {
// correct dzdx for the bias in z
Expand All @@ -368,10 +369,11 @@ void AliTRDrecoParam::SetTrackletParams(Double_t *par)
fdzdxCorrRCbias[1] = -0.012; // dz/dx < 0
/// correct x_cross for the bias in dzdx
fdzdxXcrossFactor = 0.14;
// y linear q/pt correction due to wrong tail cancellation.
fYcorrTailCancel[0][0] = 0.; fYcorrTailCancel[0][1] = 0.027; // opposite sign !RC
fYcorrTailCancel[1][0] = 0.04; fYcorrTailCancel[1][1] = 0.027; // same sign !RC
fYcorrTailCancel[2][0] = 0.013;fYcorrTailCancel[2][1] = 0.018; // RC
// y linear tg(phi)-ExB correction due to wrong tail cancellation.
fYcorrTailCancel[0][0] =-0.02; fYcorrTailCancel[0][1] = 0.13; // opposite sign !RC
fYcorrTailCancel[1][0] = 0.01; fYcorrTailCancel[1][1] = 0.115; // same sign !RC
fYcorrTailCancel[2][0] = 0.003;fYcorrTailCancel[2][1] = 0.075; // opposite sign RC
fYcorrTailCancel[3][0] = 0.005;fYcorrTailCancel[3][1] = 0.1; // same sign RC
// inflation factor of error parameterization in r-phi due to wrong estimation of residuals.
fS2Ycorr[0] = 5.; // opposite sign,
fS2Ycorr[1] = 10; // same sign
Expand Down
6 changes: 3 additions & 3 deletions TRD/AliTRDrecoParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class AliTRDrecoParam : public AliDetectorRecoParam
Double_t fdzdxCorrFactor[2]; // correction of dzdx estimation due to z bias; [0] for !RC, [1] for RC
Double_t fdzdxCorrRCbias[2]; // correction of dzdx estimation bias for RC; [0] for dz/dx>0, [1] for dz/dx<0
Double_t fdzdxXcrossFactor; // bias in dzdx of estimated xcross [RC]
Double_t fYcorrTailCancel[3][2]; // y linear q/pt correction due to wrong tail cancellation. [0] opposite sign !RC, [1] same sign !RC, [2] RC
Double_t fYcorrTailCancel[4][2]; // y linear dydx-ExB correction due to wrong tail cancellation. [0] opposite sign !RC, [1] same sign !RC, [2] opposite sign RC, [3] same sign RC
Double_t fS2Ycorr[2]; // inflation factor of error parameterization in r-phi due to wrong estimation of residuals. [0] opposite sign, [1] same sign

// Clusterization parameter
Expand All @@ -220,7 +220,7 @@ class AliTRDrecoParam : public AliDetectorRecoParam
Int_t fNumberOfPresamples; // number of presamples
Int_t fNumberOfPostsamples; // number of postsamples

ClassDef(AliTRDrecoParam, 13) // Reconstruction parameters for TRD detector
ClassDef(AliTRDrecoParam, 14) // Reconstruction parameters for TRD detector

};

Expand Down Expand Up @@ -276,7 +276,7 @@ inline void AliTRDrecoParam::SetTCParams(Double_t *par)
//___________________________________________________
inline void AliTRDrecoParam::GetYcorrTailCancel(Int_t it, Double_t par[2]) const
{
if(it<0||it>2) return;
if(it<0||it>3) return;
par[0] = fYcorrTailCancel[it][0]; par[1] = fYcorrTailCancel[it][1];
}

Expand Down
19 changes: 10 additions & 9 deletions TRD/AliTRDseedV1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ void AliTRDseedV1::UnbiasDZDX(Bool_t rc)
}

//____________________________________________________________________
Double_t AliTRDseedV1::UnbiasY(Bool_t rc, Bool_t sgn, Int_t chg)
Double_t AliTRDseedV1::UnbiasY(Bool_t rc, Bool_t sgn)
{
// correct y coordinate for tail cancellation. This should be fixed by considering TC as a function of q/pt.
// rc : TRUE if tracklet crosses rows
Expand All @@ -671,13 +671,14 @@ Double_t AliTRDseedV1::UnbiasY(Bool_t rc, Bool_t sgn, Int_t chg)

const AliTRDrecoParam* const recoParam = fkReconstructor->GetRecoParam();
if(!recoParam) return 0.;
Double_t dphi(fYref[1] - fExB);
Double_t par[2]={0.};
if(rc) recoParam->GetYcorrTailCancel(2, par);
else{
if(sgn && 1./fPt > 1.5) recoParam->GetYcorrTailCancel(1, par);
else if(!sgn) recoParam->GetYcorrTailCancel(0, par);
}
return par[0]+par[1]*chg/fPt;
if(rc) recoParam->GetYcorrTailCancel(sgn?3:2, par);
else {
if(TMath::Abs(dphi)<0.2) return 0.;
recoParam->GetYcorrTailCancel(sgn?1:0, par);
}
return par[0]+par[1]*dphi;
}


Expand Down Expand Up @@ -2161,7 +2162,7 @@ Bool_t AliTRDseedV1::Fit(UChar_t opt)


//____________________________________________________________________
Bool_t AliTRDseedV1::FitRobust(AliTRDpadPlane *pp, Bool_t sgn, Int_t chg, Int_t opt)
Bool_t AliTRDseedV1::FitRobust(AliTRDpadPlane *pp, Bool_t sgn, Int_t opt)
{
//
// Linear fit of the clusters attached to the tracklet
Expand Down Expand Up @@ -2215,7 +2216,7 @@ Bool_t AliTRDseedV1::FitRobust(AliTRDpadPlane *pp, Bool_t sgn, Int_t chg, Int_t
Int_t n(0), // clusters used in fit
row[]={-1, -1},// pad row spanned by the tracklet
col(-1); // pad column of current cluster
Double_t ycorr(UnbiasY(IsRowCross(), sgn, chg)),
Double_t ycorr(UnbiasY(IsRowCross(), sgn)),
kS2Ycorr(recoParam->GetS2Ycorr(sgn));

AliTRDcluster *c(NULL), **jc = &fClusters[0];
Expand Down
4 changes: 2 additions & 2 deletions TRD/AliTRDseedV1.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class AliTRDseedV1 : public AliTRDtrackletBase
void CookLabels();
Bool_t CookPID();
Bool_t Fit(UChar_t opt=0); // OBSOLETE
Bool_t FitRobust(AliTRDpadPlane *pp, Bool_t sgn, Int_t chg, Int_t opt=0);
Bool_t FitRobust(AliTRDpadPlane *pp, Bool_t sgn, Int_t opt=0);
Double_t EstimatedCrossPoint(AliTRDpadPlane *pp);
Bool_t Init(const AliTRDtrackV1 *track);
void Init(const AliRieman *fit);
Expand Down Expand Up @@ -217,7 +217,7 @@ class AliTRDseedV1 : public AliTRDtrackletBase
protected:
void Copy(TObject &ref) const;
void UnbiasDZDX(Bool_t rc);
Double_t UnbiasY(Bool_t rc, Bool_t sgn, Int_t chg);
Double_t UnbiasY(Bool_t rc, Bool_t sgn);

private:
inline void SetN(Int_t n);
Expand Down
2 changes: 1 addition & 1 deletion TRD/AliTRDtrackerV1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ Int_t AliTRDtrackerV1::FollowBackProlongation(AliTRDtrackV1 &t)
// tilt correction options
// 0 : no correction
// 2 : pseudo tilt correction
if(!ptrTracklet->FitRobust(fGeom->GetPadPlane(ily, stk), prod>0., t.Charge())){
if(!ptrTracklet->FitRobust(fGeom->GetPadPlane(ily, stk), prod>0.)){
t.SetErrStat(AliTRDtrackV1::kNoFit, ily);
AliDebug(4, "Failed Tracklet Fit");
continue;
Expand Down

0 comments on commit 22f08bd

Please sign in to comment.