fNtracks(0),
fSeeds(0),
fIteration(0),
- fParam(0),
+ fkParam(0),
fDebugStreamer(0)
{
//
track->SetRow((i&0x00ff0000)>>16);
track->SetSector(sec);
// Int_t index = i&0xFFFF;
- if (sec>=fParam->GetNInnerSector()) track->SetRow(track->GetRow()+fParam->GetNRowLow());
+ if (sec>=fkParam->GetNInnerSector()) track->SetRow(track->GetRow()+fkParam->GetNRowLow());
track->SetClusterIndex2(track->GetRow(), i);
//track->fFirstPoint = row;
//if ( track->fLastPoint<row) track->fLastPoint =row;
param.GetXYZ(gcl.GetMatrixArray());
cluster->GetGlobalXYZ(gclf);
gcl[0]=gclf[0]; gcl[1]=gclf[1]; gcl[2]=gclf[2];
+
+ if (AliTPCReconstructor::StreamLevel()>0) {
(*fDebugStreamer)<<"ErrParam"<<
"Cl.="<<cluster<<
"T.="<<¶m<<
"rmsy2p30R="<<rmsy2p30R<<
"rmsz2p30R="<<rmsz2p30R<<
"\n";
+ }
}
if (rdistance2>16) return 3;
fNtracks(0),
fSeeds(0),
fIteration(0),
- fParam(0),
+ fkParam(0),
fDebugStreamer(0)
{
//---------------------------------------------------------------------
for (i=0; i<fkNIS; i++) fInnerSec[i].Setup(par,0);
for (i=0; i<fkNOS; i++) fOuterSec[i].Setup(par,1);
- fParam = par;
+ fkParam = par;
Int_t nrowlow = par->GetNRowLow();
Int_t nrowup = par->GetNRowUp();
- for (Int_t i=0;i<nrowlow;i++){
+ for (i=0;i<nrowlow;i++){
fXRow[i] = par->GetPadRowRadiiLow(i);
fPadLength[i]= par->GetPadPitchLength(0,i);
fYMax[i] = fXRow[i]*TMath::Tan(0.5*par->GetInnerAngle());
}
- for (Int_t i=0;i<nrowup;i++){
+ for (i=0;i<nrowup;i++){
fXRow[i+nrowlow] = par->GetPadRowRadiiUp(i);
fPadLength[i+nrowlow] = par->GetPadPitchLength(60,i);
fYMax[i+nrowlow] = fXRow[i+nrowlow]*TMath::Tan(0.5*par->GetOuterAngle());
}
- fDebugStreamer = new TTreeSRedirector("TPCdebug.root");
+ if (AliTPCReconstructor::StreamLevel()>0) {
+ fDebugStreamer = new TTreeSRedirector("TPCdebug.root");
+ }
}
//________________________________________________________________________
AliTPCtrackerMI::AliTPCtrackerMI(const AliTPCtrackerMI &t):
fNtracks(0),
fSeeds(0),
fIteration(0),
- fParam(0),
+ fkParam(0),
fDebugStreamer(0)
{
//------------------------------------
//------------------------------------------------------------------
fOutput=t.fOutput;
}
-AliTPCtrackerMI & AliTPCtrackerMI::operator=(const AliTPCtrackerMI& /*r*/){
+AliTPCtrackerMI & AliTPCtrackerMI::operator=(const AliTPCtrackerMI& /*r*/)
+{
//------------------------------
// dummy
//--------------------------------------------------------------
}
-void AliTPCtrackerMI::FillESD(TObjArray* arr)
+void AliTPCtrackerMI::FillESD(const TObjArray* arr)
{
//
//
if (!pt) continue;
pt->UpdatePoints();
AddCovariance(pt);
- // pt->PropagateTo(fParam->GetInnerRadiusLow());
+ if (AliTPCReconstructor::StreamLevel()>1) {
+ (*fDebugStreamer)<<"Track0"<<
+ "Tr0.="<<pt<<
+ "\n";
+ }
+ // pt->PropagateTo(fkParam->GetInnerRadiusLow());
if (pt->GetKinkIndex(0)<=0){ //don't propagate daughter tracks
- pt->PropagateTo(fParam->GetInnerRadiusLow());
+ pt->PropagateTo(fkParam->GetInnerRadiusLow());
}
if (( pt->GetPoints()[2]- pt->GetPoints()[0])>5 && pt->GetPoints()[3]>0.8){
-Double_t AliTPCtrackerMI::ErrY2(AliTPCseed* seed, AliTPCclusterMI * cl){
+Double_t AliTPCtrackerMI::ErrY2(AliTPCseed* seed, const AliTPCclusterMI * cl){
//
//
// Use calibrated cluster error from OCDB
//
AliTPCClusterParam * clparam = AliTPCcalibDB::Instance()->GetClusterParam();
//
- Float_t z = TMath::Abs(fParam->GetZLength(0)-TMath::Abs(seed->GetZ()));
+ Float_t z = TMath::Abs(fkParam->GetZLength(0)-TMath::Abs(seed->GetZ()));
Int_t ctype = cl->GetType();
Int_t type = (cl->GetRow()<63) ? 0: (cl->GetRow()>126) ? 1:2;
Double_t angle = seed->GetSnp()*seed->GetSnp();
// gnoise1 = 0.0004/padlength;
// Float_t nel = 0.268*amp;
// Float_t nprim = 0.155*amp;
-// ggg1[i] = fParam->GetDiffT()*fParam->GetDiffT()*(2+0.001*nel/(padlength*padlength))/nel;
+// ggg1[i] = fkParam->GetDiffT()*fkParam->GetDiffT()*(2+0.001*nel/(padlength*padlength))/nel;
// glandau1[i] = (2.+0.12*nprim)*0.5* (2.+nprim*nprim*0.001/(padlength*padlength))/nprim;
// if (glandau1[i]>1) glandau1[i]=1;
// glandau1[i]*=padlength*padlength/12.;
// gnoise2 = 0.0004/padlength;
// nel = 0.3*amp;
// nprim = 0.133*amp;
-// ggg2[i] = fParam->GetDiffT()*fParam->GetDiffT()*(2+0.0008*nel/(padlength*padlength))/nel;
+// ggg2[i] = fkParam->GetDiffT()*fkParam->GetDiffT()*(2+0.0008*nel/(padlength*padlength))/nel;
// glandau2[i] = (2.+0.12*nprim)*0.5*(2.+nprim*nprim*0.001/(padlength*padlength))/nprim;
// if (glandau2[i]>1) glandau2[i]=1;
// glandau2[i]*=padlength*padlength/12.;
// gnoise3 = 0.0004/padlength;
// nel = 0.3*amp;
// nprim = 0.133*amp;
-// ggg3[i] = fParam->GetDiffT()*fParam->GetDiffT()*(2+0.0008*nel/(padlength*padlength))/nel;
+// ggg3[i] = fkParam->GetDiffT()*fkParam->GetDiffT()*(2+0.0008*nel/(padlength*padlength))/nel;
// glandau3[i] = (2.+0.12*nprim)*0.5*(2.+nprim*nprim*0.001/(padlength*padlength))/nprim;
// if (glandau3[i]>1) glandau3[i]=1;
// glandau3[i]*=padlength*padlength/12.;
// return 1.;
// }
// Float_t snoise2;
-// Float_t z = TMath::Abs(fParam->GetZLength(0)-TMath::Abs(seed->GetZ()));
+// Float_t z = TMath::Abs(fkParam->GetZLength(0)-TMath::Abs(seed->GetZ()));
// Int_t ctype = cl->GetType();
// Float_t padlength= GetPadPitchLength(seed->GetRow());
// Double_t angle2 = seed->GetSnp()*seed->GetSnp();
-Double_t AliTPCtrackerMI::ErrZ2(AliTPCseed* seed, AliTPCclusterMI * cl){
+Double_t AliTPCtrackerMI::ErrZ2(AliTPCseed* seed, const AliTPCclusterMI * cl){
//
//
// Use calibrated cluster error from OCDB
//
AliTPCClusterParam * clparam = AliTPCcalibDB::Instance()->GetClusterParam();
//
- Float_t z = TMath::Abs(fParam->GetZLength(0)-TMath::Abs(seed->GetZ()));
+ Float_t z = TMath::Abs(fkParam->GetZLength(0)-TMath::Abs(seed->GetZ()));
Int_t ctype = cl->GetType();
Int_t type = (cl->GetRow()<63) ? 0: (cl->GetRow()>126) ? 1:2;
//
// gnoise1 = 0.0004/padlength;
// Float_t nel = 0.268*amp;
// Float_t nprim = 0.155*amp;
-// ggg1[i] = fParam->GetDiffT()*fParam->GetDiffT()*(2+0.001*nel/(padlength*padlength))/nel;
+// ggg1[i] = fkParam->GetDiffT()*fkParam->GetDiffT()*(2+0.001*nel/(padlength*padlength))/nel;
// glandau1[i] = (2.+0.12*nprim)*0.5* (2.+nprim*nprim*0.001/(padlength*padlength))/nprim;
// if (glandau1[i]>1) glandau1[i]=1;
// glandau1[i]*=padlength*padlength/12.;
// gnoise2 = 0.0004/padlength;
// nel = 0.3*amp;
// nprim = 0.133*amp;
-// ggg2[i] = fParam->GetDiffT()*fParam->GetDiffT()*(2+0.0008*nel/(padlength*padlength))/nel;
+// ggg2[i] = fkParam->GetDiffT()*fkParam->GetDiffT()*(2+0.0008*nel/(padlength*padlength))/nel;
// glandau2[i] = (2.+0.12*nprim)*0.5*(2.+nprim*nprim*0.001/(padlength*padlength))/nprim;
// if (glandau2[i]>1) glandau2[i]=1;
// glandau2[i]*=padlength*padlength/12.;
// gnoise3 = 0.0004/padlength;
// nel = 0.3*amp;
// nprim = 0.133*amp;
-// ggg3[i] = fParam->GetDiffT()*fParam->GetDiffT()*(2+0.0008*nel/(padlength*padlength))/nel;
+// ggg3[i] = fkParam->GetDiffT()*fkParam->GetDiffT()*(2+0.0008*nel/(padlength*padlength))/nel;
// glandau3[i] = (2.+0.12*nprim)*0.5*(2.+nprim*nprim*0.001/(padlength*padlength))/nprim;
// if (glandau3[i]>1) glandau3[i]=1;
// glandau3[i]*=padlength*padlength/12.;
// return 1.;
// }
// Float_t snoise2;
-// Float_t z = TMath::Abs(fParam->GetZLength(0)-TMath::Abs(seed->GetZ()));
+// Float_t z = TMath::Abs(fkParam->GetZLength(0)-TMath::Abs(seed->GetZ()));
// Int_t ctype = cl->GetType();
// Float_t padlength= GetPadPitchLength(seed->GetRow());
// //
//_____________________________________________________________________________
Double_t AliTPCtrackerMI::F1old(Double_t x1,Double_t y1,
Double_t x2,Double_t y2,
- Double_t x3,Double_t y3)
+ Double_t x3,Double_t y3) const
{
//-----------------------------------------------------------------
// Initial approximation of the track curvature
//_____________________________________________________________________________
Double_t AliTPCtrackerMI::F1(Double_t x1,Double_t y1,
Double_t x2,Double_t y2,
- Double_t x3,Double_t y3)
+ Double_t x3,Double_t y3) const
{
//-----------------------------------------------------------------
// Initial approximation of the track curvature
Double_t AliTPCtrackerMI::F2(Double_t x1,Double_t y1,
Double_t x2,Double_t y2,
- Double_t x3,Double_t y3)
+ Double_t x3,Double_t y3) const
{
//-----------------------------------------------------------------
// Initial approximation of the track curvature
//_____________________________________________________________________________
Double_t AliTPCtrackerMI::F2old(Double_t x1,Double_t y1,
Double_t x2,Double_t y2,
- Double_t x3,Double_t y3)
+ Double_t x3,Double_t y3) const
{
//-----------------------------------------------------------------
// Initial approximation of the track curvature times center of curvature
//_____________________________________________________________________________
Double_t AliTPCtrackerMI::F3(Double_t x1,Double_t y1,
Double_t x2,Double_t y2,
- Double_t z1,Double_t z2)
+ Double_t z1,Double_t z2) const
{
//-----------------------------------------------------------------
// Initial approximation of the tangent of the track dip angle
Double_t AliTPCtrackerMI::F3n(Double_t x1,Double_t y1,
Double_t x2,Double_t y2,
- Double_t z1,Double_t z2, Double_t c)
+ Double_t z1,Double_t z2, Double_t c) const
{
//-----------------------------------------------------------------
// Initial approximation of the tangent of the track dip angle
return kFALSE;
}
- Double_t c1=x[4]*x1 - x[2], r1=sqrt(1.- c1*c1);
- Double_t c2=x[4]*x2 - x[2], r2=sqrt(1.- c2*c2);
+ Double_t c1=x[4]*x1 - x[2], r1=sqrt((1.-c1)*(1.+c1));
+ Double_t c2=x[4]*x2 - x[2], r2=sqrt((1.-c2)*(1.+c2));
y = x[0];
z = x[1];
}
-Int_t AliTPCtrackerMI::LoadClusters(TObjArray *arr)
+Int_t AliTPCtrackerMI::LoadClusters(const TObjArray *arr)
{
//
// load clusters to the memory
AliTPCClustersRow *clrow = 0x0;
Int_t lower = arr->LowerBound();
Int_t entries = arr->GetEntriesFast();
-
+
for (Int_t i=lower; i<entries; i++) {
clrow = (AliTPCClustersRow*) arr->At(i);
- if(!clrow) continue;
- if(!clrow->GetArray()) continue;
-
+ if(!clrow) continue;
+ if(!clrow->GetArray()) continue;
+
//
Int_t sec,row;
- fParam->AdjustSectorRow(clrow->GetID(),sec,row);
-
+ fkParam->AdjustSectorRow(clrow->GetID(),sec,row);
+
for (Int_t icl=0; icl<clrow->GetArray()->GetEntriesFast(); icl++){
Transform((AliTPCclusterMI*)(clrow->GetArray()->At(icl)));
}
if (left ==0){
tpcrow->SetN1(clrow->GetArray()->GetEntriesFast());
tpcrow->SetClusters1(new AliTPCclusterMI[tpcrow->GetN1()]);
- for (Int_t i=0;i<tpcrow->GetN1();i++)
- tpcrow->SetCluster1(i, *(AliTPCclusterMI*)(clrow->GetArray()->At(i)));
+ for (Int_t j=0;j<tpcrow->GetN1();++j)
+ tpcrow->SetCluster1(j, *(AliTPCclusterMI*)(clrow->GetArray()->At(j)));
}
if (left ==1){
tpcrow->SetN2(clrow->GetArray()->GetEntriesFast());
tpcrow->SetClusters2(new AliTPCclusterMI[tpcrow->GetN2()]);
- for (Int_t i=0;i<tpcrow->GetN2();i++)
- tpcrow->SetCluster2(i,*(AliTPCclusterMI*)(clrow->GetArray()->At(i)));
+ for (Int_t j=0;j<tpcrow->GetN2();++j)
+ tpcrow->SetCluster2(j,*(AliTPCclusterMI*)(clrow->GetArray()->At(j)));
}
}
//
return 0;
}
+Int_t AliTPCtrackerMI::LoadClusters(const TClonesArray *arr)
+{
+ //
+ // load clusters to the memory from one
+ // TClonesArray
+ //
+ AliTPCclusterMI *clust=0;
+ Int_t count[72][96] = { {0} , {0} };
+
+ // loop over clusters
+ for (Int_t icl=0; icl<arr->GetEntriesFast(); icl++) {
+ clust = (AliTPCclusterMI*)arr->At(icl);
+ if(!clust) continue;
+ //printf("cluster: det %d, row %d \n", clust->GetDetector(),clust->GetRow());
+
+ // transform clusters
+ Transform(clust);
+
+ // count clusters per pad row
+ count[clust->GetDetector()][clust->GetRow()]++;
+ }
+
+ // insert clusters to sectors
+ for (Int_t icl=0; icl<arr->GetEntriesFast(); icl++) {
+ clust = (AliTPCclusterMI*)arr->At(icl);
+ if(!clust) continue;
+
+ Int_t sec = clust->GetDetector();
+ Int_t row = clust->GetRow();
+
+ // filter overlapping pad rows needed by HLT
+ if(sec<fkNIS*2) { //IROCs
+ if(row == 30) continue;
+ }
+ else { // OROCs
+ if(row == 27 || row == 76) continue;
+ }
+
+ Int_t left=0;
+ if (sec<fkNIS*2){
+ left = sec/fkNIS;
+ fInnerSec[sec%fkNIS].InsertCluster(clust, count[sec][row], fkParam);
+ }
+ else{
+ left = (sec-fkNIS*2)/fkNOS;
+ fOuterSec[(sec-fkNIS*2)%fkNOS].InsertCluster(clust, count[sec][row], fkParam);
+ }
+ }
+
+ // Load functions must be called behind LoadCluster(TClonesArray*)
+ // needed by HLT
+ //LoadOuterSectors();
+ //LoadInnerSectors();
+
+ return 0;
+}
+
Int_t AliTPCtrackerMI::LoadClusters()
{
br->GetEntry(i);
//
Int_t sec,row;
- fParam->AdjustSectorRow(clrow->GetID(),sec,row);
+ fkParam->AdjustSectorRow(clrow->GetID(),sec,row);
for (Int_t icl=0; icl<clrow->GetArray()->GetEntriesFast(); icl++){
Transform((AliTPCclusterMI*)(clrow->GetArray()->At(icl)));
}
if (left ==0){
tpcrow->SetN1(clrow->GetArray()->GetEntriesFast());
tpcrow->SetClusters1(new AliTPCclusterMI[tpcrow->GetN1()]);
- for (Int_t i=0;i<tpcrow->GetN1();i++)
- tpcrow->SetCluster1(i, *(AliTPCclusterMI*)(clrow->GetArray()->At(i)));
+ for (Int_t k=0;k<tpcrow->GetN1();++k)
+ tpcrow->SetCluster1(k, *(AliTPCclusterMI*)(clrow->GetArray()->At(k)));
}
if (left ==1){
tpcrow->SetN2(clrow->GetArray()->GetEntriesFast());
tpcrow->SetClusters2(new AliTPCclusterMI[tpcrow->GetN2()]);
- for (Int_t i=0;i<tpcrow->GetN2();i++)
- tpcrow->SetCluster2(i,*(AliTPCclusterMI*)(clrow->GetArray()->At(i)));
+ for (Int_t k=0;k<tpcrow->GetN2();++k)
+ tpcrow->SetCluster2(k,*(AliTPCclusterMI*)(clrow->GetArray()->At(k)));
}
}
//
if (!transform) {
AliFatal("Tranformations not in calibDB");
}
+ transform->SetCurrentRecoParam((AliTPCRecoParam*)AliTPCReconstructor::GetRecoParam());
Double_t x[3]={cluster->GetRow(),cluster->GetPad(),cluster->GetTimeBin()};
Int_t i[1]={cluster->GetDetector()};
transform->Transform(x,i,0,1);
- if (!AliTPCReconstructor::GetRecoParam()->GetBYMirror()){
- if (cluster->GetDetector()%36>17){
- x[1]*=-1;
- }
- }
+ // if (cluster->GetDetector()%36>17){
+ // x[1]*=-1;
+ //}
//
// in debug mode check the transformation
//
//
//
- //if (!fParam->IsGeoRead()) fParam->ReadGeoMatrices();
- TGeoHMatrix *mat = fParam->GetClusterMatrix(cluster->GetDetector());
+ //if (!fkParam->IsGeoRead()) fkParam->ReadGeoMatrices();
+ TGeoHMatrix *mat = fkParam->GetClusterMatrix(cluster->GetDetector());
//TGeoHMatrix mat;
Double_t pos[3]= {cluster->GetX(),cluster->GetY(),cluster->GetZ()};
Double_t posC[3]={cluster->GetX(),cluster->GetY(),cluster->GetZ()};
}
if (sec<fkNIS*2){
- tpcrow = &(fInnerSec[sec%fkNIS][row]);
+ AliTPCtrackerSector& tracksec = fInnerSec[sec%fkNIS];
+ if (tracksec.GetNRows()<=row) return 0;
+ tpcrow = &(tracksec[row]);
if (tpcrow==0) return 0;
if (sec<fkNIS) {
}
}
else {
- tpcrow = &(fOuterSec[(sec-fkNIS*2)%fkNOS][row]);
+ AliTPCtrackerSector& tracksec = fOuterSec[(sec-fkNIS*2)%fkNOS];
+ if (tracksec.GetNRows()<=row) return 0;
+ tpcrow = &(tracksec[row]);
if (tpcrow==0) return 0;
if (sec-2*fkNIS<fkNOS) {
//-----------------------------------------------------------------
//
Double_t x= GetXrow(nr), ymax=GetMaxY(nr);
+ //
+ //
AliTPCclusterMI *cl=0;
Int_t tpcindex= t.GetClusterIndex2(nr);
//
}
}
if (TMath::Abs(t.GetSnp())>AliTPCReconstructor::GetMaxSnpTracker()) return 0; // cut on angle
- if (fIteration>1){
+ if (fIteration>1 && IsFindable(t)){
// not look for new cluster during refitting
t.SetNFoundable(t.GetNFoundable()+1);
return 0;
}
else
{
- if (TMath::Abs(z)<(AliTPCReconstructor::GetCtgRange()*x+10) && TMath::Abs(z)<fParam->GetZLength(0) && (TMath::Abs(t.GetSnp())<AliTPCReconstructor::GetMaxSnpTracker()))
+ if (IsFindable(t))
+ // if (TMath::Abs(z)<(AliTPCReconstructor::GetCtgRange()*x+10) && TMath::Abs(z)<fkParam->GetZLength(0) && (TMath::Abs(t.GetSnp())<AliTPCReconstructor::GetMaxSnpTracker()))
t.SetNFoundable(t.GetNFoundable()+1);
else
return 0;
return 1;
}
-Int_t AliTPCtrackerMI::FollowToNextFast(AliTPCseed& t, Int_t nr) {
- //-----------------------------------------------------------------
- // This function tries to find a track prolongation to next pad row
- //-----------------------------------------------------------------
- //
- Double_t x= GetXrow(nr), ymax=GetMaxY(nr);
- Double_t y,z;
- if (!t.GetProlongation(x,y,z)) {
- t.SetRemoval(10);
- return 0;
- }
- //
- //
- if (TMath::Abs(y)>ymax){
-
- if (y > ymax) {
- t.SetRelativeSector((t.GetRelativeSector()+1) % fN);
- if (!t.Rotate(fSectors->GetAlpha()))
- return 0;
- } else if (y <-ymax) {
- t.SetRelativeSector((t.GetRelativeSector()-1+fN) % fN);
- if (!t.Rotate(-fSectors->GetAlpha()))
- return 0;
- }
- if (!t.PropagateTo(x)) {
- return 0;
- }
- t.GetProlongation(x,y,z);
- }
- //
- // update current shape info every 2 pad-row
- if ( (nr%2==0) || t.GetNumberOfClusters()<2 || (t.GetCurrentSigmaY2()<0.0001) ){
- // t.fCurrentSigmaY = GetSigmaY(&t);
- //t.fCurrentSigmaZ = GetSigmaZ(&t);
- GetShape(&t,nr);
- }
- //
- AliTPCclusterMI *cl=0;
- UInt_t index=0;
-
-
- //Int_t nr2 = nr;
- const AliTPCtrackerRow &krow=GetRow(t.GetRelativeSector(),nr);
- if ( (t.GetSigmaY2()<0) || t.GetSigmaZ2()<0) return 0;
- Double_t roady =1.;
- Double_t roadz = 1.;
- //
- Int_t row = nr;
- if (TMath::Abs(TMath::Abs(y)-ymax)<krow.GetDeadZone()){
- t.SetInDead(kTRUE);
- t.SetClusterIndex2(row,-1);
- return 0;
- }
- else
- {
- if (TMath::Abs(z)>(AliTPCReconstructor::GetCtgRange()*x+10)) t.SetClusterIndex2(row,-1);
- }
- //calculate
-
- if ((cl==0)&&(krow)) {
- // cl = krow.FindNearest2(y+10,z,roady,roadz,index);
- cl = krow.FindNearest2(y,z,roady,roadz,index);
-
- if (cl) t.SetCurrentClusterIndex1(krow.GetIndex(index));
- }
-
- if (cl) {
- t.SetCurrentCluster(cl);
- // Int_t accept = AcceptCluster(&t,t.fCurrentCluster);
- //if (accept<3){
- t.SetClusterIndex2(row,index);
- t.SetClusterPointer(row, cl);
- //}
- }
- return 1;
-}
-
//_________________________________________________________________________
Int_t sector = (index&0xff000000)>>24;
// Int_t row = (index&0x00ff0000)>>16;
Float_t xyz[3];
- // xyz[0] = fParam->GetPadRowRadii(sector,row);
+ // xyz[0] = fkParam->GetPadRowRadii(sector,row);
xyz[0] = cl->GetX();
xyz[1] = cl->GetY();
xyz[2] = cl->GetZ();
Float_t sin,cos;
- fParam->AdjustCosSin(sector,cos,sin);
+ fkParam->AdjustCosSin(sector,cos,sin);
Float_t x = cos*xyz[0]-sin*xyz[1];
Float_t y = cos*xyz[1]+sin*xyz[0];
Float_t cov[6];
Float_t sigmaY2 = 0.027*cl->GetSigmaY2();
- if (sector < fParam->GetNInnerSector()) sigmaY2 *= 2.07;
+ if (sector < fkParam->GetNInnerSector()) sigmaY2 *= 2.07;
Float_t sigmaZ2 = 0.066*cl->GetSigmaZ2();
- if (sector < fParam->GetNInnerSector()) sigmaZ2 *= 1.77;
+ if (sector < fkParam->GetNInnerSector()) sigmaZ2 *= 1.77;
cov[0] = sin*sin*sigmaY2;
cov[1] = -sin*cos*sigmaY2;
cov[2] = 0.;
p.SetXYZ(x,y,xyz[2],cov);
AliGeomManager::ELayerID iLayer;
Int_t idet;
- if (sector < fParam->GetNInnerSector()) {
+ if (sector < fkParam->GetNInnerSector()) {
iLayer = AliGeomManager::kTPC1;
idet = sector;
}
else {
iLayer = AliGeomManager::kTPC2;
- idet = sector - fParam->GetNInnerSector();
+ idet = sector - fkParam->GetNInnerSector();
}
UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,idet);
p.SetVolumeID(volid);
}
else
{
- if (TMath::Abs(t.GetZ())<(AliTPCReconstructor::GetCtgRange()*t.GetX()+10) && (TMath::Abs(t.GetSnp())<AliTPCReconstructor::GetMaxSnpTracker())) t.SetNFoundable(t.GetNFoundable()+1);
+
+ // if (TMath::Abs(t.GetZ())<(AliTPCReconstructor::GetCtgRange()*t.GetX()+10) && (TMath::Abs(t.GetSnp())<AliTPCReconstructor::GetMaxSnpTracker()))
+ if (IsFindable(t)) t.SetNFoundable(t.GetNFoundable()+1);
else
return 0;
}
}
-//_____________________________________________________________________________
-Int_t AliTPCtrackerMI::FollowProlongationFast(AliTPCseed& t, Int_t rf, Int_t step) {
- //-----------------------------------------------------------------
- // This function tries to find a track prolongation.
- //-----------------------------------------------------------------
- Double_t xt=t.GetX();
- //
- Double_t alpha=t.GetAlpha() - fSectors->GetAlphaShift();
- if (alpha > 2.*TMath::Pi()) alpha -= 2.*TMath::Pi();
- if (alpha < 0. ) alpha += 2.*TMath::Pi();
- t.SetRelativeSector(Int_t(alpha/fSectors->GetAlpha()+0.0001)%fN);
-
- for (Int_t nr=GetRowNumber(xt)-1; nr>=rf; nr-=step) {
-
- if (FollowToNextFast(t,nr)==0)
- if (!t.IsActive()) return 0;
-
- }
- return 1;
-}
-
// - AliTPCtrackerMI::PropagateBack()
// - AliTPCtrackerMI::RefitInward()
//
-
-
+ // Arguments:
+ // factor1 - factor for constrained
+ // factor2 - for non constrained tracks
+ // if (Float_t(shared+1)/Float_t(found+1)>factor) - DELETE
+ //
UnsignClusters();
//
Int_t nseed = arr->GetEntriesFast();
//
if (Float_t(shared+1)/Float_t(found+1)>factor){
if (pt->GetKinkIndexes()[0]!=0) continue; //don't remove tracks - part of the kinks
+ if( AliTPCReconstructor::StreamLevel()>15){
+ TTreeSRedirector &cstream = *fDebugStreamer;
+ cstream<<"RemoveUsed"<<
+ "iter="<<fIteration<<
+ "pt.="<<pt<<
+ "\n";
+ }
delete arr->RemoveAt(trackindex);
continue;
}
if (pt->GetNumberOfClusters()<50&&(found-0.5*shared)<minimal){ //remove short tracks
if (pt->GetKinkIndexes()[0]!=0) continue; //don't remove tracks - part of the kinks
+ if( AliTPCReconstructor::StreamLevel()>15){
+ TTreeSRedirector &cstream = *fDebugStreamer;
+ cstream<<"RemoveShort"<<
+ "iter="<<fIteration<<
+ "pt.="<<pt<<
+ "\n";
+ }
delete arr->RemoveAt(trackindex);
continue;
}
-void AliTPCtrackerMI::SignClusters(TObjArray * arr, Float_t fnumber, Float_t fdensity)
+void AliTPCtrackerMI::SignClusters(const TObjArray * arr, Float_t fnumber, Float_t fdensity)
{
//
//sign clusters to be "used"
isok =kTRUE;
if (isok)
- for (Int_t i=0; i<160; i++) {
- Int_t index=pt->GetClusterIndex2(i);
+ for (Int_t j=0; j<160; ++j) {
+ Int_t index=pt->GetClusterIndex2(j);
if (index<0) continue;
- AliTPCclusterMI *c= pt->GetClusterPointer(i);
+ AliTPCclusterMI *c= pt->GetClusterPointer(j);
if (!c) continue;
//if (!(c->IsUsed(10))) c->Use();
c->Use(10);
if ((dens>mindens && pt->GetNumberOfClusters()>minn) && chi<maxchi ){
//Int_t noc=pt->GetNumberOfClusters();
pt->SetBSigned(kTRUE);
- for (Int_t i=0; i<160; i++) {
+ for (Int_t j=0; j<160; ++j) {
- Int_t index=pt->GetClusterIndex2(i);
+ Int_t index=pt->GetClusterIndex2(j);
if (index<0) continue;
- AliTPCclusterMI *c= pt->GetClusterPointer(i);
+ AliTPCclusterMI *c= pt->GetClusterPointer(j);
if (!c) continue;
// if (!(c->IsUsed(10))) c->Use();
c->Use(10);
}
-void AliTPCtrackerMI::StopNotActive(TObjArray * arr, Int_t row0, Float_t th0, Float_t th1, Float_t th2) const
+void AliTPCtrackerMI::StopNotActive(const TObjArray * arr, Int_t row0, Float_t th0, Float_t th1, Float_t th2) const
{
// stop not active tracks
// take th1 as threshold for number of founded to number of foundable on last 10 active rows
SignShared(&arraySeed);
// FindCurling(fSeeds, event,2); // find multi found tracks
FindSplitted(fSeeds, event,2); // find multi found tracks
+ if (AliTPCReconstructor::StreamLevel()>2) FindMultiMC(fSeeds, fEvent,2); // find multi found tracks
Int_t ntracks=0;
Int_t nseed = fSeeds->GetEntriesFast();
AliTPCseed * seed = (AliTPCseed*) fSeeds->UncheckedAt(i);
if (!seed) continue;
if (seed->GetKinkIndex(0)>0) UpdateKinkQualityD(seed); // update quality informations for kinks
+ AliESDtrack *esd=event->GetTrack(i);
+
+ if (seed->GetNumberOfClusters()<60 && seed->GetNumberOfClusters()<(esd->GetTPCclusters(0) -5)*0.8){
+ AliExternalTrackParam paramIn;
+ AliExternalTrackParam paramOut;
+ Int_t ncl = seed->RefitTrack(seed,¶mIn,¶mOut);
+ if (AliTPCReconstructor::StreamLevel()>0) {
+ (*fDebugStreamer)<<"RecoverIn"<<
+ "seed.="<<seed<<
+ "esd.="<<esd<<
+ "pin.="<<¶mIn<<
+ "pout.="<<¶mOut<<
+ "ncl="<<ncl<<
+ "\n";
+ }
+ if (ncl>15) {
+ seed->Set(paramIn.GetX(),paramIn.GetAlpha(),paramIn.GetParameter(),paramIn.GetCovariance());
+ seed->SetNumberOfClusters(ncl);
+ }
+ }
- seed->PropagateTo(fParam->GetInnerRadiusLow());
+ seed->PropagateTo(fkParam->GetInnerRadiusLow());
seed->UpdatePoints();
AddCovariance(seed);
MakeBitmaps(seed);
- AliESDtrack *esd=event->GetTrack(i);
seed->CookdEdx(0.02,0.6);
CookLabel(seed,0.1); //For comparison only
esd->SetTPCClusterMap(seed->GetClusterMap());
esd->UpdateTrackParams(seed,AliESDtrack::kTPCrefit);
esd->SetTPCPoints(seed->GetPoints());
esd->SetTPCPointsF(seed->GetNFoundable());
- Int_t ndedx = seed->GetNCDEDX(0)+seed->GetNCDEDX(1)+seed->GetNCDEDX(2)+seed->GetNCDEDX(3);
- Float_t sdedx = (seed->GetSDEDX(0)+seed->GetSDEDX(1)+seed->GetSDEDX(2)+seed->GetSDEDX(3))*0.25;
+ Int_t ndedx = seed->GetNCDEDX(0);
+ Float_t sdedx = seed->GetSDEDX(0);
Float_t dedx = seed->GetdEdx();
esd->SetTPCsignal(dedx, sdedx, ndedx);
//
RemoveUsed2(fSeeds,0.4,0.4,20);
//FindCurling(fSeeds, fEvent,1);
FindSplitted(fSeeds, event,1); // find multi found tracks
+ if (AliTPCReconstructor::StreamLevel()>2) FindMultiMC(fSeeds, fEvent,1); // find multi found tracks
//
Int_t nseed = fSeeds->GetEntriesFast();
seed->UpdatePoints();
AddCovariance(seed);
AliESDtrack *esd=event->GetTrack(i);
+ if (seed->GetNumberOfClusters()<60 && seed->GetNumberOfClusters()<(esd->GetTPCclusters(0) -5)*0.8){
+ AliExternalTrackParam paramIn;
+ AliExternalTrackParam paramOut;
+ Int_t ncl = seed->RefitTrack(seed,¶mIn,¶mOut);
+ if (AliTPCReconstructor::StreamLevel()>0) {
+ (*fDebugStreamer)<<"RecoverBack"<<
+ "seed.="<<seed<<
+ "esd.="<<esd<<
+ "pin.="<<¶mIn<<
+ "pout.="<<¶mOut<<
+ "ncl="<<ncl<<
+ "\n";
+ }
+ if (ncl>15) {
+ seed->Set(paramOut.GetX(),paramOut.GetAlpha(),paramOut.GetParameter(),paramOut.GetCovariance());
+ seed->SetNumberOfClusters(ncl);
+ }
+ }
seed->CookdEdx(0.02,0.6);
CookLabel(seed,0.1); //For comparison only
if (seed->GetNumberOfClusters()>15){
esd->UpdateTrackParams(seed,AliESDtrack::kTPCout);
esd->SetTPCPoints(seed->GetPoints());
esd->SetTPCPointsF(seed->GetNFoundable());
- Int_t ndedx = seed->GetNCDEDX(0)+seed->GetNCDEDX(1)+seed->GetNCDEDX(2)+seed->GetNCDEDX(3);
- Float_t sdedx = (seed->GetSDEDX(0)+seed->GetSDEDX(1)+seed->GetSDEDX(2)+seed->GetSDEDX(3))*0.25;
+ Int_t ndedx = seed->GetNCDEDX(0);
+ Float_t sdedx = seed->GetSDEDX(0);
Float_t dedx = seed->GetdEdx();
esd->SetTPCsignal(dedx, sdedx, ndedx);
ntracks++;
Int_t eventnumber = event->GetEventNumberInFile();// patch 28 fev 06
// This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number
- if (AliTPCReconstructor::StreamLevel()>1) {
+ if (AliTPCReconstructor::StreamLevel()>1 && esd) {
(*fDebugStreamer)<<"Cback"<<
"Tr0.="<<seed<<
+ "esd.="<<esd<<
"EventNrInFile="<<eventnumber<<
- "\n"; // patch 28 fev 06
+ "\n";
}
}
}
}
if (((status&AliESDtrack::kITSout)==0)&&(direction==1)) seed->ResetCovariance(10.);
if ( direction ==2 &&(status & AliESDtrack::kTRDrefit) == 0 ) seed->ResetCovariance(10.);
- if ( direction ==2 && ((status & AliESDtrack::kTPCout) == 0) ) {
- fSeeds->AddAt(0,i);
- delete seed;
- continue;
- }
+ //if ( direction ==2 && ((status & AliESDtrack::kTPCout) == 0) ) {
+ // fSeeds->AddAt(0,i);
+ // delete seed;
+ // continue;
+ //}
if ( direction ==2 &&(status & AliESDtrack::kTRDrefit) > 0 ) {
Double_t par0[5],par1[5],alpha,x;
esd->GetInnerExternalParameters(alpha,x,par0);
// if (!BuildSeed(kr1[is],kcl,0,x1,x2,x3,x,c)) continue;
- UInt_t index=kr1.GetIndex(is);
+ index=kr1.GetIndex(is);
seed->~AliTPCseed();
AliTPCseed *track=new(seed) AliTPCseed(x1, sec*alpha+shift, x, c, index);
Int_t row = row0+ddrow*delta;
kr = &(fSectors[sec][row]);
Double_t xn = kr->GetX();
- Double_t ymax = fSectors->GetMaxY(row)-kr->GetDeadZone()-1.5;
+ Double_t ymax1 = fSectors->GetMaxY(row)-kr->GetDeadZone()-1.5;
polytrack.GetFitPoint(xn,yn,zn);
- if (TMath::Abs(yn)>ymax) continue;
+ if (TMath::Abs(yn)>ymax1) continue;
nfoundable++;
AliTPCclusterMI * cln = kr->FindNearest(yn,zn,roady,roadz);
if (cln) {
}
-AliTPCseed *AliTPCtrackerMI::ReSeed(AliTPCseed *track, Float_t r0, Float_t r1, Float_t r2)
+AliTPCseed *AliTPCtrackerMI::ReSeed(const AliTPCseed *track, Float_t r0, Float_t r1, Float_t r2)
{
//
//
-void AliTPCtrackerMI::FindMultiMC(TObjArray * array, AliESDEvent */*esd*/, Int_t iter)
+void AliTPCtrackerMI::FindMultiMC(const TObjArray * array, AliESDEvent */*esd*/, Int_t iter)
{
//
// find multi tracks - THIS FUNCTION IS ONLY FOR DEBUG PURPOSES
}
if (ncl>0) xm[i]/=Float_t(ncl);
}
- TTreeSRedirector &cstream = *fDebugStreamer;
//
for (Int_t i0=0;i0<nentries;i0++){
AliTPCseed * track0 = (AliTPCseed*)array->At(i0);
}
}
//
+ if (AliTPCReconstructor::StreamLevel()>0) {
+ TTreeSRedirector &cstream = *fDebugStreamer;
cstream<<"Multi"<<
"iter="<<iter<<
"lab0="<<lab0<<
"r1="<<r1<<
"rc1="<<rc1<<
"\n";
+ }
}
}
delete [] helixes;
}
if (ncl>0) xm[i]/=Float_t(ncl);
}
- TTreeSRedirector &cstream = *fDebugStreamer;
//
for (Int_t is0=0;is0<nentries;is0++){
Int_t i0 = indexes[is0];
AliTPCseed * track0 = (AliTPCseed*)array->At(i0);
if (!track0) continue;
- if (track0->GetKinkIndexes()[0]!=0) continue;
Float_t xc0 = helixes[i0].GetHelix(6);
Float_t yc0 = helixes[i0].GetHelix(7);
Float_t fi0 = TMath::ATan2(yc0,xc0);
AliTPCseed * track1 = (AliTPCseed*)array->At(i1);
if (!track1) continue;
//
- if (TMath::Abs(track0->GetRelativeSector()-track1->GetRelativeSector())>1) continue;
- if (track1->GetKinkIndexes()[0]>0 &&track0->GetKinkIndexes()[0]<0) continue;
- if (track1->GetKinkIndexes()[0]!=0) continue;
+ Int_t dsec = TMath::Abs((track0->GetRelativeSector()%18)-(track1->GetRelativeSector()%18)); // sector distance
+ if (dsec>1 && dsec<17) continue;
+
+ if (track1->GetKinkIndexes()[0] == -track0->GetKinkIndexes()[0]) continue;
Float_t dtheta = TMath::Abs(track0->GetTgl()-track1->GetTgl())<TMath::Abs(track0->GetTgl()+track1->GetTgl())? track0->GetTgl()-track1->GetTgl():track0->GetTgl()+track1->GetTgl();
if (TMath::Abs(dtheta)>kMaxdTheta) continue;
Float_t fi1 = TMath::ATan2(yc1,xc1);
//
Float_t dfi = fi0-fi1;
- if (dfi>1.5*TMath::Pi()) dfi-=TMath::Pi(); // take care about edge effect
- if (dfi<-1.5*TMath::Pi()) dfi+=TMath::Pi(); //
+ if (dfi>TMath::Pi()) dfi-=TMath::TwoPi(); // take care about edge effect
+ if (dfi<-TMath::Pi()) dfi+=TMath::TwoPi(); //
if (TMath::Abs(dfi)>kMaxdPhi&&helixes[i0].GetHelix(4)*helixes[i1].GetHelix(4)<0){
//
// if short tracks with undefined sign
fi1 = -TMath::ATan2(yc1,-xc1);
dfi = fi0-fi1;
+ if (dfi>TMath::Pi()) dfi-=TMath::TwoPi(); // take care about edge effect
+ if (dfi<-TMath::Pi()) dfi+=TMath::TwoPi(); //
}
if (TMath::Abs(dfi)>kMaxdPhi) continue;
//
//
Int_t lab0=track0->GetLabel();
Int_t lab1=track1->GetLabel();
- cstream<<"Splitted"<<
- "iter="<<iter<<
- "lab0="<<lab0<<
- "lab1="<<lab1<<
- "Tr0.="<<track0<< // seed0
- "Tr1.="<<track1<< // seed1
- "h0.="<<&helixes[i0]<<
- "h1.="<<&helixes[i1]<<
- //
- "sum="<<sum<< //the sum of rows with cl in both
- "sum0="<<sum0<< //the sum of rows with cl in 0 track
- "sum1="<<sum1<< //the sum of rows with cl in 1 track
- "sums="<<sums<< //the sum of shared clusters
- "xm0="<<xm[i0]<< // the center of track
- "xm1="<<xm[i1]<< // the x center of track
- // General cut variables
- "dfi="<<dfi<< // distance in fi angle
- "dtheta="<<dtheta<< // distance int theta angle
- //
- //
- "dist0="<<dist[4][0]<< //distance x
- "dist1="<<dist[4][1]<< //distance y
- "dist2="<<dist[4][2]<< //distance z
- "mdist0="<<mdist[0]<< //distance x
- "mdist1="<<mdist[1]<< //distance y
- "mdist2="<<mdist[2]<< //distance z
-
- "\n";
+ if( AliTPCReconstructor::StreamLevel()>5){
+ TTreeSRedirector &cstream = *fDebugStreamer;
+ cstream<<"Splitted"<<
+ "iter="<<iter<<
+ "lab0="<<lab0<<
+ "lab1="<<lab1<<
+ "Tr0.="<<track0<< // seed0
+ "Tr1.="<<track1<< // seed1
+ "h0.="<<&helixes[i0]<<
+ "h1.="<<&helixes[i1]<<
+ //
+ "sum="<<sum<< //the sum of rows with cl in both
+ "sum0="<<sum0<< //the sum of rows with cl in 0 track
+ "sum1="<<sum1<< //the sum of rows with cl in 1 track
+ "sums="<<sums<< //the sum of shared clusters
+ "xm0="<<xm[i0]<< // the center of track
+ "xm1="<<xm[i1]<< // the x center of track
+ // General cut variables
+ "dfi="<<dfi<< // distance in fi angle
+ "dtheta="<<dtheta<< // distance int theta angle
+ //
+ //
+ "dist0="<<dist[4][0]<< //distance x
+ "dist1="<<dist[4][1]<< //distance y
+ "dist2="<<dist[4][2]<< //distance z
+ "mdist0="<<mdist[0]<< //distance x
+ "mdist1="<<mdist[1]<< //distance y
+ "mdist2="<<mdist[2]<< //distance z
+ "\n";
+ }
delete array->RemoveAt(i1);
}
}
delete [] helixes;
delete [] xm;
+ delete [] quality;
+ delete [] indexes;
AliInfo("Time for splitted tracks removal");
timer.Print();
}
-void AliTPCtrackerMI::FindCurling(TObjArray * array, AliESDEvent */*esd*/, Int_t iter)
+void AliTPCtrackerMI::FindCurling(const TObjArray * array, AliESDEvent */*esd*/, Int_t iter)
{
//
// find Curling tracks
//
// Find tracks
//
- TTreeSRedirector &cstream = *fDebugStreamer;
//
for (Int_t i0=0;i0<nentries;i0++){
AliTPCseed * track0 = (AliTPCseed*)array->At(i0);
//debug stream to tune "fine" cuts
Int_t lab0=track0->GetLabel();
Int_t lab1=track1->GetLabel();
+ TTreeSRedirector &cstream = *fDebugStreamer;
cstream<<"Curling2"<<
"iter="<<iter<<
"lab0="<<lab0<<
//
// Find circling track
- TTreeSRedirector &cstream = *fDebugStreamer;
//
for (Int_t i0=0;i0<nentries;i0++){
AliTPCseed * track0 = (AliTPCseed*)array->At(i0);
//
if (deltabest>6) continue;
if (mindcar+mindcaz<40 && (hangles[2]<3.12||deltabest>3)) continue;
- Bool_t sign =kFALSE;
- if (hangles[2]>3.06) sign =kTRUE;
+ Bool_t lsign =kFALSE;
+ if (hangles[2]>3.06) lsign =kTRUE;
//
- if (sign){
+ if (lsign){
circular[i0] = kTRUE;
circular[i1] = kTRUE;
if (track0->OneOverPt()<track1->OneOverPt()){
track0->SetCircular(track0->GetCircular()+2);
}
}
- if (sign&&AliTPCReconstructor::StreamLevel()>1){
+ if (lsign&&AliTPCReconstructor::StreamLevel()>1){
//debug stream
Int_t lab0=track0->GetLabel();
Int_t lab1=track1->GetLabel();
+ TTreeSRedirector &cstream = *fDebugStreamer;
cstream<<"Curling"<<
"lab0="<<lab0<<
"lab1="<<lab1<<
Float_t dens00=-1,dens01=-1;
Float_t dens10=-1,dens11=-1;
//
- Int_t found,foundable,shared;
- track0->GetClusterStatistic(0,row0-5, found, foundable,shared,kFALSE);
+ Int_t found,foundable,ishared;
+ track0->GetClusterStatistic(0,row0-5, found, foundable,ishared,kFALSE);
if (foundable>5) dens00 = Float_t(found)/Float_t(foundable);
- track0->GetClusterStatistic(row0+5,155, found, foundable,shared,kFALSE);
+ track0->GetClusterStatistic(row0+5,155, found, foundable,ishared,kFALSE);
if (foundable>5) dens01 = Float_t(found)/Float_t(foundable);
//
- track1->GetClusterStatistic(0,row0-5, found, foundable,shared,kFALSE);
+ track1->GetClusterStatistic(0,row0-5, found, foundable,ishared,kFALSE);
if (foundable>10) dens10 = Float_t(found)/Float_t(foundable);
- track1->GetClusterStatistic(row0+5,155, found, foundable,shared,kFALSE);
+ track1->GetClusterStatistic(row0+5,155, found, foundable,ishared,kFALSE);
if (foundable>10) dens11 = Float_t(found)/Float_t(foundable);
//
if (dens00<dens10 && dens01<dens11) continue;
Float_t x[3] = { kink->GetPosition()[0],kink->GetPosition()[1],kink->GetPosition()[2]};
Int_t index[4];
- fParam->Transform0to1(x,index);
- fParam->Transform1to2(x,index);
+ fkParam->Transform0to1(x,index);
+ fkParam->Transform1to2(x,index);
row0 = GetRowNumber(x[0]);
if (kink->GetR()<100) continue;
//
for (Int_t i=0;i<nkinks;i++){
quality[i] =100000;
- AliKink *kink = (AliKink*)kinks->At(i);
+ AliKink *kinkl = (AliKink*)kinks->At(i);
//
// refit kinks towards vertex
//
- Int_t index0 = kink->GetIndex(0);
- Int_t index1 = kink->GetIndex(1);
+ Int_t index0 = kinkl->GetIndex(0);
+ Int_t index1 = kinkl->GetIndex(1);
AliTPCseed * ktrack0 = (AliTPCseed*)array->At(index0);
AliTPCseed * ktrack1 = (AliTPCseed*)array->At(index1);
//
//
// Refit Kink under if too small angle
//
- if (kink->GetAngle(2)<0.05){
- kink->SetTPCRow0(GetRowNumber(kink->GetR()));
- Int_t row0 = kink->GetTPCRow0();
- Int_t drow = Int_t(2.+0.5/(0.05+kink->GetAngle(2)));
+ if (kinkl->GetAngle(2)<0.05){
+ kinkl->SetTPCRow0(GetRowNumber(kinkl->GetR()));
+ Int_t row0 = kinkl->GetTPCRow0();
+ Int_t drow = Int_t(2.+0.5/(0.05+kinkl->GetAngle(2)));
//
//
Int_t last = row0-drow;
AliTPCseed* seed1 = ReSeed(ktrack1,first,kTRUE);
//
if (seed0 && seed1){
- kink->SetStatus(1,8);
- if (RefitKink(*seed0,*seed1,*kink)) kink->SetStatus(1,9);
- row0 = GetRowNumber(kink->GetR());
+ kinkl->SetStatus(1,8);
+ if (RefitKink(*seed0,*seed1,*kinkl)) kinkl->SetStatus(1,9);
+ row0 = GetRowNumber(kinkl->GetR());
sumn = seed0->GetNumberOfClusters()+seed1->GetNumberOfClusters();
mothers[i] = *seed0;
daughters[i] = *seed1;
if (seed1) delete seed1;
continue;
}
- if (kink->GetDistance()>0.5 || kink->GetR()<110 || kink->GetR()>240) {
+ if (kinkl->GetDistance()>0.5 || kinkl->GetR()<110 || kinkl->GetR()>240) {
delete kinks->RemoveAt(i);
if (seed0) delete seed0;
if (seed1) delete seed1;
delete seed1;
}
//
- if (kink) quality[i] = 160*((0.1+kink->GetDistance())*(2.-kink->GetTPCDensityFactor()))/(sumn+40.); //the longest -clossest will win
+ if (kinkl) quality[i] = 160*((0.1+kinkl->GetDistance())*(2.-kinkl->GetTPCDensityFactor()))/(sumn+40.); //the longest -clossest will win
}
TMath::Sort(nkinks,quality,indexes,kFALSE);
//
for (Int_t i=0;i<nkinks;i++){
- AliKink * kink = (AliKink*) kinks->At(indexes[i]);
- if (!kink) continue;
- kink->SetTPCRow0(GetRowNumber(kink->GetR()));
- Int_t index0 = kink->GetIndex(0);
- Int_t index1 = kink->GetIndex(1);
- if (circular[index0]||circular[index1]&&kink->GetDistance()>0.2) continue;
- kink->SetMultiple(usage[index0],0);
- kink->SetMultiple(usage[index1],1);
- if (kink->GetMultiple()[0]+kink->GetMultiple()[1]>2) continue;
- if (kink->GetMultiple()[0]+kink->GetMultiple()[1]>0 && quality[indexes[i]]>0.2) continue;
- if (kink->GetMultiple()[0]+kink->GetMultiple()[1]>0 && kink->GetDistance()>0.2) continue;
- if (circular[index0]||circular[index1]&&kink->GetDistance()>0.1) continue;
+ AliKink * kinkl = (AliKink*) kinks->At(indexes[i]);
+ if (!kinkl) continue;
+ kinkl->SetTPCRow0(GetRowNumber(kinkl->GetR()));
+ Int_t index0 = kinkl->GetIndex(0);
+ Int_t index1 = kinkl->GetIndex(1);
+ if (circular[index0]||(circular[index1]&&kinkl->GetDistance()>0.2)) continue;
+ kinkl->SetMultiple(usage[index0],0);
+ kinkl->SetMultiple(usage[index1],1);
+ if (kinkl->GetMultiple()[0]+kinkl->GetMultiple()[1]>2) continue;
+ if (kinkl->GetMultiple()[0]+kinkl->GetMultiple()[1]>0 && quality[indexes[i]]>0.2) continue;
+ if (kinkl->GetMultiple()[0]+kinkl->GetMultiple()[1]>0 && kinkl->GetDistance()>0.2) continue;
+ if (circular[index0]||(circular[index1]&&kinkl->GetDistance()>0.1)) continue;
AliTPCseed * ktrack0 = (AliTPCseed*)array->At(index0);
AliTPCseed * ktrack1 = (AliTPCseed*)array->At(index1);
if (!ktrack0 || !ktrack1) continue;
- Int_t index = esd->AddKink(kink);
+ Int_t index = esd->AddKink(kinkl);
//
//
if ( ktrack0->GetKinkIndex(0)==0 && ktrack1->GetKinkIndex(0)==0) { //best kink
if (!track0) continue;
if (track0->Pt()<1.4) continue;
//remove double high momenta tracks - overlapped with kink candidates
- Int_t shared=0;
+ Int_t ishared=0;
Int_t all =0;
for (Int_t icl=track0->GetFirstPoint();icl<track0->GetLastPoint(); icl++){
if (track0->GetClusterPointer(icl)!=0){
all++;
- if (track0->GetClusterPointer(icl)->IsUsed(10)) shared++;
+ if (track0->GetClusterPointer(icl)->IsUsed(10)) ishared++;
}
}
- if (Float_t(shared+1)/Float_t(all+1)>0.5) {
+ if (Float_t(ishared+1)/Float_t(all+1)>0.5) {
delete array->RemoveAt(i);
continue;
}
AliTPCseed & mother = *pmother;
AliTPCseed & daughter = *pdaughter;
- AliKink & kink = *pkink;
- if (CheckKinkPoint(track0,mother,daughter, kink)){
+ AliKink & kinkl = *pkink;
+ if (CheckKinkPoint(track0,mother,daughter, kinkl)){
if (mother.GetNumberOfClusters()<30||daughter.GetNumberOfClusters()<20) {
delete pmother;
delete pdaughter;
delete pkink;
continue;
}
- Int_t row0= kink.GetTPCRow0();
- if (kink.GetDistance()>0.5 || kink.GetR()<110. || kink.GetR()>240.) {
+ Int_t row0= kinkl.GetTPCRow0();
+ if (kinkl.GetDistance()>0.5 || kinkl.GetR()<110. || kinkl.GetR()>240.) {
delete pmother;
delete pdaughter;
delete pkink;
continue;
}
//
- Int_t index = esd->AddKink(&kink);
+ Int_t index = esd->AddKink(&kinkl);
mother.SetKinkIndex(0,-(index+1));
daughter.SetKinkIndex(0,index+1);
if (mother.GetNumberOfClusters()>50) {
timer.Print();
}
-void AliTPCtrackerMI::FindV0s(TObjArray * array, AliESDEvent *esd)
+void AliTPCtrackerMI::FindV0s(const TObjArray * array, AliESDEvent *esd)
{
//
// find V0s
//
//
// //
- TTreeSRedirector &cstream = *fDebugStreamer;
Float_t fprimvertex[3]={GetX(),GetY(),GetZ()};
AliV0 vertex;
Double_t cradius0 = 10*10;
AliTPCseed * track0 = (AliTPCseed*)array->At(i);
if (!track0) continue;
if (AliTPCReconstructor::StreamLevel()>1){
+ TTreeSRedirector &cstream = *fDebugStreamer;
cstream<<"Tracks"<<
"Tr0.="<<track0<<
"dca="<<dca[i]<<
Int_t lab1=track1->GetLabel();
Char_t c0=track0->GetCircular();
Char_t c1=track1->GetCircular();
+ TTreeSRedirector &cstream = *fDebugStreamer;
cstream<<"V0"<<
"Event="<<eventNr<<
"vertex.="<<&vertex<<
AliTPCseed * track0 = (AliTPCseed*)array->At(index0);
AliTPCseed * track1 = (AliTPCseed*)array->At(index1);
if (track0->TPCrPID(0)>0.3&&track1->TPCrPID(0)>0.3&&v0->GetAnglep()[2]<0.15) quality[i]+=1000000; // gamma conversion candidate
- if (track0->TPCrPID(4)>0.9||track1->TPCrPID(4)>0.9&&minpulldca>4) quality[i]*=10; // lambda candidate candidate
+ if (track0->TPCrPID(4)>0.9||(track1->TPCrPID(4)>0.9&&minpulldca>4)) quality[i]*=10; // lambda candidate candidate
}
TMath::Sort(ncandidates,quality,indexes,kTRUE);
if (AliTPCReconstructor::StreamLevel()>1) {
Int_t lab0=track0->GetLabel();
Int_t lab1=track1->GetLabel();
+ TTreeSRedirector &cstream = *fDebugStreamer;
cstream<<"V02"<<
"Event="<<eventNr<<
"vertex.="<<v0<<
RemoveUsed2(fSeeds,0.85,0.85,0);
if (AliTPCReconstructor::GetRecoParam()->GetDoKinks()) FindKinks(fSeeds,fEvent);
//FindCurling(fSeeds, fEvent,0);
- if (AliTPCReconstructor::StreamLevel()>2) FindMultiMC(fSeeds, fEvent,0); // find multi found tracks
+ if (AliTPCReconstructor::StreamLevel()>2) FindMultiMC(fSeeds, fEvent,-1); // find multi found tracks
RemoveUsed2(fSeeds,0.5,0.4,20);
FindSplitted(fSeeds, fEvent,0); // find multi found tracks
+ if (AliTPCReconstructor::StreamLevel()>2) FindMultiMC(fSeeds, fEvent,0); // find multi found tracks
// //
// // refit short tracks
if (!pt) continue;
if (!t.IsActive()) continue;
// follow prolongation to the first layer
- if ( (fSectors ==fInnerSec) || (t.GetFirstPoint()-fParam->GetNRowLow()>rfirst+1) )
+ if ( (fSectors ==fInnerSec) || (t.GetFirstPoint()-fkParam->GetNRowLow()>rfirst+1) )
FollowProlongation(t, rfirst+1);
}
if (!pt) continue;
if (nr==80) pt->UpdateReference();
if (!pt->IsActive()) continue;
- // if ( (fSectors ==fOuterSec) && (pt->fFirstPoint-fParam->GetNRowLow())<nr) continue;
+ // if ( (fSectors ==fOuterSec) && (pt->fFirstPoint-fkParam->GetNRowLow())<nr) continue;
if (pt->GetRelativeSector()>17) {
continue;
}
AliTPCseed *pt=(AliTPCseed*)arr->UncheckedAt(i);
if (!pt) continue;
if (!pt->IsActive()) continue;
- // if ((fSectors ==fOuterSec) && (pt->fFirstPoint-fParam->GetNRowLow())<nr) continue;
+ // if ((fSectors ==fOuterSec) && (pt->fFirstPoint-fkParam->GetNRowLow())<nr) continue;
if (pt->GetRelativeSector()>17) {
continue;
}
//
//
AliTPCClusterParam * clparam = AliTPCcalibDB::Instance()->GetClusterParam();
- Float_t zdrift = TMath::Abs((fParam->GetZLength(0)-TMath::Abs(seed->GetZ())));
- Int_t type = (seed->GetSector() < fParam->GetNSector()/2) ? 0: (row>126) ? 1:2;
+ Float_t zdrift = TMath::Abs((fkParam->GetZLength(0)-TMath::Abs(seed->GetZ())));
+ Int_t type = (seed->GetSector() < fkParam->GetNSector()/2) ? 0: (row>126) ? 1:2;
Double_t angulary = seed->GetSnp();
angulary = angulary*angulary/(1.-angulary*angulary);
Double_t angularz = seed->GetTgl()*seed->GetTgl()*(1.+angulary);
Double_t sigmaz = clparam->GetRMS0(1,type,zdrift,TMath::Sqrt(TMath::Abs(angularz)));
seed->SetCurrentSigmaY2(sigmay*sigmay);
seed->SetCurrentSigmaZ2(sigmaz*sigmaz);
- // Float_t sd2 = TMath::Abs((fParam->GetZLength(0)-TMath::Abs(seed->GetZ())))*fParam->GetDiffL()*fParam->GetDiffL();
-// // Float_t padlength = fParam->GetPadPitchLength(seed->fSector);
+ // Float_t sd2 = TMath::Abs((fkParam->GetZLength(0)-TMath::Abs(seed->GetZ())))*fkParam->GetDiffL()*fkParam->GetDiffL();
+// // Float_t padlength = fkParam->GetPadPitchLength(seed->fSector);
// Float_t padlength = GetPadPitchLength(row);
// //
-// Float_t sresy = (seed->GetSector() < fParam->GetNSector()/2) ? 0.2 :0.3;
+// Float_t sresy = (seed->GetSector() < fkParam->GetNSector()/2) ? 0.2 :0.3;
// seed->SetCurrentSigmaY2(sd2+padlength*padlength*angulary/12.+sresy*sresy);
// //
-// Float_t sresz = fParam->GetZSigma();
+// Float_t sresz = fkParam->GetZSigma();
// seed->SetCurrentSigmaZ2(sd2+padlength*padlength*angularz*angularz*(1+angulary)/12.+sresz*sresz);
/*
Float_t wy = GetSigmaY(seed);
Int_t firstpoint = 0;
Int_t lastpoint = 159;
AliTPCTrackerPoint *point;
+ AliTPCclusterMI *cluster;
for (int iter=firstpoint; iter<lastpoint; iter++) {
- point = t->GetTrackPoint(iter);
- if (point) {
+ // Change to cluster pointers to see if we have a cluster at given padrow
+ cluster = t->GetClusterPointer(iter);
+ if (cluster) {
t->SetClusterMapBit(iter, kTRUE);
+ point = t->GetTrackPoint(iter);
if (point->IsShared())
t->SetSharedMapBit(iter,kTRUE);
else
}
}
+Bool_t AliTPCtrackerMI::IsFindable(AliTPCseed & track){
+ //
+ // return flag if there is findable cluster at given position
+ //
+ Float_t kDeltaZ=10;
+ Float_t z = track.GetZ();
+
+ if (TMath::Abs(z)<(AliTPCReconstructor::GetCtgRange()*track.GetX()+kDeltaZ) &&
+ TMath::Abs(z)<fkParam->GetZLength(0) &&
+ (TMath::Abs(track.GetSnp())<AliTPCReconstructor::GetMaxSnpTracker()))
+ return kTRUE;
+ return kFALSE;
+}
void AliTPCtrackerMI::AddCovariance(AliTPCseed * seed){