projecting 2d ntuples into hists

From: Wolfgang Korsch (wkorsch@server1.pa.uky.edu)
Date: Mon Mar 24 1997 - 16:03:22 MET


   Hello, 
     I encountered another problem. I tried to project a 2d ntuple into
     a histogram and a "profile" plot into a histogram, but without
     success. I get a "segmentation violation" error.
     
     I used the following procedure:
     
     Root> hist2d = new TH2F("hist2d", "test", 200,0,200,100,0,1);
     Root> ntuple->Draw("y:x>>hist2d");
     Root> hist2d->Draw();
     
     -----> segmentation violation
     
     This seems to work fine for 1d histograms.
     
     
     A second, probably related, problem I have is:
      I don't seem to be able to generate profile histograms without
      using the "prof" command. I would like to create a profile plot
      where I determine the number of x-bins ("prof" sets this 
      automatically).
      I tried the following:
      
      Root> hprof = new TProfile("hprof", "test",100,0,100,0,1);
      Root> ntuple->Draw("y:x>>hprof");
      Root> hprof->Draw();
      
      -----> segmentation violation
      
      Thanks very much for your help.
      
      Wolfgang
      



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:18 MET