Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8201

Three::Draw integral depends on number bins and weights

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Medium
    • Resolution: Clarified
    • 6.04/14
    • None
    • None
    • None
    • Working on lxplus
      Environment setup:
      setupATLAS
      lsetup "lcgenv -p LCG_79 x86_64-slc6-gcc49-opt pyanalysis"
      lsetup "root" --quiet

    Description

      Hello,

      I am using TTree::Draw to make histograms and I found that the integral of the histogram that is produced changes depending on the number of bins in the histogram. Here is an example of what I see:

      root [38] nominal->Draw("mtw>>hist1(1,0,200e3)","3.21e3*weight_btag_77*weight_pileup*weight_mc*weight_lept_eff/AMI")
      (Long64_t) 3698629
      root [39] nominal->Draw("mtw>>hist10(10,0,200e3)","3.21e3*weight_btag_77*weight_pileup*weight_mc*weight_lept_eff/AMI")
      (Long64_t) 3698629
      root [40] nominal->Draw("mtw>>hist100(100,0,200e3)","3.21e3*weight_btag_77*weight_pileup*weight_mc*weight_lept_eff/AMI")
      (Long64_t) 3698629
      root [41] cout<<hist1->Integral()<<endl;
      588.132
      root [42] cout<<hist10->Integral()<<endl;
      589.498
      root [43] cout<<hist100->Integral()<<endl;
      589.464

      What is even stranger is that the relative behavior changes if I change the weights. Here I include the additional weights XSection*FilterEff*KFactor, all of which are the same value for all events:

      root [44] nominal->Draw("mtw>>hb1(1,0,200e3)","3.21e3*weight_btag_77*weight_pileup*weight_mc*weight_lept_eff*XSection*FilterEff*KFactor/AMI")
      (Long64_t) 3698629
      root [45] nominal->Draw("mtw>>hb10(10,0,200e3)","3.21e3*weight_btag_77*weight_pileup*weight_mc*weight_lept_eff*XSection*FilterEff*KFactor/AMI")
      (Long64_t) 3698629
      root [46] nominal->Draw("mtw>>hb100(100,0,200e3)","3.21e3*weight_btag_77*weight_pileup*weight_mc*weight_lept_eff*XSection*FilterEff*KFactor/AMI")
      (Long64_t) 3698629
      root [47] cout<<hb1->Integral()<<endl;
      266867
      root [48] cout<<hb10->Integral()<<endl;
      266213
      root [49] cout<<hb100->Integral()<<endl;
      266240

      Any idea what is happening and how I can fix it so that I get the correct normalization for every case?

      Thanks.
      ~Joe

      Attachments

        Activity

          People

            moneta Lorenzo Moneta
            jhaley Joseph Haley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: