51 #ifndef StuRefCentrality2_hh
52 #define StuRefCentrality2_hh
54 #include "StEventTypes.h"
56 uncorrectedMultiplicity(
StEvent& evt)
60 if (!primVtx)
return 0;
62 const StSPtrVecPrimaryTrack& tracks = primVtx->daughters();
63 size_t countedTracks = 0;
64 for (StSPtrVecPrimaryTrackConstIterator iter = tracks.begin(); iter != tracks.end(); iter++) {
66 if (track->flag()<=0 )
continue;
67 if (fabs(track->geometry()->momentum().pseudoRapidity())<0.75) ++countedTracks;
76 if (!primVtx)
return 0;
78 size_t countedTracks = uncorrectedMultiplicity(evt);
80 unsigned int cent[] = {0,14,30,60,107,176,271,400,569,675};
83 if (countedTracks < cent[1]) {
return 1; }
84 else if (countedTracks < cent[2]) {
return 2; }
85 else if (countedTracks < cent[3]) {
return 3; }
86 else if (countedTracks < cent[4]) {
return 4; }
87 else if (countedTracks < cent[5]) {
return 5; }
88 else if (countedTracks < cent[6]) {
return 6; }
89 else if (countedTracks < cent[7]) {
return 7; }
90 else if (countedTracks < cent[8]) {
return 8; }
91 else if (countedTracks < cent[9]) {
return 9; }
95 percentOfCentrality(
StEvent& evt)
99 if (!primVtx)
return -1.;
101 size_t countedTracks = uncorrectedMultiplicity(evt);
103 unsigned int cent[] = {0,14,30,60,107,176,271,400,569,675};
104 float percent[] ={1.00,0.80,0.70,0.60,0.50,0.40,0.30,0.20,0.10,0.05,0.00};
106 if (countedTracks < cent[1]) {
return percent[0]; }
107 else if (countedTracks < cent[2]) {
return percent[1]; }
108 else if (countedTracks < cent[3]) {
return percent[2]; }
109 else if (countedTracks < cent[4]) {
return percent[3]; }
110 else if (countedTracks < cent[5]) {
return percent[4]; }
111 else if (countedTracks < cent[6]) {
return percent[5]; }
112 else if (countedTracks < cent[7]) {
return percent[6]; }
113 else if (countedTracks < cent[8]) {
return percent[7]; }
114 else if (countedTracks < cent[9]) {
return percent[8]; }
115 else {
return percent[9]; }