Changeset 169 in JEM-EUSO
- Timestamp:
- May 31, 2013, 1:44:36 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
esaf_lal/branches/camille/camille_work/KIT_phase1_study/macros/Analysis.C
r168 r169 26 26 void Analysis() 27 27 { 28 //Déclaration d'un tableau de TProfile permettant de stocker les TProfiles créé par l'analyse des fichiers 28 29 TProfile *hprof_multi[2]; 29 30 30 //Initialisation & process 31 //Initialisation & process du premier fichier 31 32 init(inputfile); 32 33 process_profile(); 34 TCanvas *c3 = new TCanvas("c3", "TProfile of the GTU distribution for 100 events for 30 ns dead time"); 33 35 hprof_multi[1] = hprof; 36 hprof_multi[1]->Draw(); 34 37 38 //Initialisation & process du second fichier 35 39 init(inputfile3); 36 40 process_profile(); 41 TCanvas *c4 = new TCanvas("c4", "TProfile of the GTU distribution for 100 events for 5 ns dead time"); 37 42 hprof_multi[2] = hprof; 43 hprof_multi[2]->Draw(); 38 44 39 TCanvas *c4 = new TCanvas("c4", "Efficiency vs GTU"); 45 46 TCanvas *c4 = new TCanvas("c5", "Efficiency vs GTU"); 40 47 TProfile *hprof_efficiency = new TProfile("hprof_efficiency", "Efficiency vs GTU", 128, 0, 128); 41 42 for (Int_t i= 1; i<128; i++)48 49 for (Int_t i=0; i<128; i++) 43 50 { 44 51 Float_t bin1 = hprof_multi[1]->GetBinContent(i); … … 60 67 61 68 //______________________________________________________________________________ 62 void process_profile () 69 void process_profile() 70 //ici on récupÚre les données de temps pour les 100 événements afin de réaliser un TProfile 63 71 { 64 72 //Déclaration des histogrammes et autres 65 73 TH1F *histo_total = new TH1F("histo_total", "Histogram of photons read by the electronics for 100 showers", 128, 0, 128); 66 74 TH1F *histo_multi[100]; 67 TProfile *hprof = new TProfile("hprof", "Average number of photons per GTU", 128, 0, 128); 75 hprof = new TProfile("hprof", "Average number of photons per GTU", 128, 0, 128); 76 77 histo_total->Reset(); 78 hprof->Reset(); 68 79 69 80 //Boucle sur l'ensemble des événements pour créer une distribution totale … … 88 99 89 100 } 90 91 TCanvas *c1 = new TCanvas("c1", "Distribution totale");92 histo_total->GetXaxis()->SetTitle("GTU");93 histo_total->Draw();101 102 /* TCanvas *c1 = new TCanvas("c1", "Distribution totale"); 103 histo_total->GetXaxis()->SetTitle("GTU"); 104 histo_total->Draw(); */ 94 105 95 106 //Boucle sur l'ensemble des événements pour tracer séparément les histogrammes 96 TCanvas *c2 = new TCanvas("c2", "Collection of GTU histograms for 100 events");97 c2->Divide(10,10);107 //TCanvas *c2 = new TCanvas("c2", "Collection of GTU histograms for 100 events"); 108 //c2->Divide(10,10); 98 109 99 110 for (Int_t i=0; i<nb_entries; i++) 111 { 100 112 histo_multi[i] = new TH1F("histo_multi", "Single shower histograms", 128, 0, 128); 113 histo_multi[i]->Reset(); 114 } 101 115 102 116 for (Int_t i=0; i<100 ; i++) … … 118 132 } 119 133 120 c2->cd(i+1);121 histo_multi[i]->Draw();134 //c2->cd(i+1); 135 //histo_multi[i]->Draw(); 122 136 123 137 } … … 126 140 for (Int_t j=0; j<nb_entries; j++) 127 141 { 128 for (Int_t i= 1; i<=128; i++)142 for (Int_t i=0; i<128; i++) 129 143 { 130 144 hprof->Fill(i, histo_multi[j]->GetBinContent(i)); … … 133 147 } 134 148 135 TCanvas *c3 = new TCanvas("c3", "TProfile of the GTU distribution for 100 events");136 hprof->Draw();137 138 149 } 139 150
Note: See TracChangeset
for help on using the changeset viewer.