AliPhysics  608b256 (608b256)
AliDalitzEventMC.cxx
Go to the documentation of this file.
1 #include "AliVTrack.h"
2 #include "AliVVertex.h"
3 #include "AliESDEvent.h"
4 #include "AliAODEvent.h"
5 #include "AliDalitzEventMC.h"
6 #include "AliDalitzAODESDMC.h"
7 ClassImp( AliDalitzEventMC )
8 //-----------------------------------------------------------------------------------------------
10  fESDEventMC(0),
11  fAODEvent(0),
12  fIsESDMC(kTRUE)
13  {
14 
15  }
16 
17  AliDalitzEventMC::AliDalitzEventMC(AliMCEvent* lESDMCEvent):
18  fESDEventMC(0),
19  fAODEvent(0),
20  fIsESDMC(kTRUE)
21  {
22  fESDEventMC=lESDMCEvent;
23  };
25  fESDEventMC(0),
26  fAODEvent(0),
27  fIsESDMC(kFALSE)
28  {
29  fAODEvent=lAODMCEvent;
30  };
31 
33  }
34 
35 
36 
38  if (fIsESDMC==kTRUE){
39  AliDalitzAODESDMC* esdparticle= new AliDalitzAODESDMC((TParticle*)fESDEventMC->Particle(i));
40  return esdparticle;}
41 
42  else {
43 
44  TClonesArray *AODMCTrackArray = dynamic_cast<TClonesArray*>(fAODEvent->FindListObject(AliAODMCParticle::StdBranchName()));
45 
46  AliAODMCParticle *aodparticle0 = (AliAODMCParticle*) AODMCTrackArray->At(i);
47  AliDalitzAODESDMC* aodparticle1= new AliDalitzAODESDMC(aodparticle0);
48  return aodparticle1;
49  }
50  }
51 
AliDalitzAODESDMC * Particle(Int_t i)
AliMCEvent * fESDEventMC
int Int_t
Definition: External.C:63
virtual ~AliDalitzEventMC()
AliAODEvent * fAODEvent