]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/Simulation.C
Logging of Debug, Info and Error Messages follwing AliRoot Standard http://aliweb...
[u/mrichter/AliRoot.git] / PHOS / Simulation.C
CommitLineData
12391a12 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/* $Id$ */
16//_________________________________________________________________________
17// Macros performing the full simulation chain
18// Use Case :
19// root> .L Simulation.C++
20// root> sim(2, "GSD", "PHOS EMCAL") --> generates 2 events (Config.C)
21// and produces Digits and SDigits
22// for PHOS and EMCAL
23// root> sim(2, "GSDM", "PHOS EMCAL") --> same as before but before making Digits
24// the 2 signal events are merged with one
25// background event in ./bgrd/galice.root
26// author : Yves Schutz (CERN/SUBATECH)
27// February 2004
28//_________________________________________________________________________
baf5b427 29#include "AliSimulation.h"
30#include "TString.h"
31#include "AliPHOSGetter.h"
32#include "AliEMCALGetter.h"
33#include "Riostream.h"
34
12391a12 35void simu(Int_t nevents=1, TString opt="GSD", TString name="all")
baf5b427 36{
37 AliSimulation sim ;
38 // Generation and simulation
39 if ( !opt.Contains("G") )
40 sim.SetRunGeneration(kFALSE) ;
41 // Making SDigits
42 if ( !opt.Contains("S") )
43 sim.SetMakeSDigits("") ;
44 else
45 sim.SetMakeSDigits(name.Data()) ;
46 // Making Digits
47 if ( !opt.Contains("D") )
48 sim.SetMakeDigits("") ;
49 else
50 sim.SetMakeDigits(name.Data()) ;
51 //Merging
4f36a998 52 if ( opt.Contains("M") )
23c75532 53 sim.MergeWith("bgrd/galice.root") ;
0068d40c 54 //Region of Interest
55 sim.SetRegionOfInterest(kFALSE) ;
56 if ( opt.Contains("W") )
57 sim.SetWriteRawData(name.Data()) ;
23c75532 58 sim.Run(nevents) ;
baf5b427 59}