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  const TString outputFileName = "fastmcglauber.root",
22  const UInt_t nevents = 1000,
23  const TString system = "AuAu",
24  const Double_t energy = 200,
25  const TString type = "default",
26  const Bool_t isDeformed = kFALSE,
27  const Double_t replusionDistance = 0.0
28 ){
29  gBenchmark->Start("doFastGlauberMcMaker");
30 
31  gSystem->Load("St_base");
32  gSystem->Load("StUtilities");
33  gSystem->Load("StGlauberUtilities");
34  gSystem->Load("StCentralityMaker");
35  gSystem->Load("StGlauberTree");
36  gSystem->Load("StFastGlauberMcMaker");
37 
38  StFastGlauberMcMaker* maker = new StFastGlauberMcMaker(outputFileName, system, energy, type, isDeformed);
39 // maker->DebugOn();
40 
41  // Print available types
42  maker->Print("type");
43 
44  // Smearing option will be added in type later
45 // maker->DoHardCoreSmearing() ; // Hard-core smearing ON
46 // maker->DoGaussianSmearing() ; // Gaussian smearing ON
47 
48  // Repulsion option will be added in type later
49 // maker->SetRepulsionDistance(replusionDistance); // Repulsion distance between two nucleons
50 
51  // Collision profile were already added (default is hard-core)
52  // specify "gauss" in type for Gaussian collision profile
53 // if( collisionProfile == 0 ) maker->DoHardCoreCollision() ;
54 // if( collisionProfile == 1 ) maker->DoGaussianCollision() ;
55 
56  // Run nevents
57  maker->Run(nevents);
58 
59  // Close ROOT file etc
60  maker->Finish();
61 
62  gBenchmark->Stop("doFastGlauberMcMaker");
63  gBenchmark->Show("doFastGlauberMcMaker");
64  gBenchmark->Reset();
65 }
66 
67 
68 //____________________________________________________________________________________________________
69 // Specify all parameters by hand
70 void _doFastGlauberMcMaker(
71  const Char_t* outputFileName,
72  const UInt_t nevents = 1000,
73  const UInt_t A = 197,
74  const Double_t R = 6.38,
75  const Double_t d = 0.535,
76  const Double_t beta2 = -0.131,
77  const Double_t beta4 = -0.031,
78  const Double_t sigma = 4.2,
79  const Double_t energy = 200,
80  const Double_t replusionDistance = 0.9,
81  const UInt_t collisionProfile = 0 // 0=hard-core (default), 1=gaussian profile
82 ){
83  gBenchmark->Start("doFastGlauberMcMaker");
84 
85  gSystem->Load("StGlauberUtilities");
86  gSystem->Load("StCentralityMaker");
87  gSystem->Load("StFastGlauberMcMaker");
88 
89  StFastGlauberMcMaker* maker = new StFastGlauberMcMaker(outputFileName, A, R, d, beta2, beta4, sigma, energy);
90 
91  // Hard-core smearing ON
92 // maker->DoHardCoreSmearing() ;
93 
94  // Gaussian smearing ON
95 // maker->DoGaussianSmearing() ;
96 
97  // Repulsion distance between two nucleons
98  maker->SetRepulsionDistance(replusionDistance);
99 
100  // Collision profile
101  if( collisionProfile == 0 ) maker->DoHardCoreCollision() ;
102  if( collisionProfile == 1 ) maker->DoGaussianCollision() ;
103 
104  // Run nevents
105  maker->Run(nevents);
106 
107  // Close ROOT file etc
108  maker->Finish();
109 
110  gBenchmark->Stop("doFastGlauberMcMaker");
111  gBenchmark->Show("doFastGlauberMcMaker");
112  gBenchmark->Reset();
113 }
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.