1 // Config file MUON + ITS (for vertex) for PDC06
2 // Tuned for p+p min biais and quarkonia production (AliGenMUONCocktailpp)
3 // Remember to define the directory and option
4 // gAlice->SetConfigFunction("Config('$HOME','box');");
5 // april 3rd: added L3 magnet
7 void Config(char directory[100]="", char option[6]="trg1mu")
10 static Int_t sseed = 0; // Set 0 to use the current time
12 //=====================================================================
13 // Libraries required by geant321
14 gSystem->Load("libgeant321.so");
15 new TGeant3TGeo("C++ Interface to Geant3");
16 //=======================================================================
18 // Set Random Number seed
19 gRandom->SetSeed(sseed);
21 // Create the output file
23 sprintf(filename,"%sgalice.root",directory);
26 rl = AliRunLoader::Open(
27 filename, AliConfig::GetDefaultEventFolderName(), "recreate");
29 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
32 rl->SetCompressionLevel(2);
33 rl->SetNumberOfEventsPerFile(1000);
34 gAlice->SetRunLoader(rl);
36 //=======================================================================
37 // Set the trigger configuration
38 gAlice->SetTriggerDescriptor("p-p");
39 cout<<"Trigger configuration is set to p-p"<<endl;
41 //=======================================================================
42 // Set External decayer
43 TVirtualMCDecayer *decayer = new AliDecayerPythia();
44 decayer->SetForceDecay(kAll);
46 gMC->SetExternalDecayer(decayer);
48 //=======================================================================
49 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
50 gMC->SetProcess("DCAY",1);
51 gMC->SetProcess("PAIR",1);
52 gMC->SetProcess("COMP",1);
53 gMC->SetProcess("PHOT",1);
54 gMC->SetProcess("PFIS",0);
55 gMC->SetProcess("DRAY",0);
56 gMC->SetProcess("ANNI",1);
57 gMC->SetProcess("BREM",1);
58 gMC->SetProcess("MUNU",1);
59 gMC->SetProcess("CKOV",1);
60 gMC->SetProcess("HADR",1);
61 gMC->SetProcess("LOSS",2);
62 gMC->SetProcess("MULS",1);
63 gMC->SetProcess("RAYL",1);
65 Float_t cut = 1.e-3; // 1MeV cut by default
66 Float_t tofmax = 1.e10;
68 gMC->SetCut("CUTGAM", cut);
69 gMC->SetCut("CUTELE", cut);
70 gMC->SetCut("CUTNEU", cut);
71 gMC->SetCut("CUTHAD", cut);
72 gMC->SetCut("CUTMUO", cut);
73 gMC->SetCut("BCUTE", cut);
74 gMC->SetCut("BCUTM", cut);
75 gMC->SetCut("DCUTE", cut);
76 gMC->SetCut("DCUTM", cut);
77 gMC->SetCut("PPCUTM", cut);
78 gMC->SetCut("TOFMAX", tofmax);
80 //=======================================================================
81 // ************* STEERING parameters FOR ALICE SIMULATION **************
83 // From AliMUONConstants class we get :
84 // Position Z (along beam) of the chambers (in cm)
85 // (from AliMUONConstants class):
86 // 533.5, 546.5, 678.5, 693.5, 964.0, 986.0, 1251.5, 1278.5,
87 // 1416.5, 1443.5, 1610, 1625., 1710., 1725.
88 // Internal Radius (in cm)
89 // 36.4, 46.2, 66.0, 80., 80., 100., 100.
90 // External Radius (in cm)
91 // 183., 245., 395., 560., 563., 850., 900.
92 //=======================================================================
94 if (!strcmp(option,"trg2mu")) {
95 AliGenMUONCocktailpp *gener = new AliGenMUONCocktailpp();
96 gener->SetPtRange(0.,100.);
97 gener->SetYRange(-4.,-2.4);
98 gener->SetPhiRange(0.,360.);
99 gener->SetMuonMultiplicity(2);
100 gener->SetMuonPtCut(0.5);
101 gener->SetMuonThetaRange(171.,178.);
102 gener->SetOrigin(0.,0.,0.);
103 gener->SetSigma(0.,0.,5.);
104 gener->SetVertexSmear(kPerEvent);
108 if (!strcmp(option,"trg1mu")) {
109 AliGenMUONCocktailpp *gener = new AliGenMUONCocktailpp();
110 gener->SetPtRange(0.,100.);
111 gener->SetYRange(-4.,-2.4);
112 gener->SetPhiRange(0.,360.);
113 gener->SetMuonMultiplicity(1);
114 gener->SetMuonPtCut(0.5);
115 gener->SetMuonThetaRange(171.,178.);
116 gener->SetOrigin(0.,0.,0.);
117 gener->SetSigma(0.,0.,5.);
118 gener->SetVertexSmear(kPerEvent);
121 //=============================================================
122 // Field (L3 0.5 T) outside dimuon spectrometer
123 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., AliMagFMaps::k5kG);
124 field->SetL3ConstField(0); // Using const. field in the barrel
125 gAlice->SetField(field);
137 //=================== Alice BODY parameters =============================
138 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
139 //=================== ABSO parameters ============================
140 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
141 //=================== DIPO parameters ============================
142 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
143 //================== HALL parameters ============================
144 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
145 //================== The L3 Magnet ==============================
146 AliMAG *MAG = new AliMAG("MAG", "L3 Magnet");
147 //=================== PIPE parameters ============================
148 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
149 //=================== SHIL parameters ============================
150 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
151 //=================== ITS parameters =============================
153 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","ITS PPR detailed version with asymmetric services");
155 //=================== ZDC parameters =============================
157 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
159 //=================== FMD parameters =============================
161 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
163 //=================== PHOS parameters =============================
165 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
167 //=================== PMD parameters =============================
169 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
171 //=================== T0 parameters =============================
173 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
175 //=================== VZERO parameters =============================
177 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
180 //=================== MUON Subsystem ===========================
181 cout << ">>> Config.C: Creating AliMUONv1 ..."<<endl;
183 // With the following compactor, what you get (in case you wonder...) is :
185 // - "FactoryV4", that is all stations using new segmentations/mapping
186 // - "sdigitizer:AliMUONSDigitizerV2", performing decalibration
187 // - "digitizer:NewDigitizerOldTrigger" <=> digitizer=AliMUONDigitizerV3,
188 // using the "old" trigger code, performing calibration
190 AliMUON *MUON = new AliMUONv1("MUON");
193 Float_t EtaToTheta(Float_t arg){
194 return (180./TMath::Pi())*2.*atan(exp(-arg));