1 #ifndef AliTRDCOMMONPARAM_H
2 #define AliTRDCOMMONPARAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 ///////////////////////////////////////////////////////////////////////////////
8 // Class containing constant common parameters //
10 ///////////////////////////////////////////////////////////////////////////////
18 class AliTRDCommonParam : public TObject
21 static AliTRDCommonParam* Instance();
22 static void Terminate();
24 enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
26 AliTRDCommonParam(const AliTRDCommonParam &p);
27 AliTRDCommonParam &operator=(const AliTRDCommonParam &p);
28 virtual void Copy(TObject &p) const;
30 void SetField(Float_t field) { fField = field; };
32 void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; };
34 Float_t GetField() const { return fField; };
36 Bool_t ExBOn() const { return fExBOn; };
38 AliTRDpadPlane *GetPadPlane(Int_t p, Int_t c) const;
39 Int_t GetRowMax(Int_t p, Int_t c, Int_t /*s*/) const;
40 Int_t GetColMax(Int_t p) const;
41 Double_t GetRow0(Int_t p, Int_t c, Int_t /*s*/) const;
42 Double_t GetCol0(Int_t p) const;
45 static AliTRDCommonParam* fgInstance; // Instance of this class (singleton implementation)
46 static Bool_t fgTerminated; // Defines if this class has already been terminated and therefore does not return instances in GetInstance anymore
50 Float_t fField; // Magnetic field
52 Int_t fExBOn; // Switch for the ExB effects
54 TObjArray *fPadPlaneArray; //! Array of pad plane objects
57 // this is a singleton, constructor is private!
59 virtual ~AliTRDCommonParam();
61 ClassDef(AliTRDCommonParam, 1)