1 #ifndef ALIITSSIMULATIONSSD_H
2 #define ALIITSSIMULATIONSSD_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 #include "AliITSsimulation.h"
8 #include "AliITSsegmentationSSD.h" // function used in inline functions
13 class AliITSsegmentationSSD;
14 class AliITSresponseSSD;
16 class AliITSsimulationSSD: public AliITSsimulation {
19 AliITSsimulationSSD(); // Default constructor
20 AliITSsimulationSSD(const AliITSsimulationSSD &source); // copy constructor
22 AliITSsimulationSSD& operator=(const AliITSsimulationSSD &source);
23 //Standard Constructor
24 AliITSsimulationSSD(AliITSsegmentation *seg,AliITSresponse *resp);
26 virtual ~AliITSsimulationSSD();
27 // Initilize variables for this simulation
28 void Init(AliITSsegmentationSSD *seg,AliITSresponseSSD *resp);
29 //Digitizes all of the hits in a module
30 void DigitiseModule(AliITSmodule *mod,Int_t dummy0,Int_t dummy1);
31 // Computes the Summable Digits
32 void SDigitiseModule(AliITSmodule *mod,Int_t module,Int_t dummy);
33 // Computes the Charge on each Strip/ Analog/summable digits
34 void HitsToAnalogDigits(AliITSmodule *mod,AliITSpList *pList);
35 //Computes the signal from one hit
36 void HitToDigit(Int_t module,Double_t x0,Double_t y0,Double_t z0,
37 Double_t x,Double_t y,Double_t z,Double_t de,
38 Int_t *indexRange,Bool_t first);
39 //returns a pointer to the SSD segmentation.
40 AliITSsegmentationSSD *GetSegmentation() {
41 return (AliITSsegmentationSSD*) fSegmentation;}
42 //Returns the ionization energy for Si in GeV.
43 Double_t GetIonizeE() const {return fIonE;}
44 //Sets the ionization energy for Si in GeV.
45 void SetIonizeE(Double_t e=3.62E-09){fIonE = e;}
46 //Returns the Diffusion constant h in cm**2/sec
47 Double_t GetDiffConst(Int_t i) const {return fDifConst[i];}
48 //Sets the Diffusion constant h in cm**2/sec
49 void SetDiffConst(Double_t h=11.0,Double_t e=30.0)
50 {fDifConst[0] = h;fDifConst[1]=e;}
51 //Returns the Drift velocity for the side i
52 Double_t GetDriftVelocity(Int_t i) const {return fDriftVel[i];}
53 //Sets the Drift velocity for the P and N sides
54 void SetDriftVelocity(Double_t v0=0.86E+06,Double_t v1=2.28E+06)
55 {fDriftVel[0] = v0;fDriftVel[1] = v1;}
56 // Standard ascii class print function
57 void Print(ostream *os);
58 // Standard ascii class read function
59 void Read(istream *is);
62 // returns the number of steps needed to proplerly distribute the charge
64 Int_t NumOfSteps(Double_t x,Double_t y,Double_t z,
65 Double_t &dex,Double_t &dey,Double_t &dez);
66 // Keepts track and orders tracks for a give strip.
67 void GetList(Int_t trk,Int_t ht,Int_t mod,AliITSpList *pLt,Int_t *indxRng);
68 // sets thresholds and fills digits
69 void ChargeToSignal(AliITSpList *pList);
70 // Writes Summable Digits to a root file for later use.
71 void WriteSDigits(AliITSpList *pList);
72 // ReadSDigits and create Digits
73 void SDigitToDigit(Int_t module,AliITSpList *pList);
74 // Fills fMapA2 from pList AliITSpList
75 void FillMapFrompList(AliITSpList *pList);
76 // Diffuses the charge onto neighboring strips.
77 void IntegrateGaussian(Int_t k,Double_t par,Double_t av,Double_t sigma,
78 Double_t inf, Double_t sup,
79 Int_t *indexRange, Bool_t first);
80 // Applies noise to strips randomly
81 void ApplyNoise(AliITSpList *pList,Int_t mod);
82 // Applies posible signal coupling between strips
83 void ApplyCoupling(AliITSpList *pList,Int_t mod);
84 // Computes the integral of a gaussian using Error Function
85 Float_t F(Float_t av, Float_t x, Float_t s);
86 // returns, from the segmentation, the number of stips
87 Int_t GetNStrips() {return GetSegmentation()->Npx();}
88 // returns, from the segmentation, the strip pitch
89 Float_t GetStripPitch() {return GetSegmentation()->Dpx(0);}
93 AliITSdcsSSD *fDCS; // Class containing detector controle paramters
96 AliITSMapA2 *fMapA2; //! Map of ionization, used localy only
97 Double_t fIonE; // ionization energy of Si in GeV
98 Double_t fDifConst[2]; // Diffusion constants [h,e] in cm**2/sec
99 Double_t fDriftVel[2]; // Drift velocities [P,N sides] cm/sec
101 ClassDef(AliITSsimulationSSD,2) // SSD signal simulation class
104 // Input and output functions for standard C++ input/output.
105 ostream &operator<<(ostream &os,AliITSsimulationSSD &source);
106 istream &operator>>(istream &is,AliITSsimulationSSD &source);