]> git.uio.no Git - u/mrichter/AliRoot.git/blame - macros/Config_PDC06_MUON.C
Setting a correct Pb-Pb trigger configuration (C.Cheshkov)
[u/mrichter/AliRoot.git] / macros / Config_PDC06_MUON.C
CommitLineData
dfd0f589 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
6void Config(char directory[100]="", char option[6]="trg2mu")
7{
8
9 static Int_t sseed = 0; // Set 0 to use the current time
10
11 //=====================================================================
12 // Libraries required by geant321
13 gSystem->Load("libgeant321.so");
14 new TGeant3TGeo("C++ Interface to Geant3");
15 //=======================================================================
16
17 // Set Random Number seed
18 gRandom->SetSeed(sseed);
19
20 // Create the output file
21 Text_t filename[100];
22 sprintf(filename,"%sgalice.root",directory);
23
24 AliRunLoader* rl=0x0;
25 rl = AliRunLoader::Open(
26 filename, AliConfig::GetDefaultEventFolderName(), "recreate");
27 if (rl == 0x0) {
28 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
29 return;
30 }
31 rl->SetCompressionLevel(2);
32 rl->SetNumberOfEventsPerFile(100);
33 gAlice->SetRunLoader(rl);
34
35 //=======================================================================
36 // Set External decayer
37 TVirtualMCDecayer *decayer = new AliDecayerPythia();
38 decayer->SetForceDecay(kAll);
39 decayer->Init();
40 gMC->SetExternalDecayer(decayer);
41
42 //=======================================================================
43 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
44 gMC->SetProcess("DCAY",1);
45 gMC->SetProcess("PAIR",1);
46 gMC->SetProcess("COMP",1);
47 gMC->SetProcess("PHOT",1);
48 gMC->SetProcess("PFIS",0);
49 gMC->SetProcess("DRAY",0);
50 gMC->SetProcess("ANNI",1);
51 gMC->SetProcess("BREM",1);
52 gMC->SetProcess("MUNU",1);
53 gMC->SetProcess("CKOV",1);
54 gMC->SetProcess("HADR",1);
55 gMC->SetProcess("LOSS",2);
56 gMC->SetProcess("MULS",1);
57 gMC->SetProcess("RAYL",1);
58
59 Float_t cut = 1.e-3; // 1MeV cut by default
60 Float_t tofmax = 1.e10;
61
62 gMC->SetCut("CUTGAM", cut);
63 gMC->SetCut("CUTELE", cut);
64 gMC->SetCut("CUTNEU", cut);
65 gMC->SetCut("CUTHAD", cut);
66 gMC->SetCut("CUTMUO", cut);
67 gMC->SetCut("BCUTE", cut);
68 gMC->SetCut("BCUTM", cut);
69 gMC->SetCut("DCUTE", cut);
70 gMC->SetCut("DCUTM", cut);
71 gMC->SetCut("PPCUTM", cut);
72 gMC->SetCut("TOFMAX", tofmax);
73 //
74 //=======================================================================
75 // ************* STEERING parameters FOR ALICE SIMULATION **************
76 // Chamber positions
77 // From AliMUONConstants class we get :
78 // Position Z (along beam) of the chambers (in cm)
79 // (from AliMUONConstants class):
80 // 533.5, 546.5, 678.5, 693.5, 964.0, 986.0, 1251.5, 1278.5,
81 // 1416.5, 1443.5, 1610, 1625., 1710., 1725.
82 // Internal Radius (in cm)
83 // 36.4, 46.2, 66.0, 80., 80., 100., 100.
84 // External Radius (in cm)
85 // 183., 245., 395., 560., 563., 850., 900.
86 //=======================================================================
87
88 if (!strcmp(option,"trg2mu")) {
89 AliGenMUONCocktailpp *gener = new AliGenMUONCocktailpp();
90 gener->SetPtRange(0.,100.);
91 gener->SetYRange(-4.,-2.4);
92 gener->SetPhiRange(0., 360.);
93 gener->SetMuonMultiplicity(2);
94 gener->SetMuonPtCut(1.);
95 gener->SetMuonThetaRange(171.,178.);
96 gener->SetOrigin(0.,0.,0.);
97 gener->SetSigma(0.,0.,5.);
98 gener->SetVertexSmear(kPerEvent);
99 gener->Init();
100 }
101
102 if (!strcmp(option,"trg1mu")) {
103 AliGenMUONCocktailpp *gener = new AliGenMUONCocktailpp();
104 gener->SetPtRange(0.,100.);
105 gener->SetYRange(-4.,-2.4);
106 gener->SetPhiRange(0., 360.);
107 gener->SetMuonMultiplicity(1);
108 gener->SetMuonPtCut(1.);
109 gener->SetMuonThetaRange(171.,178.);
110 gener->SetOrigin(0.,0.,0.);
111 gener->SetSigma(0.,0.,5.);
112 gener->SetVertexSmear(kPerEvent);
113 gener->Init();
114 }
115 //=============================================================
116 // Field (L3 0.4 T)
f3cba114 117 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., AliMagFMaps::k4kG);
118 field->SetL3ConstField(0); // Using const. field in the barrel
dfd0f589 119 gAlice->SetField(field);
120
121 Int_t iITS = 1;
122 rl->CdGAFile();
123
124 //=================== Alice BODY parameters =============================
125 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
126 //=================== ABSO parameters ============================
127 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
128 //=================== DIPO parameters ============================
129 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
130 //================== HALL parameters ============================
131 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
132 //================== The L3 Magnet ==============================
133 AliMAG *MAG = new AliMAG("MAG", "L3 Magnet");
134 //=================== PIPE parameters ============================
135 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
136 //=================== SHIL parameters ============================
137 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
138 //=================== ITS parameters =============================
139 if(iITS) {
140 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","ITS PPR detailed version with asymmetric services");
141 }
142
143
144 //=================== MUON Subsystem ===========================
145 cout << ">>> Config.C: Creating AliMUONv1 ..."<<endl;
146
147 // With the following compactor, what you get (in case you wonder...) is :
148 //
149 // - "FactoryV4", that is all stations using new segmentations/mapping
150 // - "sdigitizer:AliMUONSDigitizerV2", performing decalibration
151 // - "digitizer:NewDigitizerOldTrigger" <=> digitizer=AliMUONDigitizerV3,
152 // using the "old" trigger code, performing calibration
153 //
154 AliMUON *MUON = new AliMUONv1("MUON");
155}
156
157Float_t EtaToTheta(Float_t arg){
158 return (180./TMath::Pi())*2.*atan(exp(-arg));
159}