Subversion Repositories f9daq

Rev

Blame | Last modification | View Log | RSS feed

int plot_1d_scan(char * fname="C:/HOME/dino/l2d/root/scan.root"){
  gStyle->SetPalette(1);
  TFile *file = new TFile(fname);
  TNtuple *ntuple = (TNtuple*) file->Get("nt");
  TCanvas *canvas = new TCanvas("canvas","canvas1",800,800);
  canvas->Divide(2,2);
  canvas->cd(1)->SetLogz(1);
//  ntuple2->Draw("y>>h1d(100,0,100)","ch==0 && adc>49");
  ntuple->Draw("x>>h1d(100,0,100)","ch==0 && tdc>150 && tdc<180");
  //ntuple2->Draw("adc:y>>h0(200,-0.5,199.5,100,0,100)","ch==0","colz"); 
  
  //canvas2->cd();
  //canvas2->SetLogz(1);
  // ntuple2->Draw("y>>h3(100,0,100)","ch==3 && adc>40");
}