]>
Commit | Line | Data |
---|---|---|
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 <TObjArray.h> // used in inline function GetModule. | |
14 | #include "AliDetector.h" | |
15 | #include "AliITSTrigger.h" | |
16 | #include "AliITSDetTypeSim.h" | |
17 | ||
18 | ||
19 | class TString; | |
20 | class TTree; | |
21 | class AliITSpListItem; | |
22 | class AliITSsimulation; | |
23 | class AliITSsegmentation; | |
24 | ||
25 | class AliITSCalibration; | |
26 | class AliITShit; | |
27 | class AliITSgeom; | |
28 | class AliITSdigit; | |
29 | class AliITSmodule; | |
30 | class AliDigitizer; | |
31 | class AliRunDigitizer; | |
32 | ||
33 | ||
34 | class AliITS : public AliDetector { | |
35 | ||
36 | public: | |
37 | //================= Standard Classes =============================== | |
38 | AliITS(); // Default creator. | |
39 | AliITS(const Char_t *title); // standard Creator | |
40 | AliITS(const char *name, const char *title); // extended standard Creator | |
41 | virtual ~AliITS(); // destructor | |
42 | virtual Int_t IsVersion() const {return 1;} | |
43 | virtual Int_t DistancetoPrimitive(Int_t , Int_t ) {return 999;} | |
44 | ||
45 | //===================== Simulation Geometry ======================== | |
46 | // get geometry version - detailed (major) or coarse (minor) | |
47 | virtual Int_t GetMajorVersion() const {return -1;} | |
48 | virtual Int_t GetMinorVersion() const {return -1;} | |
49 | virtual void GetGeometryVersion(Int_t &a,Int_t &b) const | |
50 | {a = GetMajorVersion();b=GetMinorVersion();return;} | |
51 | virtual void SetEUCLID(Bool_t euclid=kTRUE) {fEuclidOut = euclid;} | |
52 | virtual Bool_t GetEUCLID()const {return fEuclidOut;} | |
53 | //-------------------- Geometry Transformations -------------------- | |
54 | ||
55 | // ITS geometry functions From Simulation | |
56 | AliITSgeom* GetITSgeom() const {return fDetTypeSim->GetITSgeom();} | |
57 | void SetITSgeom(AliITSgeom *geom) {fDetTypeSim->SetITSgeom(geom);} | |
58 | // return pointer to the array of modules | |
59 | TObjArray *GetModules(){return fITSmodules;} | |
60 | ||
61 | AliITSmodule *GetModule(Int_t index){ | |
62 | return (AliITSmodule*)(fITSmodules->At(index));} | |
63 | ||
64 | virtual void SetDetTypeSim(AliITSDetTypeSim* dts) {fDetTypeSim=dts;} | |
65 | AliITSDetTypeSim* GetDetTypeSim() const {return fDetTypeSim;} | |
66 | //================ Necessary general Classes ======================= | |
67 | virtual void Init(); | |
68 | virtual AliLoader* MakeLoader(const char* topfoldername); | |
69 | virtual void SetDefaults(); | |
70 | virtual void SetDefaultSimulation(); | |
71 | virtual void MakeBranch(Option_t *opt=" "); | |
72 | virtual void MakeBranchS(const char* fl); | |
73 | virtual void MakeBranchD(const char* file); | |
74 | virtual void MakeBranchInTreeD(TTree* treeD, const char* file=0); | |
75 | virtual void SetTreeAddress(); | |
76 | //---------- Configuration Methods (per detector type) ------------- | |
77 | // Determines which ITS subdetectors will be processed. Effects | |
78 | // digitization, and Reconstruction only. | |
79 | void SetDetectors(Option_t *opt="All"){fOpt = opt;} | |
80 | // Returns the list of ITS subdetectors that will be processed. | |
81 | Option_t* GetDetectors(){return fOpt;} | |
82 | ||
83 | // Set calibration | |
84 | virtual void SetCalibrationModel(Int_t dettype, AliITSCalibration *cal){ | |
85 | fDetTypeSim->SetCalibrationModel(dettype,cal);} | |
86 | // Set segmentation for Simulation | |
87 | virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg){ | |
88 | fDetTypeSim->SetSegmentationModel(id,seg);} | |
89 | // Set simulation | |
90 | virtual void SetSimulationModel(Int_t id, AliITSsimulation *sim){ | |
91 | fDetTypeSim->SetSimulationModel(id,sim);} | |
92 | // Set simulation | |
93 | virtual AliITSsimulation* GetSimulationModel(Int_t id){ | |
94 | return fDetTypeSim->GetSimulationModel(id);} | |
95 | //=================== Hits ========================================= | |
96 | virtual void StepManager() {} // See Step Manager for specific geometry. | |
97 | //------------ sort hits by module for Digitisation ---------------- | |
98 | virtual void FillModules(Int_t evnt,Int_t bgrev,Int_t nmodules, | |
99 | Option_t *opt, const char *filename); | |
100 | virtual void InitModules(Int_t size,Int_t &nmodules); | |
101 | virtual void FillModules(TTree *treeH, Int_t mask = 0); | |
102 | virtual void ClearModules(){if(fITSmodules) fITSmodules->Delete();} | |
103 | virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits); | |
104 | // Trigger | |
105 | virtual AliTriggerDetector* CreateTriggerDetector() const | |
106 | { return new AliITSTrigger(); } | |
107 | ||
108 | TClonesArray* GetSDigits() const { return fDetTypeSim->GetSDigits();} | |
109 | ||
110 | AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const; | |
111 | virtual void UpdateInternalGeometry(); | |
112 | virtual void SDigitsToDigits(Option_t *opt="All"); | |
113 | virtual void SDigits2Digits(){SDigitsToDigits("All");} | |
114 | virtual void Hits2Digits(); | |
115 | virtual void Hits2SDigits(); | |
116 | virtual void Hits2PreDigits(); | |
117 | virtual void HitsToDigits(Int_t evNumber,Int_t bgrev,Int_t size, | |
118 | Option_t *option,Option_t *opt, | |
119 | const char *filename); | |
120 | virtual void HitsToPreDigits(Int_t evNumber,Int_t bgrev,Int_t size, | |
121 | Option_t *option,Option_t *opt, | |
122 | const char *filename); | |
123 | void HitsToSDigits(Int_t evNumber,Int_t bgrev,Int_t size, | |
124 | Option_t *add, Option_t *det, const char *filename) | |
125 | {HitsToPreDigits(evNumber,bgrev,size,add,det,filename);} | |
126 | ||
127 | virtual void ResetDigits(); | |
128 | virtual void ResetDigits(Int_t branch); | |
129 | virtual void AddSumDigit(AliITSpListItem &sdig); | |
130 | virtual void AddRealDigit(Int_t branch, Int_t *digits); | |
131 | virtual void AddSimDigit(Int_t branch, AliITSdigit *d); | |
132 | virtual void AddSimDigit(Int_t branch,Float_t phys,Int_t* digits, | |
133 | Int_t* tracks,Int_t *hits,Float_t* trkcharges); | |
134 | TObjArray* GetDigits() const {return fDetTypeSim->GetDigits();} | |
135 | Int_t* GetNDigitArray() const {return fDetTypeSim->GetNDigitArray();} | |
136 | TClonesArray *DigitsAddress(Int_t id) { | |
137 | return fDetTypeSim->DigitsAddress(id);} | |
138 | //Fast simulation | |
139 | virtual void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size, | |
140 | Option_t *add, Option_t *det, const char *filename); | |
141 | virtual Int_t Hits2Clusters(TTree *in, TTree *out); | |
142 | virtual void CheckLabels(Int_t lab[3]) const; | |
143 | ||
144 | //===================== Raw Data IO ================================ | |
145 | // Write digits into raw data format | |
146 | virtual void Digits2Raw(); | |
147 | virtual Bool_t Raw2SDigits(AliRawReader*); | |
148 | ||
149 | ||
150 | protected: | |
151 | static const Int_t fgkNTYPES=3; //number of detector types | |
152 | //================== Data Members ================================== | |
153 | AliITSDetTypeSim *fDetTypeSim; //detector type for simulation | |
154 | Bool_t fEuclidOut; // Flag to write geometry in euclid format | |
155 | Option_t *fOpt; //! Detector option ="All" unless changed. | |
156 | Int_t fIdN; // the number of layers | |
157 | Int_t *fIdSens; //[fIdN] layer identifier | |
158 | TString *fIdName; //[fIdN] layer identifier | |
159 | TObjArray *fITSmodules; //! Pointer to ITS modules | |
160 | Bool_t fTiming; // flag to turn on/off timers. | |
161 | ||
162 | private: | |
163 | AliITS(const AliITS &source); // copy constructor. Not to be used! | |
164 | AliITS& operator=(const AliITS &source); // = operator. Not to be used! | |
165 | ClassDef(AliITS,7) // Base class for ITS | |
166 | ||
167 | }; | |
168 | ||
169 | #endif |