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