]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITS.h
Removal of useless dependecies via forward declarations
[u/mrichter/AliRoot.git] / ITS / AliITS.h
1 #ifndef ALIITS_H
2 #define ALIITS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ////////////////////////////////////////////////////////////////////////
9 //           Manager class for set: ITS                               //
10 ////////////////////////////////////////////////////////////////////////
11
12
13 #include "AliDetector.h"
14 #include "TObjArray.h"
15
16 class TObjArray;
17 class TString;
18 class TTree;
19
20 class AliITSDetType;
21 class AliITSsimulation;
22 class AliITSClusterFinder;
23 class AliITSsegmentation;
24 class AliITSresponse;
25 class AliITShit;
26 class AliITSgeom;
27 class AliITSdigit;
28 class AliITSRecPoint;
29 class AliITSRawCluster;
30 class AliITSmodule;
31
32
33
34
35 class AliITS : public AliDetector {
36
37   public:
38                     AliITS();
39                     AliITS(const char *name, const char *title);
40     virtual        ~AliITS();
41     AliITS(AliITS &source);
42     AliITS & operator=(AliITS &source);
43
44     virtual void   AddHit(Int_t track, Int_t *vol, Float_t *hits);
45     virtual void   AddRealDigit(Int_t branch, Int_t *digits);
46     virtual void   AddSimDigit(Int_t branch, AliITSdigit *d);
47     virtual void   AddSimDigit(Int_t branch,Float_t phys,Int_t* digits,Int_t* tracks,Int_t *hits,Float_t* trkcharges); 
48     //
49     virtual void   AddCluster(Int_t branch, AliITSRawCluster *c);
50     virtual void   AddRecPoint(const AliITSRecPoint &p);
51
52     virtual void   ResetDigits();                   // depending on how the
53     virtual void   ResetDigits(Int_t branch);       // tree will be filled only
54     virtual void   ResetClusters();                 // one of the methods in 
55     virtual void   ResetClusters(Int_t branch);     // the pair will be kept
56     virtual void   ResetRecPoints();
57
58     // get geometry version - detailed (major) or coarse (minor)
59     void GetGeometryVersion(Int_t &a,Int_t &b) const 
60                    {a = fMajorVersion;b=fMinorVersion;return;}
61     virtual Int_t  IsVersion() const {return 1;}
62     virtual Int_t  DistancetoPrimitive(Int_t px, Int_t py);
63     virtual void   Init();
64     virtual void   SetDefaults();
65     virtual void   SetDefaultSimulation();
66     virtual void   SetDefaultClusterFinders();
67     // create separate tree for clusters - declustering refining
68     virtual  void  MakeTreeC(Option_t *option="C");
69     void           GetTreeC(Int_t event);
70     virtual void   MakeBranch(Option_t *opt=" ");
71     void           SetTreeAddress();
72     virtual void   SetEUCLID(Bool_t euclid=1) {fEuclidOut = euclid;}
73     virtual void   StepManager() {}
74     // sort hits by module
75     virtual void   InitModules(Int_t size,Int_t &nmodules);  
76     virtual void   FillModules(Int_t evnt,Int_t bgrev,
77                        Int_t nmodules,Option_t *opt,Text_t *filename);
78     virtual void   ClearModules();
79     // Digitisation
80     void HitsToDigits(Int_t evNumber,Int_t bgrev,Int_t size,
81                  Option_t *add, Option_t *det, Text_t *filename);
82     // Reconstruct hits
83     void DigitsToRecPoints(Int_t evNumber,Int_t lastEntry,Option_t *det);
84     // Fast simulation of space points from hits
85     void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size,
86                  Option_t *add, Option_t *det, Text_t *filename);
87
88     // Write digits into raw data format
89     virtual void Digits2RawData() {}
90     // Decode raw data and store digits
91     virtual void RawData2Digits() {}
92
93     // Configuration Methods (per detector type )
94     // Set response 
95     virtual void   SetResponseModel(Int_t id, AliITSresponse *response);
96     // Set segmentation 
97     virtual void   SetSegmentationModel(Int_t id, AliITSsegmentation *seg);
98     // Set simulation - temporary 
99     virtual void   SetSimulationModel(Int_t id, AliITSsimulation *sim);
100     // Set reconstruction 
101     virtual void   SetReconstructionModel(Int_t id, AliITSClusterFinder *rec);
102     // Set class names for digit and rec point 
103     virtual void   SetClasses(Int_t id, const char *digit, const char *cluster);
104
105
106     // Getters
107     // ITS geometry functions
108     virtual AliITSgeom  *GetITSgeom() const {return fITSgeom;}
109     // return pointer to the array of modules
110     virtual TObjArray   *GetModules() const {return fITSmodules;}
111     // return pointer to a particular module
112     AliITSmodule *GetModule(Int_t index) {return (AliITSmodule *)
113                                               (fITSmodules->At(index));}
114
115     // Return pointers to digits 
116     TObjArray            *Dtype() {return fDtype;}
117     Int_t                *Ndtype() {return fNdtype;}
118     virtual TClonesArray *DigitsAddress(Int_t id) 
119                    {return ((TClonesArray *) (*fDtype)[id]);}
120     // Return pointers to clusters 
121     TObjArray            *Ctype() {return fCtype;}
122     Int_t                *Nctype() {return fNctype;}
123     virtual TClonesArray *ClustersAddress(Int_t id) 
124                    {return ((TClonesArray *) (*fCtype)[id]);}
125
126     // Return pointer to rec points 
127     TClonesArray  *RecPoints()   {return fRecPoints;}
128
129     // Return pointer to DetType #id
130     AliITSDetType  *DetType(Int_t id);
131     //Int_t           NDetTypes() {return fNDetTypes;}
132
133     // Return pointer to the tree of clusters
134     TTree          *TreeC() {return fTreeC;}
135
136
137  protected:
138
139     static const Int_t fgkNTYPES;          // Number of detector types
140
141     AliITSgeom  *fITSgeom;                   // Pointer to ITS geometry
142     TObjArray   *fITSmodules;                // Pointer to ITS modules
143
144     Bool_t fEuclidOut;                       // Flag to write out geometry 
145                                              // in euclid format
146     Int_t  fIdN;                             // the number of layers
147     Int_t  *fIdSens;                         //[fIdN] layer identifier
148     TString *fIdName;                        //[fIdN] layer identifier
149     // Geometry and Stepmanager version numbers used.
150     Int_t fMajorVersion,fMinorVersion;       //detailed and coarse(minor) versions
151     //
152     //
153
154     // Int_t             fNDetTypes;           //Number of detector types
155     TObjArray            *fDetTypes;           // List of detector types
156
157     TObjArray            *fDtype;              //[fgkNTYPES]  List of digits
158     Int_t                *fNdtype;             //[fgkNTYPES] Number of digits per type of
159                                                // detector 
160     TObjArray            *fCtype;              //[fgkNTYPES] List of clusters
161     Int_t                *fNctype;             //[fgkNTYPES] Number of clusters per type
162                                                // of detector
163
164     TClonesArray         *fRecPoints;          // List of reconstructed points
165     Int_t                 fNRecPoints;         // Number of rec points
166     TTree                *fTreeC;              // Tree for raw clusters
167
168
169     ClassDef(AliITS,1) // Base class for ITS
170 };
171
172 #endif