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