Changeset 197 in JEM-EUSO
- Timestamp:
- Sep 27, 2013, 9:36:51 AM (11 years ago)
- Location:
- equalization_gain/trunk
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
equalization_gain/trunk/MySetup.sh
r191 r197 1 1 #!/bin/sh 2 2 3 export srcDIR="/Users/dagoret-campagnesylvie/MacOsX/EUSO-BALLOON/GainEqualisation/ analysis/src"4 export dataDIR="/Users/dagoret-campagnesylvie/MacOsX/EUSO-BALLOON/GainEqualisation/ analysis/data/"3 export srcDIR="/Users/dagoret-campagnesylvie/MacOsX/EUSO-BALLOON/GainEqualisation/SVN/analysis/trunk/src" 4 export dataDIR="/Users/dagoret-campagnesylvie/MacOsX/EUSO-BALLOON/GainEqualisation/SVN/analysis/trunk/data/" -
equalization_gain/trunk/README
r191 r197 5 5 * 6 6 ********************************************************** 7 8 Repository 9 =========== 10 11 to see the projects for JEM-EUSO just dou : 12 13 ==> svn ls https://svn.lal.in2p3.fr/projects/JEM-EUSO 14 15 ==> svn ls https://svn.lal.in2p3.fr/projects/JEM-EUSO/equalization_gain 16 branches/ 17 tags/ 18 trunk/ 19 20 7 21 The Gain Equalisation files are inside the analysis directory. 8 22 -
equalization_gain/trunk/src/PlotScurvesAll-diffFit.cc
r195 r197 216 216 ofstream out(kFnameOut.Data()); 217 217 218 // first loop on channels 218 // first loop on channels to fill histonames 219 219 //---------------------- 220 220 for(ch=0;ch<kNch;ch++){ … … 799 799 //-------------------------------------------------------------------------------------------------------- 800 800 void Analysis::PlotScurve( 801 /*Int_t kDrawCh=31,801 Int_t kDrawCh=31, 802 802 TString fname=kFname, 803 803 TString fname_ped=kFnamePed, //ASIC_D ped_file … … 814 814 { 815 815 816 // reset all variables 817 Init(); 818 819 //OpenGainFile(fname_gain); 820 821 FillHistoName(); 822 823 ReadGainFile(fname_gain,kBoard); 824 } 825 //-------------------------------------------------------------------------------------------------------- 826 827 828 //-------------------------------------------------------------------------------------------------------- 829 // Initialize the program by reseting counters or variables and create objects 830 //-------------------------------------------------------------------------------------------------------- 831 void Analysis::Init() 832 { 833 816 834 if(input!=0) delete input; 817 835 if(input_ped!=0) delete input_ped; … … 831 849 832 850 851 // create canvas 852 853 c1 = new TCanvas(kCanvasName1,kCanvasTitle1,200,20,1100,600); //smoothed S-curves 854 c1->Divide(11,6); 855 c2 = new TCanvas(kCanvasName2,kCanvasTitle2,300,50,1100,600); //differentiated histograms of smoothed s-curves 856 c2->Divide(11,6); 857 c5 = new TCanvas(kCanvasName5,kCanvasTitle5,400,70,1100,600); 858 c5->Divide(11,6); 859 c3 = new TCanvas(kCanvasName3,kCanvasTitle3,500,100,1200,300); 860 c3->Divide(4,1); 861 c4 = new TCanvas(kCanvasName4,kCanvasTitle4,900,400,300,300); 862 863 864 // create histos and function 865 hist_scurve = new TH1D[kNch]; // smoothed S-curves 866 hist_scurve_ped = new TH1D[kNch]; // S-curves for pedestal runs 867 hist_diff = new TH1D[kNch]; // differentiated histograms of smoothed s-curves 868 hist_diff_fit = new TH1D[kNch]; // differentiated histograms of fitted s-curves 869 fit_sdiff = new TF1[kNch]; // function fitted on differentiated histograms of fitted s-curves 870 871 872 for(ch=0;ch<kNch;ch++){ 873 dac_half[ch]=0; 874 dac_ped[ch]=0; 875 dac_spe[ch]=0; 876 dac_sfit[ch]=0; 877 gain_org[ch]=0; 878 mean_diff[ch]=0; 879 sfit_chiS[ch]=0; 880 flag_fit[ch]=0; 881 } 882 883 833 884 834 885 } 835 886 //-------------------------------------------------------------------------------------------------------- 836 887 888 //-------------------------------------------------------------------------------------------------------- 889 // Initialize the program by reseting counters or variables and create objects 890 //-------------------------------------------------------------------------------------------------------- 891 void Analysis::OpenGainFile(const TString fname_gain) 892 { 893 TString input_gain(fname_gain); 894 ifstream in_gain(input_gain.Data()); 895 if(!in_gain.good()){ 896 cerr << "File " << input_gain << " open failed!" << endl; 897 exit(-1); 898 } 899 in_gain.close(); 900 in_gain.clear(); 901 902 } 903 //-------------------------------------------------------------------------------------------------------- 904 905 //-------------------------------------------------------------------------------------------------------- 906 // Fill Histogram name 907 //-------------------------------------------------------------------------------------------------------- 908 void Analysis::FillHistoName() 909 { 910 911 // first loop on channels to fill histonames 912 //---------------------- 913 for(ch=0;ch<kNch;ch++){ 914 915 name_hist[ch] ="hist"; 916 name_hist[ch] +=ch; 917 name_hist_ped[ch] ="hist_ped"; 918 name_hist_ped[ch] +=ch; 919 name_hist_diff[ch] ="hist_diff"; 920 name_hist_diff[ch] +=ch; 921 name_hist_diff_fit[ch] ="hist_diff_fit"; 922 name_hist_diff_fit[ch] +=ch; 923 name_fit_diff[ch] ="fit_diff"; 924 name_fit_diff[ch] +=ch; 925 } 926 927 } 928 //-------------------------------------------------------------------------------------------------------- 929 930 931 //-------------------------------------------------------------------------------------------------------- 932 // Read the gain 933 //-------------------------------------------------------------------------------------------------------- 934 935 void Analysis::ReadGainFile(const TString fname_gain,Bool_t kBoard) 936 { 937 TString input_gain(fname_gain); 938 ifstream in_gain(input_gain.Data()); 939 if(!in_gain.good()){ 940 cerr << "File " << input_gain << " open failed!" << endl; 941 exit(-1); 942 } 943 // read gain 944 Double_t da; 945 Int_t count=0; 946 ch=0; 947 while(in_gain >> da){ 948 if(!kBoard && (count>=128 && count<192)){ 949 gain_org[ch]=da; 950 cerr << "!kBoard, count, gain_org[" << ch << "] " 951 << !kBoard << " " << count << " " << gain_org[ch] << endl; 952 ch++; 953 } 954 if(kBoard && (count>=192 && count<256)){ 955 gain_org[ch]=da; 956 cerr << "kBoard, count, gain_org[" << ch << "] " 957 << kBoard << " " << count << " " << gain_org[ch] << endl; 958 ch++; 959 } 960 count++; 961 }// end if first loop on all channels 962 in_gain.close(); 963 in_gain.clear(); 964 965 966 } 967 //-------------------------------------------------------------------------------------------------------- -
equalization_gain/trunk/src/PlotScurvesAll-diffFit.h
r191 r197 6 6 #define _PLOTSCURVESALLDIFFFIT_H_ 7 7 8 #include <iostream> 9 #include "TString.h" 8 10 #include "PlotScurvesAll-diffFitConst.h" 9 11 12 13 class TCanvas; 14 class TH1D; 15 class TF1; 10 16 11 17 void PlotScurve( … … 61 67 private: 62 68 69 void Init(); 70 void OpenGainFile(const TString); 71 void FillHistoName(); 72 void ReadGainFile(const TString,Bool_t); 73 63 74 // common variables to the analysis 64 75 TString *input; … … 83 94 Double_t flag_fit[kNch]; 84 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 85 120 }; 86 121
Note: See TracChangeset
for help on using the changeset viewer.