]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/commonConfig.C
Changes for #89427: Porting modification for material budget issues to the Release...
[u/mrichter/AliRoot.git] / MUON / commonConfig.C
CommitLineData
6ef73001 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/* $Id$ */
17
18/// \ingroup macros
19/// \file commonConfig.C
20/// \brief Configuration macro
21/// for MUON spectrometer Monte Carlo simulation
22
23enum PprTrigConf_t {
24 kDefaultPPTrig, kDefaultPbPbTrig
25};
26
27const char * pprTrigConfName[] = {
28 "p-p","Pb-Pb"
29};
30
31// Options
32static AliMagF::BMap_t smag = AliMagF::k5kG;
33static PprTrigConf_t strig = kDefaultPPTrig; // default PP trigger configuration
34static TString comment;
35
36// Functions
37void LoadPythia();
38
b52579a7 39void commonConfig(const char* directory="",
40 const char* digitstore="AliMUONDigitStoreV2S",
41 bool forEmbedding=kFALSE)
6ef73001 42{
43 cout << "Running commonConfig.C ... " << endl;
44
45 //=======================================================================
46 // Load Pythia libraries
47 //=======================================================================
48
49 LoadPythia();
50
51 //=======================================================================
52 // ALICE steering object (AliRunLoader)
53 //=======================================================================
54
b52579a7 55 Text_t filename[100];
56 sprintf(filename,"%sgalice.root",directory);
6ef73001 57 AliRunLoader* rl
b52579a7 58 = AliRunLoader::Open(filename,
59 AliConfig::GetDefaultEventFolderName(),
60 "recreate");
6ef73001 61 if ( ! rl ) {
62 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
63 return;
64 }
65 rl->SetCompressionLevel(2);
66 rl->SetNumberOfEventsPerFile(100);
67 gAlice->SetRunLoader(rl);
b52579a7 68 cout << "Run loader created ... " << endl;
6ef73001 69
6ef73001 70 // =============================
71 // Magnetic field
72 // =============================
73
b52579a7 74 //=============================================================
6ef73001 75 // Field (L3 0.5 T)
76 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1, AliMagF::k5kG));
b52579a7 77 cout << "Field created ... " << endl;
6ef73001 78
b52579a7 79 //=============================================================
6ef73001 80 //=============================================================
81 //=================== Alice BODY parameters =============================
b52579a7 82 new AliBODY("BODY","Alice envelop");
6ef73001 83 //=================== ABSO parameters ============================
b52579a7 84 new AliABSOv3("ABSO", "Muon Absorber");
6ef73001 85 //=================== DIPO parameters ============================
b52579a7 86 new AliDIPOv3("DIPO", "Dipole version 2");
6ef73001 87 //================== HALL parameters ============================
b52579a7 88 new AliHALLv3("HALL", "Alice Hall");
6ef73001 89 //=================== PIPE parameters ============================
b52579a7 90 new AliPIPEv3("PIPE", "Beam Pipe");
6ef73001 91 //=================== SHIL parameters ============================
b52579a7 92 new AliSHILv3("SHIL", "Shielding Version 2");
6ef73001 93
94 //=================== MUON Subsystem ===========================
95 AliMUON *MUON = new AliMUONv1("MUON", "default");
96
97 // The 3 switches below are to be used for the trigger code
98 // their default value is set in AliMUON.h
99 // activate trigger cluster-size (0=default, 1=cluster-size according to AliMUONResponseTriggerV1
100 // MUON->SetTriggerResponseV1(0);
101 // activate 4/4 trigger coincidence (0=default (coinc 3/4), 1=coinc 4/4)
102 // MUON->SetTriggerCoinc44(0);
103 // activate trigger chamber efficiency by cells (0=default, 1=trigger efficiency according to AliMUONTriggerEfficiencyCells
104 // MUON->SetTriggerEffCells(0);
105
b52579a7 106 // Activate the following line when running with Fluka
107 // MUON->SetIsMaxStep(kFALSE);
108
6ef73001 109 // Use SetDigitStoreClassName() to change the digitStore implementation used by (s)digitizer
110 MUON->SetDigitStoreClassName(digitstore);
111
112 cout << "MUON DigitStore is " << MUON->DigitStoreClassName().Data() << endl;
b52579a7 113
114 if ( forEmbedding )
115 {
116 // Noise-only digits in tracker/trigger (0=no noise, 1=default (noise in tracker), 2=noise in tracker and trigger):
117 cout << "****** DISABLING NOISE GENERATION AS WE DO EMBEDDING ******" << endl;
118 MUON->SetDigitizerWithNoise(0);
119 MUON->SetConvertTrigger(true);
120
3a5fcc75 121 new AliITSv11("ITS","ITS v11");
b52579a7 122
123 }
6ef73001 124
125 // Use non-high performance raw data decoder
126 //MUON->SetFastTrackerDecoder(kFALSE);
127 //MUON->SetFastTriggerDecoder(kFALSE);
128
129 //
130 // If SetAlign, the detection elements transformations
131 // are taken from the input file and not from the code
132 // MUON->SetAlign("transform.dat");
133
134 // To generate and read scaler trigger events in rawdata
135 // MUON->SetTriggerScalerEvent();
136
137 // To switch off the tail effect
138 // MUON->SetTailEffect(kFALSE);
139
140 // If you want to play with builders, first reset the geometry builder,
141 // and then add yours.
142 // MUON->ResetGeometryBuilder();
143 // MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilderV2(MUON));
144 // MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilderV2(MUON));
145 // MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
146 // MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
147
148 cout << "Running commonConfig.C finished ... " << endl;
149}
150
151void LoadPythia()
152{
153 // Load Pythia related libraries
154 gSystem->Load("liblhapdf.so"); // Parton density functions
155 gSystem->Load("libEGPythia6.so"); // TGenerator interface
156 gSystem->Load("libpythia6.so"); // Pythia
157 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations
158}