]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliESDkink.cxx
Possibility to run the reconstruction over a DATE event located in memory. Needed...
[u/mrichter/AliRoot.git] / STEER / AliESDkink.cxx
CommitLineData
51ad6848 1/**************************************************************************
2 * Copyright(c) 1998-1999, 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/* $Id$ */
17
18//-------------------------------------------------------------------------
19// Origin: Marian Ivanov marian.ivanov@cern.ch
20//-------------------------------------------------------------------------
21
22#include <Riostream.h>
23#include <TMath.h>
24#include <TPDGCode.h>
25#include "AliESDkink.h"
51ad6848 26
27
28ClassImp(AliESDkink)
29
90e48c0c 30//____________________________________________________________________
31AliESDkink::AliESDkink() :
32 TObject(),
90e48c0c 33 fParamDaughter(),
34 fParamMother(),
35 fDist1(-1),
36 fDist2(-1),
562dd0b4 37 fRr(0),
90e48c0c 38 fShapeFactor(0),
562dd0b4 39 fID(0),
40 fRow0(0)
90e48c0c 41{
51ad6848 42 //
562dd0b4 43 //Default constructor
51ad6848 44 //
7c97ee80 45 for (Int_t i=0;i<12;i++) fStatus[i]=0;
7c97ee80 46 for (Int_t i=0;i<2;i++)
47 for (Int_t j=0;j<2;j++){
562dd0b4 48 fTPCdensity[i][j]=0;
7c97ee80 49 }
6e1f4e79 50 fTPCncls[0]=fTPCncls[1]=0;
51
52 for (Int_t i=0; i<3; i++) {
53 fPdr[i] = 0;
54 fXr[i] = 0;
55 fPm[i] = 0;
56 fAngle[i] = 0;
57 }
562dd0b4 58 fLab[0]=fLab[1]=0;
6e1f4e79 59 fIndex[0]=fIndex[1]=-1;
60 fMultiple[0]=fMultiple[1]=0;
51ad6848 61}
62
562dd0b4 63AliESDkink::AliESDkink(const AliESDkink &source):
64 TObject(source),
65 fParamDaughter(source.fParamDaughter),
66 fParamMother(source.fParamMother),
67 fDist1(source.fDist1),
68 fDist2(source.fDist1),
69 fRr(source.fRr),
70 fShapeFactor(source.fShapeFactor),
71 fID(source.fID),
72 fRow0(source.fRow0)
73{
74 //
75 //Copy constructor
76 //
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];
85 }
86 }
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];
92 }
93}
94
95//_____________________________________________________________________________
96AliESDkink& AliESDkink::operator=(const AliESDkink &source)
97{
98 //
99 // assignment operator
100 //
101
102 if (this!=&source) {
103 TObject::operator=(source);
104 fParamDaughter = source.fParamDaughter;
105 fParamMother = source.fParamMother;
106 fDist1 = source.fDist1;
107 fDist2 = source.fDist1;
108 fRr = source.fRr;
109 fShapeFactor = source.fShapeFactor;
110 fID = source.fID;
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];
120 }
121 }
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];
127 }
128 }
129
130 return *this;
131}
132
51ad6848 133void AliESDkink::SetMother(const AliExternalTrackParam & pmother) {
134 //
135 // set mother
136 //
137 fParamMother = pmother;
138}
139
140void AliESDkink::SetDaughter(const AliExternalTrackParam & pdaughter){
141 //
142 //set daughter
143 //
144 fParamDaughter = pdaughter;
145
146}
147
562dd0b4 148Double_t AliESDkink::GetTPCDensityFactor() const
51ad6848 149{
150 //
151 //
562dd0b4 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));
51ad6848 153}
154
155Float_t AliESDkink::GetQt() const
156{
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;
159}