Scaling events

Hi all…

I need help in scaling the events by some constant factor. I am using this macro

Long64_t nlines = T->ReadFile(Form("%seetrtr-w.dat",dir.Data()),“x1:x2:x3:x4:x5”);

 h1->GetXaxis()->SetTitle("cos#theta_{W+}");
 h1->GetYaxis()->SetTitle("Events");
 T->Draw("x1>>h1","x2"); 

I want to multiply list x1 by some factor like 0.5.
Another question is about how to find maximum and minimum value
from the list x1. thanks !

Hi,

the ways in which you can achieve this are really many.
A good starting point would be to loop over the events in the tree of yours:
root.cern.ch/drupal/content/how-read-tree
and use the Fill method of the TH1F class.

Danilo