]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSmoduleSSD.h
New version of ITS for the TDR
[u/mrichter/AliRoot.git] / ITS / AliITSmoduleSSD.h
1 #ifndef ALIITSMODLUESSD_H
2 #define ALIITSMODLUESSD_H
3
4 #include "TObject.h"
5 #include "TArrayS.h"
6 #include "TClonesArray.h"
7 #include "TRandom.h"
8 //#include "AliConst.h"
9 #include "TMath.h"
10
11 #include "AliITSdigitSSD.h"
12 #include "AliITS.h"
13 #include "AliITSmodule.h"
14
15
16
17 //____________________________________________________________________
18 //
19 //  Class AliITSmoduleSSD
20 //  describes one SSD module
21 //  The main function of modules is to simulate DIGITS from  
22 //  GEANT HITS and produce POINTS from DIGITS
23 //
24 //  This class keep track of Detector Control System parameters
25 //  of one SSD module: invalid (dead) strips, gain, capacitive
26 //  coupling.
27 //
28 //  In this release it make only simulation, and is not completly
29 //  tuned - up. Simulation will be improved after tests of SSD 
30 //  modules on SPS. Improved simulation and reconstruction will
31 //  appear in next releas.
32 //  
33 //  created by: A.Boucham, W.Peryt, S.Radomski, P.Skowronski
34 //  ver. 1.0    CERN, 16.09.1999  
35 // 
36 //___________________________________________________________________
37 //
38
39
40
41 class AliITSmoduleSSD: public AliITSmodule {
42
43     
44 public:       
45     
46     //________________________________________________________________
47     //
48     // Constructors and deconstructor
49     //________________________________________________________________
50     //
51     
52     AliITSmoduleSSD();
53     AliITSmoduleSSD(Int_t index);
54     ~AliITSmoduleSSD();
55   
56     //________________________________________________________________
57     //
58     // Data process methods
59     //________________________________________________________________
60     //
61     
62     void AddDigit(Int_t, Int_t,  Bool_t);
63     void HitToDigit();           // Process all hits in module
64     void HitToDigit(Int_t);      // Proces one hit
65     void DigitToPoint() {};      // Not impemented yet
66     void HitToPoint() {};        // Not impemented y
67    
68     //________________________________________________________________
69     //  
70     //Invalid strips menagement methods
71     //________________________________________________________________
72     //
73     
74     // Parameters for invalid strips MonteCarlo
75 //    void SetInvalidParam(Float_t mean, Float_t sigma);
76 //    void GetInvalParam(Float_t &mean, Float_t &sigma); 
77     
78     // Methods for creating invalid strips
79     void SetInvalidMC(Float_t mean, Float_t sigma);
80     void SetInvalidMC();
81     
82     // Testing if strip is valid
83     Bool_t  IsValidN(Int_t strip);      //True if strip work properly
84     Bool_t  IsValidP(Int_t strip);
85 //    TArrayI GetInvalidP();              //Array of invalid strips
86 //    TArrayI GetInvalidN();
87 //    Int_t   GetNInvalidP();             //Number of invalid srtips
88 //    Int_t   GrtNInvalidN();
89     
90     // Creating invalid strips
91     void      SetInvalidP(Int_t strip, Bool_t side);   //Set invalid if true 
92 //    void      SetInvalidN(Int_t strip, Bool_t side);          
93        
94   
95 protected:
96          
97     //________________________________________________________________
98     //
99     //Private methods for geometry
100     //________________________________________________________________
101     //
102     
103     Int_t   GetStripN(Float_t x, Float_t z);    // Nearest strip number P-side
104     Int_t   GetStripP(Float_t x, Float_t z);    // Nearest strip number N-side
105     
106     Float_t Get2StripN(Float_t, Float_t);       // Ditance do the nearest strip P 
107     Float_t Get2StripP(Float_t, Float_t);       // Ditance do the nearest strip N
108      
109     Bool_t  GetCrossing(Float_t&, Float_t&);      //x, y of strips crossing 
110     
111     //________________________________________________________________
112     //
113     //Private methods for simulation  
114     //________________________________________________________________
115     //
116     
117     void ApplyNoise();
118     void ApplyCoupling();
119
120     Float_t   F(Float_t x, Float_t s) {return (TMath::Erf(x*kPitch/s)+1) /2;}              
121     
122     // Proceding part should be in SSDgeo ----->
123     
124     //Technical parameters of detector
125     static const Float_t   kStereo = 0.0175;  //Stereo Angle 17.5 mrad
126     static const Float_t   kTan = 0.0175;  
127     static const Int_t     kNStrips = 768;    //Number of strips on each side
128     static const Float_t   kPitch = 0.095;    //Distance strip - strip (mm)
129     static const Float_t   kX = 72.96;        //X size (mm)
130     static const Float_t   kY = 0.3;          //Y size (mm)
131     static const Float_t   kZ = 40;           //Thickness (mm)
132     
133     // <------------------------------
134   
135     //______________________________________________________________
136     //  
137     // Parameters for simulation
138     //______________________________________________________________
139       
140     static const Float_t   kSigmaP = 0.003;     //Gaussian sigm
141     static const Float_t   kSigmaN = 0.002;
142     static const Int_t     kSteps  = 10;        //Number of steps 
143     static const Int_t     kTresholdP = 1500;    
144     static const Int_t     kTresholdN = 2500; 
145    
146     //________________________________________________________________
147     //      
148     // DCS Parameters
149     //________________________________________________________________
150     //
151     
152     Float_t   fSNRatioP;      //Signal - Noise Ratio P-side
153     Float_t   fSNRatioN;      //Signal - Noise RatioNP-side
154     
155     Float_t   fGainP;         //Charge - ADC conversion parameter P
156     Float_t   fGainN;         //Charge - ADC conversi parameter N
157     
158     Int_t     fNInvalidP;     //Number of invalid strips P
159     TArrayS  *fInvalidP;      //Invalid strips P-side
160     Int_t     fNInvalidN;     //Number of invalid strips N
161     TArrayS  *fInvalidN;      //Invalid strips N-side 
162
163
164     //________________________________________________________________
165     //
166     // Capacitive coupling parameters
167     //________________________________________________________________
168     //
169     
170     Float_t   fCouplingPR;
171     Float_t   fCouplingPL;
172     Float_t   fCouplingNR;
173     Float_t   fCouplingNL;     
174
175     //________________________________________________________________
176     //
177     // Parameters for invalid strips simulatation 
178     //________________________________________________________________
179     
180     Float_t     fNInvalid;             //Meam number of invalid strips 
181     Float_t     fISigma;               //RMS of invalid strips (Gaussian)
182
183     //________________________________________________________________
184     //
185     // temp for simulation
186     //________________________________________________________________
187     //
188     
189     TArrayI *fN;         // for signal
190     TArrayI *fP;        
191     
192     TArrayI *fNtrack1;   // for tracks, signal orgin N-side
193     TArrayI *fNtrack2;
194     TArrayI *fNtrack3;
195        
196     TArrayI *fPtrack1;   // for tracks, signal orgin P-side
197     TArrayI *fPtrack2;
198     TArrayI *fPtrack3;
199
200 public:
201     ClassDef(AliITSmoduleSSD, 1)
202 };
203
204 #endif