]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliZDC.h
Updated reco alghorithm, changes in OCDB object and in RecoParam objects, new classes...
[u/mrichter/AliRoot.git] / ZDC / AliZDC.h
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
17 class AliZDCPedestals;
18 class AliZDCEnCalib;
19 class AliZDCTowCalib;
20  
21 class AliZDC : public AliDetector {
22
23 public:
24   AliZDC();
25   AliZDC(const char *name, const char *title);
26   virtual       ~AliZDC();
27   AliZDC(const AliZDC&);
28   //
29   virtual void  AddHit(Int_t track, Int_t *vol, Float_t *hits);
30   virtual void  CreateGeometry() {}
31   virtual void  CreateMaterials() {}
32   virtual Int_t IsVersion() const =0;
33   virtual Float_t ZMin() const; // Minimum overall dimension of the ZDC
34   virtual Float_t ZMax() const; // Maximum overall dimension of the ZDC
35   virtual void  SetTreeAddress();
36   virtual void  MakeBranch(Option_t* opt);
37   virtual void  Hits2SDigits();
38   virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
39   virtual void  Digits2Raw();
40   virtual Bool_t Raw2SDigits(AliRawReader* rawReader);
41   Int_t   Pedestal(Int_t Detector, Int_t Quadrant, Int_t Res) const;
42   Int_t   ADCch2Phe(Int_t Detector, Int_t Quadrant, Int_t ADCVal, Int_t Res) const;
43   virtual void  StepManager() {}
44     
45   // Switching off the shower development in ZDCs
46   void  NoShower(){fNoShower=1;}
47   void  Shower()  {fNoShower=0;}
48
49
50   //Calibration methods 
51   void    SetZDCCalibFName(const char *name);
52   char*   GetZDCCalibFName() const {return (char*)fZDCCalibFName.Data();}
53   AliZDCPedestals* GetPedCalib()   const  {return fPedCalib;}
54   AliZDCEnCalib*   GetECalibData() const  {return fEnCalibData;}
55
56   // Trigger
57   virtual AliTriggerDetector* CreateTriggerDetector() const
58         {return new AliZDCTrigger();}
59
60   
61   void  SetSpectatorsTrack() {fSpectatorTracked=0;}
62   Int_t SpectatorsTracked() const {return fSpectatorTracked;}
63
64 private:
65
66   AliZDC& operator = (const AliZDC&);
67
68 protected:
69
70   Int_t        fNoShower;               // Flag to switch off the shower        
71
72   //Calibration data member 
73   AliZDCPedestals* fPedCalib;           //! Pedestal data for ZDC
74   AliZDCEnCalib*   fEnCalibData;        //! Energy data for ZDC
75   AliZDCTowCalib*  fTowCalibData;       //! Equalization data for ZDC
76
77   TString          fZDCCalibFName;      // Name of the ZDC calibration data
78  
79   Int_t fSpectatorTracked; // Are spectator tracked by generator?
80   
81   ClassDef(AliZDC,9)    // Zero Degree Calorimeter base class
82 };
83  
84 // Calibration
85 //_____________________________________________________________________________
86 inline void AliZDC::SetZDCCalibFName(const char *name)  
87
88   fZDCCalibFName = name;        
89   gSystem->ExpandPathName(fZDCCalibFName);
90 }
91
92
93 #endif