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;
33 const Int_t kNTYPES=3;
36 class AliITS : public AliDetector {
40 AliITS(const char *name, const char *title);
42 AliITS(AliITS &source);
43 AliITS & operator=(AliITS &source);
45 virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits);
46 virtual void AddRealDigit(Int_t branch, Int_t *digits);
47 virtual void AddSimDigit(Int_t branch, AliITSdigit *d);
48 virtual void AddSimDigit(Int_t branch,Float_t phys,Int_t* digits,Int_t* tracks,Int_t *hits,Float_t* trkcharges);
50 virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
51 virtual void AddRecPoint(const AliITSRecPoint &p);
53 virtual void ResetDigits(); // depending on how the
54 virtual void ResetDigits(Int_t branch); // tree will be filled only
55 virtual void ResetClusters(); // one of the methods in
56 virtual void ResetClusters(Int_t branch); // the pair will be kept
57 virtual void ResetRecPoints();
59 // get geometry version - detailed (major) or coarse (minor)
60 virtual Int_t GetMajorVersion(){return -1;}
61 virtual Int_t GetMinorVersion(){return -1;}
62 void GetGeometryVersion(Int_t &a,Int_t &b)
63 {a = GetMajorVersion();b=GetMinorVersion();return;}
64 virtual Int_t IsVersion() const {return 1;}
65 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
67 virtual void SetDefaults();
68 virtual void SetDefaultSimulation();
69 virtual void SetDefaultClusterFinders();
70 // create separate tree for clusters - declustering refining
71 virtual void MakeTreeC(Option_t *option="C");
72 void GetTreeC(Int_t event);
73 virtual void MakeBranch(Option_t *opt=" ", const char *file=0);
74 void SetTreeAddress();
75 virtual void SetEUCLID(Bool_t euclid=1) {fEuclidOut = euclid;}
76 virtual void StepManager() {}
77 // sort hits by module
78 virtual void InitModules(Int_t size,Int_t &nmodules);
79 virtual void FillModules(Int_t evnt,Int_t bgrev,
80 Int_t nmodules,Option_t *opt,Text_t *filename);
81 virtual void ClearModules();
83 virtual void SDigits2Digits();
84 void HitsToDigits(Int_t evNumber,Int_t bgrev,Int_t size,
85 Option_t *add, Option_t *det, Text_t *filename);
87 void DigitsToRecPoints(Int_t evNumber,Int_t lastEntry,Option_t *det);
88 // Fast simulation of space points from hits
89 void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size,
90 Option_t *add, Option_t *det, Text_t *filename);
92 // Write digits into raw data format
93 virtual void Digits2RawData() {}
94 // Decode raw data and store digits
95 virtual void RawData2Digits() {}
97 // Configuration Methods (per detector type )
99 virtual void SetResponseModel(Int_t id, AliITSresponse *response);
101 virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg);
102 // Set simulation - temporary
103 virtual void SetSimulationModel(Int_t id, AliITSsimulation *sim);
104 // Set reconstruction
105 virtual void SetReconstructionModel(Int_t id, AliITSClusterFinder *rec);
106 // Set class names for digit and rec point
107 virtual void SetClasses(Int_t id, const char *digit, const char *cluster);
111 // ITS geometry functions
112 virtual AliITSgeom *GetITSgeom() const {return fITSgeom;}
113 // return pointer to the array of modules
114 virtual TObjArray *GetModules() const {return fITSmodules;}
115 // return pointer to a particular module
116 AliITSmodule *GetModule(Int_t index) {return (AliITSmodule *)
117 (fITSmodules->At(index));}
119 // Return pointers to digits
120 TObjArray *Dtype() {return fDtype;}
121 Int_t *Ndtype() {return fNdtype;}
122 virtual TClonesArray *DigitsAddress(Int_t id)
123 {return ((TClonesArray *) (*fDtype)[id]);}
124 // Return pointers to clusters
125 TObjArray *Ctype() {return fCtype;}
126 Int_t *Nctype() {return fNctype;}
127 virtual TClonesArray *ClustersAddress(Int_t id)
128 {return ((TClonesArray *) (*fCtype)[id]);}
130 // Return pointer to rec points
131 TClonesArray *RecPoints() {return fRecPoints;}
133 // Return pointer to DetType #id
134 AliITSDetType *DetType(Int_t id);
135 //Int_t NDetTypes() {return fNDetTypes;}
137 // Return pointer to the tree of clusters
138 TTree *TreeC() {return fTreeC;}
144 AliITSgeom *fITSgeom; // Pointer to ITS geometry
145 TObjArray *fITSmodules; //! Pointer to ITS modules
146 Bool_t fEuclidOut; // Flag to write geometry in euclid format
147 Int_t fIdN; // the number of layers
148 Int_t *fIdSens; //[fIdN] layer identifier
149 // TObjArray *fIdName; // array of volume Id names
150 TString *fIdName; //[fIdN] layer identifier
152 Int_t fNDetTypes; // Number of detector types
153 TObjArray *fDetTypes; // List of detector types
155 TObjArray *fDtype; // List of digits
156 Int_t *fNdtype; //[fNDetTypes] Num. of digits per type of det.
157 TObjArray *fCtype; // List of clusters
158 Int_t *fNctype; //[fNDetTypes] Num. of clust. per type of det.
160 TClonesArray *fRecPoints; // List of reconstructed points
161 Int_t fNRecPoints; // Number of rec points
162 TTree *fTreeC; // Tree for raw clusters
165 ClassDef(AliITS,1) // Base class for ITS