AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
commonConfig.C
Go to the documentation of this file.
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 
22 
25 };
26 
27 const char * pprTrigConfName[] = {
28  "p-p","Pb-Pb"
29 };
30 
31 // Options
32 static AliMagF::BMap_t smag = AliMagF::k5kG;
33 static PprTrigConf_t strig = kDefaultPPTrig; // default PP trigger configuration
34 static TString comment;
35 
36 // Functions
37 void LoadPythia();
38 
39 void commonConfig(const char* directory="",
40  const char* digitstore="AliMUONDigitStoreV2S",
41  bool forEmbedding=kFALSE)
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 
55  Text_t filename[100];
56  sprintf(filename,"%sgalice.root",directory);
57  AliRunLoader* rl
58  = AliRunLoader::Open(filename,
59  AliConfig::GetDefaultEventFolderName(),
60  "recreate");
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);
68  cout << "Run loader created ... " << endl;
69 
70  // =============================
71  // Magnetic field
72  // =============================
73 
74  //=============================================================
75  // Field (L3 0.5 T)
76  TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1, AliMagF::k5kG));
77  cout << "Field created ... " << endl;
78 
79  //=============================================================
80  //=============================================================
81  //=================== Alice BODY parameters =============================
82  new AliBODY("BODY","Alice envelop");
83  //=================== ABSO parameters ============================
84  new AliABSOv3("ABSO", "Muon Absorber");
85  //=================== DIPO parameters ============================
86  new AliDIPOv3("DIPO", "Dipole version 2");
87  //================== HALL parameters ============================
88  new AliHALLv3("HALL", "Alice Hall");
89  //=================== PIPE parameters ============================
90  new AliPIPEv3("PIPE", "Beam Pipe");
91  //=================== SHIL parameters ============================
92  new AliSHILv3("SHIL", "Shielding Version 2");
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 
106  // Activate the following line when running with Fluka
107  // MUON->SetIsMaxStep(kFALSE);
108 
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;
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 
121  new AliITSv11("ITS","ITS v11");
122 
123  }
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 
152 {
153  // Load Pythia related libraries
154  gSystem->Load("liblhapdf"); // Parton density functions
155  gSystem->Load("libEGPythia6"); // TGenerator interface
156  gSystem->Load("libpythia6"); // Pythia
157  gSystem->Load("libAliPythia6"); // ALICE specific implementations
158 }
const TString DigitStoreClassName() const
Return digit store class name.
Definition: AliMUON.h:144
TFile * Open(const char *filename, Long64_t &nevents)
void LoadPythia()
Definition: commonConfig.C:151
virtual void SetDigitizerWithNoise(Int_t digitizerWithNoise, Double_t nsigmas=4.0)
Set off generation of noisy digits.
Definition: AliMUON.h:120
static PprTrigConf_t strig
Definition: commonConfig.C:33
static TString comment
Definition: commonConfig.C:34
PprTrigConf_t
Definition: ConfigCosmic.C:113
AliDetector class for MUON subsystem providing simulation data management.
Definition: AliMUON.h:37
virtual void SetConvertTrigger(Bool_t convertTrigger=true)
Enable trigger raw2sdigits conversion.
Definition: AliMUON.h:131
void SetDigitStoreClassName(const char *classname)
Set digit store class name.
Definition: AliMUON.h:142
AliDetector class for MUON subsystem which implements functions for simulation.
Definition: AliMUONv1.h:24
const char * pprTrigConfName[]
Definition: commonConfig.C:27
AliRun * gAlice
static AliMagF::BMap_t smag
Definition: commonConfig.C:32
void commonConfig(const char *directory="", const char *digitstore="AliMUONDigitStoreV2S", bool forEmbedding=kFALSE)
Definition: commonConfig.C:39