#include "Centrality.h" //NOTE: This is now the same as what is filled in StHiMicroEvent as the Flow Centrality // definition -- JLK 15.apr.2002 NchCentrality centralityNch(int nCh) { if(nCh>=510) return kFive; else if(nCh>=431) return kTen; else if(nCh>=312) return kTwenty; else if(nCh>=217) return kThirty; else if(nCh>=146) return kForty; else if(nCh>=94) return kFifty; else if(nCh>=56) return kSixty; else if(nCh>=30) return kSeventy; else if(nCh>=14) return kEighty; else return kTotal; } int flowCentrality(int N) { // 4-June-2002 JLK //Updated with Zhangbu's new numbers for P02gc int cent[] = {14,30,56,94,146,217,312,431,510}; if (N < cent[0]) { return 0; } else if (N < cent[1]) { return 1; } else if (N < cent[2]) { return 2; } else if (N < cent[3]) { return 3; } else if (N < cent[4]) { return 4; } else if (N < cent[5]) { return 5; } else if (N < cent[6]) { return 6; } else if (N < cent[7]) { return 7; } else if (N < cent[8]) { return 8; } else { return 9; } } int flowCentralityHalf(int N) { //HALF FIELD AT 200 GEV int cent[] = {14,32,59,98,149,216,302,409,474}; if (N < cent[0]) { return 0; } else if (N < cent[1]) { return 1; } else if (N < cent[2]) { return 2; } else if (N < cent[3]) { return 3; } else if (N < cent[4]) { return 4; } else if (N < cent[5]) { return 5; } else if (N < cent[6]) { return 6; } else if (N < cent[7]) { return 7; } else if (N < cent[8]) { return 8; } else { return 9; } } int flowCentrality947Percent(int N) { //This is a test of how sensitive the yields are for //slight variations in our understanding of the //centrality bins. I took my vertex-effic-corrected //Nch distribution, assumed it contains 94.7% of the //total cross-section and calculated the bin boundaries: int cent[] = {13,28,54,92,145,217,310,431,507}; if (N < cent[0]) { return 0; } else if (N < cent[1]) { return 1; } else if (N < cent[2]) { return 2; } else if (N < cent[3]) { return 3; } else if (N < cent[4]) { return 4; } else if (N < cent[5]) { return 5; } else if (N < cent[6]) { return 6; } else if (N < cent[7]) { return 7; } else if (N < cent[8]) { return 8; } else { return 9; } } int flowCentrality967Percent(int N) { //This is a test of how sensitive the yields are for //slight variations in our understanding of the //centrality bins. I took my vertex-effic-corrected //Nch distribution, assumed it contains 94.7% + 2% of the //total cross-section and calculated the bin boundaries: int cent[] = {15,31,57,96,150,222,314,434,508}; if (N < cent[0]) { return 0; } else if (N < cent[1]) { return 1; } else if (N < cent[2]) { return 2; } else if (N < cent[3]) { return 3; } else if (N < cent[4]) { return 4; } else if (N < cent[5]) { return 5; } else if (N < cent[6]) { return 6; } else if (N < cent[7]) { return 7; } else if (N < cent[8]) { return 8; } else { return 9; } } int flowCentrality927Percent(int N) { //This is a test of how sensitive the yields are for //slight variations in our understanding of the //centrality bins. I took my vertex-effic-corrected //Nch distribution, assumed it contains 94.7% - 2% of the //total cross-section and calculated the bin boundaries: int cent[] = {12,25,50,87,140,212,305,428,505}; if (N < cent[0]) { return 0; } else if (N < cent[1]) { return 1; } else if (N < cent[2]) { return 2; } else if (N < cent[3]) { return 3; } else if (N < cent[4]) { return 4; } else if (N < cent[5]) { return 5; } else if (N < cent[6]) { return 6; } else if (N < cent[7]) { return 7; } else if (N < cent[8]) { return 8; } else { return 9; } } int centralityPercent(int N, int crossSection) { //This is a test of how sensitive the yields are for //slight variations in our understanding of the //centrality bins. For this test, I have taken //the uncorrected Nch distributions, assumed different //crossSection fractions, and figured out the //Nch bin limits. This will give the standard 200 GeV //STAR-wide limits if crossSection is not equal to one of the //special values... int cent[5][9] = { {14,30,56,94,146,217,312,431,510}, //STAR Standard {12,27,51,88,141,213,307,430,507}, //92 {17,34,61,100,155,226,318,437,511}, //97 {20,39,67,107,162,234,325,441,513}, //100 {23,42,71,112,167,238,329,444,515}}; //102 int centbin = 0; if( crossSection == 92) { centbin = 1; } else if( crossSection == 97) { centbin = 2; } else if( crossSection == 100) { centbin = 3; } else if( crossSection == 102) { centbin = 4; } else { return flowCentrality(N); } if (N < cent[centbin][0]) { return 0; } else if (N < cent[centbin][1]) { return 1; } else if (N < cent[centbin][2]) { return 2; } else if (N < cent[centbin][3]) { return 3; } else if (N < cent[centbin][4]) { return 4; } else if (N < cent[centbin][5]) { return 5; } else if (N < cent[centbin][6]) { return 6; } else if (N < cent[centbin][7]) { return 7; } else if (N < cent[centbin][8]) { return 8; } else { return 9; } }