ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/JetFitAnalyzer/interface/jetfit.h
(Generate patch)

Comparing UserCode/JetFitAnalyzer/interface/jetfit.h (file contents):
Revision 1.2 by dnisson, Fri Sep 4 20:01:19 2009 UTC vs.
Revision 1.3 by dnisson, Wed Nov 11 01:46:55 2009 UTC

# Line 12 | Line 12
12   #include <TH2.h>
13  
14   namespace jetfit {
15 +
16 +  enum trouble_occ_t {
17 +    T_NULL = 0,
18 +    T_SIMPLEX,
19 +    T_MIGRAD,
20 +    T_MINOS
21 +  };
22 +
23 +  struct trouble {
24 +    trouble_occ_t occ;
25 +    int istat;
26 +  };
27 +
28 +  class model_def;
29 +
30 +  struct results {
31 +    model_def *moddef;
32 +    TH2 *hist_rebinned;
33 +    std::vector< double > chisquare;
34 +    std::vector< std::vector<TString> > pars;
35 +    std::vector< std::vector<double> > pval;
36 +    std::vector< std::vector<double> > perr;
37 +    std::vector< std::vector<double> > plo;
38 +    std::vector< std::vector<double> > phi;
39 +  };
40 +
41    class model_def {
42    public:
43 +    int get_ngauss();
44 +    void set_ngauss(int _ngauss);
45 +
46 +    double fit_fcn(double, double, double *);
47 +
48      TFormula *get_formula();
49      void set_formula(TFormula *);
50      void get_indiv_par(int, std::string&, double&, double&, double&, double&);
# Line 28 | Line 59 | namespace jetfit {
59      int get_indiv_max_y();
60      void set_indiv_max_y(int);
61      virtual double chisquare_error(double) = 0;
62 +    double formula_int(double, double, double, double,
63 +                       double*, double, double, double*);
64 +
65 +    results fit_histo(TH2 *hist, std::vector<trouble> &t,
66 +                      void (*cc_minuit)(TMinuit *, TH2 *, int) = 0,
67 +                      int start_ngauss = 0,
68 +                      int rebinX = 1, int rebinY = 1,
69 +                      double P_cutoff_val = 0.5);
70    private:
71 +    void par_init(TH2 *, TMinuit *, std::vector<TString> &,
72 +                  double *, double *, double *, double *,
73 +                  int, results);
74      TFormula *indiv_formula; // formula for individual Gaussian
75      std::vector<std::string> indiv_par_names;
76      std::vector<double> indiv_par_starts;
# Line 42 | Line 84 | namespace jetfit {
84      int indiv_max_E;
85      int indiv_max_x;
86      int indiv_max_y;
87 +    int ngauss;
88    };
89  
47  enum trouble_occ_t {
48    T_NULL = 0,
49    T_SIMPLEX,
50    T_MIGRAD,
51    T_MINOS
52  };
53
54  struct trouble {
55    trouble_occ_t occ;
56    int istat;
57  };
58
59  struct results {
60    TH2 *hist_rebinned;
61    std::vector< double > chisquare;
62    std::vector< std::vector<TString> > pars;
63    std::vector< std::vector<double> > pval;
64    std::vector< std::vector<double> > perr;
65    std::vector< std::vector<double> > plo;
66    std::vector< std::vector<double> > phi;
67  };
90  
91    model_def& curr_model_def();
92    void set_model_def(model_def *_mdef);
93  
72  int get_ngauss();
73  void set_ngauss(int _ngauss);
74  double fit_fcn(double, double, double *);
75  double fit_fcn_TF2(double *, double *);
94    bool get_ignorezero();
95    void set_ignorezero(bool);
96 <  
97 <  results fit_histo(TH2 *hist, std::vector<trouble> &t,
80 <                    void (*cc_minuit)(TMinuit *, TH2 *, int) = 0,
81 <                    int start_ngauss = 0,
82 <                    int rebinX = 1, int rebinY = 1,
83 <                    double P_cutoff_val = 0.5);
96 >
97 >  double fit_fcn_TF2(double *, double *);  
98   }
99  
100   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines