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