43 |
|
if( current == book.end() ) { |
44 |
|
TH1* histogram = book[name] = new TH1D((_title+"/"+name).c_str(), "", NbinsX, Xlow, Xup); |
45 |
|
histogram->SetDirectory(0); |
46 |
+ |
histogram->Sumw2(); |
47 |
|
histogram->Fill(X,W); |
48 |
|
} else current->second->Fill(X,W); |
49 |
|
} |
56 |
|
if( current == book.end() ) { |
57 |
|
TH1* histogram = book[name] = new TH2D((_title+"/"+name).c_str(), "", NbinsX, Xlow, Xup, NbinsY, Ylow, Yup); |
58 |
|
histogram->SetDirectory(0); |
59 |
+ |
histogram->Sumw2(); |
60 |
|
static_cast<TH2*>(histogram)->Fill(X,Y,W); |
61 |
|
} else static_cast<TH2*>(current->second)->Fill(X,Y,W); |
62 |
|
} |
70 |
|
if( current == book.end() ) { |
71 |
|
TH1* histogram = book[name] = new TH3D((_title+"/"+name).c_str(), "", NbinsX, Xlow, Xup, NbinsY, Ylow, Yup, NbinsZ, Zlow, Zup); |
72 |
|
histogram->SetDirectory(0); |
73 |
+ |
histogram->Sumw2(); |
74 |
|
static_cast<TH3*>(histogram)->Fill(X,Y,Z,W); |
75 |
|
} else static_cast<TH3*>(current->second)->Fill(X,Y,Z,W); |
76 |
|
} |