problem with drawing options for asymmetry histogram

From: Thomas Schietinger <tschieti_at_mail.cern.ch>
Date: Thu, 30 Jun 2005 10:37:48 +0200 (CEST)


Dear ROOT friends,

[in ROOT 4.04/02...]
I am using the GetAsymmetry() method to produce an asymmetry between two histrograms. I would like to plot the resulting asymmetry as a function (smooth curve). Unfortunately, the returned histogram refuses to be drawn with the "C" drawing option! Any idea how I can "free" my histogram from these drawing restrictions? I am attaching a simple macro to illustrate the problem.

Many thanks in advance,

Thomas

  TH1F *h1 = new TH1F("h1","first histo",3,0.,3.);   TH1F *h2 = new TH1F("h2","second histo",3,0.,3.);   

  Stat_t *s1 = new Stat_t[5];
  s1[0]=0.;s1[1]=1.;s1[2]=2.;s1[3]=3.;s1[4]=0.;   h1->SetContent(s1);
  h1->Draw("C"); // no problem drawing a smooth curve!   

  Stat_t *s2 = new Stat_t[5];
  s2[0]=0.;s2[1]=3.;s2[2]=2.;s2[3]=1.;s2[4]=0.;   h2->SetContent(s2);
  h2->Draw("C"); // no problem drawing a smooth curve!   

  TH1F *asym = h1->GetAsymmetry(h2);
  asym->Draw("C"); // #$%^@&!! no smooth curve - WHY?    Received on Thu Jun 30 2005 - 10:37:53 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:10 MET