]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSmodule.h
New Cluster finding macro. Used by new AliITStest.C macro.
[u/mrichter/AliRoot.git] / ITS / AliITSmodule.h
CommitLineData
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>
10#include <TArrayI.h>
58005f18 11
3bd79107 12class AliITS;
13class AliITShit;
14
15class AliITSmodule:public TObject{
58005f18 16
17//________________________________________________________________
18//
19// Class AliITSmodule
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
24//
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
28//
29//________________________________________________________________
30//
31
3bd79107 32 public:
58005f18 33 //________________________________________________________________
34 //
35 // Constructors and deconstructor
36 //________________________________________________________________
3bd79107 37 //
58005f18 38 AliITSmodule(); // default constructor
3bd79107 39 AliITSmodule(Int_t index); //index in TObjectArray in ITS object
40 virtual ~AliITSmodule();
58005f18 41
42 //________________________________________________________________
43 //
3bd79107 44 // Position managenent (id's getters)
58005f18 45 //________________________________________________________________
46 //
3bd79107 47
48 Int_t GetIndex() const {
49 // get index
50 return fIndex;
51 }
52 void GetID(Int_t &lay,Int_t &lad,Int_t &det);
53 Int_t GetLayer() {
54 // get layer
55 Int_t i,j,k;GetID(i,j,k);return i;
56 }
57 Int_t GetLadder(){
58 // get ladder
59 Int_t i,j,k;GetID(i,j,k);return j;
60 }
61 Int_t GetDet(){
62 // get det
63 Int_t i,j,k;GetID(i,j,k);return k;
64 }
58005f18 65 //________________________________________________________________
66 //
3bd79107 67 // Hits management
58005f18 68 //________________________________________________________________
69 //
3bd79107 70 Int_t GetNhits() const {
71 // get num of hits
72 return fHitsM->GetEntriesFast();
73 }
74 AliITS *GetITS() const {
75 // get ITS
76 return fITS;
77 }
78 TObjArray *GetHits() const {
79 // get hits
80 return fHitsM;
81 }
82 AliITShit *GetHit(Int_t i) {
58005f18 83 // returns pointer to array (TClonesArray) of pointers to hits
3bd79107 84 return (AliITShit*)fHitsM->At(i);
85 }
58005f18 86 // Adds pointer of hit belonging to this module
87 // and returns number of hits in this module
3bd79107 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);
98 }
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);
102 }
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);
107 }
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,
112 Int_t &flag);
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,
118 Double_t &de);
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,
130 Double_t &de);
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.
140
141 protected:
142 AliITSmodule(const AliITSmodule &source);
143 AliITSmodule& operator=(const AliITSmodule &source);
58005f18 144 //________________________________________________________________
145 //
146 // Data members
147 //________________________________________________________________
148 //
3bd79107 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
153
154 ClassDef(AliITSmodule,1) // Copy the hits into a more useful order
58005f18 155
58005f18 156};
157
158#endif
3bd79107 159
160
161