StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGlauberConstUtilities.cxx
1 /******************************************************************************
2  * $Id: StGlauberConstUtilities.cxx,v 1.2 2012/04/25 04:55:04 hmasui Exp $
3  * $Log: StGlauberConstUtilities.cxx,v $
4  * Revision 1.2 2012/04/25 04:55:04 hmasui
5  * Expand centrality bins
6  *
7 ******************************************************************************/
8 
9 #include <assert.h>
10 #include "TError.h"
11 #include "StGlauberConstUtilities.h"
12 
13 //____________________________________________________________________________________________________
14 namespace StGlauberConstUtilities {
15  // Impact parameter
16  const UInt_t mBBin = 400 ;
17  const Double_t mBMax = 20.0 ;
18 
19  // Npart
20  const UInt_t mNpartBin = 500 ;
21  const Double_t mNpartMax = 500 ;
22 
23  // Ncoll
24  const UInt_t mNcollBin = 1800 ;
25  const Double_t mNcollMax = 1800 ;
26 
27  // Multiplicity
28  const UInt_t mMultiplicityBin = 2000 ;
29  const Double_t mMultiplicityMax = 2000 ;
30 
31  // Centrality
32  const UInt_t mCentralityBin = 36 ;
33  const Double_t mCentralityMin[] = { 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80,
34  0, 10, 20, 30, 40, 50, 60, 70, 10, 40, 0, 20, 40, 60, 20, 50, 0, 0, 7.5 };
35  const Double_t mCentralityMax[] = { 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 100,
36  10, 20, 30, 40, 50, 60, 70, 80, 40, 80, 20, 40, 60, 80, 50, 80, 60, 80, 30 };
37 };
38 
39 //____________________________________________________________________________________________________
40 const UInt_t StGlauberConstUtilities::GetImpactParameterBin()
41 {
42  return mBBin ;
43 }
44 
45 //____________________________________________________________________________________________________
46 const Double_t StGlauberConstUtilities::GetImpactParameterMax()
47 {
48  return mBMax ;
49 }
50 
51 //____________________________________________________________________________________________________
52 const UInt_t StGlauberConstUtilities::GetNpartBin()
53 {
54  return mNpartBin ;
55 }
56 
57 //____________________________________________________________________________________________________
58 const Double_t StGlauberConstUtilities::GetNpartMax()
59 {
60  return mNpartMax ;
61 }
62 
63 //____________________________________________________________________________________________________
64 const UInt_t StGlauberConstUtilities::GetNcollBin()
65 {
66  return mNcollBin ;
67 }
68 
69 //____________________________________________________________________________________________________
70 const Double_t StGlauberConstUtilities::GetNcollMax()
71 {
72  return mNcollMax ;
73 }
74 
75 //____________________________________________________________________________________________________
76 const UInt_t StGlauberConstUtilities::GetMultiplicityBin()
77 {
78  return mMultiplicityBin ;
79 }
80 
81 //____________________________________________________________________________________________________
82 const Double_t StGlauberConstUtilities::GetMultiplicityMax()
83 {
84  return mMultiplicityMax ;
85 }
86 
87 //____________________________________________________________________________________________________
88 const UInt_t StGlauberConstUtilities::GetCentralityBin()
89 {
90  return mCentralityBin ;
91 }
92 
93 //____________________________________________________________________________________________________
94 const Double_t StGlauberConstUtilities::GetCentralityMin(const UInt_t icent)
95 {
96  if( icent >= mCentralityBin ){
97  Error("StGlauberConstUtilities::GetCentralityMin", "Unknown centrality id, icent=%3d", icent);
98  assert(0);
99  }
100 
101  return mCentralityMin[icent] ;
102 }
103 
104 //____________________________________________________________________________________________________
105 const Double_t StGlauberConstUtilities::GetCentralityMax(const UInt_t icent)
106 {
107  if( icent >= mCentralityBin ){
108  Error("StGlauberConstUtilities::GetCentralityMax", "Unknown centrality id, icent=%3d", icent);
109  assert(0);
110  }
111 
112  return mCentralityMax[icent] ;
113 }
114 
115 
116 //____________________________________________________________________________________________________
117 const Bool_t StGlauberConstUtilities::IsCentralityOk(const UInt_t icent, const Double_t centrality)
118 {
119  if(icent>=mCentralityBin){
120  Error("StGlauberConstUtilities::IsCentralityOk", "Unknown centrality bin, icent=%3d", icent);
121  assert(0);
122  }
123 
124  return (centrality >= mCentralityMin[icent] && centrality < mCentralityMax[icent] );
125 }
126 
Definition: FJcore.h:367