add getter to cut on n cells
[u/mrichter/AliRoot.git] / ITS / AliITSVertexer.h
CommitLineData
c5f0f3c1 1#ifndef ALIITSVERTEXER_H
2#define ALIITSVERTEXER_H
3
2257f27e 4#include<AliVertexer.h>
f510fd70 5//#include "AliITSDetTypeRec.h"
c5f0f3c1 6
7///////////////////////////////////////////////////////////////////
8// //
2257f27e 9// Base class for primary vertex reconstruction for ITS //
f510fd70 10// Daughter classes: //
11// AliITSVertexer3D //
12// AliITSVertexer3DTapan //
13// AliITSVertexerCosmics //
14// AliITSVertexerFast //
15// AliITSVertexerFixed //
16// AliITSVertexerZ //
c5f0f3c1 17// //
18///////////////////////////////////////////////////////////////////
19
8c42830a 20/* $Id$ */
21
41b19549 22class TString;
f510fd70 23class AliITSDetTypeRec;
c5f0f3c1 24
2257f27e 25class AliITSVertexer : public AliVertexer {
c5f0f3c1 26
27 public:
28 // default constructor
29 AliITSVertexer();
27167524 30 virtual ~AliITSVertexer();
308c2f7c 31 virtual AliESDVertex *FindVertexForCurrentEvent(TTree *itsClusterTree)=0;
32 virtual void PrintStatus() const = 0;
33
6b4d9537 34 virtual void ResetVertex();
308c2f7c 35 void FindMultiplicity(TTree *itsClusterTree);
36 void SetFirstEvent(Int_t ev){fFirstEvent = ev;}
37 void SetLastEvent(Int_t ev){fLastEvent = ev;}
5af4a2d0 38 static Float_t GetPipeRadius() {return fgkPipeRadius;}
308c2f7c 39 void SetLaddersOnLayer2(Int_t ladwid=4);
1ff24d0a 40 void SetComputeMultiplicity(Bool_t opt=kTRUE){fComputeMultiplicity=opt;}
8c42830a 41 virtual void SetUseModule(Int_t imod, Bool_t optUse){
42 if(imod>=0 && imod<kNSPDMod) fUseModule[imod]=optUse;
1ff24d0a 43 }
8c42830a 44 virtual Bool_t IsModuleUsed(Int_t imod) const {
45 if(imod>=0 && imod<kNSPDMod) return fUseModule[imod];
46 else return 0;
47 }
b96ee725 48
6b4d9537 49 virtual AliESDVertex* GetAllVertices(Int_t &novertices) const {novertices = fNoVertices; return fVertArray; }
50
06a7cbee 51 AliITSDetTypeRec *GetDetTypeRec() const {return fDetTypeRec;}
52 virtual void SetDetTypeRec(AliITSDetTypeRec *ptr){fDetTypeRec = ptr;}
8c42830a 53 enum{kNSPDMod=240};
308c2f7c 54
55 // Methods containing run-loaders, should be moved to some other class
56 void Init(TString filename);
57 void WriteCurrentVertex();
58 void FindVertices();
c5f0f3c1 59
8c32ba44 60 Int_t GetMinTrackletsForPilup() const {return fMinTrackletsForPilup;}
61 void SetMinTrackletsForPilup(Int_t mint=2) {fMinTrackletsForPilup=mint;}
62 Bool_t IsPileup() const{return fIsPileup;}
63 Float_t GetZPileupV() const {
64 if(IsPileup()) return fZpuv;
65 else return -9999999.;
66 }
67 Int_t GetNTrackletsPileupV() const {
68 if(IsPileup()) return fNTrpuv;
69 else return -2;
70 }
c5f0f3c1 71 protected:
308c2f7c 72 static const Float_t fgkPipeRadius; // beam pipe radius (cm)
73 UShort_t *fLadders; // array with layer1-layer2 ladders correspondances
74 Int_t fLadOnLay2; // (2*fLadOnLay2+1)=number of layer2 ladders
75 // associated to a layer1 ladder
1ff24d0a 76 Bool_t fComputeMultiplicity; // flag to switch on/off tracklet calculation
8c42830a 77 Bool_t fUseModule[kNSPDMod]; // flag for enabling/disabling SPD modules
06a7cbee 78 AliITSDetTypeRec *fDetTypeRec; //! pointer to DetTypeRec
8c32ba44 79 Int_t fMinTrackletsForPilup; // min. n. of tracklets for pilup definition
80 Bool_t fIsPileup; // flag for pileup
81 Int_t fNTrpuv; // tracklets in pile-up vertex
82 Float_t fZpuv; // Z of second pile-up vertex
6b4d9537 83 Int_t fNoVertices; //! number of vertices found
84 AliESDVertex* fVertArray; //! vertices (main+pileupped)
8c32ba44 85
308c2f7c 86 private:
41b19549 87 // copy constructor (NO copy allowed: the constructor is protected
88 // to avoid misuse)
89 AliITSVertexer(const AliITSVertexer& vtxr);
90 // assignment operator (NO assignment allowed)
91 AliITSVertexer& operator=(const AliITSVertexer& /* vtxr */);
92
308c2f7c 93 Int_t fFirstEvent; // First event to be processed by FindVertices
ff44c37c 94 Int_t fLastEvent; // Last event to be processed by FindVertices
27167524 95
1ff24d0a 96 ClassDef(AliITSVertexer,11);
c5f0f3c1 97};
98
99#endif