added friends to compare component
[u/mrichter/AliRoot.git] / HLT / global / AliHLTGlobalCompareFlatComponent.cxx
CommitLineData
a2e57ab1 1//-*- Mode: C++ -*-
2// $Id: AliHLTGlobalCompareFlatComponent.cxx $
3/**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * ALICE Experiment at CERN, All rights reserved. *
6 * *
7 * Primary Authors: Steffen Weber *
8 * *
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 **************************************************************************/
17
18/** @file AliHLTGlobalCompareFlatComponent.cxx
19 @author Steffen Weber
20 @brief Compare flat events from different inputs
21*/
22
23#include "TMap.h"
24#include "TSystem.h"
25#include "TTimeStamp.h"
26#include "TObjString.h"
27#include "TList.h"
28#include "THnSparse.h"
29#include "AliESDEvent.h"
30#include "AliFlatESDEvent.h"
a88a189e 31#include "AliFlatESDFriend.h"
a2e57ab1 32#include "AliFlatESDTrigger.h"
33#include "AliFlatESDV0.h"
ec748c4a 34#include "AliFlatESDVertex.h"
a2e57ab1 35#include "AliHLTErrorGuard.h"
36#include "AliHLTDataTypes.h"
37#include "AliHLTGlobalCompareFlatComponent.h"
38#include "AliHLTITSClusterDataFormat.h"
39#include "AliHLTTPCDefinitions.h"
a88a189e 40#include "AliTPCseed.h"
41#include "AliExternalTrackParam.h"
a2e57ab1 42#include "TTree.h"
43#include "AliCDBEntry.h"
44#include "AliCDBManager.h"
45
46using namespace std;
47
48/** ROOT macro for the implementation of ROOT specific class methods */
49ClassImp(AliHLTGlobalCompareFlatComponent)
50
51void AliHLTGlobalCompareFlatComponent::printDiff( string name, double val1, double val2){
52 double relDiff = ( val1 != 0 || val2!=0 ) ? (val1-val2)/(fabs(val1) + fabs(val2)): 0;
53 int diff = 0;
54 if (relDiff > 1e-6) diff = 1;
55 else if(relDiff < -1e-6) diff = -1;
56 outFile<<name<<"\t" << val1 << "\t" << val2 <<"\t" << diff << "\n";
57}
a88a189e 58
59
60
61void AliHLTGlobalCompareFlatComponent::printDiff( string name, int n , double* vals1, double* vals2 ){
62 double relDiff = 0;
63 int diff = 0;
64
65 for(int i=0; i<n && diff == 0; i++){
66 relDiff = ( vals1[i] != 0 || vals2[i] !=0 ) ? (vals1[i]-vals2[i])/(fabs(vals1[i]) + fabs(vals2[i])): 0;
67 if (relDiff > 1e-6) diff = 1;
68 else if(relDiff < -1e-6) diff = -1;
69 }
70
71 outFile<<name<<"\t";
72 for(int i=0; i<n;i++){
73 outFile<<vals1[i]<<" ";
74 }
75 outFile<<"\t";
76 for(int i=0; i<n;i++){
77 outFile<<vals2[i]<<" ";
78 }
79 outFile<<"\t" << diff << "\n";
80}
81
82
83
84
a2e57ab1 85void AliHLTGlobalCompareFlatComponent::printDiff( string name, TString val1, TString val2){
86 outFile << name << "\t" << "\t\"" << val1 <<"\"\t\"" << val2 <<"\"\t" << (val1.EqualTo(val2) ?0:1)<<"\n";
87}
88
89/*
90 * ---------------------------------------------------------------------------------
91 * Constructor / Destructor
92 * ---------------------------------------------------------------------------------
93 */
94
95// #################################################################################
96AliHLTGlobalCompareFlatComponent::AliHLTGlobalCompareFlatComponent() :
97 AliHLTProcessor()
98 {
99 // an example component which implements the ALICE HLT processor
100 // interface and does some analysis on the input raw data
101 //
102 // see header file for class documentation
103 // or
104 // refer to README to build package
105 // or
106 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
107 //
108 // NOTE: all helper classes should be instantiated in DoInit()
109}
110
111// #################################################################################
112AliHLTGlobalCompareFlatComponent::~AliHLTGlobalCompareFlatComponent() {
113 // see header file for class documentation
114
115
116
117}
118
119/*
120 * ---------------------------------------------------------------------------------
121 * Public functions to implement AliHLTComponent's interface.
122 * These functions are required for the registration process
123 * ---------------------------------------------------------------------------------
124 */
125
126// #################################################################################
127const Char_t* AliHLTGlobalCompareFlatComponent::GetComponentID() {
128 // see header file for class documentation
129 return "GlobalCompareFlat";
130}
131
132// #################################################################################
133void AliHLTGlobalCompareFlatComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) {
134 // see header file for class documentation
135 list.push_back(kAliHLTDataTypeFlatESD|kAliHLTDataOriginOut );
136}
137
138// #################################################################################
139AliHLTComponentDataType AliHLTGlobalCompareFlatComponent::GetOutputDataType() {
140 // see header file for class documentation
141 return kAliHLTDataTypeTObject|kAliHLTDataOriginOut;
142}
143
144// #################################################################################
145void AliHLTGlobalCompareFlatComponent::GetOutputDataSize( ULong_t& constBase, Double_t& inputMultiplier ) {
146 // see header file for class documentation
147 constBase = 100000;
148 inputMultiplier = 10.0;
149}
150
151
152// #################################################################################
153AliHLTComponent* AliHLTGlobalCompareFlatComponent::Spawn() {
154 // see header file for class documentation
155 return new AliHLTGlobalCompareFlatComponent;
156}
157
158/*
159 * ---------------------------------------------------------------------------------
160 * Protected functions to implement AliHLTComponent's interface.
161 * These functions provide initialization as well as the actual processing
162 * capabilities of the component.
163 * ---------------------------------------------------------------------------------
164 */
165
166// #################################################################################
167Int_t AliHLTGlobalCompareFlatComponent::DoInit( Int_t argc, const Char_t** argv ) {
168 // see header file for class documentation
169 printf("AliHLTGlobalCompareFlatComponent::DoInit\n");
170 // see header file for class documentation
171 int iResult=0;
172
173/*
174
175 Int_t bins[fDim] = {3};
176 Double_t mins[fDim] = {0};
177 Double_t maxs[fDim] = {2};
178 fhDiff = new THnSparseD("Differences","Differences",fDim,bins,mins,maxs);
179
180
181 Int_t tmp = 0;
182
183 fhDiff->GetAxis(tmp)->SetName("Overall");
184 fhDiff->GetAxis(tmp)->SetBinLabel(1,"no differences");
185 fhDiff->GetAxis(tmp)->SetBinLabel(2,"sizes differ");
186 fhDiff->GetAxis(tmp)->SetBinLabel(3,"other differences");
187
188 fhDiff->GetAxis(++tmp)->SetName("GetSize");
189 fhDiff->GetAxis(++tmp)->SetName("GetMagneticField");
190 fhDiff->GetAxis(++tmp)->SetName("GetPeriodNumber");
191 fhDiff->GetAxis(++tmp)->SetName("GetRunNumber");
192 fhDiff->GetAxis(++tmp)->SetName("GetOrbitNumber");
193 fhDiff->GetAxis(++tmp)->SetName("GetBunchCrossNumber");
194 fhDiff->GetAxis(++tmp)->SetName("GetTriggerMask");
195 fhDiff->GetAxis(++tmp)->SetName("GetTriggerMaskNext50");
196 fhDiff->GetAxis(++tmp)->SetName("GetFiredTriggerClasses");
197 fhDiff->GetAxis(++tmp)->SetName("GetNumberOfTracks");
198 fhDiff->GetAxis(++tmp)->SetName("GetNumberOfV0s");
199 fhDiff->GetAxis(++tmp)->SetName("GetTimeStamp");
200 fhDiff->GetAxis(++tmp)->SetName("GetEventSpecie");
201 */
202
203
204
205
206
207 return iResult;
208}
209
210
211
212// #################################################################################
213Int_t AliHLTGlobalCompareFlatComponent::DoDeinit() {
214 // see header file for class documentation
215 printf("AliHLTGlobalCompareFlatComponent::DoDeInit\n");
216
217 Int_t iResult = 0;
218 /*
219 TFile * f = TFile::Open("histograms.root","RECREATE");
220 f->Add(fhDiff);
221 f->Write();
222 f->Close();
223 */
224 //delete fhDiff;
225
226 return iResult;
227}
228
229// #################################################################################
230Int_t AliHLTGlobalCompareFlatComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/,
231 const AliHLTComponentBlockData* /*blocks*/,
232 AliHLTComponentTriggerData& /*trigData*/,
233 AliHLTUInt8_t* /*outputPtr*/,
234 AliHLTUInt32_t& /*size*/,
235 AliHLTComponentBlockDataList& /*outputBlocks*/) {
236 // see header file for class documentation
237
238 printf("AliHLTGlobalCompareFlatComponent::DoEvent\n");
239 Int_t iResult=0;
240
241
242 // -- Only use data event
243 if (!IsDataEvent())
244 return 0;
245
246 AliFlatESDEvent *flatEsd[2] ;
a88a189e 247 AliFlatESDFriend *flatFriend[2] ;
a2e57ab1 248
249 printf("search for input onbjects\n");
250 {
251 int i=0;
252 for ( const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(kAliHLTDataTypeFlatESD|kAliHLTDataOriginOut);
253 pBlock!=NULL && i<2; pBlock = GetNextInputBlock(),i++ ) {
254 flatEsd[i] = reinterpret_cast<AliFlatESDEvent*>( pBlock->fPtr );
255 }
a88a189e 256 i=0;
257 for ( const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(kAliHLTDataTypeFlatESDFriend|kAliHLTDataOriginOut);
258 pBlock!=NULL && i<2; pBlock = GetNextInputBlock(),i++ ) {
259 flatFriend[i] = reinterpret_cast<AliFlatESDFriend*>( pBlock->fPtr );
260 }
261
a2e57ab1 262 }
a88a189e 263 cout<<"size event : "<<flatEsd[0]->GetSize() << " "<<flatEsd[1]->GetSize()<<endl;
264 cout<<"nTracks : "<<flatEsd[0]->GetNumberOfTracks()<<" "<<flatEsd[1]->GetNumberOfTracks()<<endl;
265
266 cout<<"size friend : "<<flatFriend[0]->GetSize() << " "<<flatFriend[1]->GetSize()<<endl;
267 cout<<"nFriendTracks : "<<flatFriend[0]->GetNumberOfTracks()<<" "<<flatFriend[1]->GetNumberOfTracks()<<endl;
a2e57ab1 268
269 outFile.open("comparison.txt",ios::app);
ec748c4a 270
271 // Compare Event variables
272
273 outFile<<"\n\n------------------\nnew AliFlatESDEvent\n------------------\n";
a2e57ab1 274 printDiff( "AliFlatESDEvent::GetSize" ,flatEsd[0]->GetSize(), flatEsd[1]->GetSize() ) ;
275 printDiff( "AliFlatESDEvent::GetMagneticField",flatEsd[0]->GetMagneticField(),flatEsd[1]->GetMagneticField() );
276 printDiff( "AliFlatESDEvent::GetPeriodNumber",flatEsd[0]->GetPeriodNumber(),flatEsd[1]->GetPeriodNumber() );
277 printDiff( "AliFlatESDEvent::GetRunNumber",flatEsd[0]->GetRunNumber(), flatEsd[1]->GetRunNumber() );
278 printDiff( "AliFlatESDEvent::GetOrbitNumber",flatEsd[0]->GetOrbitNumber(),flatEsd[1]->GetOrbitNumber() );
279 printDiff( "AliFlatESDEvent::GetBunchCrossNumber",flatEsd[0]->GetBunchCrossNumber(),flatEsd[1]->GetBunchCrossNumber() );
280 printDiff( "AliFlatESDEvent::GetTriggerMask",flatEsd[0]->GetTriggerMask(),flatEsd[1]->GetTriggerMask() );
281 printDiff( "AliFlatESDEvent::GetTriggerMaskNext50",flatEsd[0]->GetTriggerMaskNext50(),flatEsd[1]->GetTriggerMaskNext50() );
282 printDiff( "AliFlatESDEvent::GetFiredTriggerClasses",flatEsd[0]->GetFiredTriggerClasses() ,flatEsd[1]->GetFiredTriggerClasses() );
283 printDiff( "AliFlatESDEvent::GetNumberOfTracks",flatEsd[0]->GetNumberOfTracks(), flatEsd[1]->GetNumberOfTracks() );
284 printDiff( "AliFlatESDEvent::GetNumberOfV0s",flatEsd[0]->GetNumberOfV0s(),flatEsd[1]->GetNumberOfV0s() );
285 printDiff( "AliFlatESDEvent::GetTimeStamp",flatEsd[0]->GetTimeStamp(),flatEsd[1]->GetTimeStamp() );
286 printDiff( "AliFlatESDEvent::GetEventSpecie",flatEsd[0]->GetEventSpecie(),flatEsd[1]->GetEventSpecie() );
287 printDiff( "AliFlatESDEvent::GetNumberOfTriggerClasses",flatEsd[0]->GetNumberOfTriggerClasses(),flatEsd[1]->GetNumberOfTriggerClasses() );
288
ec748c4a 289 const AliFlatESDVertex * vertexTracks[2] = {flatEsd[0]->GetFlatPrimaryVertexTracks(), flatEsd[1]->GetFlatPrimaryVertexTracks()};
290 printDiff("AliFlatESDEvent::GetFlatPrimaryVertexTracks", (vertexTracks[0] ? 1:0), (vertexTracks[1] ? 1:0) );
291
292 const AliFlatESDVertex * vertexSPD[2] = {flatEsd[0]->GetFlatPrimaryVertexSPD(), flatEsd[1]->GetFlatPrimaryVertexSPD()};
293 printDiff("AliFlatESDEvent::GetFlatPrimaryVertexSPD", (vertexSPD[0] ? 1:0), (vertexSPD[1] ? 1:0) );
294
295 // Compare primary vertices
296
297 if(vertexTracks[0] && vertexTracks[1]){
298 outFile<<"\nnew AliFlatESDVertexTracks\n";
299 printDiff( "AliFlatESDVertexTracks::GetSize",vertexTracks[0]->GetSize(),vertexTracks[1]->GetSize() );
300 printDiff( "AliFlatESDVertexTracks::GetX",vertexTracks[0]->GetX(),vertexTracks[1]->GetX() );
301 printDiff( "AliFlatESDVertexTracks::GetY",vertexTracks[0]->GetY(),vertexTracks[1]->GetY() );
302 printDiff( "AliFlatESDVertexTracks::GetZ",vertexTracks[0]->GetZ(),vertexTracks[1]->GetZ() );
303 }
304
305 if(vertexSPD[0] && vertexSPD[1]){
306 outFile<<"\nnew AliFlatESDVertexSPD\n";
a88a189e 307 outFile<<"AliFlatESDVertexSPD::memcmp "<<memcmp(vertexSPD[0], vertexSPD[1], max(vertexSPD[0]->GetSize(), vertexSPD[1]->GetSize()))<<"\n";
ec748c4a 308 printDiff( "AliFlatESDVertexSPD::GetSize",vertexSPD[0]->GetSize(),vertexSPD[1]->GetSize() );
309 printDiff( "AliFlatESDVertexSPD::GetX",vertexSPD[0]->GetX(),vertexSPD[1]->GetX() );
310 printDiff( "AliFlatESDVertexSPD::GetY",vertexSPD[0]->GetY(),vertexSPD[1]->GetY() );
311 printDiff( "AliFlatESDVertexSPD::GetZ",vertexSPD[0]->GetZ(),vertexSPD[1]->GetZ() );
312 }
313
314
315 // Compare triggers
316
a2e57ab1 317 if(flatEsd[0]->GetNumberOfTriggerClasses() && flatEsd[1]->GetNumberOfTriggerClasses() ){
318 outFile<<"------------------\ntriggers\n------------------\n";
319 AliFlatESDTrigger * trigger[2] = { const_cast<AliFlatESDTrigger*>(flatEsd[0]->GetTriggerClasses() ) , const_cast<AliFlatESDTrigger*>(flatEsd[1]->GetTriggerClasses() ) };
320 for( Int_t i = 0; i < flatEsd[0]->GetNumberOfTriggerClasses() && i < flatEsd[1]->GetNumberOfTriggerClasses() ; i++ ){
ec748c4a 321 outFile<<"\nnew AliFlatESDTrigger\n";
a2e57ab1 322 printDiff( "AliFlatESDTrigger::GetSize",trigger[0]->GetSize(),trigger[1]->GetSize() );
323 printDiff( "AliFlatESDTrigger::GetTriggerIndex",trigger[0]->GetTriggerIndex(),trigger[1]->GetTriggerIndex() );
324 printDiff( "AliFlatESDTrigger::GetTriggerClassName",trigger[0]->GetTriggerClassName(),trigger[1]->GetTriggerClassName() );
325
326 trigger[0] = trigger[0]->GetNextTriggerNonConst();
327 trigger[1] = trigger[1]->GetNextTriggerNonConst();
328 }
329 }
ec748c4a 330
331 // Compare v0s
332
a2e57ab1 333 if(flatEsd[0]->GetNumberOfV0s() && flatEsd[1]->GetNumberOfV0s() ){
334 outFile<<"------------------\nv0s\n------------------\n";
335
336 AliFlatESDV0 * v0[2] = { const_cast<AliFlatESDV0*>(flatEsd[0]->GetV0s() ) , const_cast<AliFlatESDV0*>(flatEsd[1]->GetV0s() ) };
337 for( Int_t i = 0; i < flatEsd[0]->GetNumberOfV0s() && i < flatEsd[1]->GetNumberOfV0s() ; i++ ){
ec748c4a 338 outFile<<"\nnew AliFlatESDV0\n";
a2e57ab1 339 printDiff( "AliFlatESDV0::GetSize",v0[0]->GetSize(),v0[1]->GetSize() );
340 printDiff( "AliFlatESDV0::GetNegTrackID",v0[0]->GetNegTrackID(),v0[1]->GetNegTrackID() );
341 printDiff( "AliFlatESDV0::GetPosTrackID",v0[0]->GetPosTrackID(),v0[1]->GetPosTrackID() );
342
343 v0[0] = v0[0]->GetNextV0NonConst();
344 v0[1] = v0[1]->GetNextV0NonConst();
345 }
346 }
347
cee25adb 348 // Compare tracks
349
350 if(flatEsd[0]->GetNumberOfTracks() && flatEsd[1]->GetNumberOfTracks() ){
351 outFile<<"------------------\ntracks\n------------------\n";
352
353 AliFlatESDTrack * track[2] = { const_cast<AliFlatESDTrack*>(flatEsd[0]->GetTracks() ) , const_cast<AliFlatESDTrack*>(flatEsd[1]->GetTracks() ) };
354 for( Int_t t = 0; t < flatEsd[0]->GetNumberOfTracks() && t < flatEsd[1]->GetNumberOfTracks() ; t++ ){
355 outFile<<"\nnew AliFlatESDTrack\n";
356 printDiff( "AliFlatESDTrack::GetSize",track[0]->GetSize(),track[1]->GetSize() );
357 printDiff( "AliFlatESDTrack::GetNumberOfTPCClusters",track[0]->GetNumberOfTPCClusters(),track[1]->GetNumberOfTPCClusters() );
358 printDiff( "AliFlatESDTrack::GetNumberOfITSClusters",track[0]->GetNumberOfITSClusters(),track[1]->GetNumberOfITSClusters() );
359
360 const char* pNames[7] = {"", "Refitted", "Ip", "TPCInner", "Op", "Cp", "ITSOUT"};
361
362 const AliFlatExternalTrackParam * p[7][2] = {
363 {track[0]->GetFlatTrackParam(), track[1]->GetFlatTrackParam()},
364 {track[0]->GetFlatTrackParamRefitted(), track[1]->GetFlatTrackParamRefitted()},
365 {track[0]->GetFlatTrackParamIp(), track[1]->GetFlatTrackParamIp()},
366 {track[0]->GetFlatTrackParamTPCInner(), track[1]->GetFlatTrackParamTPCInner()},
367 {track[0]->GetFlatTrackParamOp(), track[1]->GetFlatTrackParamOp()},
368 {track[0]->GetFlatTrackParamCp(), track[1]->GetFlatTrackParamCp()},
369 {track[0]->GetFlatTrackParamITSOut(), track[1]->GetFlatTrackParamITSOut()}
370 };
371
372 for(int i = 0 ; i<7; i++){
373 printDiff( Form("AliFlatESDTrack::GetFlatTrackParam%s",pNames[i]), (p[i][0] ? 1:0), (p[i][1] ? 1:0) );
374 }
375
376 for(int i = 0 ; i<7; i++){
377 if(p[i][0] && p[i][1] ){
378 outFile<<"\nnew AliFlatExternalTrackParam" << pNames[i] << "\n";
379 printDiff( Form("AliFlatExternalTrackParam%s::GetAlpha",pNames[i]),p[i][0]->GetAlpha(),p[i][1]->GetAlpha() );
380 printDiff( Form("AliFlatExternalTrackParam%s::GetX",pNames[i]),p[i][0]->GetX(),p[i][1]->GetX() );
381 printDiff( Form("AliFlatExternalTrackParam%s::GetY",pNames[i]),p[i][0]->GetY(),p[i][1]->GetY() );
382 printDiff( Form("AliFlatExternalTrackParam%s::GetZ",pNames[i]),p[i][0]->GetZ(),p[i][1]->GetZ() );
383 printDiff( Form("AliFlatExternalTrackParam%s::GetSnp",pNames[i]),p[i][0]->GetSnp(),p[i][1]->GetSnp() );
384 printDiff( Form("AliFlatExternalTrackParam%s::GetTgl",pNames[i]),p[i][0]->GetTgl(),p[i][1]->GetTgl() );
385 printDiff( Form("AliFlatExternalTrackParam%s::GetSigned1Pt",pNames[i]),p[i][0]->GetSigned1Pt(),p[i][1]->GetSigned1Pt() );
386
a88a189e 387
388 Double_t* cov[2] = {(Double_t* ) p[i][0]->GetCov() , (Double_t*) p[i][1]->GetCov() };
389 printDiff( Form("AliFlatExternalTrackParam%s::GetCov",pNames[i]) , 15, cov[0], cov[1]);
cee25adb 390 }
391 }
392
393
394
395
396 track[0] = track[0]->GetNextTrackNonConst();
a88a189e 397 track[1] = track[1]->GetNextTrackNonConst();
cee25adb 398
a88a189e 399 }
400 }
401
402
403 // Compare Friend variables
404
405 outFile<<"\n\n------------------\nnew AliFlatESDFriend\n------------------\n";
406 printDiff( "AliFlatESDFriend::GetSize" ,flatFriend[0]->GetSize(), flatFriend[1]->GetSize() ) ;
407 printDiff( "AliFlatESDFriend::GetNumberOfTracks" ,flatFriend[0]->GetNumberOfTracks(), flatFriend[1]->GetNumberOfTracks());
408 printDiff( "AliFlatESDFriend::GetEntriesInTracks" ,flatFriend[0]->GetEntriesInTracks(), flatFriend[1]->GetEntriesInTracks());
409 printDiff( "AliFlatESDFriend::TestSkipBit" ,flatFriend[0]->TestSkipBit(), flatFriend[1]->TestSkipBit() ) ;
410
411 Double_t clTpc[2][72];
412 Double_t clTpcU[2][72];
413 for(int i = 0 ; i<72; i++){
414 clTpc[0][i] = flatFriend[0]->GetNclustersTPC(i);
415 clTpc[1][i] = flatFriend[1]->GetNclustersTPC(i);
416
417 clTpcU[0][i] = flatFriend[0]->GetNclustersTPCused(i);
418 clTpcU[1][i] = flatFriend[1]->GetNclustersTPCused(i);
419 }
420
421
422 printDiff( "AliFlatESDFriend::GetNclustersTPC" ,72, clTpc[0], clTpc[1] ) ;
423 printDiff( "AliFlatESDFriend::GetNclustersTPCused" ,72, clTpcU[0], clTpcU[1] ) ;
424
425
426 // compare friend tracks
427
428 if(flatFriend[0]->GetEntriesInTracks() && flatFriend[1]->GetEntriesInTracks() ){
429 outFile<<"------------------\nfriend tracks\n------------------\n";
430
431 AliFlatESDFriendTrack * track[2] = { const_cast<AliFlatESDFriendTrack*>(flatFriend[0]->GetFlatTrackEntry(0) ) , const_cast<AliFlatESDFriendTrack*>(flatFriend[1]->GetFlatTrackEntry(0) ) };
432 for( Int_t t = 0; t < flatFriend[0]->GetEntriesInTracks() && t < flatFriend[1]->GetEntriesInTracks() ; t++ ){
433 if(!track[0] || !track[1]) continue;
434 outFile<<"\nnew AliFlatESDFriendTrack\n";
435 printDiff( "AliFlatESDFriendTrack::GetSize",track[0]->GetSize(),track[1]->GetSize() );
cee25adb 436
a88a189e 437 AliExternalTrackParam p[3][2];
438 AliExternalTrackParam q =AliExternalTrackParam() ;
cee25adb 439
a88a189e 440 const char* pNames[3] = {"TPCOut", "ITSOut", "TRDIn"};
cee25adb 441
a88a189e 442 // track[0]->GetTrackParamTPCOut(q );
443 // track[1]->GetTrackParamTPCOut(p[0][1] );
cee25adb 444
a88a189e 445 // track[0]->GetTrackParamITSOut(p[1][0] );
446 //track[1]->GetTrackParamITSOut(p[1][1] );
cee25adb 447
448
a88a189e 449 track[0]->GetTrackParamTRDIn(p[2][0] );
450 track[1]->GetTrackParamTRDIn(p[2][1] );
cee25adb 451
452
a88a189e 453 for(int i = 0 ; i<7; i++){
454 outFile<<"\nnew AliExternalTrackParam" << pNames[i] << "\n";
455 printDiff( Form("AliExternalTrackParam%s::GetAlpha",pNames[i]),p[i][0].GetAlpha(),p[i][1].GetAlpha() );
456 printDiff( Form("AliExternalTrackParam%s::GetX",pNames[i]),p[i][0].GetX(),p[i][1].GetX() );
457 printDiff( Form("AliExternalTrackParam%s::GetY",pNames[i]),p[i][0].GetY(),p[i][1].GetY() );
458 printDiff( Form("AliExternalTrackParam%s::GetZ",pNames[i]),p[i][0].GetZ(),p[i][1].GetZ() );
459 printDiff( Form("AliExternalTrackParam%s::GetSnp",pNames[i]),p[i][0].GetSnp(),p[i][1].GetSnp() );
460 printDiff( Form("AliExternalTrackParam%s::GetTgl",pNames[i]),p[i][0].GetTgl(),p[i][1].GetTgl() );
461 printDiff( Form("AliExternalTrackParam%s::GetSigned1Pt",pNames[i]),p[i][0].GetSigned1Pt(),p[i][1].GetSigned1Pt() );
462
463
464 Double_t* cov[2] = { const_cast<Double_t*>( p[i][0].GetCovariance()) , const_cast<Double_t*>( p[i][1].GetCovariance() ) };
465 printDiff( Form("AliExternalTrackParam%s::GetCovariance",pNames[i]) , 15, cov[0], cov[1]);
466
467 }
468
469
470
471
472
473 AliTPCseed s[2];
474
475
476 track[0]->GetTPCseed(s[0] );
477 track[1]->GetTPCseed(s[1] );
478
479
480 track[0] = track[0]->GetNextTrackNonConst();
481 track[1] = track[1]->GetNextTrackNonConst();
482
483
484 }
cee25adb 485
a88a189e 486 }
a2e57ab1 487
a88a189e 488 outFile.close();
a2e57ab1 489
490
a88a189e 491 return iResult;
a2e57ab1 492}
493
494
495// #################################################################################
496Int_t AliHLTGlobalCompareFlatComponent::ReadPreprocessorValues(const Char_t* /*modules*/) {
497 // see header file for class documentation
498 ALIHLTERRORGUARD(5, "ReadPreProcessorValues not implemented for this component");
499 return 0;
500}
501
502
503int AliHLTGlobalCompareFlatComponent::Configure(const char*/* arguments*/)
504{
505 // see header file for class documentation
506 int iResult=0;
507
508 return iResult;
509}
510
511int AliHLTGlobalCompareFlatComponent::Reconfigure(const char* /*cdbEntry*/, const char* /*chainId*/)
512{
513 // see header file for class documentation
514 int iResult=0;
515
516 return iResult;
517}
518
519