Fixed ClassDef() accidentally removed
[u/mrichter/AliRoot.git] / TPC / TPCupgrade / AliToyMCEvent.cxx
CommitLineData
de0014b7 1#include "AliToyMCEvent.h"
526ddf0e 2
de0014b7 3ClassImp(AliToyMCEvent);
d1cf83f5 4Int_t AliToyMCEvent::fgEvCounter = 0;
526ddf0e 5
de0014b7 6AliToyMCEvent::AliToyMCEvent()
526ddf0e 7 :TObject()
cd8ed0ac 8 ,fEventNumber(0)
0403120d 9 ,fEventType(kPhysics)
526ddf0e 10 ,fT0(-1.)
11 ,fX(-1000.)
12 ,fY(-1000.)
13 ,fZ(-1000.)
862220e2 14 ,fSCscale(-1.)
15 ,fSCscaleChi2(0)
de0014b7 16 ,fTracks("AliToyMCTrack")
526ddf0e 17{
d1cf83f5 18 fEventNumber = fgEvCounter;
19 fgEvCounter++;
526ddf0e 20}
21
22//____________________________________________________
de0014b7 23AliToyMCEvent::AliToyMCEvent(const AliToyMCEvent &event)
526ddf0e 24 : TObject(event)
25 ,fEventNumber(event.fEventNumber)
0403120d 26 ,fEventType(event.fEventType)
526ddf0e 27 ,fT0(event.fT0)
28 ,fX(event.fX)
29 ,fY(event.fY)
30 ,fZ(event.fZ)
862220e2 31 ,fSCscale(event.fSCscale)
32 ,fSCscaleChi2(event.fSCscaleChi2)
526ddf0e 33 ,fTracks(event.fTracks)
34{
35 //
36}
37
38//_____________________________________________________
de0014b7 39AliToyMCEvent& AliToyMCEvent::operator = (const AliToyMCEvent &event)
526ddf0e 40{
41 //assignment operator
42 if (&event == this) return *this;
de0014b7 43 new (this) AliToyMCEvent(event);
526ddf0e 44
45 return *this;
46}
47//_____________________________________________________
de0014b7 48AliToyMCTrack* AliToyMCEvent::AddTrack(const AliToyMCTrack &track)
526ddf0e 49{
de0014b7 50 return new(fTracks[fTracks.GetEntriesFast()]) AliToyMCTrack(track);
526ddf0e 51}
0403120d 52//____________________________________________________
53AliToyMCTrack* AliToyMCEvent::AddTrack(Double_t xyz[3],Double_t pxpypz[3],
54 Double_t cv[21],Short_t sign)
55{
56 return new(fTracks[fTracks.GetEntriesFast()]) AliToyMCTrack(xyz,pxpypz,cv,sign);
57}
526ddf0e 58