]>
Commit | Line | Data |
---|---|---|
d5ebf00e | 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> | |
f009b5c1 | 15 | #include <TObjArray.h> |
16 | #include <TString.h> | |
d5ebf00e | 17 | |
8d218603 | 18 | class TGeoHMatrix; |
d5ebf00e | 19 | class AliESDVertex; |
20 | ||
21 | class AliESDRun: public TObject { | |
22 | public: | |
23 | ||
5cf76849 | 24 | enum StatusBits {kBInfoStored = BIT(14), kUniformBMap = BIT(15), kConvSqrtSHalfGeV = BIT(16)}; |
33fe5eb1 | 25 | |
d5ebf00e | 26 | AliESDRun(); |
27 | AliESDRun(const AliESDRun& esd); | |
28 | AliESDRun& operator=(const AliESDRun& esd); | |
732a24fe | 29 | virtual void Copy(TObject &obj) const; // Interface for using TOBject::Copy() |
8d218603 | 30 | virtual ~AliESDRun(); |
d5ebf00e | 31 | |
33fe5eb1 | 32 | Bool_t InitMagneticField() const; |
d5ebf00e | 33 | Int_t GetRunNumber() const {return fRunNumber;} |
34 | void SetRunNumber(Int_t n) {fRunNumber=n;} | |
35 | void SetMagneticField(Float_t mf){fMagneticField = mf;} | |
694aad0c | 36 | Double_t GetMagneticField() const {return fMagneticField;} |
37 | UInt_t GetPeriodNumber() const {return fPeriodNumber;} | |
d5ebf00e | 38 | void SetPeriodNumber(Int_t n) {fPeriodNumber=n;} |
39 | void Reset(); | |
40 | void Print(const Option_t *opt=0) const; | |
33fe5eb1 | 41 | void SetDiamond(const AliESDVertex *vertex); |
f009b5c1 | 42 | void SetTriggerClass(const char*name, Int_t index); |
33fe5eb1 | 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;} | |
5cf76849 | 47 | void SetBeamEnergyIsSqrtSHalfGeV(Bool_t v=kTRUE) {SetBit(kConvSqrtSHalfGeV,v);} |
48 | ||
49 | Bool_t IsBeamEnergyIsSqrtSHalfGeV() const {return TestBit(kConvSqrtSHalfGeV);} | |
694aad0c | 50 | Double_t GetDiamondX() const {return fDiamondXY[0];} |
51 | Double_t GetDiamondY() const {return fDiamondXY[1];} | |
52 | Double_t GetSigma2DiamondX() const {return fDiamondCovXY[0];} | |
53 | Double_t GetSigma2DiamondY() const {return fDiamondCovXY[2];} | |
d5ebf00e | 54 | void GetDiamondCovXY(Float_t cov[3]) const { |
55 | for(Int_t i=0;i<3;i++) cov[i]=fDiamondCovXY[i]; return; | |
56 | } | |
f009b5c1 | 57 | const char* GetTriggerClass(Int_t index) const; |
58 | TString GetActiveTriggerClasses() const; | |
59 | TString GetFiredTriggerClasses(ULong64_t mask) const; | |
60 | Bool_t IsTriggerClassFired(ULong64_t mask, const char *name) const; | |
33fe5eb1 | 61 | Float_t GetCurrentL3() const {return fCurrentL3;} |
62 | Float_t GetCurrentDip() const {return fCurrentDip;} | |
5cf76849 | 63 | Float_t GetBeamEnergy() const {return IsBeamEnergyIsSqrtSHalfGeV() ? fBeamEnergy : fBeamEnergy/2;} |
33fe5eb1 | 64 | const char* GetBeamType() const {return fBeamType.Data();} |
f009b5c1 | 65 | |
8d218603 | 66 | void SetPHOSMatrix(TGeoHMatrix*matrix, Int_t i) { |
67 | if ((i >= 0) && (i < kNPHOSMatrix)) fPHOSMatrix[i] = matrix; | |
68 | } | |
69 | const TGeoHMatrix* GetPHOSMatrix(Int_t i) const { | |
70 | return ((i >= 0) && (i < kNPHOSMatrix)) ? fPHOSMatrix[i] : NULL; | |
71 | } | |
428557af | 72 | |
73 | void SetEMCALMatrix(TGeoHMatrix*matrix, Int_t i) { | |
74 | if ((i >= 0) && (i < kNEMCALMatrix)) fEMCALMatrix[i] = matrix; | |
75 | } | |
76 | const TGeoHMatrix* GetEMCALMatrix(Int_t i) const { | |
77 | return ((i >= 0) && (i < kNEMCALMatrix)) ? fEMCALMatrix[i] : NULL; | |
78 | } | |
79 | ||
f009b5c1 | 80 | enum {kNTriggerClasses = 50}; |
8d218603 | 81 | enum {kNPHOSMatrix = 5}; |
428557af | 82 | enum {kNEMCALMatrix = 12}; |
f009b5c1 | 83 | |
d5ebf00e | 84 | private: |
33fe5eb1 | 85 | Float_t fCurrentL3; // signed current in the L3 (LHC convention: +current -> +Bz) |
86 | Float_t fCurrentDip; // signed current in the Dipole (LHC convention: +current -> -Bx) | |
87 | Float_t fBeamEnergy; // beamEnergy entry from GRP | |
694aad0c | 88 | Double32_t fMagneticField; // Solenoid Magnetic Field in kG : for compatibility with AliMagF |
89 | Double32_t fDiamondXY[2]; // Interaction diamond (x,y) in RUN | |
90 | Double32_t fDiamondCovXY[3]; // Interaction diamond covariance (x,y) in RUN | |
91 | UInt_t fPeriodNumber; // PeriodNumber | |
92 | Int_t fRunNumber; // Run Number | |
33fe5eb1 | 93 | Int_t fRecoVersion; // Version of reconstruction |
94 | TString fBeamType; // beam type from GRP | |
f009b5c1 | 95 | TObjArray fTriggerClasses; // array of TNamed containing the names of the active trigger classes |
8d218603 | 96 | TGeoHMatrix* fPHOSMatrix[kNPHOSMatrix]; //PHOS module position and orientation matrices |
428557af | 97 | TGeoHMatrix* fEMCALMatrix[kNEMCALMatrix]; //EMCAL supermodule position and orientation matrices |
694aad0c | 98 | |
33fe5eb1 | 99 | ClassDef(AliESDRun,6) |
d5ebf00e | 100 | }; |
101 | ||
102 | #endif |