]>
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 | |
d443e5e9 | 26 | |
d5ebf00e | 27 | AliESDRun(); |
28 | AliESDRun(const AliESDRun& esd); | |
29 | AliESDRun& operator=(const AliESDRun& esd); | |
732a24fe | 30 | virtual void Copy(TObject &obj) const; // Interface for using TOBject::Copy() |
8d218603 | 31 | virtual ~AliESDRun(); |
d5ebf00e | 32 | |
33fe5eb1 | 33 | Bool_t InitMagneticField() const; |
d5ebf00e | 34 | Int_t GetRunNumber() const {return fRunNumber;} |
35 | void SetRunNumber(Int_t n) {fRunNumber=n;} | |
36 | void SetMagneticField(Float_t mf){fMagneticField = mf;} | |
694aad0c | 37 | Double_t GetMagneticField() const {return fMagneticField;} |
38 | UInt_t GetPeriodNumber() const {return fPeriodNumber;} | |
d5ebf00e | 39 | void SetPeriodNumber(Int_t n) {fPeriodNumber=n;} |
40 | void Reset(); | |
41 | void Print(const Option_t *opt=0) const; | |
33fe5eb1 | 42 | void SetDiamond(const AliESDVertex *vertex); |
f009b5c1 | 43 | void SetTriggerClass(const char*name, Int_t index); |
33fe5eb1 | 44 | void SetCurrentL3(Float_t cur) {fCurrentL3 = cur;} |
45 | void SetCurrentDip(Float_t cur) {fCurrentDip = cur;} | |
46 | void SetBeamEnergy(Float_t be) {fBeamEnergy = be;} | |
47 | void SetBeamType(const char* bt) {fBeamType = bt;} | |
5cf76849 | 48 | void SetBeamEnergyIsSqrtSHalfGeV(Bool_t v=kTRUE) {SetBit(kConvSqrtSHalfGeV,v);} |
7b649c02 | 49 | void SetDetectorsInDAQ(UInt_t detmask) { fDetInDAQ = detmask; } |
50 | void SetDetectorsInReco(UInt_t detmask) { fDetInReco = detmask; } | |
5cf76849 | 51 | |
52 | Bool_t IsBeamEnergyIsSqrtSHalfGeV() const {return TestBit(kConvSqrtSHalfGeV);} | |
694aad0c | 53 | Double_t GetDiamondX() const {return fDiamondXY[0];} |
54 | Double_t GetDiamondY() const {return fDiamondXY[1];} | |
1c7554f9 | 55 | Double_t GetDiamondZ() const {return fDiamondZ;} |
694aad0c | 56 | Double_t GetSigma2DiamondX() const {return fDiamondCovXY[0];} |
57 | Double_t GetSigma2DiamondY() const {return fDiamondCovXY[2];} | |
1c7554f9 | 58 | Double_t GetSigma2DiamondZ() const {return fDiamondSig2Z;} |
d5ebf00e | 59 | void GetDiamondCovXY(Float_t cov[3]) const { |
60 | for(Int_t i=0;i<3;i++) cov[i]=fDiamondCovXY[i]; return; | |
61 | } | |
f009b5c1 | 62 | const char* GetTriggerClass(Int_t index) const; |
63 | TString GetActiveTriggerClasses() const; | |
64 | TString GetFiredTriggerClasses(ULong64_t mask) const; | |
6848e3be | 65 | TString GetFiredTriggerClasses(ULong64_t mask,ULong64_t mask2) const; |
f009b5c1 | 66 | Bool_t IsTriggerClassFired(ULong64_t mask, const char *name) const; |
6848e3be | 67 | Bool_t IsTriggerClassFired(ULong64_t mask, ULong64_t mask2,const char *name) const; |
33fe5eb1 | 68 | Float_t GetCurrentL3() const {return fCurrentL3;} |
69 | Float_t GetCurrentDip() const {return fCurrentDip;} | |
5cf76849 | 70 | Float_t GetBeamEnergy() const {return IsBeamEnergyIsSqrtSHalfGeV() ? fBeamEnergy : fBeamEnergy/2;} |
91460b26 | 71 | const char* GetBeamType() const {return (fBeamType=="Pb-Pb") ? "A-A":fBeamType.Data();} |
72 | void SetBeamParticle(Int_t az, Int_t ibeam) {fBeamParticle[ibeam] = az;} | |
73 | Int_t GetBeamParticle(Int_t ibeam) const {return fBeamParticle[ibeam];} | |
74 | Int_t GetBeamParticleA(Int_t ibeam) const {return fBeamParticle[ibeam]/1000;} | |
75 | Int_t GetBeamParticleZ(Int_t ibeam) const {return fBeamParticle[ibeam]%1000;} | |
76 | ||
7b649c02 | 77 | UInt_t GetDetectorsInDAQ() const {return fDetInDAQ; } |
78 | UInt_t GetDetectorsInReco() const {return fDetInReco; } | |
79 | ||
8d218603 | 80 | void SetPHOSMatrix(TGeoHMatrix*matrix, Int_t i) { |
81 | if ((i >= 0) && (i < kNPHOSMatrix)) fPHOSMatrix[i] = matrix; | |
82 | } | |
83 | const TGeoHMatrix* GetPHOSMatrix(Int_t i) const { | |
84 | return ((i >= 0) && (i < kNPHOSMatrix)) ? fPHOSMatrix[i] : NULL; | |
85 | } | |
428557af | 86 | |
87 | void SetEMCALMatrix(TGeoHMatrix*matrix, Int_t i) { | |
88 | if ((i >= 0) && (i < kNEMCALMatrix)) fEMCALMatrix[i] = matrix; | |
89 | } | |
90 | const TGeoHMatrix* GetEMCALMatrix(Int_t i) const { | |
91 | return ((i >= 0) && (i < kNEMCALMatrix)) ? fEMCALMatrix[i] : NULL; | |
92 | } | |
93 | ||
6848e3be | 94 | enum {kNTriggerClasses = 100}; |
8d218603 | 95 | enum {kNPHOSMatrix = 5}; |
8cc543cb | 96 | enum {kNEMCALMatrix = 22}; |
d443e5e9 | 97 | enum {kT0spreadSize = 4}; |
b671618d | 98 | // |
99 | Double_t GetMeanIntensity(int beam,int btp) const | |
100 | { return (beam>=0&&beam<2&&btp>=0&&btp<2) ? fMeanBeamInt[beam][btp]:0;} | |
101 | void SetMeanIntensity(int beam,int btp, double v=-1) | |
102 | { if (beam>=0&&beam<2&&btp>=0&&btp<2) fMeanBeamInt[beam][btp]=v;} | |
103 | Double_t GetMeanIntensityIntecting(int beam) const {return GetMeanIntensity(beam,0);} | |
104 | Double_t GetMeanIntensityNonIntecting(int beam) const {return GetMeanIntensity(beam,1);} | |
d443e5e9 | 105 | // |
106 | Float_t GetT0spread(Int_t i) const { | |
107 | return ((i >= 0) && (i<kT0spreadSize)) ? fT0spread[i] : 0;} | |
108 | void SetT0spread(Int_t i, Float_t t); | |
109 | void SetT0spread(Float_t *t); | |
da6062af | 110 | |
63c22917 | 111 | void SetCaloTriggerType(const Int_t* in) {for (int i = 0; i < 15; i++) fCaloTriggerType[i] = in[i];} |
da6062af | 112 | Int_t* GetCaloTriggerType() {return fCaloTriggerType;} |
d443e5e9 | 113 | |
1dc767cf | 114 | void SetVZEROEqFactors(Float_t factors[64]) {for (Int_t i = 0; i < 64; ++i) fVZEROEqFactors[i] = factors[i];} |
115 | const Float_t* GetVZEROEqFactors() const {return fVZEROEqFactors;} | |
116 | Float_t GetVZEROEqFactors(Int_t i) const {return fVZEROEqFactors[i];} | |
117 | ||
d443e5e9 | 118 | private: |
33fe5eb1 | 119 | Float_t fCurrentL3; // signed current in the L3 (LHC convention: +current -> +Bz) |
120 | Float_t fCurrentDip; // signed current in the Dipole (LHC convention: +current -> -Bx) | |
121 | Float_t fBeamEnergy; // beamEnergy entry from GRP | |
694aad0c | 122 | Double32_t fMagneticField; // Solenoid Magnetic Field in kG : for compatibility with AliMagF |
b671618d | 123 | Double32_t fMeanBeamInt[2][2]; // mean intensity of interacting and non-intercting bunches per beam |
694aad0c | 124 | Double32_t fDiamondXY[2]; // Interaction diamond (x,y) in RUN |
125 | Double32_t fDiamondCovXY[3]; // Interaction diamond covariance (x,y) in RUN | |
1c7554f9 | 126 | Double32_t fDiamondZ; // Interaction diamond (z) in RUN |
127 | Double32_t fDiamondSig2Z; // Interaction diamond sigma^2 (z) in RUN | |
694aad0c | 128 | UInt_t fPeriodNumber; // PeriodNumber |
129 | Int_t fRunNumber; // Run Number | |
33fe5eb1 | 130 | Int_t fRecoVersion; // Version of reconstruction |
91460b26 | 131 | Int_t fBeamParticle[2]; // A*1000+Z for each beam particle |
33fe5eb1 | 132 | TString fBeamType; // beam type from GRP |
f009b5c1 | 133 | TObjArray fTriggerClasses; // array of TNamed containing the names of the active trigger classes |
7b649c02 | 134 | UInt_t fDetInDAQ; // Detector mask for detectors in datataking |
135 | UInt_t fDetInReco; // Detector mask for detectors in reconstruction | |
8d218603 | 136 | TGeoHMatrix* fPHOSMatrix[kNPHOSMatrix]; //PHOS module position and orientation matrices |
428557af | 137 | TGeoHMatrix* fEMCALMatrix[kNEMCALMatrix]; //EMCAL supermodule position and orientation matrices |
d443e5e9 | 138 | Float_t fT0spread[kT0spreadSize]; // spread of time distributions on T0A, T0C, (T0A+T0C)/2, (T0A-T0C)/2 |
63c22917 | 139 | Int_t fCaloTriggerType[15]; // Calorimeter trigger type |
1dc767cf | 140 | Float_t fVZEROEqFactors[64]; // V0 channel equalization factors for event-plane reconstruction |
da6062af | 141 | |
ca1f6b80 | 142 | ClassDef(AliESDRun,15) |
d5ebf00e | 143 | }; |
144 | ||
145 | #endif |