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  // fTofTrayMultCorr = new StRefMultCorr("toftray") ;
52  fgRefMultCorr = new StRefMultCorr("grefmult") ;
53  fgRefMultCorr_Run14_AuAu200_VpdMB5_P16id = new StRefMultCorr("grefmult","Run14_AuAu200_VpdMB5","P16id") ;
54  fgRefMultCorr_Run14_AuAu200_VpdMB30_P16id = new StRefMultCorr("grefmult","Run14_AuAu200_VpdMB30","P16id") ;
55  fgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_LowMid_P16id = new StRefMultCorr("grefmult","Run14_AuAu200_VpdMBnoVtx_LowMid","P16id") ;
56  fgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_High_P15ic = new StRefMultCorr("grefmult","Run14_AuAu200_VpdMBnoVtx_High","P15ic") ;
57  fgRefMultCorr_Run16_AuAu200_VpdMB5_P16ij = new StRefMultCorr("grefmult","Run16_AuAu200_VpdMB5","P16ij") ;
58  fgRefMultCorr_Run16_AuAu200_VpdMBnoVtx_P16ij = new StRefMultCorr("grefmult","Run16_AuAu200_VpdMBnoVtx","P16ij") ;
59 }
60 
61 //_________________
62 CentralityMaker::~CentralityMaker(){
63  /* empty */
64 }
65 
66 //_________________
67 CentralityMaker* CentralityMaker::instance() {
68  if ( !fInstance ) {
69  // Initialize StRefMultCorr only once
70  fInstance = new CentralityMaker() ;
71  }
72 
73  return fInstance ;
74 }
75 
76 //_________________
78  return fRefMultCorr ;
79 }
80 
81 //_________________
82 StRefMultCorr* CentralityMaker::getRefMult2Corr() {
83  return fRefMult2Corr ;
84 }
85 
86 //_________________
87 StRefMultCorr* CentralityMaker::getRefMult3Corr() {
88  return fRefMult3Corr ;
89 }
90 
91 //_________________
92 StRefMultCorr* CentralityMaker::getRefMultCorr_Isobar() {
93  return fRefMultCorr_Isobar ;
94 }
95 
96 //_________________
97 StRefMultCorr* CentralityMaker::getRefMultCorrFxt() {
98  return fRefMultCorrFxt;
99 }
100 
101 /*
102 //_________________
103 StRefMultCorr* CentralityMaker::getRefMult6Corr() {
104  return fRefMult6Corr;
105 }
106 */
107 
108 /*
109 //_________________
110 StRefMultCorr* CentralityMaker::getTofTrayMultCorr() {
111  return fTofTrayMultCorr ;
112 }
113 */
114 
115 //_________________
116 StRefMultCorr* CentralityMaker::getgRefMultCorr() {
117  return fgRefMultCorr ;
118 }
119 
120 //_________________
121 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run14_AuAu200_VpdMB5_P16id() {
122  return fgRefMultCorr_Run14_AuAu200_VpdMB5_P16id ;
123 }
124 
125 //_________________
126 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run14_AuAu200_VpdMB30_P16id() {
127  return fgRefMultCorr_Run14_AuAu200_VpdMB30_P16id ;
128 }
129 
130 //_________________
131 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_LowMid_P16id() {
132  return fgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_LowMid_P16id ;
133 }
134 
135 //_________________
136 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_High_P15ic() {
137  return fgRefMultCorr_Run14_AuAu200_VpdMBnoVtx_High_P15ic ;
138 }
139 
140 //_________________
141 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run16_AuAu200_VpdMB5_P16ij() {
142  return fgRefMultCorr_Run16_AuAu200_VpdMB5_P16ij ;
143 }
144 
145 //_________________
146 StRefMultCorr* CentralityMaker::getgRefMultCorr_Run16_AuAu200_VpdMBnoVtx_P16ij() {
147  return fgRefMultCorr_Run16_AuAu200_VpdMBnoVtx_P16ij ;
148 }
149 
150 //_________________
151 void CentralityMaker::help() const {
152  cout << endl;
153  cout << "//------------------------------------------------------------------------------" << endl;
154  cout << "How to get centrality bins by CentralityMaker ?" << endl;
155  cout << " (Please also take a look at StRoot/StRefMultCorr/macros/getCentralityBins.C" << endl;
156  cout << endl;
157  cout << "1. Initialize run index to read proper data base" << endl;
158  cout << " Suppose we want to get centrality from refmult at run index 11078000" << endl;
159  cout << endl;
160  cout << " // NOTE:" << endl;
161  cout << " // Use BBC coincidence rate (NOT ZDC coincidence rate) for refmult2)" << endl;
162  cout << " StRefMultCorr* refmultCorr = CentralityMaker::instance()->getRefMultCorr();" << endl;
163  cout << " refmultCorr->init(11078000);" << endl;
164  cout << endl;
165  cout << "2. Initialize relevant variables event-by-event" << endl;
166  cout << endl;
167  cout << " // NOTE:" << endl;
168  cout << " // 1st argument is original multiplicity" << endl;
169  cout << " // If one wants to have centrality from refmult2, you have to put refmult2" << endl;
170  cout << " refmultCorr->initEvent(refmult, vz, zdcCoincidenceRate);" << endl;
171  cout << endl;
172  cout << "3. Get centrality bins" << endl;
173  cout << endl;
174  cout << " const Int_t cent16 = refmultCorr->getCentralityBin16() ;" << endl;
175  cout << " const Int_t cent9 = refmultCorr->getCentralityBin9() ;" << endl;
176  cout << "//------------------------------------------------------------------------------" << endl;
177  cout << endl;
178 }
179 
180 
StRefMultCorr * getRefMultCorr()
Default destructor.