Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
save_makeEmcCorr.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file save_makeEmcCorr.C
1 
2 {
3 
4  TFile f("emcal_newPatternCinco.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 
21  int ket = i/8;
22  // int ll = (6-abs(6-k));
23  int llet = ket%6;
24  int pket = j/8;
25  int ppkket = pket % 3;// + llet%2;
26 
27  corr = 0.88+llet*0.04 - 0.01+0.01*ppkket;
28 
29  if (ket > 2 && ket < 5)
30  corr = 0.88+3.5*0.04;
31 
32  if (ket == 9)
33  corr = 0.88+8*0.04;
34 
35  // int ket =
36 
37  /*
38  corr = 1.0/(0.9+ll*0.2);
39  // corr = 0.9+ll*0.2;
40  //corr = 0.3000000;
41  */
42  if (i%8==0&& j%128==0)
43  cout << "towid" << towid << " corr " << corr << endl;
44  t1.Fill();
45 
46  }
47  }
48 
49  f.Write();
50  // f.Close();
51 
52 
53 }