Corrected calculation of the beam energy. RunInfo available to Init in the reconstructors
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Sep 2009 13:06:45 +0000 (13:06 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Sep 2009 13:06:45 +0000 (13:06 +0000)
STEER/AliGRPManager.cxx
STEER/AliReconstruction.cxx
STEER/AliSimulation.cxx

index 5a2affd..91557e4 100644 (file)
@@ -151,7 +151,8 @@ Bool_t AliGRPManager::SetMagField()
       beamEnergy = 0;
       ok = kFALSE;
     }
-    beamEnergy /= 120E3;       // energy is provided in MeV*120
+    // LHC: "multiply by 120 to get the energy in MeV"
+    beamEnergy *= 0.120;
 
     // read special bits for the polarity convention and map type
     Int_t  polConvention = fGRPData->IsPolarityConventionLHC() ? AliMagF::kConvLHC : AliMagF::kConvDCS2008;
index 19ddd85..b52ee33 100644 (file)
@@ -1039,8 +1039,8 @@ Bool_t AliReconstruction::InitGRP() {
     AliError("GRP/GRP/Data entry:  missing value for the beam energy ! Using 0");
     beamEnergy = 0;
   }
-  // energy is provided in MeV*120
-  beamEnergy /= 120E3;
+  // LHC: "multiply by 120 to get the energy in MeV"
+  beamEnergy *= 0.120;
 
   TString runType = fGRPData->GetRunType();
   if (runType==AliGRPObject::GetInvalidString()) {
@@ -2763,6 +2763,7 @@ AliReconstructor* AliReconstruction::GetReconstructor(Int_t iDet)
   if (reconstructor) {
     TObject* obj = fOptions.FindObject(detName.Data());
     if (obj) reconstructor->SetOption(obj->GetTitle());
+    reconstructor->SetRunInfo(fRunInfo);
     reconstructor->Init();
     fReconstructor[iDet] = reconstructor;
   }
index d017b44..b6fff7b 100644 (file)
@@ -2208,7 +2208,7 @@ void AliSimulation::WriteGRPEntry()
 
   const AliGenerator *gen = gAlice->GetMCApp()->Generator();
   if (gen) {
-    grpObj->SetBeamEnergy(gen->GetEnergyCMS());
+    grpObj->SetBeamEnergy(gen->GetEnergyCMS()/0.120);
     TString projectile;
     Int_t a,z;
     gen->GetProjectile(projectile,a,z);