]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSVertexer.h
AddTaskFemto for train update
[u/mrichter/AliRoot.git] / ITS / AliITSVertexer.h
index 7d82a04a7bb5e5483e4de952b5ee45021cfa16bf..74856063237c06c34e3f092094c1d9cbf12a135f 100644 (file)
@@ -2,6 +2,7 @@
 #define ALIITSVERTEXER_H
 
 #include<AliVertexer.h>
+#include "AliITSDetTypeRec.h"
 
 ///////////////////////////////////////////////////////////////////
 //                                                               //
@@ -9,6 +10,8 @@
 //                                                               //
 ///////////////////////////////////////////////////////////////////
 
+/* $Id$ */
+
 class TString;
 
 class AliITSVertexer : public AliVertexer {
@@ -20,23 +23,58 @@ class AliITSVertexer : public AliVertexer {
     virtual AliESDVertex *FindVertexForCurrentEvent(TTree *itsClusterTree)=0;
     virtual void PrintStatus() const = 0;
 
+    virtual void ResetVertex();
     void FindMultiplicity(TTree *itsClusterTree);
     void SetFirstEvent(Int_t ev){fFirstEvent = ev;}
     void SetLastEvent(Int_t ev){fLastEvent = ev;}
-    const Float_t GetPipeRadius()const {return fgkPipeRadius;}
+    static Float_t GetPipeRadius() {return fgkPipeRadius;}
     void SetLaddersOnLayer2(Int_t ladwid=4);
+    void SetComputeMultiplicity(Bool_t opt=kTRUE){fComputeMultiplicity=opt;}
+    virtual void SetUseModule(Int_t imod, Bool_t optUse){
+      if(imod>=0 && imod<kNSPDMod) fUseModule[imod]=optUse;
+    }    
+    virtual Bool_t IsModuleUsed(Int_t imod) const {
+      if(imod>=0 && imod<kNSPDMod) return fUseModule[imod];
+      else return 0;
+    }
+
+    virtual AliESDVertex* GetAllVertices(Int_t &novertices) const {novertices = fNoVertices; return fVertArray; }
+
+    AliITSDetTypeRec *GetDetTypeRec() const {return fDetTypeRec;}
+    virtual void SetDetTypeRec(AliITSDetTypeRec *ptr){fDetTypeRec = ptr;}
+    enum{kNSPDMod=240};
 
     // Methods containing run-loaders, should be moved to some other class
     void Init(TString filename);
     void WriteCurrentVertex();
     void FindVertices();
 
+    Int_t GetMinTrackletsForPilup() const {return fMinTrackletsForPilup;}
+    void SetMinTrackletsForPilup(Int_t mint=2) {fMinTrackletsForPilup=mint;} 
+    Bool_t IsPileup() const{return fIsPileup;}
+    Float_t GetZPileupV() const {
+      if(IsPileup()) return fZpuv;
+      else return -9999999.;
+    }
+    Int_t GetNTrackletsPileupV() const {
+      if(IsPileup()) return fNTrpuv;
+      else return -2;
+    }
  protected:
     static const Float_t fgkPipeRadius;  // beam pipe radius (cm)
     UShort_t *fLadders; // array with layer1-layer2 ladders correspondances  
     Int_t fLadOnLay2;   // (2*fLadOnLay2+1)=number of layer2 ladders 
                       // associated to a layer1 ladder
+    Bool_t  fComputeMultiplicity;      // flag to switch on/off tracklet calculation
+    Bool_t  fUseModule[kNSPDMod]; // flag for enabling/disabling SPD modules
+    AliITSDetTypeRec *fDetTypeRec;  //! pointer to DetTypeRec
+    Int_t fMinTrackletsForPilup;  // min. n. of tracklets for pilup definition
+    Bool_t fIsPileup;             // flag for pileup
+    Int_t fNTrpuv;             // tracklets in pile-up vertex
+    Float_t fZpuv;             // Z of second pile-up vertex
+    Int_t fNoVertices;         //! number of vertices found 
+    AliESDVertex* fVertArray;    //! vertices (main+pileupped)
+
  private:
     // copy constructor (NO copy allowed: the constructor is protected
     // to avoid misuse)
@@ -45,9 +83,9 @@ class AliITSVertexer : public AliVertexer {
     AliITSVertexer& operator=(const AliITSVertexer& /* vtxr */);
 
     Int_t fFirstEvent;          // First event to be processed by FindVertices
-    Int_t fLastEvent;           // Last event to be processed by FindVertices 
+    Int_t fLastEvent;           // Last event to be processed by FindVertices
 
-  ClassDef(AliITSVertexer,5);
+  ClassDef(AliITSVertexer,11);
 };
 
 #endif