]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSVertexer.h
4223b7ce641d8e764cb7fb21b0d7b765b489489a
[u/mrichter/AliRoot.git] / ITS / AliITSVertexer.h
1 #ifndef ALIITSVERTEXER_H
2 #define ALIITSVERTEXER_H
3
4 #include<AliVertexer.h>
5 #include "AliITSDetTypeRec.h"
6
7 ///////////////////////////////////////////////////////////////////
8 //                                                               //
9 // Base class for primary vertex reconstruction  for ITS         //
10 //                                                               //
11 ///////////////////////////////////////////////////////////////////
12
13 /* $Id$ */
14
15 class TString;
16
17 class AliITSVertexer : public AliVertexer {
18
19  public:
20     // default constructor
21     AliITSVertexer();   
22     virtual ~AliITSVertexer();
23     virtual AliESDVertex *FindVertexForCurrentEvent(TTree *itsClusterTree)=0;
24     virtual void PrintStatus() const = 0;
25
26     void FindMultiplicity(TTree *itsClusterTree);
27     void SetFirstEvent(Int_t ev){fFirstEvent = ev;}
28     void SetLastEvent(Int_t ev){fLastEvent = ev;}
29     const Float_t GetPipeRadius()const {return fgkPipeRadius;}
30     void SetLaddersOnLayer2(Int_t ladwid=4);
31     virtual void SetUseModule(Int_t imod, Bool_t optUse){
32       if(imod>=0 && imod<kNSPDMod) fUseModule[imod]=optUse;
33     }
34     virtual Bool_t IsModuleUsed(Int_t imod) const {
35       if(imod>=0 && imod<kNSPDMod) return fUseModule[imod];
36       else return 0;
37     }
38     virtual void SetDetTypeRec(const AliITSDetTypeRec *ptr){fDetTypeRec = ptr;}
39     enum{kNSPDMod=240};
40
41     // Methods containing run-loaders, should be moved to some other class
42     void Init(TString filename);
43     void WriteCurrentVertex();
44     void FindVertices();
45
46  protected:
47     static const Float_t fgkPipeRadius;  // beam pipe radius (cm)
48     UShort_t *fLadders; // array with layer1-layer2 ladders correspondances  
49     Int_t fLadOnLay2;   // (2*fLadOnLay2+1)=number of layer2 ladders 
50                       // associated to a layer1 ladder
51     Bool_t  fUseModule[kNSPDMod]; // flag for enabling/disabling SPD modules
52  
53  private:
54     // copy constructor (NO copy allowed: the constructor is protected
55     // to avoid misuse)
56     AliITSVertexer(const AliITSVertexer& vtxr);
57     // assignment operator (NO assignment allowed)
58     AliITSVertexer& operator=(const AliITSVertexer& /* vtxr */);
59
60     Int_t fFirstEvent;          // First event to be processed by FindVertices
61     Int_t fLastEvent;           // Last event to be processed by FindVertices
62     const AliITSDetTypeRec *fDetTypeRec;  //! pointer to DetTypeRec
63
64   ClassDef(AliITSVertexer,7);
65 };
66
67 #endif