![]() |
|
|||
File indexing completed on 2025-08-06 08:14:12
0001 root -l hadd_RhoFluct.root <<EOF 0002 0003 0004 TH1D* hparamt = new TH1D("hparamt", ";impactparam;N_{events}", 10000, 0.,22); 0005 double x[11], p[11]; 0006 for (int i=0;i<11;++i) { 0007 x[i] = .1*i; 0008 } 0009 T->Draw("impactparamt>>hparamt"); 0010 hparamt->GetQuantiles(11,x,p); 0011 for (int i=0;i<11;++i) { 0012 cout << " i("<<i<<") x("<<x[i]<<") q("<<q[i]<<")"<<endl; 0013 } 0014 0015 EOF 0016 #define RhoFluct_cxx 0017 #include "RhoFluct.h" 0018 #include <TH2.h> 0019 #include <TStyle.h> 0020 #include <TCanvas.h> 0021 0022 void RhoFluct::Loop() 0023 { 0024 // In a ROOT session, you can do: 0025 // root> .L RhoFluct.C 0026 // root> RhoFluct t 0027 // root> t.GetEntry(12); // Fill t data members with entry number 12 0028 // root> t.Show(); // Show values of entry 12 0029 // root> t.Show(16); // Read and show values of entry 16 0030 // root> t.Loop(); // Loop on all entries 0031 // 0032 0033 // This is the loop skeleton where: 0034 // jentry is the global entry number in the chain 0035 // ientry is the entry number in the current Tree 0036 // Note that the argument to GetEntry must be: 0037 // jentry for TChain::GetEntry 0038 // ientry for TTree::GetEntry and TBranch::GetEntry 0039 // 0040 // To read only selected branches, Insert statements like: 0041 // METHOD1: 0042 // fChain->SetBranchStatus("*",0); // disable all branches 0043 // fChain->SetBranchStatus("branchname",1); // activate branchname 0044 // METHOD2: replace line 0045 // fChain->GetEntry(jentry); //read all branches 0046 //by b_branchname->GetEntry(ientry); //read only this branch 0047 if (fChain == 0) return; 0048 0049 Long64_t nentries = fChain->GetEntriesFast(); 0050 0051 Long64_t nbytes = 0, nb = 0; 0052 for (Long64_t jentry=0; jentry<nentries;jentry++) { 0053 Long64_t ientry = LoadTree(jentry); 0054 if (ientry < 0) break; 0055 nb = fChain->GetEntry(jentry); nbytes += nb; 0056 // if (Cut(ientry) < 0) continue; 0057 } 0058 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |