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 **************************************************************************/
19 /// \file commonConfig.C
20 /// \brief Configuration macro
21 /// for MUON spectrometer Monte Carlo simulation
24 kDefaultPPTrig, kDefaultPbPbTrig
27 const char * pprTrigConfName[] = {
32 static AliMagF::BMap_t smag = AliMagF::k5kG;
33 static PprTrigConf_t strig = kDefaultPPTrig; // default PP trigger configuration
34 static TString comment;
39 void commonConfig(Bool_t setRootGeometry = kFALSE,
40 const char* digitstore="AliMUONDigitStoreV2S")
42 cout << "Running commonConfig.C ... " << endl;
44 //=======================================================================
45 // Load Pythia libraries
46 //=======================================================================
50 //=======================================================================
51 // ALICE steering object (AliRunLoader)
52 //=======================================================================
54 // Set Root geometry file
55 if ( setRootGeometry ) {
56 AliSimulation::Instance()->SetGeometryFile("$ALICE_ROOT/MUON/geometry/geometry.root");
60 = AliRunLoader::Open("galice.root",
61 AliConfig::GetDefaultEventFolderName(),
64 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
67 rl->SetCompressionLevel(2);
68 rl->SetNumberOfEventsPerFile(100);
69 gAlice->SetRunLoader(rl);
71 //======================================================================
72 // Trigger configuration
73 //=======================================================================
75 gAlice->SetTriggerDescriptor(pprTrigConfName[strig]);
76 cout << "Trigger configuration is set to " << pprTrigConfName[strig] << endl;
78 // =============================
80 // =============================
84 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1, AliMagF::k5kG));
86 //=============================================================
87 //=================== Alice BODY parameters =============================
88 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
89 //=================== ABSO parameters ============================
90 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
91 //=================== DIPO parameters ============================
92 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 2");
93 //================== HALL parameters ============================
94 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
95 //=================== PIPE parameters ============================
96 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
97 //=================== SHIL parameters ============================
98 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 2");
100 //=================== MUON Subsystem ===========================
101 AliMUON *MUON = new AliMUONv1("MUON", "default");
103 // The 3 switches below are to be used for the trigger code
104 // their default value is set in AliMUON.h
105 // activate trigger cluster-size (0=default, 1=cluster-size according to AliMUONResponseTriggerV1
106 // MUON->SetTriggerResponseV1(0);
107 // activate 4/4 trigger coincidence (0=default (coinc 3/4), 1=coinc 4/4)
108 // MUON->SetTriggerCoinc44(0);
109 // activate trigger chamber efficiency by cells (0=default, 1=trigger efficiency according to AliMUONTriggerEfficiencyCells
110 // MUON->SetTriggerEffCells(0);
112 // Use SetDigitStoreClassName() to change the digitStore implementation used by (s)digitizer
113 MUON->SetDigitStoreClassName(digitstore);
115 cout << "MUON DigitStore is " << MUON->DigitStoreClassName().Data() << endl;
117 // Noise-only digits in tracker/trigger (0=no noise, 1=default (noise in tracker), 2=noise in tracker and trigger):
118 //MUON->SetDigitizerWithNoise(kFALSE);
120 // Use non-high performance raw data decoder
121 //MUON->SetFastTrackerDecoder(kFALSE);
122 //MUON->SetFastTriggerDecoder(kFALSE);
125 // If SetAlign, the detection elements transformations
126 // are taken from the input file and not from the code
127 // MUON->SetAlign("transform.dat");
129 // To generate and read scaler trigger events in rawdata
130 // MUON->SetTriggerScalerEvent();
132 // To switch off the tail effect
133 // MUON->SetTailEffect(kFALSE);
135 // If you want to play with builders, first reset the geometry builder,
136 // and then add yours.
137 // MUON->ResetGeometryBuilder();
138 // MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilderV2(MUON));
139 // MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilderV2(MUON));
140 // MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
141 // MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
143 cout << "Running commonConfig.C finished ... " << endl;
148 // Load Pythia related libraries
149 gSystem->Load("liblhapdf.so"); // Parton density functions
150 gSystem->Load("libEGPythia6.so"); // TGenerator interface
151 gSystem->Load("libpythia6.so"); // Pythia
152 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations