80 likes | 214 Views
Root analysis. yao. Code & file. Code:/usrX/shyao/mysql2root/r321/MySQLtoROOT2.cc line 25~207 File:/sp8data11/shyao/rootfile/r321test.root. run. Spill. event. dimuon. track. track. track. track. track. hit. hit. hit. hit. hit. Event packet. $ root
E N D
Root analysis yao
Code & file • Code:/usrX/shyao/mysql2root/r321/MySQLtoROOT2.cc line 25~207 • File:/sp8data11/shyao/rootfile/r321test.root
run Spill event dimuon track track track track track hit hit hit hit hit
Event packet $ root root [] Tfile f(“/sp8data11/shyao/rootfile/r321test.root”) root [] f->ls() TFile** r321test.root production_dimuonR321 Tree TFile* r321test.root production_dimuonR321 Tree KEY: TTree r321;2 A tree with data taken from SQL, 2010/11/22 KEY: TTree r321;1 A tree with data taken from SQL, 2010/11/22 KEY: TTree event;15 title KEY: TTree event;14 title Root [] event->Print()
*tree :event : title Event *Br 0 :runID : runID/I *Br 1 :eventID : eventID/I *Br 2 :nDimuons : nDimuons/I *Br 3 :mWeight : mWeight/D *Br 4 :mProcessCode : mProcessCode[32]/C *Br 5 :ntracks : ntracks/I dimuon *Br 6 :dimuonID : dimuonID/I *Br 7 :trackID1 : trackID1/I *Br 8 :trackID2 : trackID2/I *Br 9 :mass : mass/D …xxx… track *Br 26 :trackID : trackID[ntracks]/I *Br 27 :x0 : x0[ntracks]/D …xxx… *Br 39 :ke0 : ke0[ntracks]/D
Draw Root [] event->Draw(“event.ntracks”) Root [] event->Draw(“event.x0”) Root [] event->Draw(“event.x0[]”) Root [] event->Draw(“event.x0[0]”) Root [] event->Draw(“event.x0[0]: event.eventID”) Root [] event->Draw(“event.x0[0]:event.eventID”, ”event.eventID<1000”) Root [] event->Draw(“event.x0[0]:event.eventID”, ”event.eventID<1000&& event.eventID>100”) Root [] event->Draw(“event.x0”,””,”E”)//error bar Root [] event->Draw(“event.x0”,””,”same”)//painting on the same canvas Root [] event->Draw(“event.x0”,””,””,1000)//entries
Scan Root [] event->Scan()//first 8 varables Root [] event->Scan(“*”)//all the varables Root [] event->Scan(“var1:var2:var3”) Root [] event->Scan(“var1:var2:var3”,”var1==0”) Root [] event->SetScanField(0) Root [] event->Scan(“*”); >temp Root [] event->Scan(“ntracks:x0”); *********************************************** * Row * Instance * ntracks * x0 * *********************************************** * 0 * 0 * 24 * -0.129800 * * 0 * 1 * 24 * -0.129800 * * 0 * 2 * 24 * 19.029987 *
Show Root [] event->Show(1234)