]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliGRPObject.cxx
GetBeamEnergy function now returning
[u/mrichter/AliRoot.git] / STEER / AliGRPObject.cxx
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;
+}