[ROOT] Histogram weighting problem?

From: Benjamin E. Norman (bnorman@kent.edu)
Date: Wed Jan 03 2001 - 17:05:49 MET


Hi Rooters,
	I have a problem with some code, and I was wondering if anyone has any
suggestions.  I'm trying to calculate dN/dpt^2 (1/pt dN/dpt) for some
simulated data, and I get what seems to me like a strange
inconsistency.  The first time I tried it, I did the following:

	TCut isFinalState = "1<=ks && ks<=10";
	TCut isHminus = "kf==-211 || kf==-321 || kf==-2212";
	TCut isMidRapidity = "abs(eta) < 0.5";
	tree->Draw("pt>>histoDnDpt2", 
	           "1./pt" * (isFinalState && isHminus && isMidRapidity));

This gives me the red curve on the enclosed graph.  This didn't seem
right, so I tried the following:

      tree->Draw("pt>>histoDnDpt2b", 
		 (isFinalState && isHminus && isMidRapidity));
      TF1* fIdentity = new TF1("fIdentity", "x");
      histoDnDpt2b->Divide(fIdentity);

This gives me blue curve.  I can understand that there will be some
slight differences due to using the pt at the bin center in the second
case, but this does not explain my problem.  The difference in the
curves at pt=0.2 GeV is a factor of 10, while the maximum difference in
pt between the bin center and the bin edge is (0.2/0.005)=2.5%.
	So....am I missing something fundamental about histograms?

Thanks,
Ben
 
,,,,:,,,,:,,,,:,,,,:,,,,:,,,,:,,,,:,,,,:,,,,:,,,,:,,,,:,,,,
Benjamin Norman                    http://kent.edu/~bnorman
Department of Physics                      bnorman@kent.edu
Kent State University, OH, USA                 330-672-0378
````:````:````:````:````:````:````:````:````:````:````:````



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:33 MET