40 #ifndef StuRefCentrality_hh
41 #define StuRefCentrality_hh
43 #include "StEventTypes.h"
45 uncorrectedMultiplicity(
StEvent& evt)
49 if (!primVtx)
return 0;
51 const StSPtrVecPrimaryTrack& tracks = primVtx->daughters();
52 size_t countedTracks = 0;
53 for (StSPtrVecPrimaryTrackConstIterator iter = tracks.begin(); iter != tracks.end(); iter++) {
55 if (track->flag()<=0 )
continue;
56 if (fabs(track->geometry()->momentum().pseudoRapidity())<0.75) ++countedTracks;
61 meanScaledMultiplicity(
StEvent& evt)
65 if (!primVtx)
return -1.;
67 size_t countedTracks = uncorrectedMultiplicity(evt);
69 unsigned int cent[] = {20,100,180,270,360,460,560,660,870};
70 float meanNch[] = {0.067,0.175,0.282,0.391,0.502,0.615,0.730,0.877,1.00};
73 if (countedTracks < cent[0]) {
return 0.00; }
74 else if (countedTracks < cent[1]) {
return meanNch[0]; }
75 else if (countedTracks < cent[2]) {
return meanNch[1]; }
76 else if (countedTracks < cent[3]) {
return meanNch[2]; }
77 else if (countedTracks < cent[4]) {
return meanNch[3]; }
78 else if (countedTracks < cent[5]) {
return meanNch[4]; }
79 else if (countedTracks < cent[6]) {
return meanNch[5]; }
80 else if (countedTracks < cent[7]) {
return meanNch[6]; }
81 else if (countedTracks < cent[8]) {
return meanNch[7]; }
82 else {
return meanNch[8]; }
89 if (!primVtx)
return 10;
91 size_t countedTracks = uncorrectedMultiplicity(evt);
93 unsigned int cent[] = {20,100,180,270,360,460,560,660,870};
96 if (countedTracks < cent[0]) {
return 0; }
97 else if (countedTracks < cent[1]) {
return 1; }
98 else if (countedTracks < cent[2]) {
return 2; }
99 else if (countedTracks < cent[3]) {
return 3; }
100 else if (countedTracks < cent[4]) {
return 4; }
101 else if (countedTracks < cent[5]) {
return 5; }
102 else if (countedTracks < cent[6]) {
return 6; }
103 else if (countedTracks < cent[7]) {
return 7; }
104 else if (countedTracks < cent[8]) {
return 8; }
108 percentOfCentrality(
StEvent& evt)
112 if (!primVtx)
return -1.;
114 size_t countedTracks = uncorrectedMultiplicity(evt);
116 unsigned int cent[] = {20,100,180,270,360,460,560,660,870};
117 float percent[] = {0.85,0.58,0.45,0.34,0.26,0.18,0.11,0.06,0.00};
119 if (countedTracks < cent[0]) {
return 1.00; }
120 else if (countedTracks < cent[1]) {
return percent[0]; }
121 else if (countedTracks < cent[2]) {
return percent[1]; }
122 else if (countedTracks < cent[3]) {
return percent[2]; }
123 else if (countedTracks < cent[4]) {
return percent[3]; }
124 else if (countedTracks < cent[5]) {
return percent[4]; }
125 else if (countedTracks < cent[6]) {
return percent[5]; }
126 else if (countedTracks < cent[7]) {
return percent[6]; }
127 else if (countedTracks < cent[8]) {
return percent[7]; }
128 else {
return percent[8]; }