StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Centrality.cc
1 
2 #include "Centrality.h"
3 
4 //NOTE: This is now the same as what is filled in StHiMicroEvent as the Flow Centrality
5 // definition -- JLK 15.apr.2002
6 
7 
8  NchCentrality centralityNch(int nCh)
9 {
10 
11  // 4-June-2002 JLK
12  //Updated with Zhangbu's new numbers for P02gc
13 
14  if(nCh>=510) return kFive;
15  else if(nCh>=431) return kTen;
16  else if(nCh>=312) return kTwenty;
17  else if(nCh>=217) return kThirty;
18  else if(nCh>=146) return kForty;
19  else if(nCh>=94) return kFifty;
20  else if(nCh>=56) return kSixty;
21  else if(nCh>=30) return kSeventy;
22  else if(nCh>=14) return kEighty;
23  else return kTotal;
24 
25 }
26 
27 int flowCentrality(int N)
28 {
29 
30  // 4-June-2002 JLK
31  //Updated with Zhangbu's new numbers for P02gc
32 
33  int cent[] = {14,30,56,94,146,217,312,431,510};
34  if (N < cent[0]) { return 0; }
35  else if (N < cent[1]) { return 1; }
36  else if (N < cent[2]) { return 2; }
37  else if (N < cent[3]) { return 3; }
38  else if (N < cent[4]) { return 4; }
39  else if (N < cent[5]) { return 5; }
40  else if (N < cent[6]) { return 6; }
41  else if (N < cent[7]) { return 7; }
42  else if (N < cent[8]) { return 8; }
43  else { return 9; }
44 
45 }
46