]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TMEVSIM/AliMevSimParticle.cxx
Classes imported from EVGEN
[u/mrichter/AliRoot.git] / TMEVSIM / AliMevSimParticle.cxx
CommitLineData
36b81802 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/*
17$Log$
18Revision 1.3 2001/10/21 18:35:56 hristov
19Several pointers were set to zero in the default constructors to avoid memory management problems
20
21Revision 1.2 2001/03/24 10:08:30 morsch
22Log tag and copyright notice added.
23
24*/
25
26#include "AliMevSimParticle.h"
27
28
29ClassImp(AliMevSimParticle)
30
31
32///////////////////////////////////////////////////////////////////////////////////////
33
34AliMevSimParticle::AliMevSimParticle()
35 : TMevSimPartTypeParams() {
36 fConv = 0;
37}
38
39///////////////////////////////////////////////////////////////////////////////////////
40
41AliMevSimParticle::AliMevSimParticle(PDG_t pdg, Int_t multmean, Int_t multvc,
42 Float_t tempmean, Float_t tempstdev, Float_t sigmamean,
43 Float_t sigmastdev, Float_t expvelmean, Float_t expvelstdev)
44
45 : TMevSimPartTypeParams(0, multmean, multvc, tempmean, tempstdev,
46 sigmamean, sigmastdev, expvelmean, expvelstdev) {
47
48
49 // Calculate geant ID from pdg
50 fConv = new TMevSimConverter();
51 fPdg = pdg;
52 if (fConv) fGPid = fConv->IdFromPDG(pdg);
53
54}
55
56///////////////////////////////////////////////////////////////////////////////////////
57
58AliMevSimParticle::~AliMevSimParticle() {
59}
60
61///////////////////////////////////////////////////////////////////////////////////////
62
63void AliMevSimParticle::SetPDG(PDG_t pdg) {
64
65 fPdg = pdg;
66 fGPid = fConv->IdFromPDG(pdg);
67}
68
69///////////////////////////////////////////////////////////////////////////////////////
70
71PDG_t AliMevSimParticle::GetPDG() {
72
73 fPdg = (PDG_t)fConv->PDGFromId(fGPid);
74 return fPdg;
75}
76
77///////////////////////////////////////////////////////////////////////////////////////
78
79
80
81