]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/Config.C
From Jochen: changes accumulated during Feb/Mar cosmic run and some coding convention...
[u/mrichter/AliRoot.git] / MUON / Config.C
index 560fd8045bed0ae626588a103beb4e0d82af5404..0552ab5c73d5388ab7b53ef7a8f0db2767728788 100644 (file)
@@ -1,8 +1,29 @@
-// Config file test for MUON spectormeter
-// Remember to define the directory and option
-// gAlice->SetConfigFunction("Config('$HOME','box');");
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
 
-void Config(char directory[100]="", char option[6]="hijing")
+/* $Id$ */
+
+/// \ingroup macros
+/// \file Config.C
+/// \brief Configuration macro for MUON spectormeter simulation
+///
+/// Remember to define the directory and event generator option:
+///
+/// gAlice->SetConfigFunction("Config('$HOME','box');");
+
+void Config(char directory[100]="", char option[6]="param", const char* digitstore="AliMUONDigitStoreV2S")
 {
   //=====================================================================
   // Config file for MUON test
@@ -70,17 +91,17 @@ void Config(char directory[100]="", char option[6]="hijing")
     gener->SetMomentumRange(20.,20.1);
     gener->SetPhiRange(0., 360.);         
     gener->SetThetaRange(171.000,178.001);
-    gener->SetPart(13);           // Muons
+    gener->SetPart(kMuonMinus);           // Muons
     gener->SetOrigin(0.,0., 0.);  //vertex position
     gener->SetSigma(0.0, 0.0, 0.0);         //Sigma in (X,Y,Z) (cm) on IP position
   }
   if (!strcmp(option,"gun")) {
-    AliGenFixed *gener = new AliGenFixed(ntracks);
+    AliGenFixed *gener = new AliGenFixed(1);
     gener->SetMomentum(10);
     gener->SetPhiRange(0.);
     gener->SetThetaRange(0.);
-    gener->SetOrigin(30,30,1200);//vertex position
-    gener->SetPart(13);          //GEANT particle type  13 is muons
+    gener->SetOrigin(30,30,-1200);//vertex position
+    gener->SetPart(kMuonMinus);          //GEANT particle type  13 is muons
   }
   if (!strcmp(option,"scan")) {
     AliGenScan *gener = new AliGenScan(-1);
@@ -152,15 +173,15 @@ void Config(char directory[100]="", char option[6]="hijing")
   //=================== Alice BODY parameters =============================
   AliBODY *BODY = new AliBODY("BODY","Alice envelop");
   //=================== ABSO parameters ============================
-  AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
+  AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
   //=================== DIPO parameters ============================
-  AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
+  AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 2");
   //================== HALL parameters ============================
-  AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
+  AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
   //=================== PIPE parameters ============================
-  AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
+  AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
   //=================== SHIL parameters ============================
-  AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
+  AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 2");
 
   //=================== MUON Subsystem ===========================
   AliMUON *MUON = new AliMUONv1("MUON", "default");
@@ -174,9 +195,17 @@ void Config(char directory[100]="", char option[6]="hijing")
   // activate trigger chamber efficiency by cells (0=default, 1=trigger efficiency according to AliMUONTriggerEfficiencyCells
   //  MUON->SetTriggerEffCells(0);
 
-  // To get same as above w/o noise-only digits for the tracker do  :
-  // MUON->SetDigitizerWithNoise(kKALSE);
+  // Use SetDigitStoreClassName() to change the digitStore implementation used by (s)digitizer
+  MUON->SetDigitStoreClassName(digitstore);
+  
+  cout << "MUON DigitStore is " << MUON->DigitStoreClassName().Data() << endl;
+  
+  // Noise-only digits in tracker/trigger (0=no noise, 1=default (noise in tracker), 2=noise in tracker and trigger):
+  //MUON->SetDigitizerWithNoise(kFALSE);
 
+  // Use fast raw data decoder
+  // MUON->SetFastDecoder(kTRUE);  
+  
   //
   // If SetAlign, the detection elements transformations
   // are taken from the input file and not from the code
@@ -184,6 +213,9 @@ void Config(char directory[100]="", char option[6]="hijing")
 
   // To generate and read scaler trigger events in rawdata
   // MUON->SetTriggerScalerEvent();
+  
+  // To switch off the tail effect
+  // MUON->SetTailEffect(kFALSE);
 
   // If you want to play with builders, first reset the geometry builder,
   // and then add yours.
@@ -193,7 +225,3 @@ void Config(char directory[100]="", char option[6]="hijing")
   //  MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
   //  MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
 }
-
-Float_t EtaToTheta(Float_t arg){
-  return (180./TMath::Pi())*2.*atan(exp(-arg));
-}