]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
GetBeamEnergy function now returning
authorzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Nov 2010 11:53:47 +0000 (11:53 +0000)
committerzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Nov 2010 11:53:47 +0000 (11:53 +0000)
fBeamEnergy * 82./208

in case beamType is "A-A".

STEER/AliGRPObject.cxx
STEER/AliGRPObject.h

index 51eba3e506b05f45d0b983c8573bf566678d2cd7..218a8cae6f0041a1189b592f07cb9ccbe4ebaf60 100644 (file)
@@ -441,3 +441,18 @@ void AliGRPObject::ReadValuesFromMap(const TMap* mapGRP){
        return;
 
 }
+//-------------------------------------------------------------------------------
+
+Float_t AliGRPObject::GetBeamEnergy() const {
+
+       //
+       // Getting the energy
+       // in case of BeamType = A-A, multiplying by 82/208 (for PbPb)
+       //
+
+       Float_t energy = fBeamEnergy;
+       if (fBeamType=="A-A"){
+               energy = energy*82./208;
+       }
+       return IsBeamEnergyIsSqrtSHalfGeV() ? energy : energy/2;
+}
index e2f7e18f8a56064687048e9a91da795e4144a923..df3d445c0b10e3be4061ff3a8ebf79302c8dadb1 100644 (file)
@@ -52,7 +52,7 @@ class AliGRPObject : public TObject {
        Bool_t    IsUniformBMap() const {return TestBit(kUniformBMap);}\r
        time_t    GetTimeStart() const {return fTimeStart;}\r
        time_t    GetTimeEnd() const {return fTimeEnd;}\r
-       Float_t   GetBeamEnergy() const {return IsBeamEnergyIsSqrtSHalfGeV() ? fBeamEnergy : fBeamEnergy/2;}\r
+       Float_t   GetBeamEnergy() const;\r
        TString   GetBeamType() const {return fBeamType;}\r
        Char_t    GetNumberOfDetectors() const {return fNumberOfDetectors;}\r
        UInt_t    GetDetectorMask() const {return fDetectorMask;}\r