ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/joshmt/MiscUtil.cxx
(Generate patch)

Comparing UserCode/joshmt/MiscUtil.cxx (file contents):
Revision 1.10 by joshmt, Wed Feb 15 15:13:44 2012 UTC vs.
Revision 1.13 by kreis, Fri Jun 8 17:09:02 2012 UTC

# Line 151 | Line 151 | namespace jmt {
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:
# Line 211 | Line 216 | namespace jmt {
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines