AliESDtrack *track = event->GetTrack(i);
AliESDfriendTrack *friendTrack = (AliESDfriendTrack*) ESDfriend->GetTrack(i);
if (!friendTrack) continue;
- track->SetFriendTrack(friendTrack);
+ //track->SetFriendTrack(friendTrack);
+ fCurrentFriendTrack=friendTrack;
const AliExternalTrackParam * trackIn = track->GetInnerParam();
const AliExternalTrackParam * trackOut = track->GetOuterParam();
AliExternalTrackParam * tpcOut = (AliExternalTrackParam *)friendTrack->GetTPCOut();
//
// 0 - Setup transform object
//
- AliESDfriendTrack *friendTrack = (AliESDfriendTrack *)track->GetFriendTrack();
+ const Double_t kxIFC = 83.; // position of IFC
+ const Double_t kxOFC = 250.; // position of OFC
+ const Double_t kaFC = 1.; // amplitude
+ const Double_t ktFC = 5.0; // slope of error
+ //cov[0]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
+ //cov[2]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
+
+ static Int_t streamCounter=0;
+ streamCounter++;
+ AliESDfriendTrack *friendTrack = fCurrentFriendTrack;
AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
AliTPCParam *param = AliTPCcalibDB::Instance()->GetParameters();
if (cluster->GetDetector()>35) ipad=1;
Float_t dy =0;//AliTPCClusterParam::SPosCorrection(0,ipad,cluster->GetPad(),cluster->GetTimeBin(),cluster->GetZ(),cluster->GetSigmaY2(),cluster->GetSigmaZ2(),cluster->GetMax());
Float_t dz =0;//AliTPCClusterParam::SPosCorrection(1,ipad,cluster->GetPad(),cluster->GetTimeBin(),cluster->GetZ(),cluster->GetSigmaY2(),cluster->GetSigmaZ2(),cluster->GetMax());
- // if(fApplyPositionCorrection) {
- //x[1]-=dy;
- //x[2]-=dz;
- // }
- //
- // Apply sector alignment
- //
- Double_t dxq = AliTPCPointCorrection::SGetCorrectionSector(0,cluster->GetDetector()%36,cluster->GetX(),
- cluster->GetY(),cluster->GetZ());
- Double_t dyq = AliTPCPointCorrection::SGetCorrectionSector(1,cluster->GetDetector()%36,cluster->GetX(),
- cluster->GetY(),cluster->GetZ());
- Double_t dzq = AliTPCPointCorrection::SGetCorrectionSector(2,cluster->GetDetector()%36,cluster->GetX(),
- cluster->GetY(),cluster->GetZ());
- if (0&fApplySectorAlignment){
- x[0]-=dxq;
- x[1]-=dyq;
- x[2]-=dzq;
- }
-// //
-// // Apply r-phi correction - To be done on track level- knowing the track angle !!!
-// //
-// Double_t corrclY =
-// corr->RPhiCOGCorrection(cluster->GetDetector(),cluster->GetRow(), cluster->GetPad(),
-// cluster->GetY(),cluster->GetY(), cluster->GetZ(), 0., cluster->GetMax(),2.5);
-// // R correction
-// Double_t corrR = corr->CorrectionOutR0(kFALSE,kFALSE,cluster->GetX(),cluster->GetY(),cluster->GetZ(),cluster->GetDetector());
-
-// if (0&fApplyRPhiCorrection){
-// if (cluster->GetY()>0) x[1]+=corrclY; // rphi correction
-// if (cluster->GetY()<0) x[1]-=corrclY; // rphi correction
-// }
-// if (0&fApplyRCorrection){
-// x[0]+=corrR; // radial correction
-// }
-
- //
- //
//
cluster->SetX(x[0]);
cluster->SetY(x[1]);
//
// Apply alignemnt
//
- if (1){
+ if (transform->GetCurrentRecoParam()->GetUseSectorAlignment()){
if (!param->IsGeoRead()) param->ReadGeoMatrices();
TGeoHMatrix *mat = param->GetClusterMatrix(cluster->GetDetector());
//TGeoHMatrix mat;
- if (fStreamLevel>2){
+ if (fStreamLevel>2 && streamCounter<20*fStreamLevel ){
+ // dump debug info if required
TTreeSRedirector *cstream = GetDebugStreamer();
if (cstream){
(*cstream)<<"Clusters"<<
"cl.="<<cluster<<
"cy="<<dy<<
"cz="<<dz<<
- // "cY="<<corrclY<<
- // "cR="<<corrR<<
- "dxq="<<dxq<<
- "dyq="<<dyq<<
- "dzq="<<dzq<<
"\n";
}
}
AliTPCseed::GetError(cl, &trackIn,cov[0],cov[2]);
cov[0]*=cov[0];
cov[2]*=cov[2];
+ cov[0]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
+ cov[2]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
trackIn.GetXYZ(xyz);
// Double_t bz = AliTracker::GetBz(xyz);
// if (!trackIn.PropagateTo(r[0],bz)) continue;
- if (!AliTracker::PropagateTrackToBxByBz(&trackIn, r[0],mass,0.1,kFALSE)) continue;
+ if (!AliTracker::PropagateTrackToBxByBz(&trackIn, r[0],mass,1.,kFALSE)) continue;
if (RejectCluster(cl,&trackIn)) continue;
nclIn++;
AliTPCseed::GetError(cl, &trackOut,cov[0],cov[2]);
cov[0]*=cov[0];
cov[2]*=cov[2];
+ cov[0]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
+ cov[2]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
trackOut.GetXYZ(xyz);
//Double_t bz = AliTracker::GetBz(xyz);
// if (!trackOut.PropagateTo(r[0],bz)) continue;
- if (!AliTracker::PropagateTrackToBxByBz(&trackOut, r[0],mass,0.1,kFALSE)) continue;
+ if (!AliTracker::PropagateTrackToBxByBz(&trackOut, r[0],mass,1.,kFALSE)) continue;
if (RejectCluster(cl,&trackOut)) continue;
nclOut++;
AliTPCseed::GetError(cl, &trackIn,cov[0],cov[2]);
cov[0]*=cov[0];
cov[2]*=cov[2];
+ cov[0]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
+ cov[2]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
+
trackIn.GetXYZ(xyz);
//Double_t bz = AliTracker::GetBz(xyz);
// if (!trackIn.PropagateTo(r[0],bz)) continue;
- if (!AliTracker::PropagateTrackToBxByBz(&trackIn, r[0],mass,0.1,kFALSE)) continue;
+ if (!AliTracker::PropagateTrackToBxByBz(&trackIn, r[0],mass,1,kFALSE)) continue;
if (RejectCluster(cl,&trackIn)) continue;
nclIn++;
trackOut.PropagateTo(trackOutOld->GetX(),bz);
- if (fStreamLevel>0){
+ if (fStreamLevel>0 && streamCounter<100*fStreamLevel){
TTreeSRedirector *cstream = GetDebugStreamer();
if (cstream){
(*cstream)<<"Tracks"<<
(*trackOutOld) = trackOut;
(*trackOuter) = trackOut;
AliExternalTrackParam *t = &trackIn;
- track->Set(t->GetX(),t->GetAlpha(),t->GetParameter(),t->GetCovariance());
+ //track->Set(t->GetX(),t->GetAlpha(),t->GetParameter(),t->GetCovariance());
seed->Set(t->GetX(),t->GetAlpha(),t->GetParameter(),t->GetCovariance());
seed->SetNumberOfClusters((nclIn+nclOut)/2);
return kTRUE;
// check the acceptance of cluster
// Cut on edge effects
//
+ if (!param) return kTRUE;
Float_t kEdgeCut=2.5;
Float_t kSigmaCut=6;
Bool_t isReject = kFALSE;
Float_t edgeY = cl->GetX()*TMath::Tan(TMath::Pi()/18);
Float_t dist = edgeY - TMath::Abs(cl->GetY());
- if (param) dist = TMath::Abs(edgeY - TMath::Abs(param->GetY()));
+ dist = TMath::Abs(edgeY - TMath::Abs(param->GetY()));
if (dist<kEdgeCut) isReject=kTRUE;
Double_t cov[3]={0.01,0.,0.01}; //TODO: correct error parametrisation