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