Float_t gc2f[3]={0.,0.,0.};
Double_t gc2[3]={0.,0.,0.};
AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
- itsRec=rpcont->FetchClusters(0,itsClusterTree);
+ rpcont->FetchClusters(0,itsClusterTree);
if(!rpcont->IsSPDActive()){
AliWarning("No SPD rec points found, 3D vertex not calculated");
return -1;
Int_t nolines = 0;
// Loop on modules of layer 1
- Int_t firstL1 = AliITSgeomTGeo::GetModuleIndex(1,1,1);
+ Int_t firstL1 = TMath::Max(0,AliITSgeomTGeo::GetModuleIndex(1,1,1));
Int_t lastL1 = AliITSgeomTGeo::GetModuleIndex(2,1,1)-1;
for(Int_t modul1= firstL1; modul1<=lastL1;modul1++){ // Loop on modules of layer 1
if(!fUseModule[modul1]) continue;
TH3F *h3dcs = new TH3F("h3dcs","xyz distribution",nbrcs,rl,rh,nbrcs,rl,rh,nbzcs,zl,zh);
// cleanup of the TCLonesArray of tracklets (i.e. fakes are removed)
- Int_t *validate = new Int_t [fLines.GetEntriesFast()];
- for(Int_t i=0; i<fLines.GetEntriesFast();i++)validate[i]=0;
- for(Int_t i=0; i<fLines.GetEntriesFast()-1;i++){
+ Int_t vsiz = fLines.GetEntriesFast();
+ Int_t *validate = new Int_t [vsiz];
+ for(Int_t i=0; i<vsiz;i++)validate[i]=0;
+ for(Int_t i=0; i<vsiz-1;i++){
AliStrLine *l1 = (AliStrLine*)fLines.At(i);
for(Int_t j=i+1;j<fLines.GetEntriesFast();j++){
AliStrLine *l2 = (AliStrLine*)fLines.At(j);
Int_t numbtracklets=0;
- for(Int_t i=0; i<fLines.GetEntriesFast();i++)if(validate[i]>=1)numbtracklets++;
+ for(Int_t i=0; i<vsiz;i++)if(validate[i]>=1)numbtracklets++;
if(numbtracklets<2){
delete [] validate;
delete h3d;
//________________________________________________________
void AliITSVertexer3D::FindOther3DVertices(TTree *itsClusterTree){
// pileup identification based on 3D vertexing with not used clusters
- MarkUsedClusters();
- fLines.Clear("C");
- Int_t nolines = FindTracklets(itsClusterTree,2);
- if(nolines>=2){
- Int_t nr=RemoveTracklets();
- nolines-=nr;
+
+ fVertArray = new AliESDVertex[kMaxPileupVertices+1];
+ fVertArray[0]=(*fCurrentVertex);
+ Int_t nFoundVert=1;
+ for(Int_t iPilV=1; iPilV<=kMaxPileupVertices; iPilV++){
+ MarkUsedClusters();
+ fLines.Clear("C");
+ Int_t nolines = FindTracklets(itsClusterTree,2);
if(nolines>=2){
- Int_t rc=Prepare3DVertex(2);
- if(rc==0){
- fVert3D=AliVertexerTracks::TrackletVertexFinder(&fLines,0);
- if(fVert3D.GetNContributors()>=fMinTrackletsForPilup){
- fIsPileup=kTRUE;
- fNoVertices=2;
- fVertArray = new AliESDVertex[2];
- fVertArray[0]=(*fCurrentVertex);
- fVertArray[1]=fVert3D;
- fZpuv=fVert3D.GetZv();
- fNTrpuv=fVert3D.GetNContributors();
+ Int_t nr=RemoveTracklets();
+ nolines-=nr;
+ if(nolines>=2){
+ Int_t rc=Prepare3DVertex(2);
+ if(rc==0){
+ fVert3D=AliVertexerTracks::TrackletVertexFinder(&fLines,0);
+ if(fVert3D.GetNContributors()>=fMinTrackletsForPilup){
+ fIsPileup=kTRUE;
+ fVertArray[nFoundVert]=fVert3D;
+ nFoundVert++;
+ if(nFoundVert==2){
+ fZpuv=fVert3D.GetZv();
+ fNTrpuv=fVert3D.GetNContributors();
+ }
+ }
}
}
}
}
+ fNoVertices=nFoundVert;
}
//______________________________________________________________________
void AliITSVertexer3D::PileupFromZ(){