Changeset 169 in JEM-EUSO


Ignore:
Timestamp:
May 31, 2013, 1:44:36 PM (11 years ago)
Author:
moretto
Message:

analysis ne permet pas d'avoir les courbes d'efficacité

File:
1 edited

Legend:

Unmodified
Added
Removed
  • esaf_lal/branches/camille/camille_work/KIT_phase1_study/macros/Analysis.C

    r168 r169  
    2626void Analysis()
    2727{
     28    //Déclaration d'un tableau de TProfile permettant de stocker les TProfiles créé par l'analyse des fichiers
    2829    TProfile *hprof_multi[2];
    2930   
    30     //Initialisation & process
     31    //Initialisation & process du premier fichier
    3132    init(inputfile);
    3233    process_profile();
     34    TCanvas *c3 = new TCanvas("c3", "TProfile of the GTU distribution for 100 events for 30 ns dead time");
    3335    hprof_multi[1] = hprof;
     36    hprof_multi[1]->Draw();
    3437   
     38    //Initialisation & process du second fichier
    3539    init(inputfile3);
    3640    process_profile();
     41    TCanvas *c4 = new TCanvas("c4", "TProfile of the GTU distribution for 100 events for 5 ns dead time");
    3742    hprof_multi[2] = hprof;
     43    hprof_multi[2]->Draw();
    3844   
    39     TCanvas *c4 = new TCanvas("c4", "Efficiency vs GTU");
     45   
     46    TCanvas *c4 = new TCanvas("c5", "Efficiency vs GTU");
    4047    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++)
    4350    {
    4451        Float_t bin1 = hprof_multi[1]->GetBinContent(i);
     
    6067
    6168//______________________________________________________________________________
    62 void process_profile ()
     69void process_profile()
     70//ici on récupÚre les données de temps pour les 100 événements afin de réaliser un TProfile
    6371{
    6472    //Déclaration des histogrammes et autres
    6573    TH1F *histo_total = new TH1F("histo_total", "Histogram of photons read by the electronics for 100 showers", 128, 0, 128);
    6674    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();
    6879   
    6980    //Boucle sur l'ensemble des événements pour créer une distribution totale
     
    8899       
    89100    }
    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(); */
    94105   
    95106    //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);
    98109   
    99110    for (Int_t i=0; i<nb_entries; i++)
     111    {
    100112        histo_multi[i] = new TH1F("histo_multi", "Single shower histograms", 128, 0, 128);
     113        histo_multi[i]->Reset();
     114    }
    101115   
    102116    for (Int_t  i=0; i<100 ; i++)
     
    118132        }
    119133       
    120         c2->cd(i+1);
    121         histo_multi[i]->Draw();
     134        //c2->cd(i+1);
     135        //histo_multi[i]->Draw();
    122136       
    123137    }
     
    126140    for (Int_t j=0; j<nb_entries; j++)
    127141    {
    128         for (Int_t i=1; i<=128; i++)
     142        for (Int_t i=0; i<128; i++)
    129143        {
    130144            hprof->Fill(i, histo_multi[j]->GetBinContent(i));
     
    133147    }
    134148   
    135     TCanvas *c3 = new TCanvas("c3", "TProfile of the GTU distribution for 100 events");
    136     hprof->Draw();
    137 
    138149}
    139150
Note: See TracChangeset for help on using the changeset viewer.