Go to the source code of this file.
◆ check_two_sigma_violate()
void check_two_sigma_violate |
( |
TString | file = "rungain.root" | ) |
|
Definition at line 1 of file RungCosSec/check_two_sigma_violate.cxx.
1 {
2 TFile *
f =
new TFile(
file);
3 TTree *
t = (TTree*)
f->Get(
"runcalib");
4 TH1F *h = new TH1F("h","h", 100, -0.5, 1.5);
6 h->Fit("gaus");
7 double mean = h->GetFunction("gaus")->GetParameter(1);
8 double sigma = h->GetFunction(
"gaus")->GetParameter(2);
9 TString
cut = Form(
"rungain<%f-2*%f || rungain>%f+2*%f",mean,
sigma,mean,
sigma);
10 cout <<
"cut: " <<
cut << endl;
11 t->Scan(
"runno:runmean:rungain:runresol",
cut);
12}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")