]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Switch to vertexerZ if the number of clusters on either layer 1 or layer 2 exceeds...
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Nov 2009 23:31:08 +0000 (23:31 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Nov 2009 23:31:08 +0000 (23:31 +0000)
ITS/AliITSVertexer3D.cxx
ITS/AliITSVertexer3D.h

index 6f06b2fc36f419517f5d8a8954ff412a70f76299..00d54724a91bcdfc95d9dc6af9f6d284763c5c59 100644 (file)
 /////////////////////////////////////////////////////////////////
 // this class implements a method to determine
 // the 3 coordinates of the primary vertex
-// for p-p collisions 
-// It can be used successfully with Pb-Pb collisions
+// optimized for 
+// p-p collisions
 ////////////////////////////////////////////////////////////////
 
+const Int_t    AliITSVertexer3D::fgkMaxNumOfClDefault = 500;
+
 ClassImp(AliITSVertexer3D)
 
 /* $Id$ */
@@ -60,7 +62,8 @@ AliITSVertexer3D::AliITSVertexer3D():
   fDiffPhiforPileup(0.),
   fBinSizeR(0.),
   fBinSizeZ(0.),
-  fPileupAlgo(0)
+  fPileupAlgo(0),
+  fMaxNumOfCl(fgkMaxNumOfClDefault)
 {
   // Default constructor
   SetCoarseDiffPhiCut();
@@ -531,6 +534,10 @@ Int_t AliITSVertexer3D::FindTracklets(TTree *itsClusterTree, Int_t optCuts){
     return -1;
   }
   AliDebug(1,Form("RecPoints on Layer 1,2 = %d, %d\n",nrpL1,nrpL2));
+  if(nrpL1>fMaxNumOfCl || nrpL2>fMaxNumOfCl){
+    AliWarning(Form("Too many recpoints on SPD(%d %d ), call vertexerZ",nrpL1,nrpL2));
+    return -1;
+  }
 
   Double_t a[3]={xbeam,ybeam,0.}; 
   Double_t b[3]={xbeam,ybeam,10.};
@@ -967,5 +974,6 @@ void AliITSVertexer3D::PrintStatus() const {
   printf("Pileup algo: %d\n",fPileupAlgo);
   printf("Min DCA to 1st vertex for pileup (algo 0 and 1): %f\n",fDCAforPileup);
   printf("Cut on distance between pair-vertices  (algo 2): %f\n",fCutOnPairs);
+  printf("Maximum number of clusters allowed on L1 or L2: %d\n",fMaxNumOfCl);
   printf("=======================================================\n");
 }
index 06400ee00659ce03a1589daa889348a04a4de5aa..6d05d9a4dfbacf10e357c3f6a629288dfe87966c 100644 (file)
@@ -59,6 +59,8 @@ class AliITSVertexer3D : public AliITSVertexer {
   void SetPileupAlgo(UShort_t optalgo=1){fPileupAlgo=optalgo;}
   void SetBinSizeR(Double_t siz=0.1){fBinSizeR=siz;}
   void SetBinSizeZ(Double_t siz=0.8){fBinSizeZ=siz;}
+  void SetMaxNumOfClusters(Int_t ncl){fMaxNumOfCl=ncl;}
+  Int_t GetMaxNumOfClusters() const {return fMaxNumOfCl;}
 
 protected:
   AliITSVertexer3D(const AliITSVertexer3D& vtxr);
@@ -97,8 +99,11 @@ protected:
   UShort_t fPileupAlgo;    // Algo for pileup identification
                            // 0->VertexerZ pileup algo
                            // 1->Unused RecPoints algo
+  Int_t fMaxNumOfCl;       // max number of clusters on L1 or L2
 
-  ClassDef(AliITSVertexer3D,12);
+  static const Int_t fgkMaxNumOfClDefault; // Default max number of clusters
+
+  ClassDef(AliITSVertexer3D,13);
 
 };