several cuts

From: Boris Skorodumov <bskorodo_at_nd.edu>
Date: Fri, 11 Mar 2005 16:46:55 -0500


Dear Rooters,

if i would like to make several gcuts on 2d histogram and later to make some projection on 1d histo, what is the best way to do it ?

one way is:

  TCutG *cut1 = (TCutG*)gPad->WaitPrimitive("CUTG","CutG");

  cut1 -> SetName("cut1");
  cut1 -> SetVarX("x");
  cut1 -> SetVarY("y");

  TCutG *cut2 = (TCutG*)gPad->WaitPrimitive("CUTG","CutG");

  cut2 -> SetName("cut2");
  cut2 -> SetVarX("x");
  cut2 -> SetVarY("y");

........ and so on

 t->Draw("x >> histo","cut1 || cut2 ||...");

but i am sure, it should be the way to orginize loop.

thank you.
boris.

-- 
--------------------------------------

| Boris Skorodumov, Graduate Student |
| Physics Department |
| University of Notre Dame |
| Indiana 46556, USA |
| WWW: http://www.nd.edu/~bskorodo |
--------------------------------------
Received on Fri Mar 11 2005 - 22:47:05 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET