]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSsimulationSPD.h
Add Boost() method to boost all particles to LHC lab frame. Needed for asymmetric...
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSPD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSSIMULATIONSPD_H
2#define ALIITSSIMULATIONSPD_H
c7a4dac0 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
b0f5e3fc 5
c7a4dac0 6/*
7$Id$
8*/
9#include "AliITSresponseSPD.h"
10#include "AliITSsegmentationSPD.h"
b0f5e3fc 11#include "AliITSsimulation.h"
12
13class AliITSMapA2;
c7a4dac0 14class AliITSpList;
b0f5e3fc 15class AliITSmodule;
16
17//-------------------------------------------------------------------
18
19class AliITSsimulationSPD : public AliITSsimulation {
20
c7a4dac0 21 public:
22 AliITSsimulationSPD(); // Default constructor
23 // Standard constructor
24 AliITSsimulationSPD(AliITSsegmentation *seg, AliITSresponse *res);
25 ~AliITSsimulationSPD();// destructor
26 AliITSsimulationSPD(const AliITSsimulationSPD &source); // copy constructo
27 // assignment operator
28 AliITSsimulationSPD& operator=(const AliITSsimulationSPD &source);
29 // Initilizes the variables
30 void Init(AliITSsegmentationSPD *seg, AliITSresponseSPD *resp);
b0f5e3fc 31
c7a4dac0 32 // Sum digitize module
33 void SDigitiseModule(AliITSmodule *mod, Int_t dummy0,Int_t dummy1);
34 // digitize module. Also need to digitize modules with only noise.
35 void DigitiseModule(AliITSmodule *mod,Int_t dummy0, Int_t dummy1);
36 // sum digits to Digits.
37 void SDigitsToDigits(Int_t module,AliITSpList *pList);
38 // updates the Map of signal, adding the energy (ene) released by
39 // the current track
40 void UpdateMapSignal(Int_t row,Int_t col,Int_t trk,Int_t hit,Int_t mod,
41 Double_t ene,AliITSpList *pList);
42 // updates the Map of noise, adding the energy (ene) give my noise
43 void UpdateMapNoise(Int_t row,Int_t col,Int_t mod,Double_t ene,
44 AliITSpList *pList);
45 // Loops over all hits to produce Analog/floting point digits. This
46 // is also the first task in producing standard digits.
47 void HitsToAnalogDigits(AliITSmodule *mod,Int_t *frowpixel,
48 Int_t *fcolpixel,Double_t *fenepixel,
49 AliITSpList *pList);
50 // Steering function to determine the digits associated to a given
51 // hit (hitpos)
52 // The digits are created by charge sharing (ChargeSharing) and by
53 // capacitive coupling (SetCoupling). At all the created digits is
54 // associated the track number of the hit (ntrack)
55 void HitToDigit(AliITSmodule *mod, Int_t hitpos,Int_t *frowpixel,
56 Int_t *fcolpixel, Double_t *fenepixel,AliITSpList *pList);
57 // Take into account the geometrical charge sharing when the track
58 // crosses more than one pixel.
59 void ChargeSharing(Float_t x1l,Float_t z1l,Float_t x2l,Float_t z2l,
60 Int_t c1,Int_t r1,Int_t c2,Int_t r2,Float_t etot,
61 Int_t &npixel,Int_t *frowpixel,Int_t *fcolpixel,
62 Double_t *fenepixel);
63 // Take into account the coupling between adiacent pixels.
64 // The parameters probcol and probrow are the fractions of the
65 // signal in one pixel shared in the two adjacent pixels along
66 // the column and row direction, respectively.
67 void SetCoupling(Int_t row,Int_t col,Int_t ntrack,Int_t idhit,Int_t module,
68 AliITSpList *pList);
69 // The pixels are fired if the energy deposited inside them is above
70 // the threshold parameter ethr. Fired pixed are interpreted as digits
71 // and stored in the file digitfilename. One also needs to write out
72 // cases when there is only noise (nhits==0).
73 void CreateDigit(Int_t module,AliITSpList *pList);
74 // Set the electronic noise and threshold non-uniformities to all the
75 // pixels in a detector.
76 // The parameter fSigma is the squared sum of the sigma due to noise
77 // and the sigma of the threshold distribution among pixels.
78 void SetFluctuations(AliITSpList *pList,Int_t module);
79 // Apply a mask to the SPD module. 1% of the pixel channels are
80 // masked. When the database will be ready, the masked pixels
81 // should be read from it.
82 void SetMask();
83 // Create Histograms
84 void CreateHistograms();
85 // Reset histograms for this detector
86 void ResetHistograms();
87 // Fills the Summable digits Tree
88 void WriteSDigits(AliITSpList *pList);
89 // Fills fMap2A from the pList of Summable digits
90 void FillMapFrompList(AliITSpList *pList);
b0f5e3fc 91 // get hist array
c7a4dac0 92 TObjArray* GetHistArray() {return fHis;}
b0f5e3fc 93
c7a4dac0 94 private:
95 // Getters for data kept in fSegmentation and fResponse.
96 // Returns the Threshold in electrons
97 Double_t GetThreshold(){Float_t a=0.0,b=0.0;
98 ((AliITSresponseSPD*)fResponse)->Thresholds(a,b); return a;}
99 // Returns the threshold and rms noise.
100 void GetThresholds(Float_t &t,Float_t &s){
101 ((AliITSresponseSPD*)fResponse)->Thresholds(t,s);}
102 // Returns the couplings Columb and Row.
103 void GetCouplings(Float_t &cc,Float_t cr){
104 ((AliITSresponseSPD*)fResponse)->GetNoiseParam(cc,cr);}
105 // Returns the number of pixels in x
106 Int_t GetNPixelsX(){return ((AliITSsegmentationSPD*)fSegmentation)->Npx();}
107 // Returns the number of pixels in z
108 Int_t GetNPixelsZ(){return ((AliITSsegmentationSPD*)fSegmentation)->Npz();}
b0f5e3fc 109
c7a4dac0 110 private:
111/* Float_t fThresh; //! Threshold from fResponse
112 Float_t fSigma; //! Noise from fResponse
113 Float_t fCouplCol; //! Coupling along columns from fResponse
114 Float_t fCouplRow; //! Coupling along rows from fResponse
115 Int_t fNPixelsX; //! NPixelsX from fSegmentation
116 Int_t fNPixelsZ; //! NPixelsZ from fSegmentation
117*/
118 AliITSMapA2 *fMapA2; //! MapA2 for Local internal use only
119 TObjArray *fHis; //! just in case for histogramming for Local
120 // internal use only
b0f5e3fc 121
c7a4dac0 122 ClassDef(AliITSsimulationSPD,1) // Simulation of SPD clusters
b0f5e3fc 123
124};
125
c7a4dac0 126#endif