]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSBeamTest.C
Static data member fgTop replaced with the static function GetTop();
[u/mrichter/AliRoot.git] / ITS / AliITSBeamTest.C
CommitLineData
7d62fb64 1///////////////////////////////////////////////////////
2// Macro to create the galice.root file for ///
3// beam test analysis (using AliITSBeamTestDigitizer //
4// class). Before using AliITSBeamTestDigitizer it //
5// is necessary to run this macro to create the //
6// galice.root file. //
7// Options: Nov04 for integrated //
8// ITS beam test November 2004 //
9// //
10// Aug04 for SDD beam test August 2004 //
11// E. Crescio: crescio@to.infn.it //
12///////////////////////////////////////////////////////
13
14void AliITSBeamTest(Char_t* opt="Nov04"){
15
16 TString choice(opt);
17 Bool_t aug04 = choice.Contains("Aug04");
18 Bool_t nov04 = choice.Contains("Nov04");
19
20 AliRunLoader* rl = AliRunLoader::Open("galice.root",
21 AliConfig::GetDefaultEventFolderName(),"recreate");
22
23 gAlice->SetRunLoader(rl);
24 rl->SetEventFolderName();
25
26 AliITS* bt;
27 if(nov04){
28 if(gGeoManager) delete gGeoManager;
29 gGeoManager = new TGeoManager("ITSGeometry","ITS Simulation Geometry Manager");
30 TGeoMaterial *vacmat = new TGeoMaterial("Vacuum",0,0,0);
31 TGeoMedium *vacmed = new TGeoMedium("Vacuum_med",1,vacmat);
32 TGeoVolume *aLICE = gGeoManager->MakeBox("ALICE",vacmed,100.,100.,200.);
33 gGeoManager->SetTopVolume(aLICE);
34 bt = new AliITSvBeamTestITS04("ITS","ITS beam test");
35 bt->CreateGeometry();
36 bt->Init();
37 }
38 if(aug04){
39 bt = new AliITSvSDD03("ITS",2004);
40 gSystem->Load("libgeant321");
41 new TGeant3("C++ Interface to Geant3");
42 if(strcmp(gMC->GetName(),"TGeant3")) {
43 Fatal("Init","TGeant3 should be instantiated in advance");
44 return;
45 }
46 bt->CreateMaterials();
47 bt->CreateGeometry();
48 bt->Init();
49 }
50 gAlice->AddModule(bt);
51 bt->SetDefaults();
52 rl->AddLoader(bt);
53 // rl->MakeTree("E");
54 //rl->WriteHeader("OVERWRITE");
55 rl->WriteRunLoader("OVERWRITE");
56 rl->WriteAliRun("OVERWRITE");
57
58}