]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSDetTypeRec.h
A default AliITSRecoParam object is defined in AliITSReconstructor as static data...
[u/mrichter/AliRoot.git] / ITS / AliITSDetTypeRec.h
CommitLineData
3b9df642 1#ifndef ALIITSDETTYPEREC_H
2#define ALIITSDETTYPEREC_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/*
7$Id$
8*/
9
7d62fb64 10////////////////////////////////////////////////////////////////////////
11// This class contains all of the "external" information needed to do //
12// detector specific reconstruction for the ITS. //
13////////////////////////////////////////////////////////////////////////
3b9df642 14#include <TObject.h>
15#include <TObjArray.h>
16#include <TClonesArray.h>
979b5a5f 17#include "AliITSDDLModuleMapSDD.h"
18#include "AliITSgeom.h"
3b9df642 19
6cae184e 20class TTree;
21class TBranch;
22
23//#include "AliITSLoader.h"
24//#include "AliRunLoader.h"
3b9df642 25
3b9df642 26class AliITSsegmentation;
fcf95fc7 27class AliITSCalibration;
7d62fb64 28class AliITSClusterFinder;
29class AliITSRawCluster;
30class AliITSRecPoint;
7d62fb64 31class AliRawReader;
3b9df642 32
8ba39da9 33
3b9df642 34class AliITSDetTypeRec : public TObject {
35 public:
36 AliITSDetTypeRec(); // Default constructor
e56160b8 37
3b9df642 38 virtual ~AliITSDetTypeRec(); // Proper Destructor
7d62fb64 39
6cae184e 40 virtual AliITSgeom* GetITSgeom() const { return fITSgeom; }
41 virtual void SetITSgeom(AliITSgeom *geom) { fITSgeom = geom; }
7d62fb64 42 virtual void SetDefaults();
43 virtual void SetDefaultClusterFinders();
3a7c3e6d 44 virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE);
6cae184e 45 virtual void MakeBranch(TTree *tree,Option_t *opt);
7d62fb64 46 virtual void SetTreeAddressD(TTree* treeD);
47
48 virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg);
fcf95fc7 49 virtual void SetCalibrationModel(Int_t iMod, AliITSCalibration *cal);
7d62fb64 50 virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec);
8ba39da9 51 virtual Bool_t GetCalibration();
7d62fb64 52 virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype);
fcf95fc7 53 virtual AliITSCalibration* GetCalibrationModel(Int_t iMod);
7d62fb64 54 virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype);
979b5a5f 55 virtual AliITSDDLModuleMapSDD* GetDDLModuleMapSDD() const { return fDDLMapSDD;}
7d62fb64 56
57 virtual void SetDigitClassName(Int_t i,Char_t *digit)
58 {fDigClassName[i]=digit;}
59 virtual void SetClusterClassName(Int_t i,Char_t *cluster)
60 {fClusterClassName[i]=cluster;}
61 virtual void SetRecPointClassName(Int_t i,Char_t *recpoint)
62 {fRecPointClassName[i]=recpoint;}
63
64 Char_t* GetDigitClassName(Int_t i) const {return fDigClassName[i];}
65 Char_t* GetClusterClassName(Int_t i) const {return fClusterClassName[i];}
66 Char_t* GetRecPointClassName(Int_t i) const {return fRecPointClassName[i];}
67
68 TObjArray* GetDigits() const {return fDigits;}
69 Int_t *Ndtype() {return fNdtype;}
70 TClonesArray *DigitsAddress(Int_t id) const {return ((TClonesArray*)(*fDigits)[id]);}
71 virtual void SelectVertexer(TString sel=" "){fSelectedVertexer = sel;}
72 //
7d62fb64 73 virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
74 virtual void ResetClusters();
75 virtual void ResetClusters(Int_t branch);
6cae184e 76 TBranch* MakeBranchInTree(TTree *tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel);
7d62fb64 77
78 TObjArray *Ctype() {return fCtype;}
79 Int_t *Nctype() {return fNctype;}
80 TClonesArray *ClustersAddress(Int_t id) const {return ((TClonesArray*)(*fCtype)[id]);}
81 virtual void ResetDigits();
82 virtual void ResetDigits(Int_t branch);
83
6cae184e 84 void MakeBranchR(TTree *treeR,Option_t *opt=" ");
7d62fb64 85 void SetTreeAddressR(TTree *treeR);
86 void AddRecPoint(const AliITSRecPoint &p);
87 void ResetRecPoints(){if(fRecPoints) fRecPoints->Clear();fNRecPoints = 0;};
88 // Return pointer to rec points
89 TClonesArray *RecPoints() {return fRecPoints;}
6cae184e 90 void MakeBranchRF(TTree *treeR){MakeBranchR(treeR,"Fast");}
91 void DigitsToRecPoints(TTree *treeD,TTree *treeR,Int_t lastEntry,Option_t *det,Bool_t v2=kFALSE);
8484b32d 92 void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All");
8ba39da9 93
3b9df642 94 private:
8e50d897 95 // private methods
e56160b8 96 AliITSDetTypeRec(const AliITSDetTypeRec& rec);
97 AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source);
98
6cae184e 99 // virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;}
8ba39da9 100 static const Int_t fgkNdettypes; // number of det. types
101 static const Int_t fgkDefaultNModulesSPD; // Total numbers of SPD modules by default
102 static const Int_t fgkDefaultNModulesSDD; // Total numbers of SDD modules by default
103 static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules by default
8e50d897 104 Int_t *fNMod; // numbers of modules from different types
8ba39da9 105
6cae184e 106 AliITSgeom *fITSgeom; //! ITS geometry
107
7d62fb64 108 TObjArray *fReconstruction;//! [NDet]
109 TObjArray *fSegmentation; //! [NDet]
110 TObjArray *fCalibration; //! [NMod]
111 TObjArray *fPreProcess; //! [] e.g. Find Calibration values
112 TObjArray *fPostProcess; //! [] e.g. find primary vertex
113 TObjArray *fDigits; //! [NMod][NDigits]
979b5a5f 114 AliITSDDLModuleMapSDD *fDDLMapSDD; //! mapping DDL/module -> SDD module number
7d62fb64 115 Int_t *fNdtype; //! detector types
116 Char_t* fClusterClassName[3]; //! String with Cluster class name
117 Char_t* fDigClassName[3]; //! String with digit class name.
118 Char_t* fRecPointClassName[3];//! String with RecPoint class name
119
120 TObjArray *fCtype; //! List of clusters
121 Int_t *fNctype; //[fNDetTypes] Num. of clust. per type of det.
122
123 TClonesArray *fRecPoints; //! List of reconstructed points
124 Int_t fNRecPoints; // Number of rec points
125
7d62fb64 126 TString fSelectedVertexer; // Vertexer selected in CreateVertexer
b17dae48 127 Bool_t fFirstcall; //! flag
3b9df642 128
979b5a5f 129 ClassDef(AliITSDetTypeRec,8) // ITS Reconstruction structure
7d62fb64 130};
131
3b9df642 132#endif