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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // Simplified TRD slow simulator //
22 ///////////////////////////////////////////////////////////////////////////////
26 #include "AliTRDsimple.h"
27 #include "AliTRDsimpleGen.h"
28 #include "AliTRDsimpleMC.h"
30 ClassImp(AliTRDsimple)
32 //_____________________________________________________________________________
33 AliTRDsimple::AliTRDsimple():TObject()
36 // AliTRDsimple default constructor
43 //_____________________________________________________________________________
44 AliTRDsimple::AliTRDsimple(const AliTRDsimple &s):TObject(s)
47 // AliTRDsimple copy constructor
50 ((AliTRDsimple &) s).Copy(*this);
54 //_____________________________________________________________________________
55 AliTRDsimple::~AliTRDsimple()
58 // AliTRDsimple destructor
67 //_____________________________________________________________________________
68 AliTRDsimple &AliTRDsimple::operator=(const AliTRDsimple &s)
71 // Assignment operator
74 if (this != &s) ((AliTRDsimple &) s).Copy(*this);
79 //_____________________________________________________________________________
80 void AliTRDsimple::Init()
86 fGenerator = new AliTRDsimpleGen();
88 // Create the MC object
89 new AliTRDsimpleMC("simple","Simplified Monte Carlo");
93 //_____________________________________________________________________________
94 void AliTRDsimple::Copy(TObject &s)
100 fGenerator->Copy(*((AliTRDsimple &) s).fGenerator);
104 //_____________________________________________________________________________
105 void AliTRDsimple::ProcessEvent(Int_t ievent)
108 // Runs a single event
113 // Generate a new particle
114 fGenerator->NewParticle(ievent);
120 while (gMC->CurrentVolID(copy) != -1);