1 /**************************************************************************
2 * Copyright(c) 1998-2007, 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 //-------------------------------------------------------------------------
19 // Realisation of AliVParticle for MC Particles
20 // Implementation wraps a TParticle and delegates the methods
21 // Author: Andreas Morsch, CERN
22 //-------------------------------------------------------------------------
24 #include <TRefArray.h>
26 #include "AliMCParticle.h"
29 ClassImp(AliMCParticle)
31 AliMCParticle::AliMCParticle():
42 AliMCParticle::AliMCParticle(TParticle* part, TRefArray* rarray, Int_t index):
45 fTrackReferences(rarray),
51 fNTrackRef = fTrackReferences->GetEntriesFast();
56 AliMCParticle::AliMCParticle(const AliMCParticle& mcPart) :
66 AliMCParticle& AliMCParticle::operator=(const AliMCParticle& mcPart)
70 AliVParticle::operator=(mcPart);
76 AliMCParticle::~AliMCParticle()
78 // delete the track references passed externally
79 // fParticle should be handled by the user
80 // AliStack in case of AliMCEventHandler
82 fTrackReferences->Delete();
83 delete fTrackReferences;