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 */
8 /////////////////////////////////////////////////////////////
9 // Simulation class for SSD //
10 /////////////////////////////////////////////////////////////
12 #include "AliITSsimulation.h"
13 #include "AliITSsegmentationSSD.h" // function used in inline functions
19 class AliITSsegmentationSSD;
20 class AliITSCalibrationSSD;
22 class AliITSsimulationSSD: public AliITSsimulation {
25 AliITSsimulationSSD(); // Default constructor
26 AliITSsimulationSSD(const AliITSsimulationSSD &source); // copy constructor
28 AliITSsimulationSSD& operator=(const AliITSsimulationSSD &source);
29 virtual AliITSsimulation& operator=(const AliITSsimulation &source);
30 //Standard Constructor
31 AliITSsimulationSSD(AliITSDetTypeSim* dettyp);
33 virtual ~AliITSsimulationSSD();
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);}
38 // Initilize variables for this simulation
40 // Initilize variables for this simulation
41 //void Init(AliITSsegmentationSSD *seg,AliITSCalibrationSSD *resp);
42 // Create maps to build the lists of tracks for each summable digit
43 void InitSimulationModule(Int_t module,Int_t events);
44 // Digitize module from the sum of summable digits.
45 void FinishSDigitiseModule();
46 //Digitizes all of the hits in a module
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);
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,
56 //returns a pointer to the SSD segmentation.
57 /*AliITSsegmentationSSD *GetSegmentation() {
58 return (AliITSsegmentationSSD*) fSegmentation;}
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);
78 virtual void Print(Option_t *option="") const {TObject::Print(option);}
79 virtual Int_t Read(const char *name) {return TObject::Read(name);}
83 // AliITSdcsSSD *fDCS; // Class containing detector controle paramters
86 // Return the Response class
87 // AliITSCalibrationSSD* GetResp(){return (AliITSCalibrationSSD*)fResponse;}
88 // Return the Segmentation class
89 //AliITSsegmentationSSD* GetSeg(){
90 // return (AliITSsegmentationSSD*)fSegmentation;}
91 // returns the number of steps needed to proplerly distribute the charge
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.
96 void GetList(Int_t trk,Int_t ht,Int_t mod,AliITSpList *pLt,
98 // sets thresholds and fills digits
99 void ChargeToSignal(Int_t module,AliITSpList *pList);
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);
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,
109 AliITSTableSSD *tav);
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 // Kill dead channels
115 void ApplyDeadChannels(Int_t mod);
116 // Computes the integral of a gaussian using Error Function
117 Float_t F(Float_t av, Float_t x, Float_t s);
118 // returns, from the segmentation, the number of stips
119 Int_t GetNStrips() {AliITSsegmentationSSD* seg = (AliITSsegmentationSSD*)GetSegmentationModel(2);return seg->Npx();}
120 // returns, from the segmentation, the strip pitch
121 Float_t GetStripPitch() {AliITSsegmentationSSD* seg = (AliITSsegmentationSSD*)GetSegmentationModel(2);return seg->Dpx(0);}
123 AliITSMapA2 *fMapA2; //! Map of ionization, used localy only
124 Double_t fIonE; // ionization energy of Si in GeV
125 Double_t fDifConst[2]; // Diffusion constants [h,e] in cm**2/sec
126 Double_t fDriftVel[2]; // Drift velocities [P,N sides] cm/sec
128 ClassDef(AliITSsimulationSSD,2) // SSD signal simulation class
131 // Input and output functions for standard C++ input/output.
132 ostream &operator<<(ostream &os,AliITSsimulationSSD &source);
133 istream &operator>>(istream &is,AliITSsimulationSSD &source);