Major changes in supppor of PreDigits (SDigits). Changes made with will make
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSSD.h
CommitLineData
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 */
5/* $Id$ */
b0f5e3fc 6
b0f5e3fc 7#include "AliITSsimulation.h"
c7a4dac0 8#include "AliITSsegmentationSSD.h" // function used in inline functions
b0f5e3fc 9
fd61217e 10class AliITSMapA2;
c7a4dac0 11class AliITSpList;
b0f5e3fc 12class AliITSdcsSSD;
57817f7c 13class AliITSsegmentationSSD;
c7a4dac0 14class AliITSresponseSSD;
b0f5e3fc 15
16class AliITSsimulationSSD: public AliITSsimulation {
17
57817f7c 18 public:
19 AliITSsimulationSSD(); // Default constructor
20 AliITSsimulationSSD(const AliITSsimulationSSD &source); // copy constructor
21 // operator =
22 AliITSsimulationSSD& operator=(const AliITSsimulationSSD &source);
23 //Standard Constructor
24 AliITSsimulationSSD(AliITSsegmentation *seg,AliITSresponse *resp);
25 //Destructor
26 virtual ~AliITSsimulationSSD();
c7a4dac0 27 // Initilize variables for this simulation
28 void Init(AliITSsegmentationSSD *seg,AliITSresponseSSD *resp);
57817f7c 29 //Digitizes all of the hits in a module
c7a4dac0 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);
57817f7c 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);
57817f7c 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);
b0f5e3fc 60
c7a4dac0 61 private:
62 // returns the number of steps needed to proplerly distribute the charge
63 // in a step
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);
57817f7c 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);
c7a4dac0 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
57817f7c 85 Float_t F(Float_t av, Float_t x, Float_t s);
c7a4dac0 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);}
57817f7c 90
91 // Data members
fd61217e 92 protected:
57817f7c 93 AliITSdcsSSD *fDCS; // Class containing detector controle paramters
fd61217e 94
57817f7c 95 private:
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
b0f5e3fc 100
57817f7c 101 ClassDef(AliITSsimulationSSD,2) // SSD signal simulation class
b0f5e3fc 102
57817f7c 103};
104// Input and output functions for standard C++ input/output.
105ostream &operator<<(ostream &os,AliITSsimulationSSD &source);
106istream &operator>>(istream &is,AliITSsimulationSSD &source);
b0f5e3fc 107#endif