1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 // Origin: Marian Ivanov marian.ivanov@cern.ch
20 //-------------------------------------------------------------------------
22 #include <Riostream.h>
25 #include "AliESDkink.h"
30 //____________________________________________________________________
31 AliESDkink::AliESDkink() :
45 for (Int_t i=0;i<12;i++) fStatus[i]=0;
46 for (Int_t i=0;i<2;i++)
47 for (Int_t j=0;j<2;j++){
50 fTPCncls[0]=fTPCncls[1]=0;
52 for (Int_t i=0; i<3; i++) {
59 fIndex[0]=fIndex[1]=-1;
60 fMultiple[0]=fMultiple[1]=0;
63 AliESDkink::AliESDkink(const AliESDkink &source):
65 fParamDaughter(source.fParamDaughter),
66 fParamMother(source.fParamMother),
67 fDist1(source.fDist1),
68 fDist2(source.fDist1),
70 fShapeFactor(source.fShapeFactor),
77 for (Int_t i=0;i<12;i++) fStatus[i]=source.fStatus[i];
78 for (Int_t i=0;i<2;i++){
79 fTPCncls[i] = source.fTPCncls[i];
80 fLab[i] = source.fLab[i];
81 fIndex[i] = source.fIndex[i];
82 fMultiple[i]= source.fMultiple[i];
83 for (Int_t j=0;j<2;j++){
84 fTPCdensity[i][j] = source.fTPCdensity[i][j];
87 for (Int_t i=0; i<3; i++) {
88 fPdr[i] = source.fPdr[i];
89 fXr[i] = source.fXr[i];
90 fPm[i] = source.fPm[i];
91 fAngle[i] = source.fAngle[i];
95 //_____________________________________________________________________________
96 AliESDkink& AliESDkink::operator=(const AliESDkink &source)
99 // assignment operator
103 TObject::operator=(source);
104 fParamDaughter = source.fParamDaughter;
105 fParamMother = source.fParamMother;
106 fDist1 = source.fDist1;
107 fDist2 = source.fDist1;
109 fShapeFactor = source.fShapeFactor;
111 fRow0 = source.fRow0;
112 for (Int_t i=0;i<12;i++) fStatus[i]=source.fStatus[i];
113 for (Int_t i=0;i<2;i++){
114 fTPCncls[i] = source.fTPCncls[i];
115 fLab[i] = source.fLab[i];
116 fIndex[i] = source.fIndex[i];
117 fMultiple[i]= source.fMultiple[i];
118 for (Int_t j=0;j<2;j++){
119 fTPCdensity[i][j] = source.fTPCdensity[i][j];
122 for (Int_t i=0; i<3; i++) {
123 fPdr[i] = source.fPdr[i];
124 fXr[i] = source.fXr[i];
125 fPm[i] = source.fPm[i];
126 fAngle[i] = source.fAngle[i];
133 void AliESDkink::SetMother(const AliExternalTrackParam & pmother) {
137 fParamMother = pmother;
140 void AliESDkink::SetDaughter(const AliExternalTrackParam & pdaughter){
144 fParamDaughter = pdaughter;
148 Double_t AliESDkink::GetTPCDensityFactor() const
152 return fTPCdensity[0][0]+fTPCdensity[1][1]-TMath::Max(fTPCdensity[0][1],Double_t(0.0))-TMath::Max(fTPCdensity[1][0],Double_t(0.0));
155 Float_t AliESDkink::GetQt() const
157 Float_t dmomentum = TMath::Sqrt(fPdr[0]*fPdr[0]+fPdr[1]*fPdr[1]+fPdr[2]*fPdr[2]);
158 return TMath::Sin(fAngle[2])*dmomentum;