Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
How to use Root:http://root.cern.ch/ "How to" page: http://root.cern.ch/drupal/content/howtos User's guide: http://root.cern.ch/drupal/content/users-guide Reference guide: http://root.cern.ch/drupal/content/reference-guide | ||||||||
Changed: | ||||||||
< < | Run it: | |||||||
> > | Run the Root:root -l | |||||||
Deleted: | ||||||||
< < | root -l | |||||||
Open a file:TFile *_file0 = TFile::Open("..... .root") | ||||||||
Line: 31 to 31 | ||||||||
Draw a histogram: | ||||||||
Changed: | ||||||||
< < | < name of the tree in the file >.Draw("< name of a Branch >.< name of a leaf >") 2D histogram: < name of the tree in the file >. Draw("< name of a Branch1 >.< name of a leaf1 >:< name of a Branch2 >.< name of a leaf2 >") | |||||||
> > | < name of the tree in the file >.Draw("< name of a Branch >.< name of a leaf >") | |||||||
Changed: | ||||||||
< < | histogram with cut criteria: < name of the tree in the file >.Draw("< name of a Branch1 >.< name of a leaf1 >,< name of a Branch2 >.< name of a leaf2 >< cut criteria>") | |||||||
> > | 2D histogram: | |||||||
Changed: | ||||||||
< < | draw two histogram in one canvas: < name of the tree in the file >.Draw("< name of a Branch1 >.< name of a leaf1 >") | |||||||
> > | < name of the tree in the file >. Draw("< name of a Branch1 >.< name of a leaf1 >:< name of a Branch2 >.< name of a leaf2 >") histogram with cut criteria: < name of the tree in the file >.Draw("< name of a Branch1 >.< name of a leaf1 >,< name of a Branch2 >.< name of a leaf2 >< cut criteria>") draw two histogram in one canvas: < name of the tree in the file >.Draw("< name of a Branch1 >.< name of a leaf1 >") | |||||||
< name of the tree in the file >.Draw("< name of a Branch2 >.< name of a leaf2 > ","","SAME") e.g.: tree.Draw("pelectron_1.tight: pelectron_1.loose ","pelectron_1.tight>-1") Open an AOD file in root: |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
How to use Root: | ||||||||
Line: 11 to 11 | ||||||||
TFile *_file0 = TFile::Open("..... .root")
File browser: | ||||||||
Changed: | ||||||||
< < | TBrowser < name > | |||||||
> > | TBrowser < name > | |||||||
List the directories: | ||||||||
Changed: | ||||||||
< < | .ls < directory name >.cd() | |||||||
> > | .ls < directory name >.cd() | |||||||
Print the tree: | ||||||||
Changed: | ||||||||
< < | < ntuplename >.Print() | |||||||
> > | < ntuplename >.Print() | |||||||
Scan the tree:< ntuplename >.Scan("< name of a Branch >.< name of a leaf >")Make a new histogram: | ||||||||
Changed: | ||||||||
< < | TH1F * = new TH1F ("name","",#ofXaxis,#ofYaxis,#ofBins); | |||||||
> > | TH1F *< name_of_the_histogram > = new TH1F ("< name >","",< #ofXaxis >,< #ofYaxis >,< #ofBins >); | |||||||
Make a new canvas: | ||||||||
Changed: | ||||||||
< < | TCanvas *c1=new TCanvas ("name","",1); | |||||||
> > | TCanvas *< c1 >=new TCanvas ("< name >","",1); | |||||||
Draw a histogram: | ||||||||
Changed: | ||||||||
< < | name of the tree in the file.Draw("name of a Branch.name of a leaf") | |||||||
> > | < name of the tree in the file >.Draw("< name of a Branch >.< name of a leaf >") 2D histogram: < name of the tree in the file >. Draw("< name of a Branch1 >.< name of a leaf1 >:< name of a Branch2 >.< name of a leaf2 >") | |||||||
Changed: | ||||||||
< < | 2D histogram: name of the tree in the file.Draw("name of a Branch1.name of a leaf1:name of a Branch2.name of a leaf2") | |||||||
> > | histogram with cut criteria: < name of the tree in the file >.Draw("< name of a Branch1 >.< name of a leaf1 >,< name of a Branch2 >.< name of a leaf2 >< cut criteria>") | |||||||
Changed: | ||||||||
< < | histogram with cut criteria: _name of the tree in the file.Draw("name of a Branch1.name of a leaf1,name of a Branch2.name of a leaf2 cut criteria")_ | |||||||
> > | draw two histogram in one canvas: < name of the tree in the file >.Draw("< name of a Branch1 >.< name of a leaf1 >") | |||||||
Changed: | ||||||||
< < | draw two histogram in one canvas: < name of the tree in the file>.Draw(" e.g.: tree.Draw("pelectron_1.tight: pelectron_1.loose ","pelectron_1.tight>-1") | |||||||
> > | < name of the tree in the file >.Draw("< name of a Branch2 >.< name of a leaf2 > ","","SAME") e.g.: tree.Draw("pelectron_1.tight: pelectron_1.loose ","pelectron_1.tight>-1") | |||||||
Open an AOD file in root: | ||||||||
Line: 51 to 49 | ||||||||
void Chain(){ TChain tree("stopAnaMod/tree"); tree.AddFile("stopAnaNtuple_noselection_Chowder_00.root"); tree.Draw("event"); } Save a histogram to .eps: | ||||||||
Changed: | ||||||||
< < | TCanvas *=new TCanvas (" | |||||||
> > | TCanvas *c1=new TCanvas (" | |||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Changed: | ||||||||
< < |
http://root.cern.ch/ "How to" page: http://root.cern.ch/drupal/content/howtos User's guide: http://root.cern.ch/drupal/content/users-guide Reference guide: http://root.cern.ch/drupal/content/reference-guide Run it: root -l Open a file: TFile *_file0 = TFile::Open("..... .root") File browser: TBrowser <name> List the directories: .ls <directory name>.cd() Print the tree: ntuple.Print() Scan the tree: ntuple.Scan("name of a Branch.name of a leaf") Make a new histogram: TH1F *name_of_the_histogram = new TH1F ("name","title",<#ofXaxis>,<#ofYaxis>,<#ofBins>); Make a new canvas: TCanvas *c1=new TCanvas ("name","title",1); Draw a histogram: name of the tree in the file.Draw("name of a Branch.name of a leaf") 2D histogram: name of the tree in the file.Draw("name of a Branch1.name of a leaf1:name of a Branch2.name of a leaf2") histogram with cut criteria: <name of the tree in the file>.Draw("<name of a Branch1>.<name of a leaf1,name of a Branch2>.<name of a leaf2><cut criteria>") draw two histogram in one canvas: <name of the tree in the file>.Draw("<name of a Branch1>.<name of a leaf1>") <name of the tree in the file>.Draw("<name of a Branch2>.<name of a leaf2>","","SAME") e.g.: tree.Draw("pelectron_1.tight:pelectron_1.loose","pelectron_1.tight>-1") Open an AOD file in root: gSystem->Load("libFWCoreFWLite"); AutoLibraryLoader ::enable(); TFile *_file0 = TFile::Open("rfio:/castor/cern.ch/user/........ .root") TBrowser b TChain: Chain.C: #include <TChain.h> void Chain(){ TChain tree("stopAnaMod/tree"); tree.AddFile("stopAnaNtuple_noselection_Chowder_00.root"); tree.Draw("event"); } Save a histogram to .eps: TCanvas *c1=new TCanvas ("name","title",1); <name of the tree in the file>.Draw("<name of a Branch>.<name of a leaf>"); c1->SaveAs("name.eps"); Usage of MakeClass : | |||||||
> > | How to use Root:http://root.cern.ch/ "How to" page: http://root.cern.ch/drupal/content/howtos User's guide: http://root.cern.ch/drupal/content/users-guide Reference guide: http://root.cern.ch/drupal/content/reference-guide Run it:root -lOpen a file:TFile *_file0 = TFile::Open("..... .root")File browser:TBrowser < name >List the directories:.ls< directory name >.cd() Print the tree:< ntuplename >.Print()Scan the tree:< ntuplename >.Scan("< name of a Branch >.< name of a leaf >")Make a new histogram:TH1F * = new TH1F ("name","",#ofXaxis,#ofYaxis,#ofBins);Make a new canvas:TCanvas *c1=new TCanvas ("name","",1);Draw a histogram:name of the tree in the file.Draw("name of a Branch.name of a leaf") 2D histogram:name of the tree in the file.Draw("name of a Branch1.name of a leaf1:name of a Branch2.name of a leaf2") histogram with cut criteria: _name of the tree in the file.Draw("name of a Branch1.name of a leaf1,name of a Branch2.name of a leaf2 cut criteria")_ draw two histogram in one canvas: < name of the tree in the file>.Draw(" e.g.: tree.Draw("pelectron_1.tight: pelectron_1.loose ","pelectron_1.tight>-1") Open an AOD file in root:gSystem->Load("libFWCoreFWLite");AutoLibraryLoader::enable(); TFile *_file0 = TFile::Open("rfio:/castor/cern.ch/user/........ .root") TBrowser b TChain:Chain.C:#include void Chain(){ TChain tree("stopAnaMod/tree"); tree.AddFile("stopAnaNtuple_noselection_Chowder_00.root"); tree.Draw("event"); } Save a histogram to .eps:TCanvas *=new TCanvas ("Usage of MakeClass : | |||||||
-- AnitaKapusi - 29 Jun 2009 |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
http://root.cern.ch/ "How to" page: http://root.cern.ch/drupal/content/howtos User's guide: http://root.cern.ch/drupal/content/users-guide Reference guide: http://root.cern.ch/drupal/content/reference-guide Run it: root -l Open a file: TFile *_file0 = TFile::Open("..... .root") File browser: TBrowser <name> List the directories: .ls <directory name>.cd() Print the tree: ntuple.Print() Scan the tree: ntuple.Scan("name of a Branch.name of a leaf") Make a new histogram: TH1F *name_of_the_histogram = new TH1F ("name","title",<#ofXaxis>,<#ofYaxis>,<#ofBins>); Make a new canvas: TCanvas *c1=new TCanvas ("name","title",1); Draw a histogram: name of the tree in the file.Draw("name of a Branch.name of a leaf") 2D histogram: name of the tree in the file.Draw("name of a Branch1.name of a leaf1:name of a Branch2.name of a leaf2") histogram with cut criteria: <name of the tree in the file>.Draw("<name of a Branch1>.<name of a leaf1,name of a Branch2>.<name of a leaf2><cut criteria>") draw two histogram in one canvas: <name of the tree in the file>.Draw("<name of a Branch1>.<name of a leaf1>") <name of the tree in the file>.Draw("<name of a Branch2>.<name of a leaf2>","","SAME") e.g.: tree.Draw("pelectron_1.tight:pelectron_1.loose","pelectron_1.tight>-1") Open an AOD file in root: gSystem->Load("libFWCoreFWLite"); AutoLibraryLoader ::enable(); TFile *_file0 = TFile::Open("rfio:/castor/cern.ch/user/........ .root") TBrowser b TChain: Chain.C: #include <TChain.h> void Chain(){ TChain tree("stopAnaMod/tree"); tree.AddFile("stopAnaNtuple_noselection_Chowder_00.root"); tree.Draw("event"); } Save a histogram to .eps: TCanvas *c1=new TCanvas ("name","title",1); <name of the tree in the file>.Draw("<name of a Branch>.<name of a leaf>"); c1->SaveAs("name.eps"); Usage of MakeClass : -- AnitaKapusi - 29 Jun 2009 |