- Reduce number of bins in order to decrease memory consumption
[u/mrichter/AliRoot.git] / PWGJE / FlavourJetTasks / AliPicoV0MC.cxx
1 #include "AliPicoV0MC.h"
2
3 ClassImp(AliPicoV0MC)
4
5 //_____________________________________________________________________________
6 AliPicoV0MC::AliPicoV0MC() :
7 AliPicoV0Base(),
8 fV0PDG(0),
9 fV0Status(0),
10 fV0Kine(),
11 fMotherPDG(0),
12 fMotherStatus(0),
13 fMotherPt(0.),
14 fMotherEta(0.),
15 fMotherRap(0.)
16 {
17 //
18 //  AliPicoV0MC::AliPicoV0MC
19 //
20 }
21
22 //_____________________________________________________________________________
23 AliPicoV0MC::AliPicoV0MC(UInt_t   wMask,
24                          Double_t dV0Radius,
25                          Double_t dV0CosPA,
26                          Double_t dV0DistToPVoverP,
27                          Double_t dDausDCA,
28                          Double_t dPosDCAtoPV,
29                          Double_t dNegDCAtoPV,
30                          Float_t  dDauXrowsTPC,
31                          Double_t dDauXrowsOverFindableClusTPC,
32                          Double_t dPosPx, Double_t dPosPy, Double_t dPosPz,
33                          Double_t dNegPx, Double_t dNegPy, Double_t dNegPz,
34                          Bool_t   bPosInJC, Bool_t bNegInJC,
35                          Int_t idV, UInt_t wsV, Double_t dV0Px, Double_t dV0Py, Double_t dV0Pz, Double_t dV0E,
36                          Int_t idM, UInt_t wsM, Double_t dPtM,  Double_t dEtaM, Double_t dRapM) :
37 AliPicoV0Base(wMask,
38               dV0Radius,
39               dV0CosPA,
40               dV0DistToPVoverP,
41               dDausDCA,
42               dPosDCAtoPV,
43               dNegDCAtoPV,
44               dDauXrowsTPC,
45               dDauXrowsOverFindableClusTPC,
46               dPosPx, dPosPy, dPosPz,
47               dNegPx, dNegPy, dNegPz,
48               bPosInJC, bNegInJC),
49 fV0PDG(idV),
50 fV0Status(wsV),
51 fV0Kine(dV0Px, dV0Py, dV0Pz, dV0E),
52 fMotherPDG(idM),
53 fMotherStatus(wsM),
54 fMotherPt(dPtM),
55 fMotherEta(dEtaM),
56 fMotherRap(dRapM)
57 {
58 //
59 //  AliPicoV0MC::AliPicoV0MC
60 //
61 }
62
63 //_____________________________________________________________________________
64 AliPicoV0MC::AliPicoV0MC(const AliPicoV0MC &src) :
65 AliPicoV0Base(src),
66 fV0PDG(src.fV0PDG),
67 fV0Status(src.fV0Status),
68 fV0Kine(src.fV0Kine),
69 fMotherPDG(src.fMotherPDG),
70 fMotherStatus(src.fMotherStatus),
71 fMotherPt(src.fMotherPt),
72 fMotherEta(src.fMotherEta),
73 fMotherRap(src.fMotherRap)
74 {
75 //
76 //  AliPicoV0MC::AliPicoV0MC
77 //
78 }
79
80 //_____________________________________________________________________________
81 AliPicoV0MC& AliPicoV0MC::operator=(const AliPicoV0MC &src)
82 {
83 //
84 //  AliPicoV0RD::operator=
85 //
86
87   if (&src==this) return *this;
88
89   AliPicoV0Base::operator=(src);
90
91   fV0PDG        = src.fV0PDG;
92   fV0Status     = src.fV0Status;
93   fV0Kine       = src.fV0Kine;
94
95   fMotherPDG    = src.fMotherPDG;
96   fMotherStatus = src.fMotherStatus;
97   fMotherPt     = src.fMotherPt;
98   fMotherEta    = src.fMotherEta;
99   fMotherRap    = src.fMotherRap;
100
101   return *this;
102 }
103
104 //_____________________________________________________________________________
105 AliPicoV0MC::~AliPicoV0MC()
106 {
107 //
108 //  AliPicoV0MC::~AliPicoV0MC
109 //
110 }
111
112 //_____________________________________________________________________________
113 Bool_t AliPicoV0MC::IsKshort(Double_t dCuts[9])
114 {
115 //
116 //  AliPicoV0MC::IsKshort
117 //
118
119   if (!AliPicoV0Base::IsKshort()) return kFALSE;
120 //=============================================================================
121
122   if (!IsKa(dCuts[0],dCuts[1],dCuts[2],dCuts[3],dCuts[4],dCuts[5],dCuts[6],dCuts[7],dCuts[8])) return kFALSE;
123
124   return kTRUE;
125 }
126
127 //_____________________________________________________________________________
128 Bool_t AliPicoV0MC::IsLambda(Double_t dCuts[9])
129 {
130 //
131 //  AliPicoV0MC::IsLambda
132 //
133
134   if (!AliPicoV0Base::IsLambda()) return kFALSE;
135 //=============================================================================
136
137   if (!IsLa(dCuts[0],dCuts[1],dCuts[2],dCuts[3],dCuts[4],dCuts[5],dCuts[6],dCuts[7],dCuts[8])) return kFALSE;
138
139   return kTRUE;
140 }
141
142 //_____________________________________________________________________________
143 Bool_t AliPicoV0MC::IsAntiLa(Double_t dCuts[9])
144 {
145 //
146 //  AliPicoV0MC::IsAntiLa
147 //
148
149   if (!AliPicoV0Base::IsAntiLa()) return kFALSE;
150 //=============================================================================
151
152   if (!IsLa(dCuts[0],dCuts[1],dCuts[2],dCuts[3],dCuts[4],dCuts[5],dCuts[6],dCuts[7],dCuts[8])) return kFALSE;
153
154   return kTRUE;
155 }
156
157 //_____________________________________________________________________________
158 Bool_t AliPicoV0MC::IsV0InRapAcc(Double_t dMin, Double_t dMax)
159 {
160 //
161 //  AliPicoV0MC::IsV0InRapAcc
162 //
163
164   Double_t dRap = fV0Kine.Rapidity();
165   return ((dRap>=dMin) && (dRap<dMax));
166 }
167
168 //_____________________________________________________________________________
169 void AliPicoV0MC::GetControlVariables(Float_t d[18])
170 {
171 //
172 //  AliPicoV0MC::GetControlVariables
173 //
174
175   d[ 0] = (Float_t)fV0Radius;
176   d[ 1] = (Float_t)fV0CosPA;
177   d[ 2] = (Float_t)fV0DistToPVoverP;
178   d[ 3] = (Float_t)fDausDCA;
179   d[ 4] = (Float_t)fPosDCAtoPV;
180   d[ 5] = (Float_t)fNegDCAtoPV;
181   d[ 6] = (Float_t)fDauXrowsTPC;
182   d[ 7] = (Float_t)fDauXrowsOverFindableClusTPC;
183   d[ 8] = (Float_t)KineRD().Pt();
184   d[ 9] = (Float_t)RapidityKa();
185   d[10] = (Float_t)RapidityLa();
186   d[11] = (Float_t)KineMC().Pt();
187   d[12] = (Float_t)KineMC().Rapidity();
188   d[13] = (Float_t)KineKshort().M();
189   d[14] = (Float_t)KineLambda().M();
190   d[15] = (Float_t)KineAntiLa().M();
191   d[16] = (Float_t)fP3Pos.Eta();
192   d[17] = (Float_t)fP3Neg.Eta();
193
194   return;
195 }