heather's optimisations
[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
7088dbe9 13#include "AliDigitizer.h"
14
b2b13ee2 15class TClonesArray;
16class TFile;
36031625 17class TMath;
b2b13ee2 18class TObjArray;
19class TParticle;
20class TTree;
21class TNtuple;
22
23class AliLoader;
24class AliRunLoader;
25class AliRun;
26class AliDetector;
27class AliPMDhit;
28class AliHit;
29class AliHeader;
7088dbe9 30class AliRunDigitizer;
b2b13ee2 31
32class AliPMDcell;
33class AliPMDsdigit;
34class AliPMDdigit;
b2b13ee2 35
7088dbe9 36class AliPMDDigitizer:public AliDigitizer
b2b13ee2 37{
b2b13ee2 38 public:
39
40 AliPMDDigitizer();
7088dbe9 41 AliPMDDigitizer(AliRunDigitizer *manager);
b2b13ee2 42 virtual ~AliPMDDigitizer();
43
85a5290f 44 void OpengAliceFile(const char *file, Option_t *option);
b2b13ee2 45
36031625 46 void Hits2SDigits(Int_t ievt);
47 void Hits2Digits(Int_t ievt);
48 void SDigits2Digits(Int_t ievt);
7088dbe9 49 void Exec(Option_t *option);
50 void MergeSDigits(Int_t filenumber, Int_t troffset);
b2b13ee2 51 void TrackAssignment2Cell();
a7d110b8 52 void MeV2ADC(Float_t mev, Float_t & adc) const;
36031625 53 void AddSDigit(Int_t trnumber, Int_t det, Int_t smnumber,
7088dbe9 54 Int_t irow, Int_t icol, Float_t adc);
36031625 55 void AddDigit(Int_t trnumber, Int_t det, Int_t smnumber,
7088dbe9 56 Int_t irow, Int_t icol, Float_t adc);
36031625 57 void SetZPosition(Float_t zpos);
b2b13ee2 58 Float_t GetZPosition() const;
59 void ResetCell();
60 void ResetSDigit();
61 void ResetDigit();
62 void ResetCellADC();
7088dbe9 63 void UnLoad(Option_t * option);
b2b13ee2 64
36031625 65 protected:
66 AliRunLoader *fRunLoader; // Pointer to Run Loader
36031625 67 AliPMDhit *fPMDHit; // Pointer to specific detector hits
68 AliDetector *fPMD; // Get pointers to Alice detectors
69 // and Hits containers
70 AliLoader *fPMDLoader; // Pointer to specific detector loader
71
72 TClonesArray *fHits; // Pointer to hits array
73 TObjArray *fPArray; // Pointer to particle array
74 TParticle *fParticle; // Pointer to a given particle
75
76 TTree *fTreeH; // Hits tree
77 TTree *fTreeS; // Summable Digits tree
78 TTree *fTreeD; // Digits tree
79
80 TClonesArray *fSDigits; // List of summable digits
81 TClonesArray *fDigits; // List of digits
82
83 TObjArray *fCell; // List of pmd cells
84 AliPMDcell *fPMDcell; // Pointer to a PMD cell
85
7088dbe9 86 Int_t fDebug; // Debug switch
36031625 87 Int_t fNsdigit; // Summable digits counter
88 Int_t fNdigit; // Digits counter
89 Int_t fDetNo; // Detector Number (0:PRE, 1:CPV)
90 Float_t fZPos; // z-position of the detector
91
92 static const Int_t fgkTotUM = 24; // Total Unit modules in one detector
93 static const Int_t fgkRow = 48; // Total number of rows in one unitmodule
94 static const Int_t fgkCol = 96; // Total number of cols in one unitmodule
95 Float_t fCPV[fgkTotUM][fgkRow][fgkCol]; // CPV Array containing total edep
96 Float_t fPRE[fgkTotUM][fgkRow][fgkCol]; // PRE Array containing total edep
97 Int_t fPRECounter[fgkTotUM][fgkRow][fgkCol]; // Number of times each cell
98 // is fired in PMD
99 Int_t fPRETrackNo[fgkTotUM][fgkRow][fgkCol]; // PRE Array containing track number
100 Int_t fCPVTrackNo[fgkTotUM][fgkRow][fgkCol]; // CPV Array containing track number
101
102
7088dbe9 103 ClassDef(AliPMDDigitizer,3) // To digitize PMD Hits
b2b13ee2 104};
105#endif
106