Update master to aliroot
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODHMPIDrings.cxx
CommitLineData
3bf10ad9 1/**************************************************************************
2 * Copyright(c) 1998-2007, 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
18//
19// Class to handle the AOD tracks with good HMPID data
20// Author: Levente Molnar
21// levente.molnar@cern.ch , March 2012
22//
23
24#include "AliAODHMPIDrings.h"
25
26ClassImp(AliAODHMPIDrings)
27
28//________________________________________________________________________________________________________________________________________________________
29
30AliAODHMPIDrings::AliAODHMPIDrings()
31 :TObject(),
32 fHmpidAODtrkId(0),
33 fHmpidAODqn(0),
34 fHmpidAODcluIdx(0),
35 fHmpidAODtrkTheta(0),
36 fHmpidAODtrkPhi(0),
37 fHmpidAODsignal(0),
38 fHmpidAODocc(0),
39 fHmpidAODchi2(0),
40 fHmpidAODtrkX(0),
41 fHmpidAODtrkY(0),
42 fHmpidAODmipX(0),
43 fHmpidAODmipY(0)
44
45{
46 //default ctor
47 for(Int_t isp = 0 ; isp <AliPID::kSPECIES; isp++) fHmpidAODpid[isp] = 0;
48 for ( Int_t ico = 0 ; ico < 3; ico++) fHMPIDmom[ico] = 0;
49}
50
51//________________________________________________________________________________________________________________________________________________________
52AliAODHMPIDrings::AliAODHMPIDrings(
53 Int_t trkId,
54 Int_t qn,
55 Int_t cluIdx,
824d3e1f 56 Double_t trkTheta,
57 Double_t trkPhi,
58 Double_t signal,
59 Double_t occ,
60 Double_t chi2,
61 Double_t trkX,
62 Double_t trkY,
63 Double_t mipX,
64 Double_t mipY,
65 Double_t *pid,
66 Double_t *p ):
3bf10ad9 67 TObject(),
68
69 fHmpidAODtrkId(trkId),
70 fHmpidAODqn(qn),
71 fHmpidAODcluIdx(cluIdx),
72 fHmpidAODtrkTheta(trkTheta),
73 fHmpidAODtrkPhi(trkPhi),
74 fHmpidAODsignal(signal),
75 fHmpidAODocc(occ),
76 fHmpidAODchi2(chi2),
77 fHmpidAODtrkX(trkX),
78 fHmpidAODtrkY(trkY),
79 fHmpidAODmipX(mipX),
80 fHmpidAODmipY(mipY)
81
82
83{
84 //
85 for(Int_t isp = 0 ; isp <AliPID::kSPECIES; isp++) fHmpidAODpid[isp] = pid[isp];
86 for ( Int_t ico = 0 ; ico < 3; ico++) fHMPIDmom[ico] = p[ico];
87
88}
89//________________________________________________________________________________________________________________________________________________________
90AliAODHMPIDrings::AliAODHMPIDrings(const AliAODHMPIDrings& hmpidAOD):
91
92 TObject(hmpidAOD),
93 fHmpidAODtrkId(hmpidAOD.fHmpidAODtrkId),
94 fHmpidAODqn(hmpidAOD.fHmpidAODqn),
95 fHmpidAODcluIdx(hmpidAOD.fHmpidAODcluIdx),
96 fHmpidAODtrkTheta(hmpidAOD.fHmpidAODtrkTheta),
97 fHmpidAODtrkPhi(hmpidAOD.fHmpidAODtrkPhi),
98 fHmpidAODsignal(hmpidAOD.fHmpidAODsignal),
99 fHmpidAODocc(hmpidAOD.fHmpidAODocc),
100 fHmpidAODchi2(hmpidAOD.fHmpidAODchi2),
101 fHmpidAODtrkX(hmpidAOD.fHmpidAODtrkX),
102 fHmpidAODtrkY(hmpidAOD.fHmpidAODtrkY),
103 fHmpidAODmipX(hmpidAOD.fHmpidAODmipX),
104 fHmpidAODmipY(hmpidAOD.fHmpidAODmipY)
105
106
107{
108 //
109 for(Int_t isp = 0 ; isp <AliPID::kSPECIES; isp++) fHmpidAODpid[isp] = hmpidAOD.fHmpidAODpid[isp];
110 for ( Int_t ico = 0 ; ico < 3; ico++) fHMPIDmom[ico] = hmpidAOD.fHMPIDmom[ico];
111
112}
113
114//________________________________________________________________________________________________________________________________________________________
115AliAODHMPIDrings& AliAODHMPIDrings::operator=(const AliAODHMPIDrings& hmpidAOD)
116{
117 if (this!=&hmpidAOD) {
118 AliAODHMPIDrings::operator=(hmpidAOD);
119 fHmpidAODtrkId = hmpidAOD.fHmpidAODtrkId;
120 fHmpidAODqn = hmpidAOD.fHmpidAODqn;
121 fHmpidAODcluIdx = hmpidAOD.fHmpidAODcluIdx;
122 fHmpidAODtrkTheta = hmpidAOD.fHmpidAODtrkTheta;
123 fHmpidAODtrkPhi = hmpidAOD.fHmpidAODtrkPhi;
124 fHmpidAODsignal = hmpidAOD.fHmpidAODsignal;
125 fHmpidAODocc = hmpidAOD.fHmpidAODocc;
126 fHmpidAODchi2 = hmpidAOD.fHmpidAODchi2;
127 fHmpidAODtrkX = hmpidAOD.fHmpidAODtrkX;
128 fHmpidAODtrkY = hmpidAOD.fHmpidAODtrkY;
129 fHmpidAODmipX = hmpidAOD.fHmpidAODmipX;
130 fHmpidAODmipY = hmpidAOD.fHmpidAODmipY;
131
132 for(Int_t isp = 0 ; isp <AliPID::kSPECIES; isp++) fHmpidAODpid[isp] = hmpidAOD.fHmpidAODpid[isp];
133 for ( Int_t ico = 0 ; ico < 3; ico++) fHMPIDmom[ico] = hmpidAOD.fHMPIDmom[ico];
134
135 }
136
137 return *this;
138
139}
140//________________________________________________________________________________________________________________________________________________________
824d3e1f 141void AliAODHMPIDrings::GetHmpPidProbs(Double_t *pid) const
3bf10ad9 142{
143 // Gets probabilities of each particle type (in HMPID)
144 for (Int_t i=0; i<AliPID::kSPECIES; i++) pid[i]=fHmpidAODpid[i];
145}
146//________________________________________________________________________________________________________________________________________________________
824d3e1f 147void AliAODHMPIDrings::GetHmpMom(Double_t *mom) const
3bf10ad9 148{
149 for( Int_t ico = 0 ; ico < 3; ico++) mom[ico] = fHMPIDmom[ico];
150}
151//________________________________________________________________________________________________________________________________________________________
824d3e1f 152void AliAODHMPIDrings::SetHmpPidProbs(Double_t *pid)
3bf10ad9 153{
154 // Gets probabilities of each particle type (in HMPID)
155 for (Int_t i=0; i<AliPID::kSPECIES; i++) fHmpidAODpid[i] = pid[i];
156}
157
158//________________________________________________________________________________________________________________________________________________________
824d3e1f 159void AliAODHMPIDrings::SetHmpMom(Double_t *mom)
3bf10ad9 160{
161 for( Int_t ico = 0 ; ico < 3; ico++) fHMPIDmom[ico] = mom[ico];
162}
163//________________________________________________________________________________________________________________________________________________________
164