StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CentralityMaker.cxx
1 //----------------------------------------------------------------------------------------------------
2 // $Id: CentralityMaker.cxx,v 1.4 2021/05/17 09:07:05 tnonaka Exp $
3 // $Log: CentralityMaker.cxx,v $
4 // Revision 1.4 2021/05/17 09:07:05 tnonaka
5 // Refmult centrality definition for isobaric data
6 //
7 // Revision 1.3 2020/01/16 23:51:55 tnonaka
8 // gRefmult for Run14 and Run16 added
9 //
10 // Revision 1.2 2019/07/11 03:28:49 tnonaka
11 // Toftray commented out
12 //
13 // Revision 1.5 2015/05/22 06:51:56 hmasui
14 // Add grefmult for Run14 Au+Au 200 GeV
15 //
16 // Revision 1.4 2013/05/10 18:33:33 hmasui
17 // Add TOF tray mult, preliminary update for Run12 U+U
18 //
19 // Revision 1.3 2012/05/19 00:49:16 hmasui
20 // Update refmult3
21 //
22 // Revision 1.2 2012/05/08 03:19:36 hmasui
23 // Move parameters to Centrality_def_refmult.txt
24 //
25 // Revision 1.1 2012/04/23 21:32:12 hmasui
26 // Interface for future extention of centrality correction maker to other centrality measures, like refmult2
27 //
28 //
29 //----------------------------------------------------------------------------------------------------
30 
31 #include <iostream>
32 #include "StRefMultCorr.h"
33 #include "CentralityMaker.h"
34 
35 using std::cout ;
36 using std::endl ;
37 
38 ClassImp(CentralityMaker)
39 
40 CentralityMaker* CentralityMaker::fInstance = 0 ;
41 
42 //_________________
44  // Create instance for centrality classes
45  fRefMultCorr = new StRefMultCorr("refmult") ;
46  fRefMult2Corr = new StRefMultCorr("refmult2") ;
47  fRefMult3Corr = new StRefMultCorr("refmult3") ;
48  fRefMultCorr_Isobar = new StRefMultCorr("refmult","Isobar") ;
49  fRefMultCorrFxt = new StRefMultCorr("fxtmult");
50  fRefMult6Corr = new StRefMultCorr("refmult6");
51  fRefMult6Corr = new StRefMultCorr("totnmip");
52  // fTofTrayMultCorr = new StRefMultCorr("toftray") ;
53  fgRefMultCorr = new StRefMultCorr("grefmult") ;
54  fgRefMultCorr_Run14_AuAu200_VpdMB5_P16id = new StRefMultCorr("grefmult","Run14_AuAu200_VpdMB5","P16id") ;
55  fgRefMultCorr_Run14_AuAu200_VpdMB30_P16id = new StRefMultCorr("grefmult","Run14_AuAu200_VpdMB30","P16id") ;
56  fgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_LowMid_P16id = new StRefMultCorr("grefmult","Run14_AuAu200_VpdMBnoVtx_LowMid","P16id") ;
57  fgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_High_P15ic = new StRefMultCorr("grefmult","Run14_AuAu200_VpdMBnoVtx_High","P15ic") ;
58  fgRefMultCorr_Run16_AuAu200_VpdMB5_P16ij = new StRefMultCorr("grefmult","Run16_AuAu200_VpdMB5","P16ij") ;
59  fgRefMultCorr_Run16_AuAu200_VpdMBnoVtx_P16ij = new StRefMultCorr("grefmult","Run16_AuAu200_VpdMBnoVtx","P16ij") ;
60 }
61 
62 //_________________
63 CentralityMaker::~CentralityMaker(){
64  /* empty */
65 }
66 
67 //_________________
68 CentralityMaker* CentralityMaker::instance() {
69  if ( !fInstance ) {
70  // Initialize StRefMultCorr only once
71  fInstance = new CentralityMaker() ;
72  }
73 
74  return fInstance ;
75 }
76 
77 //_________________
79  return fRefMultCorr ;
80 }
81 
82 //_________________
83 StRefMultCorr* CentralityMaker::getRefMult2Corr() {
84  return fRefMult2Corr ;
85 }
86 
87 //_________________
88 StRefMultCorr* CentralityMaker::getRefMult3Corr() {
89  return fRefMult3Corr ;
90 }
91 
92 //_________________
93 StRefMultCorr* CentralityMaker::getRefMultCorr_Isobar() {
94  return fRefMultCorr_Isobar ;
95 }
96 
97 //_________________
98 StRefMultCorr* CentralityMaker::getRefMultCorrFxt() {
99  return fRefMultCorrFxt;
100 }
101 
102 //_________________
103 StRefMultCorr* CentralityMaker::getRefMult6Corr() {
104  return fRefMult6Corr;
105 }
106 
107 //_________________
108 StRefMultCorr* CentralityMaker::getTotnMIPCorr() {
109  return fTotnMIPCorr;
110 }
111 
112 /*
113 //_________________
114 StRefMultCorr* CentralityMaker::getTofTrayMultCorr() {
115  return fTofTrayMultCorr ;
116 }
117 */
118 
119 //_________________
120 StRefMultCorr* CentralityMaker::getgRefMultCorr() {
121  return fgRefMultCorr ;
122 }
123 
124 //_________________
125 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run14_AuAu200_VpdMB5_P16id() {
126  return fgRefMultCorr_Run14_AuAu200_VpdMB5_P16id ;
127 }
128 
129 //_________________
130 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run14_AuAu200_VpdMB30_P16id() {
131  return fgRefMultCorr_Run14_AuAu200_VpdMB30_P16id ;
132 }
133 
134 //_________________
135 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_LowMid_P16id() {
136  return fgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_LowMid_P16id ;
137 }
138 
139 //_________________
140 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_High_P15ic() {
141  return fgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_High_P15ic ;
142 }
143 
144 //_________________
145 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run16_AuAu200_VpdMB5_P16ij() {
146  return fgRefMultCorr_Run16_AuAu200_VpdMB5_P16ij ;
147 }
148 
149 //_________________
150 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run16_AuAu200_VpdMBnoVtx_P16ij() {
151  return fgRefMultCorr_Run16_AuAu200_VpdMBnoVtx_P16ij ;
152 }
153 
154 //_________________
155 void CentralityMaker::help() const {
156  cout << endl;
157  cout << "//------------------------------------------------------------------------------" << endl;
158  cout << "How to get centrality bins by CentralityMaker ?" << endl;
159  cout << " (Please also take a look at StRoot/StRefMultCorr/macros/getCentralityBins.C" << endl;
160  cout << endl;
161  cout << "1. Initialize run index to read proper data base" << endl;
162  cout << " Suppose we want to get centrality from refmult at run index 11078000" << endl;
163  cout << endl;
164  cout << " // NOTE:" << endl;
165  cout << " // Use BBC coincidence rate (NOT ZDC coincidence rate) for refmult2)" << endl;
166  cout << " StRefMultCorr* refmultCorr = CentralityMaker::instance()->getRefMultCorr();" << endl;
167  cout << " refmultCorr->init(11078000);" << endl;
168  cout << endl;
169  cout << "2. Initialize relevant variables event-by-event" << endl;
170  cout << endl;
171  cout << " // NOTE:" << endl;
172  cout << " // 1st argument is original multiplicity" << endl;
173  cout << " // If one wants to have centrality from refmult2, you have to put refmult2" << endl;
174  cout << " refmultCorr->initEvent(refmult, vz, zdcCoincidenceRate);" << endl;
175  cout << endl;
176  cout << "3. Get centrality bins" << endl;
177  cout << endl;
178  cout << " const Int_t cent16 = refmultCorr->getCentralityBin16() ;" << endl;
179  cout << " const Int_t cent9 = refmultCorr->getCentralityBin9() ;" << endl;
180  cout << "//------------------------------------------------------------------------------" << endl;
181  cout << endl;
182 }
183 
184 
StRefMultCorr * getRefMultCorr()
Default destructor.