Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RhoFluct.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RhoFluct.cc
1 root -l hadd_RhoFluct.root <<EOF
2 
3 
4  TH1D* hparamt = new TH1D("hparamt", ";impactparam;N_{events}", 10000, 0.,22);
5  double x[11], p[11];
6  for (int i=0;i<11;++i) {
7  x[i] = .1*i;
8  }
9  T->Draw("impactparamt>>hparamt");
10  hparamt->GetQuantiles(11,x,p);
11  for (int i=0;i<11;++i) {
12  cout << " i("<<i<<") x("<<x[i]<<") q("<<q[i]<<")"<<endl;
13  }
14 
15 EOF
16 #define RhoFluct_cxx
17 #include "RhoFluct.h"
18 #include <TH2.h>
19 #include <TStyle.h>
20 #include <TCanvas.h>
21 
22 void RhoFluct::Loop()
23 {
24 // In a ROOT session, you can do:
25 // root> .L RhoFluct.C
26 // root> RhoFluct t
27 // root> t.GetEntry(12); // Fill t data members with entry number 12
28 // root> t.Show(); // Show values of entry 12
29 // root> t.Show(16); // Read and show values of entry 16
30 // root> t.Loop(); // Loop on all entries
31 //
32 
33 // This is the loop skeleton where:
34 // jentry is the global entry number in the chain
35 // ientry is the entry number in the current Tree
36 // Note that the argument to GetEntry must be:
37 // jentry for TChain::GetEntry
38 // ientry for TTree::GetEntry and TBranch::GetEntry
39 //
40 // To read only selected branches, Insert statements like:
41 // METHOD1:
42 // fChain->SetBranchStatus("*",0); // disable all branches
43 // fChain->SetBranchStatus("branchname",1); // activate branchname
44 // METHOD2: replace line
45 // fChain->GetEntry(jentry); //read all branches
46 //by b_branchname->GetEntry(ientry); //read only this branch
47  if (fChain == 0) return;
48 
49  Long64_t nentries = fChain->GetEntriesFast();
50 
51  Long64_t nbytes = 0, nb = 0;
52  for (Long64_t jentry=0; jentry<nentries;jentry++) {
53  Long64_t ientry = LoadTree(jentry);
54  if (ientry < 0) break;
55  nb = fChain->GetEntry(jentry); nbytes += nb;
56  // if (Cut(ientry) < 0) continue;
57  }
58 }