3 /**************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
19 * >> Flat structure representing an ESDTrack <<
21 * To be used in the online and offline calibration schema.
23 * Class provides interface methods for
24 * - Filling from AliESDtrack and AliExternalTrackParam, as well
25 * as clusters from ESD friends (if requested)
26 * - HLT Filling to be added
29 * Primary Authors : Sergey Gorbunov, Jochen Thaeder, Chiara Zampolli
31 **************************************************************************/
34 #include "AliFlatESDTrack.h"
35 #include "AliFlatExternalTrackParam.h"
36 #include "AliESDtrack.h"
37 #include "AliExternalTrackParam.h"
38 #include "Riostream.h"
40 // _______________________________________________________________________________________________________
41 AliFlatESDTrack::AliFlatESDTrack() :
42 // Default constructor
50 // _______________________________________________________________________________________________________
53 // _______________________________________________________________________________________________________
54 Int_t AliFlatESDTrack::Set(const AliESDtrack* track)
56 // Fill external track parameters
62 if( !track ) return 0;
64 Int_t iResult = SetExternalTrackParam( track,
65 track->GetInnerParam(),
66 track->GetTPCInnerParam(),
67 track->GetOuterParam(),
68 track->GetConstrainedParam(), NULL );
69 fNITSClusters = track->GetTPCNcls();
74 // _______________________________________________________________________________________________________
75 Int_t AliFlatESDTrack::SetExternalTrackParam(
76 const AliExternalTrackParam* refittedParam,
77 const AliExternalTrackParam* innerParam,
78 const AliExternalTrackParam* innerTPC,
79 const AliExternalTrackParam* outerParam,
80 const AliExternalTrackParam* constrainedParam,
81 const AliExternalTrackParam* outerITS
83 // Fill external track parameters
92 iResult = FillExternalTrackParam(refittedParam, flag);
95 iResult = FillExternalTrackParam(innerParam, flag);
98 iResult = FillExternalTrackParam(innerTPC, flag);
101 iResult = FillExternalTrackParam(outerParam, flag);
104 iResult = FillExternalTrackParam(constrainedParam, flag);
107 iResult = FillExternalTrackParam(outerITS, flag);
112 // _______________________________________________________________________________________________________
113 Int_t AliFlatESDTrack::FillExternalTrackParam(const AliExternalTrackParam* param, UShort_t flag) {
114 // Fill external track parameters
119 Printf(" DEBUG: CONTENT %d >> %p + 0x%07llx = %p", flag, fContent, fContentSize, fContent + fContentSize);
121 AliFlatExternalTrackParam * current = reinterpret_cast<AliFlatExternalTrackParam*> (fContent + fContentSize);
122 current->SetAlpha(param->GetAlpha());
123 current->SetX(param->GetX());
124 current->SetY(param->GetY());
125 current->SetZ(param->GetZ());
126 current->SetSnp(param->GetSnp());
127 current->SetTgl(param->GetTgl());
128 current->SetSigned1Pt(param->GetSigned1Pt());
130 const Double_t *cov = param->GetCovariance();
131 for (Int_t idx = 0; idx <15; ++idx)
132 current->fC[idx] = cov[idx];
134 fTrackParamMask |= flag;
135 fContentSize += sizeof(AliFlatExternalTrackParam);
140 // _______________________________________________________________________________________________________