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