]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIZDC_H | |
2 | #define ALIZDC_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //////////////////////////////////////////////// | |
9 | // Manager and classes for set ZDC // | |
10 | //////////////////////////////////////////////// | |
11 | ||
12 | #include <TSystem.h> | |
13 | ||
14 | #include "AliDetector.h" | |
15 | #include "AliZDCTrigger.h" | |
16 | #include "AliZDCChMap.h" | |
17 | ||
18 | class AliZDCPedestals; | |
19 | class AliZDCEnCalib; | |
20 | class AliZDCTowCalib; | |
21 | ||
22 | class AliZDC : public AliDetector { | |
23 | ||
24 | public: | |
25 | AliZDC(); | |
26 | AliZDC(const char *name, const char *title); | |
27 | virtual ~AliZDC(); | |
28 | AliZDC(const AliZDC&); | |
29 | // | |
30 | virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits); | |
31 | virtual void CreateGeometry() {} | |
32 | virtual void CreateMaterials() {} | |
33 | virtual Int_t IsVersion() const =0; | |
34 | virtual Float_t ZMin() const; // Minimum overall dimension of the ZDC | |
35 | virtual Float_t ZMax() const; // Maximum overall dimension of the ZDC | |
36 | virtual void SetTreeAddress(); | |
37 | virtual void MakeBranch(Option_t* opt); | |
38 | virtual void Hits2SDigits(); | |
39 | virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const; | |
40 | virtual void Digits2Raw(); | |
41 | virtual Bool_t Raw2SDigits(AliRawReader* rawReader); | |
42 | Int_t Pedestal(Int_t Detector, Int_t Quadrant, Int_t Res) const; | |
43 | Int_t ADCch2Phe(Int_t Detector, Int_t Quadrant, Int_t ADCVal, Int_t Res) const; | |
44 | virtual void StepManager() {} | |
45 | ||
46 | // Switching off the shower development in ZDCs | |
47 | void NoShower(){fNoShower=1;} | |
48 | void Shower() {fNoShower=0;} | |
49 | ||
50 | ||
51 | //Calibration methods | |
52 | void SetZDCCalibFName(const char *name); | |
53 | char* GetZDCCalibFName() const {return (char*)fZDCCalibFName.Data();} | |
54 | AliZDCPedestals* GetPedCalib() const {return fPedCalib;} | |
55 | AliZDCEnCalib* GetECalibData() const {return fEnCalibData;} | |
56 | ||
57 | // Map from OCDB | |
58 | AliZDCChMap* GetChMap() const; | |
59 | ||
60 | // Trigger | |
61 | virtual AliTriggerDetector* CreateTriggerDetector() const | |
62 | {return new AliZDCTrigger();} | |
63 | ||
64 | ||
65 | void SetSpectatorsTrack() {fSpectatorTracked=0;} | |
66 | Int_t SpectatorsTracked() const {return fSpectatorTracked;} | |
67 | ||
68 | private: | |
69 | ||
70 | AliZDC& operator = (const AliZDC&); | |
71 | ||
72 | protected: | |
73 | ||
74 | Int_t fNoShower; // Flag to switch off the shower | |
75 | ||
76 | //Calibration data member | |
77 | AliZDCPedestals* fPedCalib; //! Pedestal data for ZDC | |
78 | AliZDCEnCalib* fEnCalibData; //! Energy data for ZDC | |
79 | AliZDCTowCalib* fTowCalibData; //! Equalization data for ZDC | |
80 | ||
81 | TString fZDCCalibFName; // Name of the ZDC calibration data | |
82 | ||
83 | Int_t fSpectatorTracked; // Are spectator tracked by generator? | |
84 | ||
85 | ClassDef(AliZDC,10) // Zero Degree Calorimeter base class | |
86 | }; | |
87 | ||
88 | // Calibration | |
89 | //_____________________________________________________________________________ | |
90 | inline void AliZDC::SetZDCCalibFName(const char *name) | |
91 | { | |
92 | fZDCCalibFName = name; | |
93 | gSystem->ExpandPathName(fZDCCalibFName); | |
94 | } | |
95 | ||
96 | ||
97 | #endif |