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 **************************************************************************/
16 //_________________________________________________________________________
17 // Macros performing the full simulation chain
19 // root> .L Simulation.C++
20 // root> sim(2, "GSD", "PHOS EMCAL") --> generates 2 events (Config.C)
21 // and produces Digits and SDigits
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)
28 //_________________________________________________________________________
29 #include "AliSimulation.h"
31 #include "Riostream.h"
32 #include "TStopwatch.h"
34 void simu(Int_t nevents=1, TString opt="GSD", TString name="all", TString cdb="")
37 // Generation and simulation
38 if ( !opt.Contains("G") )
39 sim.SetRunGeneration(kFALSE) ;
41 if ( !opt.Contains("S") )
42 sim.SetMakeSDigits("") ;
44 sim.SetMakeSDigits(name.Data()) ;
45 if (name.Contains("ITS") || name.Contains("all"))
46 sim.SetMakeDigitsFromHits("ITS ") ;
47 if (name.Contains("TPC") || name.Contains("all"))
48 sim.SetMakeDigitsFromHits("TPC") ;
51 if ( !opt.Contains("D") )
52 sim.SetMakeDigits("") ;
54 sim.SetMakeDigits(name.Data()) ;
56 if ( opt.Contains("M") )
57 sim.MergeWith("bgrd/galice.root") ;
59 sim.SetRegionOfInterest(kFALSE) ;
60 if ( opt.Contains("W") )
61 sim.SetWriteRawData(name.Data(),"raw.root",kTRUE) ;
63 sim.SetDefaultStorage(cdb.Data()) ;