13 #ifndef __STESTRUCTCENTRALITY_H
14 #define __STESTRUCTCENTRALITY_H
18 enum StEStructCentType { ESNTracks=0, ESGenImpact };
23 double *mcentralities;
25 double *mpts, *mptcents;
26 int mnumpts, mnumptcents;
29 StEStructCentType mCentType;
32 StEStructCentrality(): mcentralities(0), mnumCentralities(0), mpts(0), mptcents(0),mnumpts(0), mnumptcents(0), warningCount(0), mCentType(ESNTracks) {};
40 double minCentrality(
int id);
41 double maxCentrality(
int id);
43 int centrality(
double impact );
44 double GetCentValue();
45 int ptIndex(
const double pt);
46 int ptCentrality(
const double cent);
48 void setCentralities(
const double* centralities,
const int num );
49 void setPtLimit(
const int index,
double pt );
50 int numCentralities();
51 double centralityLimit(
const int index );
53 void setPts(
const double* ptRange,
const int numPt,
54 const double* centRange,
const int numPtCent );
56 int numPtCentralities();
57 double ptLimit(
const int ptIndex );
58 double ptCentralityLimit(
const int ptCent );
60 void setCentTypeNTracks();
61 void setCentTypeImpact();
65 StEStructCentType getCentType();
72 inline double StEStructCentrality::GetCentValue() {
76 inline double StEStructCentrality::minCentrality(
int id){
77 if(mcentralities &&
id>=0 &&
id<mnumCentralities )
return mcentralities[id];
81 inline double StEStructCentrality::maxCentrality(
int id){
82 if(mcentralities &&
id>=0 &&
id<(mnumCentralities-1) )
return mcentralities[
id+1]-1;
87 inline void StEStructCentrality::setCentTypeNTracks() { mCentType=ESNTracks ;};
88 inline void StEStructCentrality::setCentTypeImpact() { mCentType=ESGenImpact;};
89 inline StEStructCentType StEStructCentrality::getCentType(){
return mCentType;};