]>
Commit | Line | Data |
---|---|---|
29998a6e | 1 | #ifndef ALIITSUPG_H |
2 | #define ALIITSUPG_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliITSUpg.h */ | |
7 | ||
8 | //////////////////////////////////////////////////////////////////////// | |
9 | // Manager class for set: ITS Upgrade // | |
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; | |
f21fc003 | 30 | class AliDigitizationInput; |
29998a6e | 31 | |
32 | ||
33 | class AliITSUpg : public AliDetector { | |
34 | ||
35 | public: | |
36 | //================= Standard Classes =============================== | |
37 | AliITSUpg(); // Default creator. | |
38 | AliITSUpg(const Char_t *title); // standard Creator | |
39 | AliITSUpg(const char *name, const char *title); // extended standard Creator | |
40 | virtual ~AliITSUpg(); // destructor | |
41 | virtual Int_t IsVersion() const {return 1;} | |
42 | ||
43 | //===================== Simulation Geometry ======================== | |
44 | // get geometry version - detailed (major) or coarse (minor) | |
45 | virtual Int_t GetMajorVersion() const {return -1;} | |
46 | virtual Int_t GetMinorVersion() const {return -1;} | |
47 | virtual void GetGeometryVersion(Int_t &a,Int_t &b) const | |
48 | {a = GetMajorVersion();b=GetMinorVersion();return;} | |
49 | virtual void SetEUCLID(Bool_t euclid=kTRUE) {fEuclidOut = euclid;} | |
50 | virtual Bool_t GetEUCLID()const {return fEuclidOut;} | |
51 | //-------------------- Geometry Transformations -------------------- | |
52 | ||
53 | // ITS geometry functions From Simulation | |
54 | AliITSgeom* GetITSgeom() const {return fDetTypeSim->GetITSgeom();} | |
55 | void SetITSgeom(AliITSgeom *geom) {fDetTypeSim->SetITSgeom(geom);} | |
56 | // return pointer to the array of modules | |
57 | TObjArray *GetModules(){return fITSmodules;} | |
58 | ||
59 | AliITSmodule *GetModule(Int_t index){ | |
60 | return (AliITSmodule*)(fITSmodules->At(index));} | |
61 | virtual void SetSimuParam(AliITSSimuParam *sp){ | |
62 | fSimuParam=sp; | |
63 | fDetTypeSim->SetSimuParam(sp); | |
64 | } | |
65 | AliITSSimuParam* GetSimuParam() const {return fSimuParam;} | |
66 | ||
67 | virtual void SetDetTypeSim(AliITSDetTypeSim* dts) {fDetTypeSim=dts;} | |
68 | AliITSDetTypeSim* GetDetTypeSim() const {return fDetTypeSim;} | |
69 | //================ Necessary general Classes ======================= | |
70 | virtual void Init(); | |
71 | virtual AliLoader* MakeLoader(const char* topfoldername); | |
72 | virtual void SetDefaults(); | |
73 | virtual void SetDefaultSimulation(); | |
74 | virtual void MakeBranch(Option_t *opt=" "); | |
75 | virtual void MakeBranchS(const char* fl); | |
76 | virtual void MakeBranchD(const char* file); | |
77 | virtual void MakeBranchInTreeD(TTree* treeD, const char* file=0); | |
78 | virtual void SetTreeAddress(); | |
79 | //---------- Configuration Methods (per detector type) ------------- | |
80 | // Determines which ITS subdetectors will be processed. Effects | |
81 | // digitization, and Reconstruction only. | |
82 | void SetDetectors(Option_t *opt="All"){fOpt = opt;} | |
83 | // Returns the list of ITS subdetectors that will be processed. | |
84 | Option_t* GetDetectors(){return fOpt;} | |
85 | ||
86 | // Set calibration | |
87 | virtual void SetCalibrationModel(Int_t dettype, AliITSCalibration *cal){ | |
88 | fDetTypeSim->SetCalibrationModel(dettype,cal);} | |
89 | // Set segmentation for Simulation | |
90 | virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg){ | |
91 | fDetTypeSim->SetSegmentationModel(id,seg);} | |
92 | // Set simulation | |
93 | virtual void SetSimulationModel(Int_t id, AliITSsimulation *sim){ | |
94 | fDetTypeSim->SetSimulationModel(id,sim);} | |
95 | // Set simulation | |
96 | virtual AliITSsimulation* GetSimulationModel(Int_t id){ | |
97 | return fDetTypeSim->GetSimulationModel(id);} | |
98 | //=================== Hits ========================================= | |
99 | virtual void StepManager() {} // See Step Manager for specific geometry. | |
100 | //------------ sort hits by module for Digitisation ---------------- | |
101 | virtual void FillModules(Int_t /* evnt */,Int_t bgrev,Int_t /* nmodules */, | |
102 | Option_t *opt, const char *filename); | |
103 | virtual Bool_t InitModules(Int_t size,Int_t &nmodules); | |
104 | virtual void FillModules(TTree *treeH, Int_t mask = 0); | |
105 | virtual void ClearModules(){if(fITSmodules) fITSmodules->Delete();} | |
106 | virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits); | |
107 | // Trigger | |
108 | virtual AliTriggerDetector* CreateTriggerDetector() const; | |
109 | ||
f21fc003 | 110 | AliDigitizer* CreateDigitizer(AliDigitizationInput* manager) const; |
29998a6e | 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 AddSimDigit(Int_t branch, AliITSdigit *d); | |
131 | virtual void AddSimDigit(Int_t branch,Float_t phys,Int_t* digits, | |
132 | Int_t* tracks,Int_t *hits,Float_t* trkcharges, | |
133 | Int_t sigexpanded=-1000); | |
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 | //===================== FO signals ================================ | |
150 | // Write FO signals in UserInfo of SDigits/Digits tree | |
151 | void WriteFOSignals(); | |
152 | ||
153 | protected: | |
154 | static const Int_t fgkNTYPES=3; //number of detector types | |
155 | //================== Data Members ================================== | |
156 | AliITSDetTypeSim *fDetTypeSim; //detector type for simulation | |
157 | Bool_t fEuclidOut; // Flag to write geometry in euclid format | |
158 | Option_t *fOpt; //! Detector option ="All" unless changed. | |
159 | Int_t fIdN; // the number of layers | |
160 | Int_t *fIdSens; //[fIdN] layer identifier | |
161 | TString *fIdName; //[fIdN] layer identifier | |
162 | TObjArray *fITSmodules; //! Pointer to ITS modules | |
163 | Bool_t fTiming; // flag to turn on/off timers. | |
164 | AliITSSimuParam* fSimuParam; //simulation parameters | |
165 | TClonesArray** fModA; //! Used by Raw2SDigits (one TC per module) | |
166 | TClonesArray* fpSDigits; //! Branch address to build SD from raw data | |
167 | ||
168 | private: | |
169 | AliITSUpg(const AliITSUpg &source); // copy constructor. Not to be used! | |
170 | AliITSUpg& operator=(const AliITSUpg &source); // = operator. Not to be used! | |
171 | ClassDef(AliITSUpg,1) // Base class for ITS | |
172 | ||
173 | }; | |
174 | ||
175 | #endif |