Some compilation problems on HPUX fixed.
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSDD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSSIMULATIONSDD_H
2#define ALIITSSIMULATIONSDD_H
3
4
5#include <TH1.h>
6#include <TFile.h>
7#include <TNtuple.h>
8#include <TRandom.h>
9#include <TVector.h>
10#include <TArrayI.h>
11
12
13#include "AliITSMap.h"
14#include "AliITSsimulation.h"
15#include "AliITSRawData.h"
16
17//___________________________________________________
18
19
20
21class AliITSetfSDD;
22
23//___________________________________________________
24
25class AliITSsimulationSDD : public AliITSsimulation {
26
27public:
28
29 AliITSsimulationSDD();
30 AliITSsimulationSDD(AliITSsegmentation *seg, AliITSresponse *res);
31 AliITSsimulationSDD(AliITSsimulationSDD &source);
32 virtual ~AliITSsimulationSDD();
33 AliITSsimulationSDD& operator=(AliITSsimulationSDD &source);
34
35 // get the address of the array mapping the signal or pointers to arrays
36 virtual AliITSMap* HitMap(Int_t i);
37
38 // set compression parameters for 2D or 1D via response functions
39 void SetCompressParam();
40 // retrieve compression parameters for 2D or 1D
41 void CompressionParam(Int_t i, Int_t &db, Int_t &tl, Int_t &th);
42 void CompressionParam(Int_t i, Int_t &db, Int_t &tl);
43
44 virtual Int_t Convert10to8(Int_t signal);
45 virtual Int_t Convert8to10(Int_t signal);
46 virtual void ZeroSuppression(Option_t *opt);
47 virtual void Init2D();
48 virtual void Compress2D();
49 virtual void Init1D();
50 virtual void Compress1D();
51 virtual void StoreAllDigits();
52 virtual void ReadBaseline();
53 virtual void GetAnodeBaseline(Int_t i, Float_t &baseline, Float_t &noise);
54 virtual void AddDigit(Int_t i, Int_t j, Int_t signal);
55 virtual void FindCluster
56 (Int_t i, Int_t j,Int_t signal,Int_t minval,Bool_t cond);
57
58
59 // get parameters for 1D - this could be changed when we get more
60 // input from Torino after they have a look at the code
61 virtual Int_t Tolerance(Int_t i) {return fTol[i];}
62 virtual Int_t Disable(Int_t i) {return fT2[i];}
63 virtual void SetFileName(const char *filnam) {fFileName=filnam;}
64
65 void ChargeToSignal();
66 void DigitiseModule(AliITSmodule *mod,Int_t md,Int_t ev);
67 void SortTracks(Int_t *tracks,Float_t *charges,Int_t ntracks);
68 void ListOfFiredCells(Int_t *arg,Double_t timeAmplitude,TObjArray *list,
69 TClonesArray *padr);
70 Int_t Module() {return fModule;}
71 Int_t Event() {return fEvent;}
72
73 void CreateHistograms();
74 void ResetHistograms();
75 TObjArray* GetHistArray() {return fHis;}
76
77 // create a separate tree for background monitoring (2D) -easy to do
78 virtual void MakeTreeB(Option_t *option="B")
79 { fTreeB = new TNtuple("ntuple","2D backgr","nz:nl:nh:low:anode");}
80 void GetTreeB(Int_t) { }
81
82 // Return pointer to TreeB
83 TNtuple *TreeB() {return fTreeB;}
84
85 void WriteToFile(TFile *fp);
86 TH1F *GetAnode(Int_t wing, Int_t anode);
87 Float_t GetNoise(Float_t threshold);
88
89private:
90 AliITS *fITS; // local pointer to ITS
91
92 AliITSMapA1 *fHitMap1; // local pointer to map of digits
93 AliITSMapA2 *fHitMap2; // local pointer to map of signals
94 AliITSInStream *fStream; // input file stream
95 AliITSetfSDD *fElectronics; // local pointer to electronics simulation
96
97 TArrayI fD; // decrease values for baseline eq.
98 TArrayI fT1; // low thresholds
99 TArrayI fT2; // high thresholds(2D) or disable (1D)
100 TArrayI fTol; // tolerance
101 TArrayF fBaseline; // Baseline
102 TArrayF fNoise; // Noise value
103 TNtuple *fTreeB; // Background info tree for 2D
104 Option_t *fParam; // Compresion algorithm options
105 TString fFileName; // File name for possible options above
106
107 Int_t fNofMaps; // Number of anodes used ( 1 - 2*nanodes per wing )
108 Int_t fMaxNofSamples; // Number of time samples
109 Int_t fModule; // in case bgr, noise, param change module-by-module
110 Int_t fEvent; // solely for output from bgr monitoring of 2D
111
112 TObjArray *fHis; // just in case for histogramming
113
114 ClassDef(AliITSsimulationSDD,1) // Simulation of SDD clusters
115
116};
117#endif