Re: How to use a contour as a cut?

From: suvayu ali <fatkasuvayu_at_gmail.com>
Date: Mon, 9 Apr 2012 22:27:15 +0200


Hi Michelle

>From a quick look I would like to point a couple of things.

On Mon, Apr 9, 2012 at 18:35, Michelle Medeiros <mi.mesquita.medeiros_at_gmail.com> wrote:
>    TH2F *contour = (TH2F*)file->Get("Contour Hist");
>    contour->Draw("CONT3");
>
>    TCutG *cut = (TCutG*)file->Get("Contour Hist");
>    cut->SetName("mycut");
>

You are asking for the same name twice, the first time you type cast it to TH2F and the second time to the TCutG. Since ROOT doesn't allow multiple objects of the same name (as far as I am aware), maybe one of them is a typo?

ROOT doesn't like "names" with spaces. I think you should try renaming the histograms/cuts to something without a space before you use them.

Hope this helps.
:)

-- 
Suvayu

Open source is the future. It sets us free.
Received on Mon Apr 09 2012 - 22:27:44 CEST

This archive was generated by hypermail 2.2.0 : Tue Apr 10 2012 - 05:50:02 CEST