2D TEfficiency Calculation

Hello experts,
Could you please help me to calculate following Efficiency calculation using TEfficiency?
I was wondering that there is no direct histogram for hpass and htotal

{
    
    //f_bgd= (Integrate 3-fold)/(Integrated 4-fold !Exc) in bgnd region
    TH2F *f_bgnd=(TH2F*)h2_pim_3fold_bgnd->Clone("f_bgnd");
    f_bgnd->Divide(h2_pim_4fold_bgnd_notExc);
    
//     normalized bgnd = f_bgd * (4-fold !Exc integrated over "exclusive" window of missing pi- M2)
    TH2F* Normalized_bgnd=(TH2F*) f_bgnd->Clone("Normalized_bgnd");
    Normalized_bgnd->Multiply(h2_pim_4fold_exc_notExc);
    
 //   (h2_pim_3fold_exc- normalized bgnd)
    TH2F* Neg_Normalized_bgnd= (TH2F*) Normalized_bgnd->Clone("Neg_Normalized_bgnd");
    Neg_Normalized_bgnd->Scale(-1);
    h2_pim_3fold_exc->Add(Neg_Normalized_bgnd);
    
    // Efficiency=(h2_pim_4fold_exc)/(h2_pim_3fold_exc- normalized bgnd);
    TH2F * Efficiency= (TH2F*) h2_pim_4fold_exc->Clone("Efficiency");
     Efficiency->Divide(h2_pim_4fold_exc,h2_pim_3fold_exc);
    
    Efficiency->SetMarkerSize(1.5);
    Efficiency->Draw("text30");
    
    }

Any help would be greatly appreciated.
Thank You


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hi,

TEfficiency works for computing the division of a total and a pass histogram, where pass is a subset of total.
Now you are performing some different operations on the histograms, I am not sure TEfficiency can be applied for your case. You can then use TH1::card_index_dividers:

Lorenzo

1 Like

Hi Lorenzo,

Thank you for the reply.

-Dil

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.