source: JEM-EUSO/equalization_gain/trunk/src/PlotScurvesAll-diffFit.h @ 197

Last change on this file since 197 was 197, checked in by dagoret, 11 years ago

bug due to a comment left corrected

File size: 2.9 KB
Line 
1//
2//
3// Definition of classes
4//
5#ifndef _PLOTSCURVESALLDIFFFIT_H_
6#define _PLOTSCURVESALLDIFFFIT_H_
7
8#include <iostream>
9#include "TString.h"
10#include "PlotScurvesAll-diffFitConst.h"
11
12
13class TCanvas;
14class TH1D;
15class TF1;
16
17void PlotScurve(
18                Int_t    kDrawCh=31,
19                TString  fname=kFname,
20                TString  fname_ped=kFnamePed, //ASIC_D ped_file
21                Double_t dac_half_spe_fix = -1,
22                TString  fname_gain="gain-org.txt",
23                Int_t    fit_min=kFitMin,
24                Int_t    fit_max=kFitMax,
25                Int_t    fit_min_scurve=kFitMinS,
26                Int_t    fit_max_scurve=kFitMaxS,
27                Bool_t   kBoard=0, //0:ASIC_C, 1:ASIC_D
28                Int_t    kChRef=kRefCh,//ASIC_C
29                Bool_t   checkAve=0 //0:use ref pix, 1:check average
30                );
31
32
33//-------------------------------------------------------------
34// Same work presented inside the analysis class
35//
36//
37//-------------------------------------------------------------
38
39class Analysis
40{
41 public:
42
43  Analysis(); // construtor to clean variables, and create object on the heap
44
45  ~Analysis(); // destructor to clean object form the heap
46
47  // Main analysis function to be called from outside
48
49void PlotScurve(
50                Int_t    kDrawCh,
51                TString  fname,
52                TString  fname_ped, //ASIC_D ped_file
53                Double_t dac_half_spe_fix,
54                TString  fname_gain,
55                Int_t    fit_min,
56                Int_t    fit_max,
57                Int_t    fit_min_scurve,
58                Int_t    fit_max_scurve,
59                Bool_t   kBoard, //0:ASIC_C, 1:ASIC_D
60                Int_t    kChRef,//ASIC_C
61                Bool_t   checkAve //0:use ref pix, 1:check average
62                );
63
64
65
66
67private:
68
69 void Init();
70 void OpenGainFile(const TString);
71 void FillHistoName();
72 void ReadGainFile(const TString,Bool_t);
73
74// common variables to the analysis
75     TString *input;
76     TString *input_ped;
77     Int_t    ch;
78     Float_t  dac_half_sum; 
79     Float_t  dac_ped_sum;   
80     Float_t  dac_spe_sum;   
81     Float_t  dac_sfit_sum;     
82     Float_t  diff_sum;     
83     Float_t  mean_sum;       
84     Float_t  maxBinSum;
85
86// output of the PlotScurve Analysis
87     Double_t dac_half[kNch];
88     Double_t dac_ped[kNch];
89     Double_t dac_spe[kNch];
90     Double_t dac_sfit[kNch];
91     Double_t mean_diff[kNch];
92     Double_t gain_org[kNch];
93     Double_t sfit_chiS[kNch];
94     Double_t flag_fit[kNch];
95
96     //canvas pointers
97
98     TCanvas *c1; //smoothed S-curves
99     TCanvas *c2; //differentiated histograms of smoothed s-curves
100     TCanvas *c5;
101     TCanvas *c3;           
102     TCanvas *c4;
103
104     //histograms
105
106     TString  name_hist[kNch];
107     TString  name_hist_ped[kNch];
108     TString  name_hist_diff[kNch];
109     TString  name_hist_diff_fit[kNch];
110     TString  name_fit_diff[kNch];
111     TH1D    *hist_scurve; // smoothed S-curves
112     TH1D    *hist_scurve_ped; // S-curves for pedestal runs
113     TH1D    *hist_diff; // differentiated histograms of smoothed s-curves
114     TH1D    *hist_diff_fit; // differentiated histograms of fitted s-curves
115     TF1     *fit_sdiff;  // function fitted on differentiated histograms of fitted s-curves
116
117
118     
119
120};
121
122#endif
123
Note: See TracBrowser for help on using the repository browser.