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