X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FConfig.C;h=56c609b18b6b15c1def88d4aed8350e5ce155052;hb=3a5fcc75ca21520fe4f0b00f33764ef07ef3aab5;hp=3459e8c4e9dc66ee47e5b625670d146f35579574;hpb=c9c10a0673d3ac0111fde4acdaa9f9543b4df006;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/Config.C b/MUON/Config.C index 3459e8c4e9d..56c609b18b6 100644 --- a/MUON/Config.C +++ b/MUON/Config.C @@ -1,15 +1,92 @@ -// 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]="param") +/* $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');"); +/// +/// Can be compiled by : +/// .L Config.C+ +/// (depends on the correct rootlogon.C though...) + +#if !defined(__CINT__) || defined(__MAKECINT__) + +#include "AliABSOv3.h" +#include "AliBODY.h" +#include "AliConfig.h" +#include "AliDIPOv3.h" +#include "AliDecayerPythia.h" +#include "AliFRAMEv2.h" +#include "AliGenBox.h" +#include "AliGenFixed.h" +#include "AliGenHijing.h" +#include "AliGenMUONCocktail.h" +#include "AliGenMUONlib.h" +#include "AliGenParam.h" +#include "AliGenScan.h" +#include "AliHALLv3.h" +#include "AliITSv11.h" +#include "AliMAG.h" +#include "AliMagF.h" +#include "AliMUONv1.h" +#include "AliPIPEv3.h" +#include "AliRun.h" +#include "AliRunLoader.h" +#include "AliSHILv3.h" +#include +#include +#include +#include +#include +#include +#include +#include + +//#include "AliZDCv3.h" +//#include "AliFMDv1.h" +//#include "AliPMDv1.h" +//#include "AliVZEROv7.h" + +#endif + +void Config(const char* directory="", + const char* option="param", + const char* digitstore="AliMUONDigitStoreV2S", + bool forEmbedding=kFALSE, + bool forRealistic=kFALSE) { //===================================================================== // Config file for MUON test //===================================================================== // Libraries required by geant321 + + gSystem->Load("liblhapdf.so"); // Parton density functions + gSystem->Load("libpythia6.so"); // Pythia gSystem->Load("libgeant321.so"); + gSystem->Load("libEG"); + gSystem->Load("libEGPythia6"); + gSystem->Load("libAliPythia6.so"); // ALICE specific implementations + new TGeant3TGeo("C++ Interface to Geant3"); + //======================================================================= // Create the output file Text_t filename[100]; @@ -23,7 +100,7 @@ void Config(char directory[100]="", char option[6]="param") { gAlice->Fatal("Config.C","Can not instatiate the Run Loader"); return; } rl->SetCompressionLevel(2); - rl->SetNumberOfEventsPerFile(100); + rl->SetNumberOfEventsPerFile(10000); gAlice->SetRunLoader(rl); //======================================================================= // For having more debuging messages @@ -70,17 +147,17 @@ void Config(char directory[100]="", char option[6]="param") 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); @@ -100,7 +177,24 @@ void Config(char directory[100]="", char option[6]="param") gener->SetCutOnChild(1); gener->SetChildPhiRange(0.,360.); gener->SetChildThetaRange(171.0,178.0); - gener->SetOrigin(0,0,0); //vertex position gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position + gener->SetOrigin(0,0,0); //vertex position gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position + if (forRealistic) + { + gener->SetVertexSmear(kPerEvent); + } + gener->SetForceDecay(kDiMuon); + gener->SetTrackingFlag(1); + gener->Init(); + } + if (!strcmp(option,"paramJpsi")) { + AliGenParam *gener = new AliGenParam(1, AliGenMUONlib::kJpsi); + gener->SetMomentumRange(0,999); + gener->SetPtRange(0,100.); + gener->SetPhiRange(0., 360.); + gener->SetCutOnChild(1); + gener->SetChildPhiRange(0.,360.); + gener->SetChildThetaRange(171.0,178.0); + gener->SetOrigin(0,0,0); gener->SetForceDecay(kDiMuon); gener->SetTrackingFlag(1); gener->Init(); @@ -146,21 +240,20 @@ void Config(char directory[100]="", char option[6]="param") } //============================================================= // Field (L3 0.5 T) - AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG); - gAlice->SetField(field); + TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1, AliMagF::k5kG)); //============================================================= //=================== Alice BODY parameters ============================= - AliBODY *BODY = new AliBODY("BODY","Alice envelop"); + new AliBODY("BODY","Alice envelop"); //=================== ABSO parameters ============================ - AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber"); + new AliABSOv3("ABSO", "Muon Absorber"); //=================== DIPO parameters ============================ - AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2"); + new AliDIPOv3("DIPO", "Dipole version 2"); //================== HALL parameters ============================ - AliHALL *HALL = new AliHALL("HALL", "Alice Hall"); + new AliHALLv3("HALL", "Alice Hall"); //=================== PIPE parameters ============================ - AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe"); + new AliPIPEv3("PIPE", "Beam Pipe"); //=================== SHIL parameters ============================ - AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2"); + new AliSHILv3("SHIL", "Shielding Version 2"); //=================== MUON Subsystem =========================== AliMUON *MUON = new AliMUONv1("MUON", "default"); @@ -174,9 +267,30 @@ void Config(char directory[100]="", char option[6]="param") // 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); + // Activate the following line when running with Fluka + // MUON->SetIsMaxStep(kFALSE); + // Use SetDigitStoreClassName() to change the digitStore implementation used by (s)digitizer + MUON->SetDigitStoreClassName(digitstore); + + if ( forEmbedding ) + { + // Noise-only digits in tracker/trigger (0=no noise, 1=default (noise in tracker), 2=noise in tracker and trigger): + cout << "****** DISABLING NOISE GENERATION AS WE DO EMBEDDING ******" << endl; + MUON->SetDigitizerWithNoise(0); + MUON->SetConvertTrigger(true); + + new AliITSv11("ITS","ITS v11"); + } + else if (forRealistic) + { + new AliITSv11("ITS","ITS v11"); + } + + // Use non-high performance raw data decoder + //MUON->SetFastTrackerDecoder(kFALSE); + //MUON->SetFastTriggerDecoder(kFALSE); + // // If SetAlign, the detection elements transformations // are taken from the input file and not from the code @@ -184,6 +298,9 @@ void Config(char directory[100]="", char option[6]="param") // 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 +310,3 @@ void Config(char directory[100]="", char option[6]="param") // MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON)); // MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON)); } - -Float_t EtaToTheta(Float_t arg){ - return (180./TMath::Pi())*2.*atan(exp(-arg)); -}