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