Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
make_EmcCorr.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file make_EmcCorr.C
1 
2 {
3 
4  TFile f("inv_emcal_corr_sec12bands.root","recreate");
5  TTree t1("emc_corr_tree","");
6  Int_t towid;
7  Float_t corr;
8  t1.Branch("corr",&corr,"corr/F");
9  t1.Branch("towid",&towid,"towid/I");
10 
11  for (Int_t i=0;i< 96; i++) {
12 
13  int k = i/8;
14  // int ll = (6-abs(6-k));
15  int ll = k%6;
16 
17  for (int j=0; j < 256; j++) {
18 
19  towid = i*1000 + j;
20  corr = 1.0/(0.9+ll*0.2);
21  // corr = 0.9+ll*0.2;
22  //corr = 0.3000000;
23  if (i%8==0&& j%128==0)
24  cout << "towid" << towid << " corr " << corr << endl;
25  t1.Fill();
26 
27  }
28  }
29 
30  f.Write();
31  // f.Close();
32 
33 
34 }