]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDRun.h
Cosmetics
[u/mrichter/AliRoot.git] / STEER / AliESDRun.h
1 // -*- mode: C++ -*- 
2 #ifndef ALIESDRUN_H
3 #define ALIESDRUN_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //-------------------------------------------------------------------------
8 //                     Implementation Class AliESDRun
9 //   Run by run data
10 //   for the ESD   
11 //   Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch 
12 //-------------------------------------------------------------------------
13
14 #include <TObject.h>
15 #include <TObjArray.h>
16 #include <TString.h>
17
18 class TGeoHMatrix;
19 class AliESDVertex;
20
21 class AliESDRun: public TObject {
22 public:
23
24   enum StatusBits {kBInfoStored = BIT(14), kUniformBMap = BIT(15), kConvSqrtSHalfGeV = BIT(16)};
25
26   AliESDRun();
27   AliESDRun(const AliESDRun& esd);
28   AliESDRun& operator=(const AliESDRun& esd);
29   virtual void Copy(TObject &obj) const; // Interface for using TOBject::Copy()
30   virtual ~AliESDRun();
31
32   Bool_t  InitMagneticField() const;
33   Int_t   GetRunNumber() const {return fRunNumber;}
34   void    SetRunNumber(Int_t n) {fRunNumber=n;}
35   void    SetMagneticField(Float_t mf){fMagneticField = mf;}
36   Double_t GetMagneticField() const {return fMagneticField;}
37   UInt_t   GetPeriodNumber() const {return fPeriodNumber;}
38   void    SetPeriodNumber(Int_t n) {fPeriodNumber=n;}
39   void    Reset();
40   void    Print(const Option_t *opt=0) const;
41   void    SetDiamond(const AliESDVertex *vertex);
42   void    SetTriggerClass(const char*name, Int_t index);
43   void    SetCurrentL3(Float_t cur)    {fCurrentL3 = cur;}
44   void    SetCurrentDip(Float_t cur)   {fCurrentDip = cur;}
45   void    SetBeamEnergy(Float_t be)    {fBeamEnergy = be;}
46   void    SetBeamType(const char* bt)  {fBeamType = bt;}
47   void    SetBeamEnergyIsSqrtSHalfGeV(Bool_t v=kTRUE) {SetBit(kConvSqrtSHalfGeV,v);}
48   void    SetDetectorsInDAQ(UInt_t detmask) { fDetInDAQ = detmask; }
49   void    SetDetectorsInReco(UInt_t detmask) { fDetInReco = detmask; }
50
51   Bool_t  IsBeamEnergyIsSqrtSHalfGeV() const {return TestBit(kConvSqrtSHalfGeV);}  
52   Double_t GetDiamondX() const {return fDiamondXY[0];}
53   Double_t GetDiamondY() const {return fDiamondXY[1];}
54   Double_t GetDiamondZ() const {return fDiamondZ;}
55   Double_t GetSigma2DiamondX() const {return fDiamondCovXY[0];}
56   Double_t GetSigma2DiamondY() const {return fDiamondCovXY[2];}
57   Double_t GetSigma2DiamondZ() const {return fDiamondSig2Z;}
58   void GetDiamondCovXY(Float_t cov[3]) const {
59     for(Int_t i=0;i<3;i++) cov[i]=fDiamondCovXY[i]; return;
60   }
61   const char* GetTriggerClass(Int_t index) const;
62   TString     GetActiveTriggerClasses() const;
63   TString     GetFiredTriggerClasses(ULong64_t mask) const;
64   Bool_t      IsTriggerClassFired(ULong64_t mask, const char *name) const;
65   Float_t     GetCurrentL3()               const {return fCurrentL3;}
66   Float_t     GetCurrentDip()              const {return fCurrentDip;}
67   Float_t     GetBeamEnergy()              const {return IsBeamEnergyIsSqrtSHalfGeV() ? fBeamEnergy : fBeamEnergy/2;}
68   const char* GetBeamType()                const {return fBeamType.Data();}
69   UInt_t      GetDetectorsInDAQ()         const {return fDetInDAQ; }
70   UInt_t      GetDetectorsInReco()         const {return fDetInReco; }
71  
72   void    SetPHOSMatrix(TGeoHMatrix*matrix, Int_t i) {
73     if ((i >= 0) && (i < kNPHOSMatrix)) fPHOSMatrix[i] = matrix;
74   }
75   const TGeoHMatrix* GetPHOSMatrix(Int_t i) const {
76     return ((i >= 0) && (i < kNPHOSMatrix)) ? fPHOSMatrix[i] : NULL;
77   }
78         
79   void    SetEMCALMatrix(TGeoHMatrix*matrix, Int_t i) {
80         if ((i >= 0) && (i < kNEMCALMatrix)) fEMCALMatrix[i] = matrix;
81   }
82   const TGeoHMatrix* GetEMCALMatrix(Int_t i) const {
83         return ((i >= 0) && (i < kNEMCALMatrix)) ? fEMCALMatrix[i] : NULL;
84   }
85         
86   enum {kNTriggerClasses = 50};
87   enum {kNPHOSMatrix = 5};
88   enum {kNEMCALMatrix = 12};
89
90 private:
91   Float_t         fCurrentL3;       // signed current in the L3     (LHC convention: +current -> +Bz)
92   Float_t         fCurrentDip;      // signed current in the Dipole (LHC convention: +current -> -Bx)
93   Float_t         fBeamEnergy;      // beamEnergy entry from GRP
94   Double32_t      fMagneticField;   // Solenoid Magnetic Field in kG : for compatibility with AliMagF
95   Double32_t      fDiamondXY[2];    // Interaction diamond (x,y) in RUN
96   Double32_t      fDiamondCovXY[3]; // Interaction diamond covariance (x,y) in RUN
97   Double32_t      fDiamondZ;        // Interaction diamond (z) in RUN
98   Double32_t      fDiamondSig2Z;    // Interaction diamond sigma^2 (z) in RUN
99   UInt_t          fPeriodNumber;    // PeriodNumber
100   Int_t           fRunNumber;       // Run Number
101   Int_t           fRecoVersion;     // Version of reconstruction
102   TString         fBeamType;        // beam type from GRP
103   TObjArray       fTriggerClasses;  // array of TNamed containing the names of the active trigger classes
104   UInt_t          fDetInDAQ;        // Detector mask for detectors in datataking
105   UInt_t          fDetInReco;       // Detector mask for detectors in reconstruction
106   TGeoHMatrix*    fPHOSMatrix[kNPHOSMatrix]; //PHOS module position and orientation matrices
107   TGeoHMatrix*    fEMCALMatrix[kNEMCALMatrix]; //EMCAL supermodule position and orientation matrices
108
109   ClassDef(AliESDRun,8)
110 };
111
112 #endif