10 TFile* infile=TFile::Open(file,
"READ");
11 file.ReplaceAll(
".root",
".wht");
13 ofstream outfile(file.Data());
15 TTree* tr=(TTree*)infile->Get(
"pwevents");
17 tr->SetBranchAddress(
"impweight",&w);
19 outfile << std::setprecision(10);
21 unsigned int n=tr->GetEntries();
22 for(
unsigned int i=0;
i<
n; ++
i){