StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
doFastGlauberMcMaker.C
1 //****************************************************************************************************
2 // Run Fast Monte Carlo Glauber simulation (StFastGlauberMcMaker)
3 //****************************************************************************************************
4 /****************************************************************************************************
5  * $Id: doFastGlauberMcMaker.C,v 1.3 2012/04/25 05:29:34 hmasui Exp $
6  * $Log: doFastGlauberMcMaker.C,v $
7  * Revision 1.3 2012/04/25 05:29:34 hmasui
8  * Added deformation flag
9  *
10  * Revision 1.2 2010/10/27 00:31:45 hmasui
11  * Added loading relevant STAR libs
12  *
13  * Revision 1.1 2010/06/24 23:41:40 hmasui
14  * Macro to run StFastGlauberMcMaker
15  *
16  ****************************************************************************************************/
17 
18 //____________________________________________________________________________________________________
19 // Specify the system by TString, detailed parameters will be defined inside StFastGlauberMcMaker
20 void doFastGlauberMcMaker
21 (
22  const TString outputFileName = "fastmcglauber.root",
23  const UInt_t nevents = 1000,
24  const TString system = "AuAu",
25  const Double_t energy = 200,
26  const TString type = "default",
27  const Bool_t isDeformed = kFALSE,
28  const Double_t replusionDistance = 0.0
29  )
30 {
31  gBenchmark->Start("doFastGlauberMcMaker");
32 
33  gSystem->Load("St_base");
34  gSystem->Load("StUtilities");
35  gSystem->Load("StGlauberUtilities");
36  gSystem->Load("StCentralityMaker");
37  gSystem->Load("StGlauberTree");
38  gSystem->Load("StFastGlauberMcMaker");
39 
40  StFastGlauberMcMaker* maker = new StFastGlauberMcMaker(outputFileName, system, energy, type, isDeformed);
41  // maker->DebugOn();
42 
43  // Print available types
44  maker->Print("type");
45 
46  // Smearing option will be added in type later
47  // maker->DoHardCoreSmearing() ; // Hard-core smearing ON
48  // maker->DoGaussianSmearing() ; // Gaussian smearing ON
49 
50  // Repulsion option will be added in type later
51  // maker->SetRepulsionDistance(replusionDistance); // Repulsion distance between two nucleons
52 
53  // Collision profile were already added (default is hard-core)
54  // specify "gauss" in type for Gaussian collision profile
55  // if( collisionProfile == 0 ) maker->DoHardCoreCollision() ;
56  // if( collisionProfile == 1 ) maker->DoGaussianCollision() ;
57 
58  // Run nevents
59  maker->Run(nevents);
60 
61  // Close ROOT file etc
62  maker->Finish();
63 
64  gBenchmark->Stop("doFastGlauberMcMaker");
65  gBenchmark->Show("doFastGlauberMcMaker");
66  gBenchmark->Reset();
67 }
68 //____________________________________________________________________________________________________
69 // Specify all parameters by hand
70 void _doFastGlauberMcMaker
71 (
72  const Char_t* outputFileName,
73  const UInt_t nevents = 1000,
74  const UInt_t A = 197,
75  const Double_t R = 6.38,
76  const Double_t d = 0.535,
77  const Double_t beta2 = -0.131,
78  const Double_t beta4 = -0.031,
79  const Double_t sigma = 4.2,
80  const Double_t energy = 200,
81  const Double_t replusionDistance = 0.9,
82  const UInt_t collisionProfile = 0 // 0=hard-core (default), 1=gaussian profile
83  )
84 {
85  gBenchmark->Start("doFastGlauberMcMaker");
86  gSystem->Load("StGlauberUtilities");
87  gSystem->Load("StCentralityMaker");
88  gSystem->Load("StFastGlauberMcMaker");
89 
90  StFastGlauberMcMaker* maker = new StFastGlauberMcMaker(outputFileName, A, R, d, beta2, beta4, sigma, energy);
91 
92  // Hard-core smearing ON
93  // maker->DoHardCoreSmearing() ;
94 
95  // Gaussian smearing ON
96  // maker->DoGaussianSmearing() ;
97 
98  // Repulsion distance between two nucleons
99  maker->SetRepulsionDistance(replusionDistance);
100 
101  // Collision profile
102  if( collisionProfile == 0 ) maker->DoHardCoreCollision() ;
103  if( collisionProfile == 1 ) maker->DoGaussianCollision() ;
104 
105  // Run nevents
106  maker->Run(nevents);
107 
108  // Close ROOT file etc
109  maker->Finish();
110 
111  gBenchmark->Stop("doFastGlauberMcMaker");
112  gBenchmark->Show("doFastGlauberMcMaker");
113  gBenchmark->Reset();
114 }
Int_t Finish()
Run Make() by nevents.
void DoGaussianCollision()
Hard-core collision (default)
void Print(const TString option="") const
Gaussion profile collision.
void SetRepulsionDistance(const Double_t repulsionDistance)
Default destructor.
void DoHardCoreCollision()
Default is OFF.
Int_t Run(const UInt_t nevents)
Make one event.