RE: Projection of two TH1 objects

From: Ijaz Ahmed <Ijaz.Ahmed_at_cern.ch>
Date: Thu, 10 Feb 2011 14:07:27 +0000


Actually my aim is to extract the values from two TH1F histos and then would make 2D histo by projection on each other. Ijaz



From: Mario Kadastik
Sent: 10 February 2011 14:57
To: Ijaz Ahmed
Cc: roottalk (Mailing list discussing all aspects of the ROOT system.) Subject: Re: [ROOT] Projection of two TH1 objects

Hello all,
I have two TH1 objects, and i wan to see simply the projection between them, in the form of 2D histo. Any quick idea..



TH1F *h1 = coutput1->FindObject("fMultiplicityITSTPC"); TH1F *h2 = coutput1->FindObject("fMultiplicitySPD"); test = new TH2F("test","",100,0,100,100,0,100);

can you explain what do you mean by the projection between them? So what should bin X,Y contain in the 2D plot? h1->GetBinContent(x)+h2->GetBinContent(y); or - or * or / or ....

Mario Kadastik, PhD
Researcher

---
  "Physics is like sex, sure it may have practical reasons, but that's not why we do it"
     -- Richard P. Feynman
Received on Thu Feb 10 2011 - 15:07:33 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 10 2011 - 17:50:02 CET