//
// the clusterization is performed here
//
- AliITSsegmentationUpgrade *segmentation2 = 0x0;
+ AliITSsegmentationUpgrade *segmentation = new AliITSsegmentationUpgrade();
AliITSRecPoint recpnt;
- if(!segmentation2) segmentation2 = new AliITSsegmentationUpgrade();
Int_t nClusters =0;
TClonesArray &lrecp = *fRecPoints;
for(Int_t ilayer=0; ilayer < 6 ;ilayer ++){
TClonesArray *pArrDig= (TClonesArray*)digList->At(ilayer);
StartEvent();
- AliInfo(Form("layer %i with digit entries %i",ilayer,pArrDig->GetEntries()));
+ AliDebug(1,Form("layer %i : # digits %i",ilayer,pArrDig->GetEntries()));
for(Int_t ientr =0; ientr < pArrDig->GetEntries() ; ientr++){
AliITSDigitUpgrade *dig = (AliITSDigitUpgrade*)pArrDig->At(ientr);
Int_t colz=dig->GetzPixelNumber();
xPixC2 = GetClusterMeanRow(ilayer, nClu);
zPixC2 = GetClusterMeanCol(ilayer, nClu);
- xzl2[0] = xPixC2*(segmentation2->GetCellSizeX(ilayer))+0.5*(segmentation2-> GetCellSizeX(ilayer));
- xzl2[1] = zPixC2*(segmentation2->GetCellSizeZ(ilayer))+0.5*(segmentation2->GetCellSizeZ(ilayer))-(segmentation2->GetHalfLength(ilayer));
- check2 = segmentation2->DetToGlobal(ilayer,xzl2[0], xzl2[1],xcheck2,ycheck2,zcheck2);
+ xzl2[0] = xPixC2*(segmentation->GetCellSizeX(ilayer))+0.5*(segmentation-> GetCellSizeX(ilayer));
+ xzl2[1] = zPixC2*(segmentation->GetCellSizeZ(ilayer))+0.5*(segmentation->GetCellSizeZ(ilayer))-(segmentation->GetHalfLength(ilayer));
+ check2 = segmentation->DetToGlobal(ilayer,xzl2[0], xzl2[1],xcheck2,ycheck2,zcheck2);
recpnt.SetType(GetClusterType(ilayer,nClu ));
// recpnt.SetLocalCoord(xzl2[0],xzl2[1]); //temporary solution (no LocalToTrack Matrix)
//from global to tracking system coordinate
recpnt.SetZ(zclu1);
Double_t xsize, zsize;
- segmentation2->GetSegmentation(ilayer,xsize, zsize);
+ segmentation->GetSegmentation(ilayer,xsize, zsize);
recpnt.SetSigmaY2(xsize/TMath::Sqrt(12)*xsize/TMath::Sqrt(12));
recpnt.SetSigmaZ2(zsize/TMath::Sqrt(12)*zsize/TMath::Sqrt(12));
new(lrecp[nClusters++]) AliITSRecPoint(recpnt);
AliInfo(Form("recpoint : Nelectrons %f (entry %i)",recpnt.GetQ(),fRecPoints->GetEntries()));
}//cluster list entries
}//ilayer
+ if(segmentation) delete segmentation;
}
fCluLayer = 0;
fCluCoord = 0;
fMinNPoints = 3;
- AliITSsegmentationUpgrade *segmentation2 = 0x0;
- if(!segmentation2)
- segmentation2 = new AliITSsegmentationUpgrade();
+ //AliITSsegmentationUpgrade *segmentation2 = 0x0;
+ //if(!segmentation2)
+ // segmentation2 = new AliITSsegmentationUpgrade();
for(Int_t layer=0; layer<6; layer++){
Double_t p=0.;
Double_t zC= 0.;
}
//_______________________________________________________________________
Int_t AliITStrackerUpgrade::LoadClusters(TTree *clusTree){
+//
+// Load clusters for tracking
+//
+
TClonesArray statITSCluster("AliITSRecPoint");
- for(Int_t layer=0; layer<6; layer++){
- TClonesArray *ITSCluster = &statITSCluster;
+ TClonesArray *ITSCluster = &statITSCluster;
+
TBranch* itsClusterBranch=clusTree->GetBranch("ITSRecPoints");
if (!itsClusterBranch){
AliError("can't get the branch with the ITS clusters ! \n");
return 1;
}
itsClusterBranch->SetAddress(&ITSCluster);
- if (!clusTree->GetEvent(layer)) continue;
+ clusTree->GetEvent(0);
Int_t nCluster = ITSCluster->GetEntriesFast();
for(Int_t i=0; i<nCluster; i++){
AliITSRecPoint *recp = (AliITSRecPoint*)ITSCluster->UncheckedAt(i);
-
- fLayers[layer]->InsertCluster(new AliITSRecPoint(*recp));
+ fLayers[recp->GetLayer()]->InsertCluster(new AliITSRecPoint(*recp));
}//loop clusters
- }//loop layer
+
+
+
SetClusterTree(clusTree);
return 0;
TClonesArray &clulay = *fCluLayer[ilay];
TClonesArray &clucoo = *fCluCoord[ilay];
if (!ForceSkippingOfLayer(ilay)){
+ AliDebug(2,Form("number of clusters in layer %i : %i",ilay,fLayers[ilay]->GetNumberOfClusters()));
for(Int_t cli=0;cli<fLayers[ilay]->GetNumberOfClusters();cli++){
AliITSRecPoint* cls = (AliITSRecPoint*)fLayers[ilay]->GetCluster(cli);
if(cls->TestBit(kSAflag)==kTRUE) continue;
Double_t yclu1 = p1->GetY();
Double_t zclu1 = p1->GetZ();
layer=p1->GetLayer();
- AliITSsegmentationUpgrade *segmentation = 0x0;
- if(!segmentation)
- segmentation = new AliITSsegmentationUpgrade();
+ AliITSsegmentationUpgrade *segmentation = new AliITSsegmentationUpgrade();
radius=segmentation->GetRadius(layer);
Double_t cv=0.,tgl2=0.,phi2=0.;
Int_t cln1=mrk1;
Int_t AliITStrackerUpgrade::SearchClusters(Int_t layer,Double_t phiwindow,Double_t lambdawindow, AliITStrackSA* trs,Double_t /*zvertex*/,Int_t pflag){
//function used to to find the clusters associated to the track
- AliITSsegmentationUpgrade *segmentation = 0x0;
- if(!segmentation)
- segmentation = new AliITSsegmentationUpgrade();
+ AliITSsegmentationUpgrade *segmentation = new AliITSsegmentationUpgrade();
- if(ForceSkippingOfLayer(layer)) return 0;
+ AliDebug(2,"Starting...");
+ if(ForceSkippingOfLayer(layer)) {
+ AliDebug(2,Form("Forcing skipping of layer %i. Exiting",layer));
+ return 0;
+ }
Int_t nc=0;
Double_t r=segmentation->GetRadius(layer);
Int_t ncl = fCluLayer[layer]->GetEntries();
+ AliDebug(2,Form(" Number of clusters %i in layer %i.",ncl,layer));
for (Int_t index=0; index<ncl; index++) {
AliITSRecPoint *c = (AliITSRecPoint*)fCluLayer[layer]->At(index);
if (!c) continue;
fPointc[0]=arr->GetX();
fPointc[1]=arr->GetY();
}
+ delete segmentation;
return nc;
}
Double_t xz[2];
xz[0]= cl->GetDetLocalX();
xz[1]= cl->GetDetLocalZ() ;
- AliITSsegmentationUpgrade *segmentation2 = 0x0;
- if(!segmentation2)
- segmentation2 = new AliITSsegmentationUpgrade();
+ AliITSsegmentationUpgrade *segmentation2 = new AliITSsegmentationUpgrade();
Bool_t check2;
Int_t ilayer;
ilayer = cl->GetLayer();
if(x!=0 && y!=0)
phi=TMath::ATan2(y-vertex[1],x-vertex[0]);
lambda=TMath::ATan2(z-vertex[2],TMath::Sqrt((x-vertex[0])*(x-vertex[0])+(y-vertex[1])*(y-vertex[1])));
+ if(segmentation2) delete segmentation2;
}
//________________________________________________________________________
for (k=0; k<AliITSgeomTGeo::GetNLayers(); k++) {
index[k]=clusters[k];
}
- AliITSsegmentationUpgrade *segmentation = 0x0;
- if(!segmentation)
- segmentation = new AliITSsegmentationUpgrade();
+ AliITSsegmentationUpgrade *segmentation = new AliITSsegmentationUpgrade();
ULong_t trStatus=0;
if(track->GetESDtrack()) trStatus=track->GetStatus();
Double_t oldGlobXYZ[3];
if (!track->GetXYZ(oldGlobXYZ)) {
+ if(segmentation) delete segmentation;
return kFALSE;
}
// continue if we are already beyond this layer
}
Double_t phi,z;
if (!track->GetPhiZat(r,phi,z)){
+ if(segmentation) delete segmentation;
return kFALSE;
}
// only for ITS-SA tracks refit
Double_t alpha= (ladder*18.+9.)*TMath::Pi()/180.;
if (!track->Propagate(alpha,r)) {
-
+ if(segmentation) delete segmentation;
return kFALSE;
}
clAcc=cl;
maxchi2=chi2;
} else {
- return kFALSE;
+ if(segmentation) delete segmentation;
+ return kFALSE;
}
}
}
if (clAcc) {
if (!UpdateMI(track,clAcc,maxchi2,idx)){
+ if(segmentation) delete segmentation;
return kFALSE;
}
track->SetSampledEdx(clAcc->GetQ(),ilayer-2);
// cross material
// add time if going outward
if(!CorrectForLayerMaterial(track,ilayer,oldGlobXYZ,dir)){
+ if(segmentation) delete segmentation;
return kFALSE;
}
track->SetCheckInvariant(kFALSE);
} // end loop on layers
if (!track->PropagateTo(xx,0.,0.)){
+ if(segmentation) delete segmentation;
return kFALSE;
- }
+ }
+ if(segmentation) delete segmentation;
return kTRUE;
}