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