Re: [ROOT] Many cuts on an ntuple and h2root

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Apr 12 2000 - 16:33:17 MEST


Hi Huw,
I looked into your PAW and Root macros. Your Root macro was not doing
exactly the cuts of the PAW macro. You had in PAW:

* kaon identification (if available) for each of the 3 tracks.
cut $11
(((msq1)>0.13.and.(msq1)<0.6.and.cthdrc1.ne.0.).or.(cthdrc1=0..and.p1<0.5))
cut $12
(((msq2)>0.13.and.(msq2)<0.6.and.cthdrc2.ne.0.).or.(cthdrc2=0..and.p2<0.5))
cut $13
(((msq3)>0.13.and.(msq3)<0.6.and.cthdrc3.ne.0.).or.(cthdrc3=0..and.p3<0.5))

and in Root:

// Kaon identification (if available) for each of the 3 tracks
TCut cut11 = msq1g && msq1l && cth1;
TCut cut12 = msq2g && msq2l && cth2;
TCut cut13 = msq3g && msq3l && cth3;

I modified the Root cuts to:

// Kaon identification (if available) for each of the 3 tracks
TCut cut11 = (msq1g && msq1l && cth1) || cth1e;
TCut cut12 = (msq2g && msq2l && cth2) || cth2e;
TCut cut13 = (msq3g && msq3l && cth3) || cth3e;

and I obtain now identical results.

Rene Brun


> 
> I don't know if there's a good explaination but for some reason I can't
> apply lots of cuts to an ntuple at the same time.  All combinations of the
> cuts work and they also all work together in paw.  I'm trying to plot a
> histogram with:    chain->Draw("variable>>+hist", cut1 && cut2 && ...);
> (I have tried combining them with TCut somecuts = cut1 && cut2 && ...
> which not surprisingly didn't do anything.)  Can anybody help?
> 
> Also I've noticed a very strange thing as have a couple of other people.
> When we've converted hbook files with h2root and plotted various variables
> from an ntuple the number of entries in the root histogram is a lot less
> than in the paw histogram.  This has happened with completly unrealted
> hbook files.  Are we doing something wrong?
> 
> Cheers,
>         Huw



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:23 MET