Code for simulation, sdigitization and digitization moved from macros to compiled...
[u/mrichter/AliRoot.git] / PMD / AliPMDDigitizer.h
CommitLineData
36031625 1#ifndef ALIPMDDIGITIZER_H
2#define ALIPMDDIGITIZER_H
b9746a9e 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
b2b13ee2 5//-----------------------------------------------------//
6// //
7// Header File : PMDDigitization.h, Version 00 //
8// //
9// Date : September 20 2002 //
10// //
11//-----------------------------------------------------//
12
b2b13ee2 13class TClonesArray;
14class TFile;
36031625 15class TMath;
b2b13ee2 16class TObjArray;
17class TParticle;
18class TTree;
19class TNtuple;
20
21class AliLoader;
22class AliRunLoader;
23class AliRun;
24class AliDetector;
25class AliPMDhit;
26class AliHit;
27class AliHeader;
28
29class AliPMDcell;
30class AliPMDsdigit;
31class AliPMDdigit;
32class AliPMDClustering;
b2b13ee2 33
b2b13ee2 34class AliPMDDigitizer
35{
b2b13ee2 36 public:
37
38 AliPMDDigitizer();
39 virtual ~AliPMDDigitizer();
40
85a5290f 41 void OpengAliceFile(const char *file, Option_t *option);
b2b13ee2 42
36031625 43 void Hits2SDigits(Int_t ievt);
44 void Hits2Digits(Int_t ievt);
45 void SDigits2Digits(Int_t ievt);
b2b13ee2 46 void TrackAssignment2Cell();
a7d110b8 47 void MeV2ADC(Float_t mev, Float_t & adc) const;
36031625 48 void AddSDigit(Int_t trnumber, Int_t det, Int_t smnumber,
49 Int_t cellnumber, Float_t adc);
50 void AddDigit(Int_t trnumber, Int_t det, Int_t smnumber,
51 Int_t cellnumber, Float_t adc);
52 void SetZPosition(Float_t zpos);
b2b13ee2 53 Float_t GetZPosition() const;
54 void ResetCell();
55 void ResetSDigit();
56 void ResetDigit();
57 void ResetCellADC();
58 void UnLoad(Option_t * /* option */);
59
36031625 60 protected:
61 AliRunLoader *fRunLoader; // Pointer to Run Loader
36031625 62 AliPMDhit *fPMDHit; // Pointer to specific detector hits
63 AliDetector *fPMD; // Get pointers to Alice detectors
64 // and Hits containers
65 AliLoader *fPMDLoader; // Pointer to specific detector loader
66
67 TClonesArray *fHits; // Pointer to hits array
68 TObjArray *fPArray; // Pointer to particle array
69 TParticle *fParticle; // Pointer to a given particle
70
71 TTree *fTreeH; // Hits tree
72 TTree *fTreeS; // Summable Digits tree
73 TTree *fTreeD; // Digits tree
74
75 TClonesArray *fSDigits; // List of summable digits
76 TClonesArray *fDigits; // List of digits
77
78 TObjArray *fCell; // List of pmd cells
79 AliPMDcell *fPMDcell; // Pointer to a PMD cell
80
81 Int_t fNsdigit; // Summable digits counter
82 Int_t fNdigit; // Digits counter
83 Int_t fDetNo; // Detector Number (0:PRE, 1:CPV)
84 Float_t fZPos; // z-position of the detector
85
86 static const Int_t fgkTotUM = 24; // Total Unit modules in one detector
87 static const Int_t fgkRow = 48; // Total number of rows in one unitmodule
88 static const Int_t fgkCol = 96; // Total number of cols in one unitmodule
89 Float_t fCPV[fgkTotUM][fgkRow][fgkCol]; // CPV Array containing total edep
90 Float_t fPRE[fgkTotUM][fgkRow][fgkCol]; // PRE Array containing total edep
91 Int_t fPRECounter[fgkTotUM][fgkRow][fgkCol]; // Number of times each cell
92 // is fired in PMD
93 Int_t fPRETrackNo[fgkTotUM][fgkRow][fgkCol]; // PRE Array containing track number
94 Int_t fCPVTrackNo[fgkTotUM][fgkRow][fgkCol]; // CPV Array containing track number
95
96
97 ClassDef(AliPMDDigitizer,2) // To digitize PMD Hits
b2b13ee2 98};
99#endif
100