#ifndef ALIITSVERTEXER_H
#define ALIITSVERTEXER_H
-#include <TTree.h>
-#include <TFile.h>
-#include <AliITSVertex.h>
-#include <AliRun.h>
-
+#include<AliVertexer.h>
///////////////////////////////////////////////////////////////////
// //
-// Base class for primary vertex reconstruction //
+// Base class for primary vertex reconstruction for ITS //
// //
///////////////////////////////////////////////////////////////////
+/* $Id$ */
+class TString;
-class AliITSVertexer : public TObject {
+class AliITSVertexer : public AliVertexer {
public:
// default constructor
AliITSVertexer();
- // standard constructor
- AliITSVertexer(TFile *infile, TFile *outfile);
- // destructor
- virtual ~AliITSVertexer();
- // computes the vertex for the current event
- virtual AliITSVertex* FindVertexForCurrentEvent(Int_t evnumb)=0;
- // computes the vetex for each event and stores it on fOutFile
- virtual void FindVertices()= 0;
+ virtual ~AliITSVertexer();
+ virtual AliESDVertex *FindVertexForCurrentEvent(TTree *itsClusterTree)=0;
virtual void PrintStatus() const = 0;
- virtual void SetDebug(Int_t debug = 0){fDebug = debug;}
- virtual void SetFirstEvent(Int_t ev){fFirstEvent = ev;}
- virtual void SetLastEvent(Int_t ev){fLastEvent = ev;}
- virtual void SetInputFile(TFile *infile){fInFile = infile;}
- virtual void SetOutputFile(TFile *outfile){fOutFile = outfile;}
- virtual void WriteCurrentVertex();
-
+ 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;}
+ void SetLaddersOnLayer2(Int_t ladwid=4);
+ 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;
+ }
+ enum{kNSPDMod=240};
+
+ // Methods containing run-loaders, should be moved to some other class
+ void Init(TString filename);
+ void WriteCurrentVertex();
+ void FindVertices();
+
protected:
- AliITSVertex *fCurrentVertex; //! pointer to the vertex of the current
- // event
- TFile *fInFile; //! pointer to the input file
- TFile *fOutFile; //! pointer to the output file
+ 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 fUseModule[kNSPDMod]; // flag for enabling/disabling SPD modules
+
+ private:
+ // copy constructor (NO copy allowed: the constructor is protected
+ // to avoid misuse)
+ AliITSVertexer(const AliITSVertexer& vtxr);
+ // assignment operator (NO assignment allowed)
+ 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 fDebug; //! debug flag - verbose printing if >0
- ClassDef(AliITSVertexer,1);
+ ClassDef(AliITSVertexer,6);
};
#endif