13 #include "StMessMgr.h"
14 #include "StNegativeBinomial.h"
15 #include "StCentrality.h"
16 #include "StCentralityMaker.h"
23 : mNBinomial(0), mCentrality(0)
25 LOG_INFO <<
"StCentralityMaker User needs to call Init(const Char_t* system) function to Initialize NBD (see below)" << endm;
31 StCentralityMaker::StCentralityMaker(
const Char_t* system)
32 : mNBinomial(0), mCentrality(0)
46 if(
id >= mNBinomial.size() ){
47 Error(
"StCentralityMaker::GetNegativeBinomial",
"Invalid index for negative binomial, id=%3d",
id);
51 return mNBinomial[id] ;
55 StCentrality* StCentralityMaker::GetCentrality(
const UInt_t
id)
const
57 if(
id >= mCentrality.size() ){
58 Error(
"StCentralityMaker::GetCentrality",
"Invalid index for centrality, id=%3d",
id);
62 return mCentrality[id] ;
70 const TString systemName(system);
72 LOG_INFO <<
"StCentralityMaker::Init Initialization for " << systemName.Data() << endm;
75 const TString type[] = {
"default",
"low",
"high"};
76 for(UInt_t
id=0;
id<3;
id++){
77 mCentrality.push_back(
new StCentrality(systemName, type[
id]) );
82 for(UInt_t
id=0;
id<3;
id++){
83 Bool_t isConstEfficiency = kFALSE ;
86 new StNegativeBinomial( mCentrality[
id]->GetNpp(), mCentrality[
id]->GetK(), mCentrality[
id]->GetX(),
87 mCentrality[
id]->GetEfficiency(), mCentrality[
id]->GetTriggerBias(), isConstEfficiency)
void Init(const Char_t *system="AuAu_200GeV")
static void help()
Default destructor.
virtual ~StCentralityMaker()
Call init(const Char_t* system)
const StNegativeBinomial * GetNegativeBinomial(const UInt_t id=0) const
Default destructor.