]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSDetTypeRec.h
A default AliITSRecoParam object is defined in AliITSReconstructor as static data...
[u/mrichter/AliRoot.git] / ITS / AliITSDetTypeRec.h
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
10 ////////////////////////////////////////////////////////////////////////
11 // This class contains all of the "external" information needed to do //
12 // detector specific reconstruction for the ITS.                      //
13 ////////////////////////////////////////////////////////////////////////
14 #include <TObject.h>
15 #include <TObjArray.h>
16 #include <TClonesArray.h>
17 #include "AliITSDDLModuleMapSDD.h"
18 #include "AliITSgeom.h"
19
20 class TTree;
21 class TBranch;
22
23 //#include "AliITSLoader.h"
24 //#include "AliRunLoader.h"
25
26 class AliITSsegmentation;
27 class AliITSCalibration;
28 class AliITSClusterFinder;
29 class AliITSRawCluster;
30 class AliITSRecPoint;
31 class AliRawReader;
32
33
34 class AliITSDetTypeRec : public TObject {
35   public:
36     AliITSDetTypeRec(); // Default constructor
37  
38     virtual ~AliITSDetTypeRec(); // Proper Destructor
39
40     virtual AliITSgeom* GetITSgeom() const { return fITSgeom; }
41     virtual void SetITSgeom(AliITSgeom *geom) { fITSgeom = geom; }
42     virtual void SetDefaults();
43     virtual void SetDefaultClusterFinders();
44     virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE);
45     virtual void MakeBranch(TTree *tree,Option_t *opt);
46     virtual void SetTreeAddressD(TTree* treeD);
47
48     virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg);
49     virtual void SetCalibrationModel(Int_t iMod, AliITSCalibration *cal);
50     virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec);
51     virtual Bool_t GetCalibration();
52     virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype);
53     virtual AliITSCalibration* GetCalibrationModel(Int_t iMod);
54     virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype);
55     virtual AliITSDDLModuleMapSDD* GetDDLModuleMapSDD() const { return fDDLMapSDD;}
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     //
73     virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
74     virtual void ResetClusters(); 
75     virtual void ResetClusters(Int_t branch);
76     TBranch* MakeBranchInTree(TTree *tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel);
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
84     void MakeBranchR(TTree *treeR,Option_t *opt=" ");
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;}
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);
92     void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All");
93
94   private:
95     // private methods
96     AliITSDetTypeRec(const AliITSDetTypeRec& rec);
97     AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source);
98  
99     //    virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;}
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
104     Int_t *fNMod;     // numbers of modules from different types
105
106     AliITSgeom   *fITSgeom;       //! ITS geometry
107
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]
114     AliITSDDLModuleMapSDD *fDDLMapSDD; //! mapping DDL/module -> SDD module number
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
126     TString fSelectedVertexer; // Vertexer selected in CreateVertexer
127     Bool_t fFirstcall;         //! flag
128
129     ClassDef(AliITSDetTypeRec,8) // ITS Reconstruction structure
130 };
131
132 #endif