64 |
|
} |
65 |
|
|
66 |
|
void |
67 |
< |
CutFlow::fillCutFlow () |
67 |
> |
CutFlow::fillCutFlow (double w) |
68 |
|
{ |
69 |
|
bool fillCumulative = true, fillComplement = true; |
70 |
|
double complement = -1.0; |
71 |
|
|
72 |
< |
cutFlow_->Fill (0.5); |
73 |
< |
selection_->Fill (0.5); |
72 |
> |
cutFlow_->Fill (0.5, w); |
73 |
> |
selection_->Fill (0.5, w); |
74 |
|
for (vector<string>::const_iterator cut = cutNames_.begin (); cut != cutNames_.end (); cut++) |
75 |
|
{ |
76 |
|
if (cuts_[*cut]) |
77 |
|
{ |
78 |
|
double binCenter = selection_->GetBinCenter (cut - cutNames_.begin () + 2); |
79 |
|
|
80 |
< |
selection_->Fill (binCenter); |
80 |
> |
selection_->Fill (binCenter, w); |
81 |
|
if (fillCumulative) |
82 |
< |
cutFlow_->Fill (binCenter); |
82 |
> |
cutFlow_->Fill (binCenter, w); |
83 |
|
} |
84 |
|
else |
85 |
|
{ |
92 |
|
} |
93 |
|
if (fillCumulative) |
94 |
|
{ |
95 |
< |
rejection_->Fill (0.5); |
95 |
> |
rejection_->Fill (0.5, w); |
96 |
|
for (vector<string>::const_iterator cut = cutNames_.begin (); cut != cutNames_.end (); cut++) |
97 |
|
{ |
98 |
|
double binCenter = rejection_->GetBinCenter (cut - cutNames_.begin () + 2); |
99 |
|
|
100 |
< |
rejection_->Fill (binCenter); |
100 |
> |
rejection_->Fill (binCenter, w); |
101 |
|
} |
102 |
|
} |
103 |
|
if (!fillCumulative && fillComplement) |
104 |
< |
rejection_->Fill (complement); |
104 |
> |
rejection_->Fill (complement, w); |
105 |
|
} |
106 |
|
|
107 |
|
void |
170 |
|
} |
171 |
|
|
172 |
|
clog << setw (80) << setfill ('-') << '-' << setfill (' ') << endl; |
173 |
< |
clog << setw (16) << left << "Cut Name" << right << setw (16) << "Cut Flow" << setw (16) << "Efficiency" << setw (16) << "Selection" << setw (16) << "Rejection" << endl; |
173 |
> |
clog << setw (15) << left << "Cut Name" << right << setw (16) << "Events" << setw (16) << "Cumulative Eff." << setw (16) << "Individual Eff." << setw (16) << "Rejection" << endl; |
174 |
|
clog << setw (80) << setfill ('-') << '-' << setfill (' ') << endl; |
175 |
|
totalEvents = cutFlow_->GetBinContent (1); |
176 |
< |
clog << setw (25) << left << "Total:" << right << setw (25) << totalEvents << setw (25) << "100%" << endl; |
176 |
> |
clog << setw (15) << left << "Total:" << right << setw (16) << totalEvents << setw (16) << "100%" << setw (16) << "100%" << setw (16) << "0%" << endl; |
177 |
|
for (vector<string>::const_iterator cut = cutNames_.begin (); cut != cutNames_.end (); cut++) |
178 |
|
{ |
179 |
|
double cutFlow = cutFlow_->GetBinContent (cut - cutNames_.begin () + 2), |
180 |
|
selection = selection_->GetBinContent (cut - cutNames_.begin () + 2), |
181 |
|
rejection = rejection_->GetBinContent (cut - cutNames_.begin () + 2); |
182 |
|
|
183 |
< |
clog << setw (16) << left << (*cut + ":") << right << setw (16) << cutFlow << setw (16) << 100.0 * (cutFlow / (double) totalEvents) << "%" |
184 |
< |
<< setw (16) << 100.0 * (selection / (double) totalEvents) << "%" |
185 |
< |
<< setw (16) << 100.0 * (rejection / (double) totalEvents) << "%" << endl; |
183 |
> |
clog << setw (15) << left << (*cut + ":") << right << setw (16) << cutFlow << setw (15) << 100.0 * (cutFlow / (double) totalEvents) << "%" |
184 |
> |
<< setw (15) << 100.0 * (selection / (double) totalEvents) << "%" |
185 |
> |
<< setw (15) << 100.0 * (rejection / (double) totalEvents) << "%" << endl; |
186 |
|
} |
187 |
|
clog << setw (80) << setfill ('-') << '-' << setfill (' ') << endl; |
188 |
– |
clog << endl; |
188 |
|
} |