]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliHFEpidBase.cxx
Coverity 10698
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEpidBase.cxx
CommitLineData
809a4336 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**************************************************************************/
50685501 15//
16// Abstract PID base class for Detector PID classes
17// Supplies detector PID classes with basic informations (i.e. Debug
18// Level)
19//
20// Authors:
21// Markus Fasel <M.Fasel@gsi.de>
22//
3a72645a 23
24#include "AliAODpidUtil.h"
faee3b18 25#include "AliESDpid.h"
809a4336 26#include "AliHFEpidBase.h"
3a72645a 27#include "AliHFEtools.h"
809a4336 28
29ClassImp(AliHFEpidBase)
30
faee3b18 31//___________________________________________________________________
32AliHFEpidBase::AliHFEpidBase():
33 TNamed(),
34 fESDpid(NULL),
3a72645a 35 fAODpid(NULL)
faee3b18 36{
37 //
38 // Default constructor
39 //
40}
41
809a4336 42//___________________________________________________________________
43AliHFEpidBase::AliHFEpidBase(const Char_t *name):
44 TNamed(name, ""),
faee3b18 45 fESDpid(NULL),
3a72645a 46 fAODpid(NULL)
809a4336 47{
48 //
49 // Default constructor
50 //
51}
52
53//___________________________________________________________________
54AliHFEpidBase::AliHFEpidBase(const AliHFEpidBase &c):
55 TNamed(),
faee3b18 56 fESDpid(NULL),
3a72645a 57 fAODpid(NULL)
809a4336 58{
59 //
60 //Copy constructor
61 //
62 c.Copy(*this);
63}
64
65//___________________________________________________________________
66AliHFEpidBase &AliHFEpidBase::operator=(const AliHFEpidBase &ref){
67 //
68 // Assignment operator
69 //
70 if(this != &ref){
71 ref.Copy(*this);
72 }
73
74 return *this;
75d81601 75}
809a4336 76
77//___________________________________________________________________
78void AliHFEpidBase::Copy(TObject &ref) const {
50685501 79 //
80 // Copy function for assignment operator
81 //
809a4336 82 AliHFEpidBase &target = dynamic_cast<AliHFEpidBase &>(ref);
83
faee3b18 84 target.fESDpid = fESDpid;
3a72645a 85 target.fAODpid = fAODpid;
809a4336 86
87 TNamed::Copy(ref);
88}
89
3a72645a 90//___________________________________________________________________
91AliHFEpidObject &AliHFEpidObject::operator=(const AliHFEpidObject &ref){
92 //
93 // Assignment operator
94 //
95 if(&ref != this){
96 fkRecTrack = ref.fkRecTrack;
97 fAnalysisType = ref.fAnalysisType;
98 fAbInitioPID = ref.fAbInitioPID;
99 fCentrality = ref.fCentrality;
100 }
101 return *this;
102}
103
104//___________________________________________________________________
105void AliHFEpidObject::SetMCTrack(const AliVParticle *mctrack){
106 //
107 // Set the aprioriPID information coming from the MC truth
108 //
109 if(mctrack) fAbInitioPID = AliHFEtools::PDG2AliPID(AliHFEtools::GetPdg(mctrack));
110}
111