3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ////////////////////////////////////////////////////////////////////////
9 // Manager class for set: ITS //
10 ////////////////////////////////////////////////////////////////////////
12 #include <TObjArray.h> // used in inline function GetModule.
14 #include "AliDetector.h"
21 class AliITSsimulation;
22 class AliITSClusterFinder;
23 class AliITSsegmentation;
29 class AliITSRawCluster;
35 class AliITS : public AliDetector {
39 AliITS(const char *name, const char *title);
41 AliITS(AliITS &source);
42 AliITS & operator=(AliITS &source);
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);
49 virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
50 virtual void AddRecPoint(const AliITSRecPoint &p);
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();
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);
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();
80 void HitsToDigits(Int_t evNumber,Int_t bgrev,Int_t size,
81 Option_t *add, Option_t *det, Text_t *filename);
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);
88 // Write digits into raw data format
89 virtual void Digits2RawData() {}
90 // Decode raw data and store digits
91 virtual void RawData2Digits() {}
93 // Configuration Methods (per detector type )
95 virtual void SetResponseModel(Int_t id, AliITSresponse *response);
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);
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));}
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]);}
126 // Return pointer to rec points
127 TClonesArray *RecPoints() {return fRecPoints;}
129 // Return pointer to DetType #id
130 AliITSDetType *DetType(Int_t id);
131 //Int_t NDetTypes() {return fNDetTypes;}
133 // Return pointer to the tree of clusters
134 TTree *TreeC() {return fTreeC;}
139 AliITStrack Tracking(AliITStrack &track, AliITStrack *reference, TObjArray *fpoints, Int_t **vettid,
142 void DoTracking(Int_t evNumber, Int_t min_t, Int_t max_t, TFile *file, Bool_t flagvert);
146 static const Int_t fgkNTYPES; // Number of detector types
147 AliITSgeom *fITSgeom; // Pointer to ITS geometry
148 TObjArray *fITSmodules; //! Pointer to ITS modules
149 Bool_t fEuclidOut; // Flag to write geometry in euclid format
150 Int_t fIdN; // the number of layers
151 Int_t *fIdSens; //[fIdN] layer identifier
152 // TObjArray *fIdName; // array of volume Id names
153 TString *fIdName; //[fIdN] layer identifier
154 // Geometry and Stepmanager version numbers used.
155 Int_t fMajorVersion; // detailed and coarse(minor) versions
156 Int_t fMinorVersion; // detailed and coarse(minor) versions
158 // Int_t fNDetTypes; // Number of detector types
159 TObjArray *fDetTypes; // List of detector types
161 TObjArray *fDtype; //[fgkNTYPES] List of digits
162 Int_t *fNdtype; //[fgkNTYPES] Num. of digits per type of det.
163 TObjArray *fCtype; //[fgkNTYPES] List of clusters
164 Int_t *fNctype; //[fgkNTYPES] Num. of clust. per type of det.
166 TClonesArray *fRecPoints; // List of reconstructed points
167 Int_t fNRecPoints; // Number of rec points
168 TTree *fTreeC; // Tree for raw clusters
171 ClassDef(AliITS,1) // Base class for ITS