Multi-vertexerTracks with clusterization + steering options in GRPRecoParam
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 Oct 2011 09:51:32 +0000 (09:51 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 Oct 2011 09:51:32 +0000 (09:51 +0000)
STEER/ESD/AliVertexerTracks.cxx
STEER/ESD/AliVertexerTracks.h
STEER/STEER/AliGRPRecoParam.cxx
STEER/STEER/AliGRPRecoParam.h

index 73d450a..b62270c 100644 (file)
@@ -86,7 +86,10 @@ fMVScanStep(3.),
 fMVMaxWghNtr(10.),
 fMVFinalWBinary(kTRUE),
 fBCSpacing(50),
 fMVMaxWghNtr(10.),
 fMVFinalWBinary(kTRUE),
 fBCSpacing(50),
-fMVVertices(0)
+fMVVertices(0),
+fClusterize(kFALSE),
+fDeltaZCutForCluster(0.1),
+fnSigmaZCutForCluster(999999.)
 {
 //
 // Default constructor
 {
 //
 // Default constructor
@@ -136,7 +139,10 @@ fMVScanStep(3.),
 fMVMaxWghNtr(10.),
 fMVFinalWBinary(kTRUE),
 fBCSpacing(50),
 fMVMaxWghNtr(10.),
 fMVFinalWBinary(kTRUE),
 fBCSpacing(50),
-fMVVertices(0)
+fMVVertices(0),
+fClusterize(kFALSE),
+fDeltaZCutForCluster(0.1),
+fnSigmaZCutForCluster(999999.)
 {
 //
 // Standard constructor
 {
 //
 // Standard constructor
@@ -192,6 +198,8 @@ AliESDVertex* AliVertexerTracks::FindPrimaryVertex(const AliVEvent *vEvent)
   if(nTrks>500) f = new TFile("VertexerTracks.root","recreate");
   TObjArray trkArrayOrig(nTrks);
   UShort_t *idOrig = new UShort_t[nTrks];
   if(nTrks>500) f = new TFile("VertexerTracks.root","recreate");
   TObjArray trkArrayOrig(nTrks);
   UShort_t *idOrig = new UShort_t[nTrks];
+  Double_t *zTr = new Double_t[nTrks];
+  Double_t *err2zTr = new Double_t[nTrks];
 
   Int_t nTrksOrig=0;
   AliExternalTrackParam *t=0;
 
   Int_t nTrksOrig=0;
   AliExternalTrackParam *t=0;
@@ -246,16 +254,21 @@ AliESDVertex* AliVertexerTracks::FindPrimaryVertex(const AliVEvent *vEvent)
     //
     trkArrayOrig.AddLast(t);
     idOrig[nTrksOrig]=(UShort_t)track->GetID();
     //
     trkArrayOrig.AddLast(t);
     idOrig[nTrksOrig]=(UShort_t)track->GetID();
+    zTr[nTrksOrig]=t->GetZ();
+    err2zTr[nTrksOrig]=t->GetSigmaZ2();
+
     nTrksOrig++;
   } // end loop on tracks
   
   // call method that will reconstruct the vertex
     nTrksOrig++;
   } // end loop on tracks
   
   // call method that will reconstruct the vertex
-  FindPrimaryVertex(&trkArrayOrig,idOrig);
-
+  if(fClusterize) FindAllVertices(nTrksOrig,&trkArrayOrig,zTr,err2zTr,idOrig);
+  else FindPrimaryVertex(&trkArrayOrig,idOrig);
   if(!inputAOD) AnalyzePileUp((AliESDEvent*)vEvent);
 
   if(fMode==0) trkArrayOrig.Delete();
   delete [] idOrig; idOrig=NULL;
   if(!inputAOD) AnalyzePileUp((AliESDEvent*)vEvent);
 
   if(fMode==0) trkArrayOrig.Delete();
   delete [] idOrig; idOrig=NULL;
+  delete [] zTr; zTr=NULL;
+  delete [] err2zTr; err2zTr=NULL;
 
   if(f) {
     f->Close(); delete f; f = NULL;
 
   if(f) {
     f->Close(); delete f; f = NULL;
@@ -273,7 +286,7 @@ AliESDVertex* AliVertexerTracks::FindPrimaryVertex(const AliVEvent *vEvent)
       esdt->SetVertexID(-1);
     }
   }
       esdt->SetVertexID(-1);
     }
   }
-
   return fCurrentVertex;
 }
 //----------------------------------------------------------------------------
   return fCurrentVertex;
 }
 //----------------------------------------------------------------------------
@@ -1017,7 +1030,11 @@ void AliVertexerTracks::SetCuts(Double_t *cuts, Int_t ncuts)
   if (ncuts>19) SetMVFinalWBinary(cuts[19]>0);
   if (ncuts>20) if (cuts[20]>20.)  SetBCSpacing(int(cuts[20]));
   //
   if (ncuts>19) SetMVFinalWBinary(cuts[19]>0);
   if (ncuts>20) if (cuts[20]>20.)  SetBCSpacing(int(cuts[20]));
   //
-  if (fAlgo==kMultiVertexer) SetSelectOnTOFBunchCrossing(kTRUE,kTRUE);
+  if (ncuts>21) if (cuts[21]>0.5)  SetUseTrackClusterization(kTRUE);
+  if (ncuts>22) SetDeltaZCutForCluster(cuts[22]);
+  if (ncuts>23) SetnSigmaZCutForCluster(cuts[23]);  
+  //
+  if (fAlgo==kMultiVertexer || fClusterize) SetSelectOnTOFBunchCrossing(kTRUE,kTRUE);
   else                       SetSelectOnTOFBunchCrossing(kFALSE,kTRUE);
   //
   return;
   else                       SetSelectOnTOFBunchCrossing(kFALSE,kTRUE);
   //
   return;
@@ -2071,3 +2088,113 @@ void AliVertexerTracks::AnalyzePileUp(AliESDEvent* esdEv)
   //
 }
 
   //
 }
 
+//______________________________________________________
+void AliVertexerTracks::FindAllVertices(Int_t nTrksOrig, 
+                                       const TObjArray *trkArrayOrig,
+                                       Double_t* zTr, 
+                                       Double_t* err2zTr, 
+                                       UShort_t* idOrig){
+
+  // clusterize tracks using z coordinates of intersection with beam axis
+  // and compute all vertices 
+
+  UShort_t* posOrig=new UShort_t[nTrksOrig];
+  for(Int_t iTr=0; iTr<nTrksOrig; iTr++) posOrig[iTr]=iTr;
+
+  // sort points along Z
+  AliDebug(1,Form("Sort points along Z, used tracks %d",nTrksOrig));
+  for(Int_t iTr1=0; iTr1<nTrksOrig; iTr1++){
+    for(Int_t iTr2=iTr1+1; iTr2<nTrksOrig; iTr2++){
+      if(zTr[iTr1]>zTr[iTr2]){
+       Double_t tmpz=zTr[iTr2];
+       Double_t tmperr=err2zTr[iTr2];
+       UShort_t tmppos=posOrig[iTr2];
+       UShort_t tmpid=idOrig[iTr2];
+       zTr[iTr2]=zTr[iTr1];
+       err2zTr[iTr2]=err2zTr[iTr1];
+       posOrig[iTr2]=posOrig[iTr1];
+       idOrig[iTr2]=idOrig[iTr1];
+       zTr[iTr1]=tmpz;
+       err2zTr[iTr1]=tmperr;
+       idOrig[iTr1]=tmpid;
+       posOrig[iTr1]=tmppos;
+      }
+    }
+  }
+
+  // clusterize
+  Int_t nClusters=0;
+  Int_t* firstTr=new Int_t[nTrksOrig];
+  Int_t* lastTr=new Int_t[nTrksOrig];
+
+  firstTr[0]=0;
+  for(Int_t iTr=0; iTr<nTrksOrig-1; iTr++){
+    Double_t distz=zTr[iTr+1]-zTr[iTr];
+    Double_t errdistz=TMath::Sqrt(err2zTr[iTr+1]+err2zTr[iTr]);
+    if(errdistz<=0.000001) errdistz=0.000001;
+    if(distz>fDeltaZCutForCluster || (distz/errdistz)>fnSigmaZCutForCluster){
+      lastTr[nClusters]=iTr;
+      firstTr[nClusters+1]=iTr+1;
+      nClusters++;
+    }
+  }
+  lastTr[nClusters]=nTrksOrig-1;
+
+  // Compute vertices
+  AliDebug(1,Form("Number of found clusters %d",nClusters+1));
+  Int_t nFoundVertices=0;
+
+  if (!fMVVertices) fMVVertices = new TObjArray(nClusters+1);
+
+  fMVVertices->Clear();
+  TObjArray cluTrackArr(nTrksOrig);
+  UShort_t *idTrkClu=new UShort_t[nTrksOrig];
+  //  Int_t maxContr=0;
+  //  Int_t maxPos=-1;
+
+  for(Int_t iClu=0; iClu<=nClusters; iClu++){
+    Int_t nCluTracks=lastTr[iClu]-firstTr[iClu]+1;
+    cluTrackArr.Clear();
+    AliDebug(1,Form(" Vertex #%d tracks %d first tr %d  last track %d",iClu,nCluTracks,firstTr[iClu],lastTr[iClu]));
+    Int_t nSelTr=0;
+    for(Int_t iTr=firstTr[iClu]; iTr<=lastTr[iClu]; iTr++){
+      AliExternalTrackParam* t=(AliExternalTrackParam*)trkArrayOrig->At(posOrig[iTr]);
+      if(TMath::Abs(t->GetZ()-zTr[iTr])>0.00001){
+       AliError(Form("Clu %d Track %d zTrack=%f  zVec=%f\n",iClu,iTr,t->GetZ(),zTr[iTr]));
+      }
+      cluTrackArr.AddAt(t,nSelTr);
+      idTrkClu[nSelTr]=idOrig[iTr];
+      AliDebug(1,Form("   Add track %d: id %d, z=%f",iTr,idOrig[iTr],zTr[iTr]));
+      nSelTr++;
+    }
+    AliESDVertex* vert=FindPrimaryVertex(&cluTrackArr,idTrkClu);
+    AliDebug(1,Form("Found vertex in z=%f with %d contributors",vert->GetZv(),
+                vert->GetNContributors()));
+
+    fCurrentVertex=0;
+    if(vert->GetNContributors()>0){
+      nFoundVertices++;
+      fMVVertices->AddLast(vert);
+    }
+    //    if(vert->GetNContributors()>maxContr){
+    //      maxContr=vert->GetNContributors();
+    //      maxPos=nFoundVertices-1;
+    //    }
+  }
+
+  AliDebug(1,Form("Number of found vertices %d (%d)",nFoundVertices,fMVVertices->GetEntriesFast()));
+  // if(maxPos>=0 && maxContr>0){
+  //   AliESDVertex* vtxMax=(AliESDVertex*)fMVVertices->At(maxPos);
+  //   if(fCurrentVertex) delete fCurrentVertex; 
+  //   fCurrentVertex=new AliESDVertex(*vtxMax);
+  // }
+
+  delete [] firstTr;
+  delete [] lastTr;
+  delete [] idTrkClu;
+  delete [] posOrig;
+
+  return;
+
+}
index 50e253a..904c9cb 100644 (file)
@@ -147,6 +147,17 @@ class AliVertexerTracks : public TObject {
   TObjArray*    GetVerticesArray() const {return (TObjArray*)fMVVertices;}   // RS to be removed
   void          AnalyzePileUp(AliESDEvent* esdEv);
   void          SetBCSpacing(Int_t ns=50) {fBCSpacing = ns;}
   TObjArray*    GetVerticesArray() const {return (TObjArray*)fMVVertices;}   // RS to be removed
   void          AnalyzePileUp(AliESDEvent* esdEv);
   void          SetBCSpacing(Int_t ns=50) {fBCSpacing = ns;}
+
+  // Configuration of multi-vertexing vis pre-clusterization of tracks
+  void SetUseTrackClusterization(Bool_t opt=kFALSE){fClusterize=opt;}
+  void SetDeltaZCutForCluster(Double_t cut){fDeltaZCutForCluster=cut;}
+  void SetnSigmaZCutForCluster(Double_t cut){fnSigmaZCutForCluster=cut;}
+
+  Bool_t GetUseTrackClusterization() const {return fClusterize;}
+  Double_t GetDeltaZCutForCluster() const {return fDeltaZCutForCluster;}
+  Double_t GetnSigmaZCutForCluster() const {return fnSigmaZCutForCluster;}
+
+
   //
  protected:
   void     HelixVertexFinder();
   //
  protected:
   void     HelixVertexFinder();
@@ -163,6 +174,8 @@ class AliVertexerTracks : public TObject {
   void     StrLinVertexFinderMinDist(Int_t optUseWeights=0);
   void     TooFewTracks();
 
   void     StrLinVertexFinderMinDist(Int_t optUseWeights=0);
   void     TooFewTracks();
 
+  void     FindAllVertices(Int_t nTrksOrig, const TObjArray *trkArrayOrig, Double_t* zTr, Double_t* err2zTr, UShort_t* idOrig);
+
   AliESDVertex fVert;         // vertex after vertex finder
   AliESDVertex *fCurrentVertex;  // ESD vertex after fitter
   UShort_t  fMode;            // 0 ITS+TPC; 1 TPC
   AliESDVertex fVert;         // vertex after vertex finder
   AliESDVertex *fCurrentVertex;  // ESD vertex after fitter
   UShort_t  fMode;            // 0 ITS+TPC; 1 TPC
@@ -224,12 +237,16 @@ class AliVertexerTracks : public TObject {
   Bool_t   fMVFinalWBinary;            // for the final fit use binary weights
   Int_t    fBCSpacing;                 // BC Spacing in ns (will define the rounding of BCid)
   TObjArray* fMVVertices;              // array of found vertices
   Bool_t   fMVFinalWBinary;            // for the final fit use binary weights
   Int_t    fBCSpacing;                 // BC Spacing in ns (will define the rounding of BCid)
   TObjArray* fMVVertices;              // array of found vertices
+
+  Bool_t   fClusterize;                // flag to activate track clusterization into vertices before vertex finder
+  Double_t fDeltaZCutForCluster;       // minimum distance in z between tracks to create new cluster
+  Double_t fnSigmaZCutForCluster;      // minimum distacnce in number of sigma along z to create new cluster
   //
  private:
   AliVertexerTracks(const AliVertexerTracks & source);
   AliVertexerTracks & operator=(const AliVertexerTracks & source);
 
   //
  private:
   AliVertexerTracks(const AliVertexerTracks & source);
   AliVertexerTracks & operator=(const AliVertexerTracks & source);
 
-  ClassDef(AliVertexerTracks,15) // 3D Vertexing with tracks 
+  ClassDef(AliVertexerTracks,16) // 3D Vertexing with tracks 
 };
 
 #endif
 };
 
 #endif
index 7024ed2..f2e091d 100644 (file)
@@ -31,7 +31,7 @@ AliGRPRecoParam::AliGRPRecoParam() : AliDetectorRecoParam(),
 fMostProbablePt(0.350),
 fVertexerTracksConstraintITS(kTRUE),
 fVertexerTracksConstraintTPC(kTRUE),
 fMostProbablePt(0.350),
 fVertexerTracksConstraintITS(kTRUE),
 fVertexerTracksConstraintTPC(kTRUE),
-fVertexerTracksNCuts(21),
+fVertexerTracksNCuts(24),
 fVertexerTracksITSdcacut(0.1),
 fVertexerTracksITSdcacutIter0(0.1),
 fVertexerTracksITSmaxd0z0(0.5),
 fVertexerTracksITSdcacut(0.1),
 fVertexerTracksITSdcacutIter0(0.1),
 fVertexerTracksITSmaxd0z0(0.5),
@@ -55,6 +55,10 @@ fVertexerTracksITSMVMaxWghNtr(10),
 fVertexerTracksITSMVFinalWBinary(1),
 fVertexerTracksITSMVBCSpacing(50),
 //
 fVertexerTracksITSMVFinalWBinary(1),
 fVertexerTracksITSMVBCSpacing(50),
 //
+fVertexerTracksITSclusterize(0),
+fVertexerTracksITSclusterdz(999999.),
+fVertexerTracksITSclusternsigmaz(3.),
+//
 fVertexerTracksTPCdcacut(0.1),
 fVertexerTracksTPCdcacutIter0(1.0),
 fVertexerTracksTPCmaxd0z0(5.),
 fVertexerTracksTPCdcacut(0.1),
 fVertexerTracksTPCdcacutIter0(1.0),
 fVertexerTracksTPCmaxd0z0(5.),
@@ -78,6 +82,10 @@ fVertexerTracksTPCMVMaxWghNtr(10),
 fVertexerTracksTPCMVFinalWBinary(1),
 fVertexerTracksTPCMVBCSpacing(50),
 //
 fVertexerTracksTPCMVFinalWBinary(1),
 fVertexerTracksTPCMVBCSpacing(50),
 //
+fVertexerTracksTPCclusterize(0),
+fVertexerTracksTPCclusterdz(999999.),
+fVertexerTracksTPCclusternsigmaz(3.),
+//
 fVertexerV0NCuts(7),
 fVertexerV0Chi2max(33.),
 fVertexerV0DNmin(0.05),
 fVertexerV0NCuts(7),
 fVertexerV0Chi2max(33.),
 fVertexerV0DNmin(0.05),
@@ -140,6 +148,10 @@ AliGRPRecoParam::AliGRPRecoParam(const AliGRPRecoParam& par) :
   fVertexerTracksITSMVFinalWBinary(par.fVertexerTracksITSMVFinalWBinary),
   fVertexerTracksITSMVBCSpacing(par.fVertexerTracksITSMVBCSpacing),
   //
   fVertexerTracksITSMVFinalWBinary(par.fVertexerTracksITSMVFinalWBinary),
   fVertexerTracksITSMVBCSpacing(par.fVertexerTracksITSMVBCSpacing),
   //
+  fVertexerTracksITSclusterize(par.fVertexerTracksITSclusterize),
+  fVertexerTracksITSclusterdz(par.fVertexerTracksITSclusterdz),
+  fVertexerTracksITSclusternsigmaz(par.fVertexerTracksITSclusternsigmaz),
+  //
   fVertexerTracksTPCdcacut(par.fVertexerTracksTPCdcacut),
   fVertexerTracksTPCdcacutIter0(par.fVertexerTracksTPCdcacutIter0),
   fVertexerTracksTPCmaxd0z0(par.fVertexerTracksTPCmaxd0z0),
   fVertexerTracksTPCdcacut(par.fVertexerTracksTPCdcacut),
   fVertexerTracksTPCdcacutIter0(par.fVertexerTracksTPCdcacutIter0),
   fVertexerTracksTPCmaxd0z0(par.fVertexerTracksTPCmaxd0z0),
@@ -163,6 +175,10 @@ AliGRPRecoParam::AliGRPRecoParam(const AliGRPRecoParam& par) :
   fVertexerTracksTPCMVFinalWBinary(par.fVertexerTracksTPCMVFinalWBinary),
   fVertexerTracksTPCMVBCSpacing(par.fVertexerTracksTPCMVBCSpacing),
   //
   fVertexerTracksTPCMVFinalWBinary(par.fVertexerTracksTPCMVFinalWBinary),
   fVertexerTracksTPCMVBCSpacing(par.fVertexerTracksTPCMVBCSpacing),
   //
+  fVertexerTracksTPCclusterize(par.fVertexerTracksTPCclusterize),
+  fVertexerTracksTPCclusterdz(par.fVertexerTracksTPCclusterdz),
+  fVertexerTracksTPCclusternsigmaz(par.fVertexerTracksTPCclusternsigmaz),
+  //
   fVertexerV0NCuts(par.fVertexerV0NCuts),
   fVertexerV0Chi2max(par.fVertexerV0Chi2max),
   fVertexerV0DNmin(par.fVertexerV0DNmin),
   fVertexerV0NCuts(par.fVertexerV0NCuts),
   fVertexerV0Chi2max(par.fVertexerV0Chi2max),
   fVertexerV0DNmin(par.fVertexerV0DNmin),
@@ -280,6 +296,10 @@ void AliGRPRecoParam::GetVertexerTracksCuts(Int_t mode,Double_t *cuts, int n) co
     if (n>18)  cuts[18]= fVertexerTracksTPCMVMaxWghNtr;
     if (n>19)  cuts[19]= fVertexerTracksTPCMVFinalWBinary;
     if (n>20)  cuts[20]= fVertexerTracksTPCMVBCSpacing;
     if (n>18)  cuts[18]= fVertexerTracksTPCMVMaxWghNtr;
     if (n>19)  cuts[19]= fVertexerTracksTPCMVFinalWBinary;
     if (n>20)  cuts[20]= fVertexerTracksTPCMVBCSpacing;
+    //
+    if (n>21)  cuts[21]= fVertexerTracksTPCclusterize;
+    if (n>22)  cuts[22]= fVertexerTracksTPCclusterdz;
+    if (n>23)  cuts[23]= fVertexerTracksTPCclusternsigmaz;
   } else {
     if (n>0 ) cuts[0] = fVertexerTracksITSdcacut;
     if (n>1 ) cuts[1] = fVertexerTracksITSdcacutIter0;
   } else {
     if (n>0 ) cuts[0] = fVertexerTracksITSdcacut;
     if (n>1 ) cuts[1] = fVertexerTracksITSdcacutIter0;
@@ -303,12 +323,16 @@ void AliGRPRecoParam::GetVertexerTracksCuts(Int_t mode,Double_t *cuts, int n) co
     if (n>18) cuts[18]= fVertexerTracksITSMVMaxWghNtr;
     if (n>19) cuts[19]= fVertexerTracksITSMVFinalWBinary;
     if (n>20) cuts[20]= fVertexerTracksITSMVBCSpacing;
     if (n>18) cuts[18]= fVertexerTracksITSMVMaxWghNtr;
     if (n>19) cuts[19]= fVertexerTracksITSMVFinalWBinary;
     if (n>20) cuts[20]= fVertexerTracksITSMVBCSpacing;
+    //
+    if (n>21)  cuts[21]= fVertexerTracksITSclusterize;
+    if (n>22)  cuts[22]= fVertexerTracksITSclusterdz;
+    if (n>23)  cuts[23]= fVertexerTracksITSclusternsigmaz;
   }
 
   return;
 }
 //_____________________________________________________________________________
   }
 
   return;
 }
 //_____________________________________________________________________________
-void AliGRPRecoParam::SetVertexerTracksCuts(Int_t mode,Int_t ncuts,Double_t cuts[21]) {
+void AliGRPRecoParam::SetVertexerTracksCuts(Int_t mode,Int_t ncuts,Double_t* cuts) {
   //
   // set cuts for ITS (0) or TPC (1) mode
   //
   //
   // set cuts for ITS (0) or TPC (1) mode
   //
@@ -340,6 +364,10 @@ void AliGRPRecoParam::SetVertexerTracksCuts(Int_t mode,Int_t ncuts,Double_t cuts
     if (ncuts>18) fVertexerTracksTPCMVMaxWghNtr    = cuts[18];
     if (ncuts>19) fVertexerTracksTPCMVFinalWBinary = cuts[19];
     if (ncuts>20) fVertexerTracksTPCMVBCSpacing    = cuts[20];
     if (ncuts>18) fVertexerTracksTPCMVMaxWghNtr    = cuts[18];
     if (ncuts>19) fVertexerTracksTPCMVFinalWBinary = cuts[19];
     if (ncuts>20) fVertexerTracksTPCMVBCSpacing    = cuts[20];
+    //
+    if (ncuts>21) fVertexerTracksTPCclusterize     = cuts[21];
+    if (ncuts>22) fVertexerTracksTPCclusterdz      = cuts[22];
+    if (ncuts>23) fVertexerTracksTPCclusternsigmaz = cuts[23];
   } else {
     if (ncuts>0) fVertexerTracksITSdcacut = cuts[0];
     if (ncuts>1) fVertexerTracksITSdcacutIter0 = cuts[1];
   } else {
     if (ncuts>0) fVertexerTracksITSdcacut = cuts[0];
     if (ncuts>1) fVertexerTracksITSdcacutIter0 = cuts[1];
@@ -363,6 +391,10 @@ void AliGRPRecoParam::SetVertexerTracksCuts(Int_t mode,Int_t ncuts,Double_t cuts
     if (ncuts>18) fVertexerTracksITSMVMaxWghNtr    = cuts[18];
     if (ncuts>19) fVertexerTracksITSMVFinalWBinary = cuts[19];
     if (ncuts>20) fVertexerTracksITSMVBCSpacing    = cuts[20];
     if (ncuts>18) fVertexerTracksITSMVMaxWghNtr    = cuts[18];
     if (ncuts>19) fVertexerTracksITSMVFinalWBinary = cuts[19];
     if (ncuts>20) fVertexerTracksITSMVBCSpacing    = cuts[20];
+    //
+    if (ncuts>21) fVertexerTracksITSclusterize     = cuts[21];
+    if (ncuts>22) fVertexerTracksITSclusterdz      = cuts[22];
+    if (ncuts>23) fVertexerTracksITSclusternsigmaz = cuts[23];
   }
   //
   return;
   }
   //
   return;
index 5def03b..b2a3e93 100644 (file)
@@ -30,13 +30,27 @@ class AliGRPRecoParam : public AliDetectorRecoParam
 
   void  SetVertexerTracksConstraintITS(Bool_t constr=kTRUE) { fVertexerTracksConstraintITS=constr; return; }
   void  SetVertexerTracksConstraintTPC(Bool_t constr=kTRUE) { fVertexerTracksConstraintTPC=constr; return; }
 
   void  SetVertexerTracksConstraintITS(Bool_t constr=kTRUE) { fVertexerTracksConstraintITS=constr; return; }
   void  SetVertexerTracksConstraintTPC(Bool_t constr=kTRUE) { fVertexerTracksConstraintTPC=constr; return; }
-  void  SetVertexerTracksCuts(Int_t mode,Int_t ncuts,Double_t cuts[21]);
-  void  SetVertexerTracksCutsITS(Int_t ncuts,Double_t cuts[21])
+  void  SetVertexerTracksCuts(Int_t mode,Int_t ncuts,Double_t* cuts);
+  void  SetVertexerTracksCutsITS(Int_t ncuts,Double_t* cuts)
     { SetVertexerTracksCuts(0,ncuts,cuts); return; }
     { SetVertexerTracksCuts(0,ncuts,cuts); return; }
-  void  SetVertexerTracksCutsTPC(Int_t ncuts,Double_t cuts[21])
+  void  SetVertexerTracksCutsTPC(Int_t ncuts,Double_t* cuts)
     { SetVertexerTracksCuts(1,ncuts,cuts); return; }
   void  SetVertexerV0Cuts(Int_t ncuts,Double_t cuts[7]);
   void  SetVertexerCascadeCuts(Int_t ncuts,Double_t cuts[8]);
     { SetVertexerTracksCuts(1,ncuts,cuts); return; }
   void  SetVertexerV0Cuts(Int_t ncuts,Double_t cuts[7]);
   void  SetVertexerCascadeCuts(Int_t ncuts,Double_t cuts[8]);
+  void  SetVertexerTracksTPCClusterization(Bool_t use, Double_t dzcut, Double_t nsigmazcut){
+    if(use) fVertexerTracksTPCclusterize=1.;
+    else fVertexerTracksTPCclusterize=0.;
+    fVertexerTracksTPCclusterdz=dzcut;
+    fVertexerTracksTPCclusternsigmaz=nsigmazcut;
+  }
+  void  SetVertexerTracksITSClusterization(Bool_t use, Double_t dzcut, Double_t nsigmazcut){
+    if(use) fVertexerTracksITSclusterize=1.;
+    else fVertexerTracksITSclusterize=0.;
+    fVertexerTracksITSclusterdz=dzcut;
+    fVertexerTracksITSclusternsigmaz=nsigmazcut;
+  }
+
+
   Bool_t GetVertexerTracksConstraintITS() const { return fVertexerTracksConstraintITS; }
   Bool_t GetVertexerTracksConstraintTPC() const { return fVertexerTracksConstraintTPC; }
   Int_t GetVertexerTracksNCuts() const { return fVertexerTracksNCuts; }
   Bool_t GetVertexerTracksConstraintITS() const { return fVertexerTracksConstraintITS; }
   Bool_t GetVertexerTracksConstraintTPC() const { return fVertexerTracksConstraintTPC; }
   Int_t GetVertexerTracksNCuts() const { return fVertexerTracksNCuts; }
@@ -84,7 +98,11 @@ class AliGRPRecoParam : public AliDetectorRecoParam
   Double_t fVertexerTracksITSMVMaxWghNtr;       // min wdist*ncontrib between to vertices to eliminate
   Double_t fVertexerTracksITSMVFinalWBinary;    // for the final fit used binary weights
   Double_t fVertexerTracksITSMVBCSpacing;       // assumer BC spacing
   Double_t fVertexerTracksITSMVMaxWghNtr;       // min wdist*ncontrib between to vertices to eliminate
   Double_t fVertexerTracksITSMVFinalWBinary;    // for the final fit used binary weights
   Double_t fVertexerTracksITSMVBCSpacing;       // assumer BC spacing
+  //
+  Double_t fVertexerTracksITSclusterize; // pre-clusterization of tracks
+  Double_t fVertexerTracksITSclusterdz;  // cut in absolute dz
+  Double_t fVertexerTracksITSclusternsigmaz;  // cut in standardized dz
+
   // cuts for AliVertexerTracks: TPC-only mode
   Double_t fVertexerTracksTPCdcacut; // general dca
   Double_t fVertexerTracksTPCdcacutIter0; // dca in iteration 0
   // cuts for AliVertexerTracks: TPC-only mode
   Double_t fVertexerTracksTPCdcacut; // general dca
   Double_t fVertexerTracksTPCdcacutIter0; // dca in iteration 0
@@ -109,6 +127,10 @@ class AliGRPRecoParam : public AliDetectorRecoParam
   Double_t fVertexerTracksTPCMVFinalWBinary;    // for the final fit used binary weights
   Double_t fVertexerTracksTPCMVBCSpacing;       // assumer BC spacing
   //
   Double_t fVertexerTracksTPCMVFinalWBinary;    // for the final fit used binary weights
   Double_t fVertexerTracksTPCMVBCSpacing;       // assumer BC spacing
   //
+  Double_t fVertexerTracksTPCclusterize; // pre-clusterization of tracks
+  Double_t fVertexerTracksTPCclusterdz;  // cut in absolute dz
+  Double_t fVertexerTracksTPCclusternsigmaz;  // cut in standardized dz
+  //
   Int_t    fVertexerV0NCuts;      // number of cuts for AliV0vertexer
 
   // cuts for AliV0vertexer:
   Int_t    fVertexerV0NCuts;      // number of cuts for AliV0vertexer
 
   // cuts for AliV0vertexer:
@@ -132,7 +154,7 @@ class AliGRPRecoParam : public AliDetectorRecoParam
   Double_t fVertexerCascadeRmin;     //min radius of the fiducial volume
   Double_t fVertexerCascadeRmax;     //max radius of the fiducial volume
 
   Double_t fVertexerCascadeRmin;     //min radius of the fiducial volume
   Double_t fVertexerCascadeRmax;     //max radius of the fiducial volume
 
-  ClassDef(AliGRPRecoParam,6) // global reco parameters
+  ClassDef(AliGRPRecoParam,7) // global reco parameters
 };
 
 #endif
 };
 
 #endif