message: PWGJE/EMCALJetTasks/Tracks Adding protection from zero division
diff: @@ -458,18 +458,18 @@ Bool_t AliAnalysisTaskEmcalJetEnergyScale::Run(){
  double detptcharged = detjetpt * (1 - detjet->NEF()), detptneutral = detjetpt * detjet->NEF(),
  partptcharged = partjetpt * (1 - partjet->NEF()), partptneutral = partjetpt * partjet->NEF();
  fHistos->FillTH2("hJetResponseFine", detjetpt, partjetpt);
  - fHistos->FillTH1("hJetResponseFineCharged", detptcharged, partptcharged);
  - fHistos->FillTH1("hJetResponseFineNeutral", detptneutral, partptneutral);
  + if(partptcharged) fHistos->FillTH1("hJetResponseFineCharged", detptcharged, partptcharged);
  + if(partptneutral) fHistos->FillTH1("hJetResponseFineNeutral", detptneutral, partptneutral);
  fHistos->FillTH1("hJetEnergyScale", partjetpt, (detjetpt - partjetpt)/partjetpt);
  - fHistos->FillTH1("hJetEnergyScaleCharged", partptcharged, (detptcharged - partptcharged)/partptcharged);
  - fHistos->FillTH1("hJetEnergyScaleNeutral", partptneutral, (detptneutral - partptneutral)/partptneutral);
  - fHistos->FillTH1("hJetEnergyScaleChargedVsFull", partjetpt, (detptcharged - partptcharged)/partptcharged);
  - fHistos->FillTH1("hJetEnergyScaleNeutralVsFull", partjetpt, (detptneutral - partptneutral)/partptneutral);
  + if(partptcharged) fHistos->FillTH1("hJetEnergyScaleCharged", partptcharged, (detptcharged - partptcharged)/partptcharged);
  + if(partptneutral) fHistos->FillTH1("hJetEnergyScaleNeutral", partptneutral, (detptneutral - partptneutral)/partptneutral);
  + if(partptcharged) fHistos->FillTH1("hJetEnergyScaleChargedVsFull", partjetpt, (detptcharged - partptcharged)/partptcharged);
  + if(partptneutral) fHistos->FillTH1("hJetEnergyScaleNeutralVsFull", partjetpt, (detptneutral - partptneutral)/partptneutral);
  fHistos->FillTH1("hJetEnergyScaleDet", detjetpt, (detjetpt - partjetpt)/partjetpt);
  - fHistos->FillTH1("hJetEnergyScaleDetCharged", detptcharged, (detptcharged - partptcharged)/partptcharged);
  - fHistos->FillTH1("hJetEnergyScaleDetNeutral", detptneutral, (detptneutral - partptneutral)/partptneutral);
  - fHistos->FillTH1("hJetEnergyScaleDetChargedVsFull", detjetpt, (detptcharged - partptcharged)/partptcharged);
  - fHistos->FillTH1("hJetEnergyScaleDetNeutralVsFull", detjetpt, (detptneutral - partptneutral)/partptneutral);
  + if(partptcharged) fHistos->FillTH1("hJetEnergyScaleDetCharged", detptcharged, (detptcharged - partptcharged)/partptcharged);
  + if(partptneutral) fHistos->FillTH1("hJetEnergyScaleDetNeutral", detptneutral, (detptneutral - partptneutral)/partptneutral);
  + if(partptcharged) fHistos->FillTH1("hJetEnergyScaleDetChargedVsFull", detjetpt, (detptcharged - partptcharged)/partptcharged);
  + if(partptneutral) fHistos->FillTH1("hJetEnergyScaleDetNeutralVsFull", detjetpt, (detptneutral - partptneutral)/partptneutral);
  // splitting for closure test
  if(isClosure) {
  fHistos->FillTH2("hJetResponseFineClosure", detjetpt, partjetpt);
  