本文整理汇总了C++中AliGenCocktail::Init方法的典型用法代码示例。如果您正苦于以下问题:C++ AliGenCocktail::Init方法的具体用法?C++ AliGenCocktail::Init怎么用?C++ AliGenCocktail::Init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliGenCocktail
的用法示例。
在下文中一共展示了AliGenCocktail::Init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Config
void Config()
{
// ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
// Theta range given through pseudorapidity limits 22/6/2001
// Set Random Number seed
//gRandom->SetSeed(123456); // Set 0 to use the current time
AliLog::Message(AliLog::kInfo, Form("Seed for random number generation = %d",gRandom->GetSeed()), "Config.C", "Config.C", "Config()","Config.C", __LINE__);
new TGeant3TGeo("C++ Interface to Geant3");
AliRunLoader* rl=0x0;
AliLog::Message(AliLog::kInfo, "Creating Run Loader", "Config.C", "Config.C", "Config()"," Config.C", __LINE__);
rl = AliRunLoader::Open("galice.root",
AliConfig::GetDefaultEventFolderName(),
"recreate");
if (rl == 0x0)
{
gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
return;
}
rl->SetCompressionLevel(2);
rl->SetNumberOfEventsPerFile(3);
gAlice->SetRunLoader(rl);
// gAlice->SetGeometryFromFile("geometry.root");
// Uncomment if you want to load geometry from OCDB! >>>>
/*
if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
cout << "#####################################################" << endl;
cout << "# #" << endl;
cout << "# WARNING: CDB DEFAULT STORAGE NOT SET !!! #" << endl;
cout << "# SETTING IT TO local://$ALICE_ROOT/OCDB !!! #" << endl;
cout << "# #" << endl;
cout << "#####################################################" << endl;
AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
}
if(AliCDBManager::Instance()->GetRun() < 0){
cout << "#####################################################" << endl;
cout << "# #" << endl;
cout << "# WARNING: RUN NUMBER NOT SET !!! #" << endl;
cout << "# SETTING IT TO 0 !!! #" << endl;
cout << "# #" << endl;
cout << "#####################################################" << endl;
AliCDBManager::Instance()->SetRun(0);
}
gAlice->SetGeometryFromCDB();
*/
// Set the trigger configuration
AliSimulation::Instance()->SetTriggerConfig(pprTrigConfName[strig]);
cout<<"Trigger configuration is set to "<<pprTrigConfName[strig]<<endl;
//
// Set External decayer
TVirtualMCDecayer *decayer = new AliDecayerPythia();
decayer->SetForceDecay(kAll);
decayer->Init();
gMC->SetExternalDecayer(decayer);
//=======================================================================
// ************* STEERING parameters FOR ALICE SIMULATION **************
// --- Specify event type to be tracked through the ALICE setup
// --- All positions are in cm, angles in degrees, and P and E in GeV
gMC->SetProcess("DCAY",1);
gMC->SetProcess("PAIR",1);
gMC->SetProcess("COMP",1);
gMC->SetProcess("PHOT",1);
gMC->SetProcess("PFIS",0);
gMC->SetProcess("DRAY",0);
gMC->SetProcess("ANNI",1);
gMC->SetProcess("BREM",1);
gMC->SetProcess("MUNU",1);
gMC->SetProcess("CKOV",1);
gMC->SetProcess("HADR",1);
gMC->SetProcess("LOSS",2);
gMC->SetProcess("MULS",1);
gMC->SetProcess("RAYL",1);
Float_t cut = 1.e-3; // 1MeV cut by default
Float_t tofmax = 1.e10;
gMC->SetCut("CUTGAM", cut);
gMC->SetCut("CUTELE", cut);
gMC->SetCut("CUTNEU", cut);
gMC->SetCut("CUTHAD", cut);
//.........这里部分代码省略.........