]>
Commit | Line | Data |
---|---|---|
58005f18 | 1 | #ifndef ALIITSMODULE_H |
2 | #define ALIITSMODULE_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$ */ | |
58005f18 | 7 | |
3bd79107 | 8 | #include <TObject.h> |
9 | #include <TObjArray.h> | |
58005f18 | 10 | |
3bd79107 | 11 | class AliITS; |
12 | class AliITShit; | |
ff61221e | 13 | class TArrayI; |
14 | ||
3bd79107 | 15 | |
16 | class AliITSmodule:public TObject{ | |
58005f18 | 17 | |
18 | //________________________________________________________________ | |
19 | // | |
20 | // Class AliITSmodule | |
21 | // is a superclass for AliITSmoduleSSD, SPD and SDD. | |
22 | // The main function of modules is to simulate DIGITS from | |
23 | // GEANT HITS and produce POINTS from DIGITS | |
24 | // It also make fast simulation without use of DIGITS | |
25 | // | |
26 | // created by: A.Boucham, W.Peryt, S.Radomski, P.Skowronski | |
27 | // R.Barbera, B. Batynia, B. Nilsen | |
28 | // ver. 1.0 CERN, 16.09.1999 | |
29 | // | |
30 | //________________________________________________________________ | |
31 | // | |
32 | ||
3bd79107 | 33 | public: |
58005f18 | 34 | //________________________________________________________________ |
35 | // | |
36 | // Constructors and deconstructor | |
37 | //________________________________________________________________ | |
3bd79107 | 38 | // |
58005f18 | 39 | AliITSmodule(); // default constructor |
3bd79107 | 40 | AliITSmodule(Int_t index); //index in TObjectArray in ITS object |
41 | virtual ~AliITSmodule(); | |
58005f18 | 42 | |
43 | //________________________________________________________________ | |
44 | // | |
3bd79107 | 45 | // Position managenent (id's getters) |
58005f18 | 46 | //________________________________________________________________ |
47 | // | |
3bd79107 | 48 | |
49 | Int_t GetIndex() const { | |
50 | // get index | |
51 | return fIndex; | |
52 | } | |
53 | void GetID(Int_t &lay,Int_t &lad,Int_t &det); | |
54 | Int_t GetLayer() { | |
55 | // get layer | |
56 | Int_t i,j,k;GetID(i,j,k);return i; | |
57 | } | |
58 | Int_t GetLadder(){ | |
59 | // get ladder | |
60 | Int_t i,j,k;GetID(i,j,k);return j; | |
61 | } | |
62 | Int_t GetDet(){ | |
63 | // get det | |
64 | Int_t i,j,k;GetID(i,j,k);return k; | |
65 | } | |
58005f18 | 66 | //________________________________________________________________ |
67 | // | |
3bd79107 | 68 | // Hits management |
58005f18 | 69 | //________________________________________________________________ |
70 | // | |
3bd79107 | 71 | Int_t GetNhits() const { |
72 | // get num of hits | |
73 | return fHitsM->GetEntriesFast(); | |
74 | } | |
75 | AliITS *GetITS() const { | |
76 | // get ITS | |
77 | return fITS; | |
78 | } | |
79 | TObjArray *GetHits() const { | |
80 | // get hits | |
81 | return fHitsM; | |
82 | } | |
83 | AliITShit *GetHit(Int_t i) { | |
58005f18 | 84 | // returns pointer to array (TClonesArray) of pointers to hits |
3bd79107 | 85 | return (AliITShit*)fHitsM->At(i); |
86 | } | |
58005f18 | 87 | // Adds pointer of hit belonging to this module |
88 | // and returns number of hits in this module | |
3bd79107 | 89 | Int_t AddHit(AliITShit *hit,Int_t TrackIndex,Int_t HitIndex); |
90 | void MedianHitG(Int_t index, Float_t hitx1,Float_t hity1,Float_t hitz1, | |
91 | Float_t hitx2,Float_t hity2,Float_t hitz2, Float_t &xMg, | |
92 | Float_t &yMg, Float_t &zMg); | |
93 | void MedianHitL(Int_t index, AliITShit *itsHit1, AliITShit *itsHit2, | |
94 | Float_t &xMl, Float_t &yMl, Float_t &zMl); | |
95 | Double_t PathLength(Int_t index, AliITShit *itsHit1, AliITShit *itsHit2); | |
96 | Int_t GetHitTrackIndex(Int_t i) { | |
97 | // get hit track index | |
98 | return fTrackIndex->At(i); | |
99 | } | |
100 | Int_t GetHitHitIndex(Int_t i) { | |
101 | // return the hit index number in TreeH for the given sorted hit in the module. | |
102 | return fHitIndex->At(i); | |
103 | } | |
104 | void GetHitTrackAndHitIndex(Int_t i,Int_t &TrackIndex,Int_t &HitIndex) { | |
105 | // return the hit index number for the given hit. Hits are kept on | |
106 | // file according to their track index and hit index numbers. | |
107 | TrackIndex = fTrackIndex->At(i);HitIndex = fHitIndex->At(i); | |
108 | } | |
109 | // returns both the track and hit index numbers for the given hit. Hits | |
110 | // are kept on file according to their track index and hit index numbers. | |
111 | void MedianHit(Int_t index, Float_t xg,Float_t yg,Float_t zg, | |
112 | Int_t status,Float_t &xMg, Float_t &yMg, Float_t &zMg, | |
113 | Int_t &flag); | |
114 | void PathLength(Int_t index,Float_t x,Float_t y,Float_t z,Int_t status, | |
115 | Int_t &nseg,Float_t &x1,Float_t &y1,Float_t &z1, | |
116 | Float_t &dx1,Float_t &dy1, Float_t &dz1,Int_t &flag); | |
117 | Bool_t LineSegmentL(Int_t hindex,Double_t &a,Double_t &b, | |
118 | Double_t &c,Double_t &d,Double_t &e,Double_t &f, | |
119 | Double_t &de); | |
120 | Bool_t LineSegmentL(Int_t hindex,Double_t &a,Double_t &b, | |
121 | Double_t &c,Double_t &d,Double_t &e,Double_t &f, | |
122 | Double_t &de,Int_t &track); | |
123 | // if returns kTRUE; gives the parameterization of the line segment | |
124 | // from this step. x=a+b*t, y=c+d*t, and z=e+f*t for 0.0t<=1.0 and the | |
125 | // energy lost during this step all in the local detector coordinates. | |
126 | // if returns kFALSE; this is a begining step and no energy loss has | |
127 | // occured. This step is used to set up the next steps. Do not use | |
128 | // this parameterization. | |
129 | Bool_t LineSegmentG(Int_t hindex,Double_t &a,Double_t &b, | |
130 | Double_t &c,Double_t &d,Double_t &e,Double_t &f, | |
131 | Double_t &de); | |
132 | Bool_t LineSegmentG(Int_t hindex,Double_t &a,Double_t &b, | |
133 | Double_t &c,Double_t &d,Double_t &e,Double_t &f, | |
134 | Double_t &de,Int_t &track); | |
135 | // if returns kTRUE; gives the parameterization of the line segment | |
136 | // from this step. x=a+b*t, y=c+d*t, and z=e+f*t for 0.0t<=1.0 and the | |
137 | // energy lost during this step all in the global detector coordinates. | |
138 | // if returns kFALSE; this is a begining step and no energy loss has | |
139 | // occured. This step is used to set up the next steps. Do not use | |
140 | // this parameterization. | |
141 | ||
142 | protected: | |
143 | AliITSmodule(const AliITSmodule &source); | |
144 | AliITSmodule& operator=(const AliITSmodule &source); | |
58005f18 | 145 | //________________________________________________________________ |
146 | // | |
147 | // Data members | |
148 | //________________________________________________________________ | |
149 | // | |
3bd79107 | 150 | AliITS *fITS; // Pointer to ITS detector |
151 | Int_t fIndex; //Index of this module in ITSmodules TObjectArray | |
152 | TObjArray *fHitsM; // Pointer to list of hits on this module | |
153 | TArrayI *fTrackIndex,*fHitIndex; // track index, hit index | |
154 | ||
155 | ClassDef(AliITSmodule,1) // Copy the hits into a more useful order | |
58005f18 | 156 | |
58005f18 | 157 | }; |
158 | ||
159 | #endif | |
3bd79107 | 160 | |
161 | ||
162 |