1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
20 /// \brief Configuration macro for MUON spectormeter simulation
22 /// Remember to define the directory and event generator option:
24 /// gAlice->SetConfigFunction("Config('$HOME','box');");
26 void Config(char directory[100]="", char option[6]="param", const char* digitstore="AliMUONDigitStoreV2S")
28 //=====================================================================
29 // Config file for MUON test
30 //=====================================================================
31 // Libraries required by geant321
32 gSystem->Load("liblhapdf.so"); // Parton density functions
33 gSystem->Load("libpythia6.so"); // Pythia
34 gSystem->Load("libgeant321.so");
35 gSystem->Load("libEG");
36 gSystem->Load("libEGPythia6");
37 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations
39 new TGeant3TGeo("C++ Interface to Geant3");
41 //=======================================================================
42 // Create the output file
44 sprintf(filename,"%sgalice.root",directory);
45 cout << ">>> Output file is " << filename << endl;
46 cout << ">>> Config.C: Creating Run Loader ..."<<endl;
48 rl = AliRunLoader::Open(
49 filename, AliConfig::GetDefaultEventFolderName(), "recreate");
51 { gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
53 rl->SetCompressionLevel(2);
54 rl->SetNumberOfEventsPerFile(100);
55 gAlice->SetRunLoader(rl);
56 //=======================================================================
57 // For having more debuging messages
58 //AliLog::SetModuleDebugLevel("MUON", 1);
59 //=======================================================================
60 // Set External decayer
61 TVirtualMCDecayer *decayer = new AliDecayerPythia();
62 decayer->SetForceDecay(kAll);
64 gMC->SetExternalDecayer(decayer);
65 //=======================================================================
66 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
67 gMC->SetProcess("DCAY",1);
68 gMC->SetProcess("PAIR",1);
69 gMC->SetProcess("COMP",1);
70 gMC->SetProcess("PHOT",1);
71 gMC->SetProcess("PFIS",0);
72 gMC->SetProcess("DRAY",0);
73 gMC->SetProcess("ANNI",1);
74 gMC->SetProcess("BREM",1);
75 gMC->SetProcess("MUNU",1);
76 gMC->SetProcess("CKOV",1);
77 gMC->SetProcess("HADR",1);
78 gMC->SetProcess("LOSS",2);
79 gMC->SetProcess("MULS",1);
80 gMC->SetProcess("RAYL",1);
81 Float_t cut = 1.e-3; // 1MeV cut by default
82 Float_t tofmax = 1.e10;
83 gMC->SetCut("CUTGAM", cut);
84 gMC->SetCut("CUTELE", cut);
85 gMC->SetCut("CUTNEU", cut);
86 gMC->SetCut("CUTHAD", cut);
87 gMC->SetCut("CUTMUO", cut);
88 gMC->SetCut("BCUTE", cut);
89 gMC->SetCut("BCUTM", cut);
90 gMC->SetCut("DCUTE", cut);
91 gMC->SetCut("DCUTM", cut);
92 gMC->SetCut("PPCUTM", cut);
93 gMC->SetCut("TOFMAX", tofmax);
94 //=======================================================================
95 // Examples of generators. Only option param is sistematically tested
96 if (!strcmp(option,"box")) {
97 AliGenBox * gener = new AliGenBox(1);
98 gener->SetMomentumRange(20.,20.1);
99 gener->SetPhiRange(0., 360.);
100 gener->SetThetaRange(171.000,178.001);
101 gener->SetPart(kMuonMinus); // Muons
102 gener->SetOrigin(0.,0., 0.); //vertex position
103 gener->SetSigma(0.0, 0.0, 0.0); //Sigma in (X,Y,Z) (cm) on IP position
105 if (!strcmp(option,"gun")) {
106 AliGenFixed *gener = new AliGenFixed(1);
107 gener->SetMomentum(10);
108 gener->SetPhiRange(0.);
109 gener->SetThetaRange(0.);
110 gener->SetOrigin(30,30,-1200);//vertex position
111 gener->SetPart(kMuonMinus); //GEANT particle type 13 is muons
113 if (!strcmp(option,"scan")) {
114 AliGenScan *gener = new AliGenScan(-1);
115 gener->SetMomentumRange(10,10);
116 gener->SetPhiRange(0, 0);
117 gener->SetThetaRange(-180, -180);
119 //gener->SetSigma(1,1,0); //Sigma in (X,Y,Z) (cm) on IP position
120 gener->SetPart(kRootino);
121 gener->SetRange(100, -300., 300., 100, -300., 300., 1, 2000, 2000);
123 if (!strcmp(option,"param")) {
124 AliGenParam *gener = new AliGenParam(1, AliGenMUONlib::kUpsilon);
125 gener->SetMomentumRange(0,999);
126 gener->SetPtRange(0,100.);
127 gener->SetPhiRange(0., 360.);
128 gener->SetCutOnChild(1);
129 gener->SetChildPhiRange(0.,360.);
130 gener->SetChildThetaRange(171.0,178.0);
131 gener->SetOrigin(0,0,0); //vertex position gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
132 gener->SetForceDecay(kDiMuon);
133 gener->SetTrackingFlag(1);
136 if (!strcmp(option,"hijing")) { //Hijing generator from ConfigPPR in macros
137 AliGenHijing *gener = new AliGenHijing(-1);
138 // centre of mass energy
139 gener->SetEnergyCMS(5500.);
141 gener->SetReferenceFrame("CMS");
143 gener->SetProjectile("A", 208, 82);
144 gener->SetTarget ("A", 208, 82);
145 // tell hijing to keep the full parent child chain
146 gener->KeepFullEvent();
147 // enable jet quenching
148 gener->SetJetQuenching(1);
150 gener->SetShadowing(1);
151 // neutral pion and heavy particle decays switched off
152 gener->SetDecaysOff(1);
153 // Don't track spectators
154 gener->SetSpectators(0);
155 // kinematic selection
156 gener->SetSelectAll(0);
157 // impact parameter range
158 gener->SetImpactParameterRange(0., 5.); // 0. - 5. fm corresponds to ~10% most central
161 if (!strcmp(option,"muoncocktail")) { // Muon cocktail for PbPb
162 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
163 gener->SetPtRange(1.,100.); // Transverse momentum range
164 gener->SetPhiRange(0.,360.); // Azimuthal angle range
165 gener->SetYRange(-4.0,-2.5);
166 gener->SetMuonPtCut(0.5);
167 gener->SetMuonThetaCut(171.,178.);
168 gener->SetMuonMultiplicity(2);
169 gener->SetImpactParameterRange(0.,5.); // 10% most centra PbPb collisions
170 gener->SetVertexSmear(kPerTrack);
171 gener->SetOrigin(0,0,0); // Vertex position
172 gener->SetSigma(0,0,0.0); // Sigma in (X,Y,Z) (cm) on IP position
175 //=============================================================
177 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
178 gAlice->SetField(field);
179 //=============================================================
180 //=================== Alice BODY parameters =============================
181 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
182 //=================== ABSO parameters ============================
183 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
184 //=================== DIPO parameters ============================
185 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 2");
186 //================== HALL parameters ============================
187 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
188 //=================== PIPE parameters ============================
189 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
190 //=================== SHIL parameters ============================
191 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 2");
193 //=================== MUON Subsystem ===========================
194 AliMUON *MUON = new AliMUONv1("MUON", "default");
196 // The 3 switches below are to be used for the trigger code
197 // their default value is set in AliMUON.h
198 // activate trigger cluster-size (0=default, 1=cluster-size according to AliMUONResponseTriggerV1
199 // MUON->SetTriggerResponseV1(0);
200 // activate 4/4 trigger coincidence (0=default (coinc 3/4), 1=coinc 4/4)
201 // MUON->SetTriggerCoinc44(0);
202 // activate trigger chamber efficiency by cells (0=default, 1=trigger efficiency according to AliMUONTriggerEfficiencyCells
203 // MUON->SetTriggerEffCells(0);
205 // Use SetDigitStoreClassName() to change the digitStore implementation used by (s)digitizer
206 MUON->SetDigitStoreClassName(digitstore);
208 cout << "MUON DigitStore is " << MUON->DigitStoreClassName().Data() << endl;
210 // Noise-only digits in tracker/trigger (0=no noise, 1=default (noise in tracker), 2=noise in tracker and trigger):
211 //MUON->SetDigitizerWithNoise(kFALSE);
213 // Use non-high performance raw data decoder
214 //MUON->SetFastTrackerDecoder(kFALSE);
215 //MUON->SetFastTriggerDecoder(kFALSE);
218 // If SetAlign, the detection elements transformations
219 // are taken from the input file and not from the code
220 // MUON->SetAlign("transform.dat");
222 // To generate and read scaler trigger events in rawdata
223 // MUON->SetTriggerScalerEvent();
225 // To switch off the tail effect
226 // MUON->SetTailEffect(kFALSE);
228 // If you want to play with builders, first reset the geometry builder,
229 // and then add yours.
230 // MUON->ResetGeometryBuilder();
231 // MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilderV2(MUON));
232 // MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilderV2(MUON));
233 // MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
234 // MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));