# Setting X range with t-efficienct

**URL:** <https://root-forum.cern.ch/t/setting-x-range-with-t-efficienct/31092>\
**Category:** Newbie\
**Created:** [October 12, 2018, 3:38pm UTC](https://root-forum.cern.ch/t/setting-x-range-with-t-efficienct/31092 "2018-10-12T15:38:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![IP25](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ip25/32/22277_2.png) [@IP25](https://root-forum.cern.ch/u/IP25)\
**Post date:** [October 12, 2018, 3:38pm UTC](https://root-forum.cern.ch/t/setting-x-range-with-t-efficienct/31092/1 "2018-10-12T15:38:38Z")

</div>

currently i have a Tefficiency from (0,8256), but I need to divide in three planes, how can i set my x range?

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [October 15, 2018, 10:05am UTC](https://root-forum.cern.ch/t/setting-x-range-with-t-efficienct/31092/2 "2018-10-15T10:05:39Z")

</div>

Hi,

In order to better understand what you’re trying to achieve, can you give us a small ROOT macro of what you’re doing and the ROOT version you use?

Thanks,  
Jakob

---

<div class="post-metadata">

**Author:** ![IP25](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ip25/32/22277_2.png) [@IP25](https://root-forum.cern.ch/u/IP25)\
**Post date:** [October 16, 2018, 1:49pm UTC](https://root-forum.cern.ch/t/setting-x-range-with-t-efficienct/31092/3 "2018-10-16T13:49:49Z")

</div>

root v6\_14\_02

```auto
    TH1D *totalEvents = new TH1D("h_total","tot", 8256,0,8256);
    TH1D *passEvents = new TH1D("h_pass", "pass", 8256,0,8256);
    TH1D *htotal = new TH1D("samples_total","s_tot",8256,0,8256);
    TH1D *ptotal = new TH1D("samples_pass","p_sam",8256,0,8256);
    for (int j = 0; j < 8256; j++ )
    {
        if (ROIs[j] != 0)
        {
            flippedROIs->Fill(j,flipROI[j]/ROIs[j]);
        }
        if (samples[j] != 0)
        {
            flippedSamples->Fill(j,totalflips[j]/samples[j]);
        }
        totalEvents->SetBinContent(j,ROIs[j]);
        passEvents->SetBinContent(j,flipROI[j]);
        htotal->SetBinContent(j,samples[j]);
        ptotal->SetBinContent(j,totalflips[j]);

    if (TEfficiency::CheckConsistency(*passEvents,*totalEvents))
    {
        pEff = new TEfficiency(*passEvents,*totalEvents);
        TEfficiency* pCopy = new TEfficiency(*pEff);
        //pCopy->SetConfidenceLevel(.90);
        pCopy->SetStatisticOption(TEfficiency::kFCP);
        pCopy->SetTitle("Probability of Flipped Bit Per ROI for Run 17990 1000 events; Wires; ROIs with Flipped bit over Total ROIs");
        f_output.cd();
        pEff->Write();
        pCopy->Write();
        c1.cd();
        pCopy->Draw("AP");
        c1.Print(".png");
        
    }

```

I want to divide pCopy in three different ranges rather than have all 8256 points in one plot

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [October 16, 2018, 1:54pm UTC](https://root-forum.cern.ch/t/setting-x-range-with-t-efficienct/31092/4 "2018-10-16T13:54:40Z")

</div>

I guess @moneta can help
