Re: smart code-help needed

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Wed, 02 May 2007 09:08:38 +0200


Do something like:

  TH2F *h2 = new TH2F("h2","y vs pt",npt,ptmin,ptmax,ny,ymin,ymax);   //now make your loop computing pt and y and fill h2   h2->Fill(pt,y);

 //draw h2 as a lego plot
 h2->Draw("lego");

Rene Brun

suneel_at_puhep.res.in wrote:
> Dear rooters,
> I want to be a smart coder but now have a very limited knowledge of
> c++ and coding techniques that is why running for help.
> I an interested in plotting few similar two dimensional histograms for a
> very large number of variables .All the histograms are going to have same
> thing along one of the axis(let us take x-axis(pt))Idea is to define the
> other axis as a variable(y) as then I can make a common fill loop.(like
> Fill(pt,y).Then I am left with only specifying value for y and get all
> the histograms.This thing will also need to define one other variable
> which could represent the histograms for different y-variables.
> To provide more clarity of what I am doing I am enclosing following three
> steps.
> 1.Defining histograms
> 2.define the loop which tells for a particular value of y fill which set
> of histograms.
> 3.Common fill.
> I am finding myself clueless in answering "how to code it".
> If some-one could provide me some help or hints regarding this then it
> could be a great help.
> Thanks a lot in advance
> chris
>
Received on Wed May 02 2007 - 09:08:44 CEST

This archive was generated by hypermail 2.2.0 : Wed May 02 2007 - 23:50:02 CEST