151 |
|
return sqrt( b*b*aerr*aerr + a*a*berr*berr); |
152 |
|
} |
153 |
|
|
154 |
+ |
//simple routines for addition in quadrature |
155 |
+ |
double addInQuad(double a, double b) {return sqrt(a*a + b*b); } |
156 |
+ |
double addInQuad(double a, double b, double c) {return sqrt(a*a + b*b + c*c); } |
157 |
+ |
double addInQuad(double a, double b, double c, double d) {return sqrt(a*a + b*b + c*c +d*d); } |
158 |
+ |
|
159 |
|
//======== container for run, lumisection, event number ========= |
160 |
|
class eventID { |
161 |
|
public: |
216 |
|
return false; |
217 |
|
} |
218 |
|
|
219 |
+ |
|
220 |
+ |
void printHist(const TH1D* h, int binlow=1, int binhigh=-1, bool withErrors=true) { |
221 |
+ |
cout << "print debug" << endl; |
222 |
+ |
if (binhigh == -1) binhigh = h->GetNbinsX(); |
223 |
+ |
|
224 |
+ |
std::cout << h->GetName() << ": " ; |
225 |
+ |
for (int i = binlow; i<= binhigh; i++) { |
226 |
+ |
if(withErrors) std::cout << format_nevents(h->GetBinContent(i), h->GetBinError(i)) << ", "; |
227 |
+ |
else std::cout << " " << h->GetBinContent(i); |
228 |
+ |
} |
229 |
+ |
std::cout << std::endl; |
230 |
+ |
} |
231 |
+ |
|
232 |
+ |
|
233 |
|
} //end of namespace |
234 |
|
|
235 |
|
|