for (Int_t of =0; of<4; of++){
for (Int_t i=of+i1;i<i2;i+=4)
{
- Int_t index = fIndex[i];
- if (index<0||index&0x8000) continue;
+ Int_t clindex = fIndex[i];
+ if (clindex<0||clindex&0x8000) continue;
//AliTPCTrackPoint * point = (AliTPCTrackPoint *) arr.At(i);
AliTPCTrackerPoint * point = GetTrackPoint(i);
AliExternalTrackParam paramIn;
AliExternalTrackParam paramOut;
Bool_t isOK=kTRUE;
+ Int_t ncl=0;
//
//
//
AliTPCclusterMI *c=track->GetClusterPointer(i);
if (!c) continue;
// if (RejectCluster(c,track)) continue;
+ sector = (c->GetDetector()%18);
+ if (!track->Rotate(TMath::DegToRad()*(sector%18*20.+10.)-track->GetAlpha())) {
+ //continue;
+ }
Double_t r[3]={c->GetX(),c->GetY(),c->GetZ()};
Double_t cov[3]={0.01,0.,0.01}; //TODO: correct error parametrisation
if (!track->PropagateTo(r[0])) {
isOK=kFALSE;
- break;
}
if ( !((static_cast<AliExternalTrackParam*>(track)->Update(&r[1],cov)))) isOK=kFALSE;
}
AliTPCclusterMI *c=track->GetClusterPointer(i);
if (!c) continue;
//if (RejectCluster(c,track)) continue;
+ sector = (c->GetDetector()%18);
+ if (!track->Rotate(TMath::DegToRad()*(sector%18*20.+10.)-track->GetAlpha())) {
+ //continue;
+ }
Double_t r[3]={c->GetX(),c->GetY(),c->GetZ()};
Double_t cov[3]={0.01,0.,0.01}; //TODO: correct error parametrisation
if (!track->PropagateTo(r[0])) {
isOK=kFALSE;
- break;
}
if ( !((static_cast<AliExternalTrackParam*>(track)->Update(&r[1],cov)))) isOK=kFALSE;
}
- if (!isOK) { delete track; return 0;}
+ //if (!isOK) { delete track; return 0;}
paramIn = *track;
track->AddCovariance(covar);
//
for (Int_t i=imin; i<=imax; i++){
AliTPCclusterMI *c=track->GetClusterPointer(i);
if (!c) continue;
+ sector = (c->GetDetector()%18);
+ if (!track->Rotate(TMath::DegToRad()*(sector%18*20.+10.)-track->GetAlpha())) {
+ //continue;
+ }
+ ncl++;
//if (RejectCluster(c,track)) continue;
Double_t r[3]={c->GetX(),c->GetY(),c->GetZ()};
Double_t cov[3]={0.01,0.,0.01}; //TODO: correct error parametrisation
if (!track->PropagateTo(r[0])) {
isOK=kFALSE;
- break;
}
if ( !((static_cast<AliExternalTrackParam*>(track)->Update(&r[1],cov)))) isOK=kFALSE;
}
- if (!isOK) { delete track; return 0;}
+ //if (!isOK) { delete track; return 0;}
paramOut=*track;
-
//
//
//
if (parin) (*parin)=paramIn;
if (parout) (*parout)=paramOut;
-
+ return ncl;
}
//
return kFALSE;
}
+
+
+
+
+
+
+void AliTPCseed::GetError(AliTPCclusterMI* cluster, AliExternalTrackParam * param,
+ Double_t& erry, Double_t &errz)
+{
+ //
+ // Get cluster error at given position
+ //
+ AliTPCClusterParam *clusterParam = AliTPCcalibDB::Instance()->GetClusterParam();
+ Double_t tany,tanz;
+ Double_t snp1=param->GetSnp();
+ tany=snp1/TMath::Sqrt(1.-snp1*snp1);
+ //
+ Double_t tgl1=param->GetTgl();
+ tanz=tgl1/TMath::Sqrt(1.-snp1*snp1);
+ //
+ Int_t padSize = 0; // short pads
+ if (cluster->GetDetector() >= 36) {
+ padSize = 1; // medium pads
+ if (cluster->GetRow() > 63) padSize = 2; // long pads
+ }
+
+ erry = clusterParam->GetError0Par( 0, padSize, (250.0 - TMath::Abs(cluster->GetZ())), TMath::Abs(tany) );
+ errz = clusterParam->GetError0Par( 1, padSize, (250.0 - TMath::Abs(cluster->GetZ())), TMath::Abs(tanz) );
+}
+
+
+void AliTPCseed::GetShape(AliTPCclusterMI* cluster, AliExternalTrackParam * param,
+ Double_t& rmsy, Double_t &rmsz)
+{
+ //
+ // Get cluster error at given position
+ //
+ AliTPCClusterParam *clusterParam = AliTPCcalibDB::Instance()->GetClusterParam();
+ Double_t tany,tanz;
+ Double_t snp1=param->GetSnp();
+ tany=snp1/TMath::Sqrt(1.-snp1*snp1);
+ //
+ Double_t tgl1=param->GetTgl();
+ tanz=tgl1/TMath::Sqrt(1.-snp1*snp1);
+ //
+ Int_t padSize = 0; // short pads
+ if (cluster->GetDetector() >= 36) {
+ padSize = 1; // medium pads
+ if (cluster->GetRow() > 63) padSize = 2; // long pads
+ }
+
+ rmsy = clusterParam->GetRMSQ( 0, padSize, (250.0 - TMath::Abs(cluster->GetZ())), TMath::Abs(tany), TMath::Abs(cluster->GetMax()) );
+ rmsz = clusterParam->GetRMSQ( 1, padSize, (250.0 - TMath::Abs(cluster->GetZ())), TMath::Abs(tanz) ,TMath::Abs(cluster->GetMax()));
+}