/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/src/analyse/Renaud/ROOT/show.C File Reference

Go to the source code of this file.

Functions

 show (Int_t chip_num, Int_t ch_num)


Function Documentation

show ( Int_t  chip_num,
Int_t  ch_num 
)

Definition at line 1 of file show.C.

Referenced by main().

00002 {
00003         //.X show.C(1,2)
00004         //cout << chip_num << " " << ch_num << endl ;
00005         TString directory = "/gpfs/LAPP-DATA/LC/Detecteurs/MicroMegas/data/MICROROC/PROD_1/ROOTFILES/";
00006         TString name_file_ped = directory + "scurve_chip_" + Form("%d", chip_num) + "_pedestal.root" ;  
00007         TString name_file_data = directory + "scurve_chip_" + Form("%d", chip_num) + "_data.root" ;
00008         
00009 //      Pedestal: Scurve and derive
00010         TFile * f_ped = new TFile(name_file_ped) ;
00011         TString * h_ped_name_h = new TString() ;
00012         h_ped_name_h->Form("hscurve_%d", ch_num) ;
00013         TString * h_ped_name_d = new TString() ;
00014         h_ped_name_d->Form("deriv_%d", ch_num) ;
00015         TH1I * h_ped_h = (TH1I*) f_ped->Get(h_ped_name_h->Data()) ;
00016         TH1I * h_ped_d = (TH1I*) f_ped->Get(h_ped_name_d->Data()) ;
00017         h_ped_h->GetXaxis()->SetRangeUser(100,500);
00018         h_ped_d->GetXaxis()->SetRangeUser(100,500);
00019         
00020         TCanvas * c1 = new TCanvas("c1","Pedestals",0, 0, 800, 300);
00021         c1->Divide(2,1);
00022         c1->cd(1);
00023         h_ped_h->Draw();
00024         c1->cd(2);
00025         h_ped_d->Draw();
00026         
00027         //      Data: Scurve and derive
00028         TFile * f_dat = new TFile(name_file_data) ;
00029         TString * h_dat_name_h = new TString() ;
00030         h_dat_name_h->Form("hscurve_%d", ch_num) ;
00031         TString * h_dat_name_d = new TString() ;
00032         h_dat_name_d->Form("deriv_%d", ch_num) ;
00033         TH1I * h_dat_h = (TH1I*) f_dat->Get(h_dat_name_h->Data()) ;
00034         TH1I * h_dat_d = (TH1I*) f_dat->Get(h_dat_name_d->Data()) ;
00035         h_dat_h->GetXaxis()->SetRangeUser(350,750);
00036         h_dat_d->GetXaxis()->SetRangeUser(350,750);
00037         
00038         TCanvas * c2 = new TCanvas("c2","Data",0, 350, 800, 300);
00039         c2->Divide(2,1);
00040         c2->cd(1);
00041         h_dat_h->Draw();
00042         c2->cd(2);
00043         h_dat_d->Draw();
00044         
00045         return 0 ;
00046 
00047 }


Generated on Mon Jan 7 13:17:04 2013 for MicromegasFramework by  doxygen 1.4.7