Skip to content

Commit

Permalink
Take MC min/max time-stamps from lumi graph rather than GRP
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed Dec 9, 2016
1 parent 05dabe6 commit 0ef6b93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions STEER/STEER/AliSimulation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,13 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents)
else { // generate according to real lumi
TGraph* lumi = AliLumiTools::GetLumiFromCTP();
if (!lumi) AliFatal("Failed to get lumi graph");
// redefine time stamps according to real luminosity start - end
int nbl = lumi->GetN();
if (nbl) {
fTimeStart = lumi->GetX()[0];
fTimeEnd = lumi->GetX()[nbl-1];
deltaT = fTimeEnd - fTimeStart;
}
int nb = 1+deltaT/60.;
TH1F hlumi("hlumi","",nb,fTimeStart,fTimeEnd);
for (int ib=1;ib<=nb;ib++) hlumi.SetBinContent(ib,TMath::Max(0.,lumi->Eval(hlumi.GetBinCenter(ib))));
Expand Down

0 comments on commit 0ef6b93

Please sign in to comment.