StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFastGlauberMcMaker.h
1 /******************************************************************************
2  * $Id: StFastGlauberMcMaker.h,v 1.4 2013/02/05 22:49:50 hmasui Exp $
3  * $Log: StFastGlauberMcMaker.h,v $
4  * Revision 1.4 2013/02/05 22:49:50 hmasui
5  * Added Pb and Cu nuclei
6  *
7  * Revision 1.3 2012/04/25 05:22:42 hmasui
8  * Added deformation parameters, higher order participant eccentricity with r^2 weight
9  *
10  * Revision 1.2 2010/11/20 19:03:11 hmasui
11  * Mode mode flag to StCentralityMaker. Use STAR logger rather than STD iostream
12  *
13 ******************************************************************************/
14 //====================================================================================================
15 // StFastGlauberMcMaker class
16 // Fast MC Glauber simulation
17 //
18 // In order to run the MC glauber simulation, you can do
19 // root4star -b
20 // [0] .L doFastGlauberMcMaker.C
21 // [1] doFastGlauberMcMaker("glauber.root", 1000, "AuAu", 200, "default", kFALSE);
22 // where 1st argument is output ROOT file name, 2nd is number of events,
23 // 3rd is the system, 4th is the center of mass energy
24 // and 5th is type. The available type can be checked by
25 // StFastGlauberMcMaker::Print("type");
26 //
27 // - The 5th argument is the flag of deformation. kFALSE (or false) gives
28 // spherical nuclei (default), kTRUE (or true) gives deformed nuclei.
29 // Deformation parameters are defined inside the class up to 4th order deformation.
30 //
31 // You can see the debugging messages by
32 // StFastGlauberMcMaker::DebugOn()
33 // in case you need further checks of outputs
34 //
35 //----------------------------------------------------------------------------------------------------
36 // Hiroshi Masui (HMasui@lbl.gov)
37 //====================================================================================================
38 
39 #ifndef __StFastGlauberMcMaker_h__
40 #define __StFastGlauberMcMaker_h__
41 
42 class TF1 ;
43 class TF2 ;
44 class TF3 ;
45 class TGraph ;
46 class TH1 ;
47 class TTree ;
48 class Nucleon ;
49 class StCentralityMaker ;
50 class StGlauberTree ;
51 #include <vector>
52 #include "TString.h"
53 
54 //____________________________________________________________________________________________________
55 // Class StFastGlauberMcMaker: Fast Glauber Monte Carlo
57  public:
58  // Default constructor (spherical Au+Au), and output file "fastglaubermc.root"
60 
62  // Current available system:
63  // AuAu
64  //
65  // Current available type
66  // default
67  // large Large R(+2%), small d(-10%)
68  // small Small R(-2%), large d(+10%)
69  // largeXsec Large inelastic NN cross section (+1mb)
70  // smallXsec Small inelastic NN cross section (-1mb)
71  // gauss Use gaussian collision profile
73  const TString outputFileName, // Output fileName
74  const TString system, // System name (e.x. AuAu)
75  const Double_t energy, // energy (GeV)
76  const TString type, // type (see above)
77  const Bool_t isDeformed = kFALSE // Deformation flag
78  );
79 
82  const TString outputFileName,
83  const UInt_t massNumber, // Mass number of nucleus
84  const Double_t radius, // Radius of nucleus
85  const Double_t skinDepth, // Skin depth of nucleus
86  const Double_t beta2, // 2nd order deformation parameter
87  const Double_t beta4, // 4th order deformation parameter
88  const Double_t inelasticCrossSection, // Inelastic NN cross section
89  const Double_t energy // sqrt(sNN)
90  );
91 
94  const TString outputFileName,
95  const UInt_t massNumberA, // Mass number of nucleus for nucleus A
96  const Double_t radiusA, // Radius of nucleus for nucleus A
97  const Double_t skinDepthA, // Skin depth of nucleus for nucleus A
98  const Double_t beta2A, // 2nd order deformation parameter for nucleus A
99  const Double_t beta4A, // 4th order deformation parameter for nucleus A
100  const UInt_t massNumberB, // Mass number of nucleus for nucleus B
101  const Double_t radiusB, // Radius of nucleus for nucleus B
102  const Double_t skinDepthB, // Skin depth of nucleus for nucleus B
103  const Double_t beta2B, // 2nd order deformation parameter for nucleus B
104  const Double_t beta4B, // 4th order deformation parameter for nucleus B
105  const Double_t inelasticCrossSection, // Inelastic NN cross section
106  const Double_t energy // sqrt(sNN)
107  );
108 
109  virtual ~StFastGlauberMcMaker();
110 
112  void SetRepulsionDistance(const Double_t repulsionDistance);
113 
114  Int_t Make() ;
115  Int_t Run(const UInt_t nevents) ;
116  Int_t Finish() ;
117 
119  void DoHardCoreSmearing() ;
120 
122  void DoGaussianSmearing() ;
123 
125  void DoHardCoreCollision() ;
126  void DoGaussianCollision() ;
127 
129  // option=type print all available types
130  void Print(const TString option="") const ;
131 
132  void DebugOn() ;
133  UInt_t Version() const ;
134 
135  private:
136  // Functions
137  Int_t Clear() ;
138 
140  Int_t InitTree() ;
141 
143  Int_t Init(
144  const UInt_t massNumberA, // Mass number of nucleus for nucleus A
145  const Double_t radiusA, // Radius of nucleus for nucleus A
146  const Double_t skinDepthA, // Skin depth of nucleus for nucleus A
147  const Double_t beta2A, // 2nd order deformation parameter for nucleus A
148  const Double_t beta4A, // 4th order deformation parameter for nucleus A
149  const UInt_t massNumberB, // Mass number of nucleus for nucleus B
150  const Double_t radiusB, // Radius of nucleus for nucleus B
151  const Double_t skinDepthB, // Skin depth of nucleus for nucleus B
152  const Double_t beta2B, // 2nd order deformation parameter for nucleus B
153  const Double_t beta4B, // 4th order deformation parameter for nucleus B
154  const TString type = "default"
155  );
156 
158  Int_t InitAuAu(const TString type) ;
159  Int_t InitSmSm(const TString type) ;
160  Int_t InitUU(const TString type) ;
161  Int_t InitPbPb(const TString type) ;
162  Int_t InitCuCu(const TString type) ;
163  Int_t InitZrZr(const TString type, int Case) ;
164  Int_t InitRuRu(const TString type, int Case) ;
165 
167  Bool_t IsCollision(Nucleon* nucleon0, Nucleon* nucleon1) const ;
168 
170  const Char_t* GetName(const UInt_t massNumber) const ;
171  Double_t GetInelasticNNCrossSection(const Double_t energy, const TString type) const ;
172  void GetRThetaPhi(const UInt_t inucleus,
173  Double_t& r, Double_t& theta, Double_t& phi) const ;
174 
176  void Smearing(Double_t& r, Double_t& theta, Double_t& phi) const ;
177 
183  //
184  // TGraph::GetY()[0] <r_T^2 * cos(n*phi)>
185  // TGraph::GetY()[1] <r_T^2 * sin(n*phi)>
186  // TGraph::GetY()[2] n * Psi = tan^{-1}(q_{y;n}, q_{x;n})
187  // TGraph::GetY()[3] eps_{part;n}
188  TGraph* GetParticipantEccentricity(const Double_t order, const Double_t sumx, const Double_t sumy,
189  const Double_t sumw, const UInt_t weightId) const ;
190 
191  //____________________________________________________________________________________________________
192  // Data members
193 
194  // For collision profile
195  enum {
196  mkHardCoreProfile = 0,
197  mkGaussianProfile = 1
198  };
199 
200  // Version control
201  static const UInt_t mVersion ;
202 
203  const Double_t mEnergy ;
204  const TString mOutputFileName ;
205  Double_t mInelasticNNCrossSection ;
206 
207  UInt_t mDebug ;
208 
209  // Switches
210  Double_t mRepulsionDistance ;
211 
212  // NOTE: Only one smearing method can be applied
213  // Another option will be switched off when one turn on one of them
214  Bool_t mHardCoreSmearing ;
215  Bool_t mGaussianSmearing ;
217  UInt_t mCollisionProfile ;
219 
220  UInt_t mMode ;
221  Bool_t mIsDeformed[2] ;
222 
223  StCentralityMaker* mCentralityMaker ;
224  std::vector<Nucleon*> mNucleons[2] ;
225  TF1* mfWoodsSaxon[2] ;
226  TF2* mfWoodsSaxon2D[2] ;
227 
228  UInt_t mNeventsThrow ;
229  UInt_t mNeventsAccept ;
230  TTree* mHeader ;
231 
232  // Output data in tree
233  StGlauberTree* mGlauberTree ;
234 
235  // QA histograms
236  TH1* mhWoodsSaxon[4] ;
237 
239  // Random number generator
240  TF1* mfB ;
241  TF3* mfHardCore ;
242  TF3* mfGaussian ;
243 
244  ClassDef(StFastGlauberMcMaker, 1)
245 };
246 
247 #endif
248 
Int_t Finish()
Run Make() by nevents.
void DoGaussianCollision()
Hard-core collision (default)
StFastGlauberMcMaker()
Current version.
void Print(const TString option="") const
Gaussion profile collision.
void SetRepulsionDistance(const Double_t repulsionDistance)
Default destructor.
void DoHardCoreCollision()
Default is OFF.
void DoGaussianSmearing()
Default is OFF.
virtual ~StFastGlauberMcMaker()
Default constructor.
void DoHardCoreSmearing()
Finish maker.
UInt_t Version() const
Debug Mode ON.
Definition: Nucleon.h:9
Int_t Run(const UInt_t nevents)
Make one event.