3 // AliRoot Configuration for gun vmctest
5 // Extracted from G3 specific Config.C in test/gun.
6 // by I. Hrivnacova, IPN Orsay
8 Float_t EtaToTheta(Float_t arg);
10 AliGenerator* genGunConfig()
12 cout << "Running genGunConfig.C ... " << endl;
14 //=======================================================================
16 //=======================================================================
18 // The cocktail iitself
20 AliGenCocktail *gener = new AliGenCocktail();
21 gener->SetPhiRange(0, 360);
22 // Set pseudorapidity range from -8 to 8.
23 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
24 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
25 gener->SetThetaRange(thmin,thmax);
26 gener->SetOrigin(0, 0, 0); //vertex position
27 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
30 // Particle guns for the barrel part (taken from RichConfig)
32 AliGenFixed *pG1=new AliGenFixed(1);
33 pG1->SetPart(kProton);
34 pG1->SetMomentum(2.5);
35 pG1->SetTheta(109.5-3);
37 gener->AddGenerator(pG1,"g1",1);
39 AliGenFixed *pG2=new AliGenFixed(1);
40 pG2->SetPart(kPiPlus);
41 pG2->SetMomentum(1.0);
42 pG2->SetTheta( 90.0-3);
44 gener->AddGenerator(pG2,"g2",1);
46 AliGenFixed *pG3=new AliGenFixed(1);
47 pG3->SetPart(kPiMinus);
48 pG3->SetMomentum(1.5);
49 pG3->SetTheta(109.5-3);
51 gener->AddGenerator(pG3,"g3",1);
53 AliGenFixed *pG4=new AliGenFixed(1);
55 pG4->SetMomentum(0.7);
56 pG4->SetTheta( 90.0-3);
58 gener->AddGenerator(pG4,"g4",1);
60 AliGenFixed *pG5=new AliGenFixed(1);
61 pG5->SetPart(kKMinus);
62 pG5->SetMomentum(1.0);
63 pG5->SetTheta( 70.0-3);
65 gener->AddGenerator(pG5,"g5",1);
67 AliGenFixed *pG6=new AliGenFixed(1);
68 pG6->SetPart(kProtonBar);
69 pG6->SetMomentum(2.5);
70 pG6->SetTheta( 90.0-3);
72 gener->AddGenerator(pG6,"g6",1);
74 AliGenFixed *pG7=new AliGenFixed(1);
75 pG7->SetPart(kPiMinus);
76 pG7->SetMomentum(0.7);
77 pG7->SetTheta( 70.0-3);
79 gener->AddGenerator(pG7,"g7",1);
83 AliGenFixed *pG8=new AliGenFixed(1);
84 pG8->SetPart(kElectron);
85 pG8->SetMomentum(1.2);
88 gener->AddGenerator(pG8,"g8",1);
90 AliGenFixed *pG9=new AliGenFixed(1);
91 pG9->SetPart(kPositron);
92 pG9->SetMomentum(1.2);
95 gener->AddGenerator(pG9,"g9",1);
99 AliGenBox *gphos = new AliGenBox(1);
100 gphos->SetMomentumRange(10,11.);
101 gphos->SetPhiRange(270.5,270.7);
102 gphos->SetThetaRange(90.5,90.7);
103 gphos->SetPart(kGamma);
104 gener->AddGenerator(gphos,"GENBOX GAMMA for PHOS",1);
108 AliGenBox *gemcal = new AliGenBox(1);
109 gemcal->SetMomentumRange(10,11.);
110 gemcal->SetPhiRange(90.5,199.5);
111 gemcal->SetThetaRange(90.5,90.7);
112 gemcal->SetPart(kGamma);
113 gener->AddGenerator(gemcal,"GENBOX GAMMA for EMCAL",1);
116 AliGenBox * gmuon1 = new AliGenBox(1);
117 gmuon1->SetMomentumRange(20.,20.1);
118 gmuon1->SetPhiRange(0., 360.);
119 gmuon1->SetThetaRange(171.000,178.001);
120 gmuon1->SetPart(kMuonMinus); // Muons
121 gener->AddGenerator(gmuon1,"GENBOX MUON1",1);
123 AliGenBox * gmuon2 = new AliGenBox(1);
124 gmuon2->SetMomentumRange(20.,20.1);
125 gmuon2->SetPhiRange(0., 360.);
126 gmuon2->SetThetaRange(171.000,178.001);
127 gmuon2->SetPart(kMuonPlus); // Muons
128 gener->AddGenerator(gmuon2,"GENBOX MUON1",1);
131 AliGenFixed *gtof=new AliGenFixed(1);
132 gtof->SetPart(kProton);
133 gtof->SetMomentum(2.5);
136 gener->AddGenerator(gtof,"Proton for TOF",1);
139 AliGenFixed *gfmd1=new AliGenFixed(1);
140 gfmd1->SetPart(kGamma);
141 gfmd1->SetMomentum(25);
142 gfmd1->SetTheta(1.8);
144 gener->AddGenerator(gfmd1,"Gamma for FMD1",1);
147 AliGenFixed *gfmd2i=new AliGenFixed(1);
148 gfmd2i->SetPart(kPiPlus);
149 gfmd2i->SetMomentum(1.5);
150 gfmd2i->SetTheta(7.3);
152 gener->AddGenerator(gfmd2i,"Pi+ for FMD2i",1);
155 AliGenFixed *gfmd2o=new AliGenFixed(1);
156 gfmd2o->SetPart(kPiMinus);
157 gfmd2o->SetMomentum(1.5);
158 gfmd2o->SetTheta(16.1);
160 gener->AddGenerator(gfmd2o,"Pi- for FMD2o",1);
163 AliGenFixed *gfmd3o=new AliGenFixed(1);
164 gfmd3o->SetPart(kPiPlus);
165 gfmd3o->SetMomentum(1.5);
166 gfmd3o->SetTheta(163.9);
168 gener->AddGenerator(gfmd3o,"Pi+ for FMD3o",1);
171 AliGenFixed *gfmd3i=new AliGenFixed(1);
172 gfmd3i->SetPart(kPiMinus);
173 gfmd3i->SetMomentum(1.5);
174 gfmd3i->SetTheta(170.5);
176 gener->AddGenerator(gfmd3i,"Pi- for FMD3i",1);
182 cout << "Running genGunConfig.C finished ... " << endl;
185 Float_t EtaToTheta(Float_t arg){
186 return (180./TMath::Pi())*2.*atan(exp(-arg));