3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
15 class AliITSmodule:public TObject{
17 //________________________________________________________________
20 // is a superclass for AliITSmoduleSSD, SPD and SDD.
21 // The main function of modules is to simulate DIGITS from
22 // GEANT HITS and produce POINTS from DIGITS
23 // It also make fast simulation without use of DIGITS
25 // created by: A.Boucham, W.Peryt, S.Radomski, P.Skowronski
26 // R.Barbera, B. Batynia, B. Nilsen
27 // ver. 1.0 CERN, 16.09.1999
29 //________________________________________________________________
33 //________________________________________________________________
35 // Constructors and deconstructor
36 //________________________________________________________________
38 AliITSmodule(); // default constructor
39 AliITSmodule(Int_t index); //index in TObjectArray in ITS object
40 virtual ~AliITSmodule();
42 //________________________________________________________________
44 // Position managenent (id's getters)
45 //________________________________________________________________
48 Int_t GetIndex() const {
52 void GetID(Int_t &lay,Int_t &lad,Int_t &det);
55 Int_t i,j,k;GetID(i,j,k);return i;
59 Int_t i,j,k;GetID(i,j,k);return j;
63 Int_t i,j,k;GetID(i,j,k);return k;
65 //________________________________________________________________
68 //________________________________________________________________
70 Int_t GetNhits() const {
72 return fHitsM->GetEntriesFast();
74 AliITS *GetITS() const {
78 TObjArray *GetHits() const {
82 AliITShit *GetHit(Int_t i) {
83 // returns pointer to array (TClonesArray) of pointers to hits
84 return (AliITShit*)fHitsM->At(i);
86 // Adds pointer of hit belonging to this module
87 // and returns number of hits in this module
88 Int_t AddHit(AliITShit *hit,Int_t TrackIndex,Int_t HitIndex);
89 void MedianHitG(Int_t index, Float_t hitx1,Float_t hity1,Float_t hitz1,
90 Float_t hitx2,Float_t hity2,Float_t hitz2, Float_t &xMg,
91 Float_t &yMg, Float_t &zMg);
92 void MedianHitL(Int_t index, AliITShit *itsHit1, AliITShit *itsHit2,
93 Float_t &xMl, Float_t &yMl, Float_t &zMl);
94 Double_t PathLength(Int_t index, AliITShit *itsHit1, AliITShit *itsHit2);
95 Int_t GetHitTrackIndex(Int_t i) {
96 // get hit track index
97 return fTrackIndex->At(i);
99 Int_t GetHitHitIndex(Int_t i) {
100 // return the hit index number in TreeH for the given sorted hit in the module.
101 return fHitIndex->At(i);
103 void GetHitTrackAndHitIndex(Int_t i,Int_t &TrackIndex,Int_t &HitIndex) {
104 // return the hit index number for the given hit. Hits are kept on
105 // file according to their track index and hit index numbers.
106 TrackIndex = fTrackIndex->At(i);HitIndex = fHitIndex->At(i);
108 // returns both the track and hit index numbers for the given hit. Hits
109 // are kept on file according to their track index and hit index numbers.
110 void MedianHit(Int_t index, Float_t xg,Float_t yg,Float_t zg,
111 Int_t status,Float_t &xMg, Float_t &yMg, Float_t &zMg,
113 void PathLength(Int_t index,Float_t x,Float_t y,Float_t z,Int_t status,
114 Int_t &nseg,Float_t &x1,Float_t &y1,Float_t &z1,
115 Float_t &dx1,Float_t &dy1, Float_t &dz1,Int_t &flag);
116 Bool_t LineSegmentL(Int_t hindex,Double_t &a,Double_t &b,
117 Double_t &c,Double_t &d,Double_t &e,Double_t &f,
119 Bool_t LineSegmentL(Int_t hindex,Double_t &a,Double_t &b,
120 Double_t &c,Double_t &d,Double_t &e,Double_t &f,
121 Double_t &de,Int_t &track);
122 // if returns kTRUE; gives the parameterization of the line segment
123 // from this step. x=a+b*t, y=c+d*t, and z=e+f*t for 0.0t<=1.0 and the
124 // energy lost during this step all in the local detector coordinates.
125 // if returns kFALSE; this is a begining step and no energy loss has
126 // occured. This step is used to set up the next steps. Do not use
127 // this parameterization.
128 Bool_t LineSegmentG(Int_t hindex,Double_t &a,Double_t &b,
129 Double_t &c,Double_t &d,Double_t &e,Double_t &f,
131 Bool_t LineSegmentG(Int_t hindex,Double_t &a,Double_t &b,
132 Double_t &c,Double_t &d,Double_t &e,Double_t &f,
133 Double_t &de,Int_t &track);
134 // if returns kTRUE; gives the parameterization of the line segment
135 // from this step. x=a+b*t, y=c+d*t, and z=e+f*t for 0.0t<=1.0 and the
136 // energy lost during this step all in the global detector coordinates.
137 // if returns kFALSE; this is a begining step and no energy loss has
138 // occured. This step is used to set up the next steps. Do not use
139 // this parameterization.
142 AliITSmodule(const AliITSmodule &source);
143 AliITSmodule& operator=(const AliITSmodule &source);
144 //________________________________________________________________
147 //________________________________________________________________
149 AliITS *fITS; // Pointer to ITS detector
150 Int_t fIndex; //Index of this module in ITSmodules TObjectArray
151 TObjArray *fHitsM; // Pointer to list of hits on this module
152 TArrayI *fTrackIndex,*fHitIndex; // track index, hit index
154 ClassDef(AliITSmodule,1) // Copy the hits into a more useful order