]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/testconfig.C
Fix for transient fSDigits, AliITSRawStream classes adapted to changed AliRawReader...
[u/mrichter/AliRoot.git] / PHOS / testconfig.C
CommitLineData
c3f9ed2f 1void Config()
2{
3 // 7-DEC-2000 09:00
4 // Switch on Transition Radiation simulation. 6/12/00 18:00
5 // iZDC=1 7/12/00 09:00
6 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
7 // Theta range given through pseudorapidity limits 22/6/2001
8
9 // Set Random Number seed
10
11 TDatime dat ;
12 gRandom->SetSeed(dat.GetTime());
13
88cb7938 14 new AliGeant3("C++ Interface to Geant3");
15 AliRunLoader* rl;
16 if (!gSystem->Getenv("CONFIG_FILE"))
17 {
18 cout<<"Config.C: Creating Run Loader ..."<<endl;
19 rl = AliRunLoader::Open("galice.root",AliConfig::fgkDefaultEventFolderName,
20 "recreate");
21 if (rl == 0x0)
22 {
23 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
24 return;
25 }
26 rl->SetCompressionLevel(2);
27 rl->SetNumberOfEventsPerFile(2);
28 gAlice->SetRunLoader(rl);
29 }
c3f9ed2f 30
c3f9ed2f 31
c3f9ed2f 32 TGeant3 *geant3 = (TGeant3 *) gMC;
33
34 //
35 // Set External decayer
36 AliDecayer *decayer = new AliDecayerPythia();
37
38 decayer->SetForceDecay(kAll);
39 decayer->Init();
40 gMC->SetExternalDecayer(decayer);
41 //
42 //
43 //=======================================================================
44 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
45 geant3->SetTRIG(1); //Number of events to be processed
46 geant3->SetSWIT(4, 10);
47 geant3->SetDEBU(0, 0, 1);
48 //geant3->SetSWIT(2,2);
49 geant3->SetDCAY(1);
50 geant3->SetPAIR(1);
51 geant3->SetCOMP(1);
52 geant3->SetPHOT(1);
53 geant3->SetPFIS(0);
54 geant3->SetDRAY(0);
55 geant3->SetANNI(1);
56 geant3->SetBREM(1);
57 geant3->SetMUNU(1);
58 geant3->SetCKOV(1);
59 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
60 geant3->SetLOSS(2);
61 geant3->SetMULS(1);
62 geant3->SetRAYL(1);
63 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
64 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
65 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
66 geant3->SetERAN(5.e-7);
67
68 Float_t cut = 1.e-3; // 1MeV cut by default
69 Float_t tofmax = 1.e10;
70
71 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
72 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
73 tofmax);
74 //
75 //=======================================================================
76 // ************* STEERING parameters FOR ALICE SIMULATION **************
77 // --- Specify event type to be tracked through the ALICE setup
78 // --- All positions are in cm, angles in degrees, and P and E in GeV
79
80 int nParticles = 1;
81 AliGenBox *gener = new AliGenBox(nParticles);
c3f9ed2f 82 gener->SetPart(22) ;
83 gener->SetPtRange(9.99, 10.00);
69c46d16 84 gener->SetPhiRange(220, 320);
c3f9ed2f 85 // Set pseudorapidity range from -8 to 8.
69c46d16 86 Float_t thmin = EtaToTheta(0.12); // 220 theta min. <---> eta max
87 Float_t thmax = EtaToTheta(-0.12); // 320 theta max. <---> eta min
c3f9ed2f 88
89 gener->SetThetaRange(thmin, thmax);
90 gener->SetOrigin(0, 0, 0); //vertex position
91 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
92 gener->Init();
93 //
94 // Activate this line if you want the vertex smearing to happen
95 // track by track
96 //
97 //gener->SetVertexSmear(perTrack);
98
99 gAlice->SetField(0,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
100
101 //=================== Alice BODY parameters =============================
102 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
103
104
105 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
88cb7938 106
107 AliPHOSLoader* gim = 0x0;
108
109 cout<<"0: "<<gim<<endl;
110
111 gim = (AliPHOSLoader*)PHOS->MakeLoader(rl->GetEventFolder()->GetName());
112
113 cout<<"1: "<<gim<<endl;
114
115 AliPHOSQAMeanChecker * hm = static_cast<AliPHOSQAMeanChecker *>gim->QAtask("HitsMul");
116 AliPHOSQAMeanChecker * te = static_cast<AliPHOSQAMeanChecker *>gim->QAtask("TotEner");
117 AliPHOSQAMeanChecker * hmB = static_cast<AliPHOSQAMeanChecker *>gim->QAtask("HitsMulB");
118 AliPHOSQAMeanChecker * teB = static_cast<AliPHOSQAMeanChecker *>gim->QAtask("TotEnerB");
c3f9ed2f 119 hm->Set(62.18, 23.81) ;
120 hm->Print() ;
121 te->Set(8.092, 3.06) ;
122 hmB->Set(63.498, 24.348) ;
123 teB->Set(8.363, 3.44) ;
88cb7938 124
c3f9ed2f 125}
126
127Float_t EtaToTheta(Float_t arg){
128 return (180./TMath::Pi())*2.*atan(exp(-arg));
129}