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 // AOD Pid class to store additional pid information
20 // Author: Annalisa Mastroserio
21 //-------------------------------------------------------------------------
23 #include "AliAODPid.h"
24 #include "AliESDtrack.h"
30 //______________________________________________________________________________
31 AliAODPid::AliAODPid():
39 // default constructor
40 for(Int_t i=0; i<kSPECIES; i++) fIntTime[i]=0;
44 //______________________________________________________________________________
45 AliAODPid::~AliAODPid()
53 //______________________________________________________________________________
54 AliAODPid::AliAODPid(const AliAODPid& pid) :
56 fITSsignal(pid.fITSsignal),
57 fTPCsignal(pid.fTPCsignal),
58 fTRDnSlices(pid.fTRDnSlices),
60 fTOFesdsignal(pid.fTOFesdsignal),
61 fHMPIDsignal(pid.fHMPIDsignal)
64 fTRDslices = new Double32_t[fTRDnSlices];
65 for(Int_t i=0; i< fTRDnSlices; i++) fTRDslices[i]=pid.fTRDslices[i];
66 for(Int_t i=0; i<kSPECIES; i++) fIntTime[i]=pid.fIntTime[i];
69 //______________________________________________________________________________
70 AliAODPid& AliAODPid::operator=(const AliAODPid& pid)
72 // Assignment operator
75 fITSsignal=pid.fITSsignal;
76 fTPCsignal=pid.fTPCsignal;
78 if(pid.fTRDnSlices<=0||(fTRDnSlices!=pid.fTRDnSlices)){
79 // only delete if number changed or is 0
82 if(pid.fTRDnSlices>0) fTRDslices = new Double32_t[fTRDnSlices];
84 fTRDnSlices=pid.fTRDnSlices;
86 for(Int_t i=0; i< fTRDnSlices; i++) fTRDslices[i]=pid.fTRDslices[i];
87 fTOFesdsignal=pid.fTOFesdsignal;
88 fHMPIDsignal=pid.fHMPIDsignal;
89 for(Int_t i=0; i<kSPECIES; i++) fIntTime[i]=pid.fIntTime[i];
94 //_______________________________________________________________________________
95 void AliAODPid::GetIntegratedTimes(Double_t timeint[kSPECIES])
97 // Returns the array with integrated times for each particle hypothesis
98 for(Int_t i=0; i<kSPECIES; i++) timeint[i]=fIntTime[i];
100 //_______________________________________________________________________________
101 void AliAODPid::SetIntegratedTimes(Double_t timeint[kSPECIES])
103 // Returns the array with integrated times for each particle hypothesis
104 for(Int_t i=0; i<kSPECIES; i++) fIntTime[i]=timeint[i];