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