]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliHFEreducedMCParticle.cxx
Reduced events
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEreducedMCParticle.cxx
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 // Debug MC particle
17 // the tree is represented as reduced events
18 // 
19 // Authors:
20 //   M.Fasel <M.Fasel@gsi.de>
21 //
22 #include "TObjArray.h"
23 #include <cstring>
24
25 #include "AliHFEreducedMCParticle.h"
26
27 ClassImp(AliHFEreducedMCParticle)
28
29 //_______________________________________
30 AliHFEreducedMCParticle::AliHFEreducedMCParticle():
31 TObject(),
32   fSignedPt(0.),
33   fP(0.),
34   fEta(0.),
35   fPhi(0.),
36   fPdg(0),
37   fMotherPdg(0),
38   fSource(5),
39   fSignal(kFALSE)
40 {
41   //
42   // Default constructor
43   //
44         memset(fProductionVertex, 0, sizeof(Double_t) *3);      // Initialise production vertex array
45 }
46
47 //_______________________________________
48 AliHFEreducedMCParticle::AliHFEreducedMCParticle(const AliHFEreducedMCParticle &ref):
49   TObject(ref),
50   fSignedPt(ref.fSignedPt),
51   fP(ref.fP),
52   fEta(ref.fEta),
53   fPhi(ref.fPhi),
54   fPdg(ref.fPdg),
55   fMotherPdg(ref.fMotherPdg),
56   fSource(ref.fSource),
57   fSignal(ref.fSignal)
58 {
59   //
60   // Copy constructor
61   //
62   memcpy(fProductionVertex, ref.fProductionVertex, sizeof(Double_t) *3);      // Port production vertex array
63 }
64
65 //_______________________________________
66 AliHFEreducedMCParticle &AliHFEreducedMCParticle::operator=(const AliHFEreducedMCParticle &ref){
67   // 
68   // Assignment operator
69   //
70   if(&ref != this){
71     TObject::operator=(ref);
72     fSignedPt = ref.fSignedPt;
73     fP= ref.fP;
74     fEta = ref.fEta;
75     fPhi = ref.fPhi;
76     fPdg = ref.fPdg;
77     fMotherPdg = ref.fMotherPdg;
78     fSource = ref.fSource;
79     fSignal = ref.fSignal;
80     memcpy(fProductionVertex, ref.fProductionVertex, sizeof(Double_t) *3); 
81   }
82   return *this;
83 }
84