Cleaning the code and using "const" wherever it is ppossible (Boris)
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPair.cxx
CommitLineData
0cf0c402 1#include "AliLog.h"
0f7f8d16 2
0cf0c402 3#include "AliRsnEvent.h"
0f7f8d16 4#include "AliRsnPairParticle.h"
5#include "AliRsnPairDef.h"
0cf0c402 6
7#include "AliRsnPair.h"
8
0f7f8d16 9ClassImp ( AliRsnPair )
10
11AliRsnPair::AliRsnPair()
12 : TObject() ,fPairDef(),
13 fPairType ( kESDNoPID )
0cf0c402 14{
0f7f8d16 15 fCurrentCutMgr=0;
16 fMass[0]=-1.0;
17 fMass[1]=-1.0;
18 fRsnMVEventBuffer=0;
19 fNumOfMixEvent=0;
20 fIsSignSame = kFALSE;
21 fIsFilledOnlyInHistRange = kTRUE;
22
0cf0c402 23}
0f7f8d16 24
25AliRsnPair::AliRsnPair ( AliRsnPair::EPairType type, AliRsnPairDef * pairDef,Int_t numOfMix) : TObject(),
26 fPairDef ( *pairDef ),
27 fPairType ( type )
0cf0c402 28{
0f7f8d16 29 fCurrentCutMgr=0;
30 fMass[0]=-1.0;
31 fMass[1]=-1.0;
32 fRsnMVEventBuffer=0;
33 fNumOfMixEvent=numOfMix;
34 fIsSignSame = kFALSE;
35 fIsFilledOnlyInHistRange = kTRUE;
0cf0c402 36}
0f7f8d16 37
38AliRsnPair::~AliRsnPair()
0cf0c402 39{
0cf0c402 40}
0f7f8d16 41
42TString AliRsnPair::GetEffMassHistName ( Int_t index )
0cf0c402 43{
0f7f8d16 44
45 fCurrentCutMgr = ( AliRsnCutMgr* ) fCutMgrs.UncheckedAt ( index );
46
47 TString sName;
48 sName += GetPairTypeName ( fPairType );
49 sName += GetESDParticleName ( fPairDef.GetType( 0 ) );
50 sName += fPairDef.GetCharge ( 0 );
51 sName += GetESDParticleName ( fPairDef.GetType( 1 ) );
52 sName += fPairDef.GetCharge ( 1 );
53 sName += "_";
54 if ( fCurrentCutMgr )
55 sName += fCurrentCutMgr->GetName();
56 else
57 sName += "NoCut";
58 sName += "_";
59 sName += "[";
60 sName += Form ( "%.2f", fPairDef.GetMin() );
61 sName += "-";
62 sName += Form ( "%.2f",fPairDef.GetMax() );
63 sName += "]";
64
65 return sName;
66}
67
68TString AliRsnPair::GetEffMassHistTitle ( Int_t index )
69{
70
71 fCurrentCutMgr= ( AliRsnCutMgr* ) fCutMgrs.UncheckedAt ( index );
72
73 TString sTitle;
74 sTitle += GetPairTypeName ( fPairType );
75 sTitle += GetESDParticleName ( fPairDef.GetType ( 0 ) );
76 sTitle += fPairDef.GetCharge ( 0 );
77 sTitle += GetESDParticleName ( fPairDef.GetType ( 1 ) );
78 sTitle += fPairDef.GetCharge ( 1 );
79 sTitle += " ";
80 if ( fCurrentCutMgr )
81 sTitle += fCurrentCutMgr->GetTitle();
82 else
83 sTitle += "NoCut";
84 return sTitle;
0cf0c402 85}
0f7f8d16 86
87TH1F * AliRsnPair::GenerateEffMassHist ( Int_t index )
0cf0c402 88{
0f7f8d16 89 return new TH1F ( GetEffMassHistName ( index ).Data(),GetEffMassHistTitle ( index ).Data(),fPairDef.GetNBins(),fPairDef.GetMin(),fPairDef.GetMax() );
90
0cf0c402 91}
0f7f8d16 92
93TString AliRsnPair::GetESDParticleName ( AliRsnPID::EType type )
0cf0c402 94{
0f7f8d16 95
96 switch ( type )
97 {
98 case AliRsnPID::kElectron : return ( "e" );break;
99 case AliRsnPID::kMuon : return ( "mu" );break;
100 case AliRsnPID::kPion : return ( "pi" );break;
101 case AliRsnPID::kKaon : return ( "K" );break;
102 case AliRsnPID::kProton : return ( "p" );break;
103 case AliRsnPID::kUnknown : return ( "unknown" );
104 default:
105 AliWarning ( "Unrecognized value of EParticle argument" );
106 break;
107 }
108
109 return "";
110
0cf0c402 111}
0f7f8d16 112
113TString AliRsnPair::GetPairTypeName ( EPairType type )
0cf0c402 114{
0f7f8d16 115 switch ( type )
116 {
117 case kESDNoPID : return ( "ESDNOPID_" );break;
118 case kESDNoPIDMix : return ( "ESDNOPIDMIX_" );break;
119 case kESDNormal : return ( "ESDNORMAL_" );break;
120 case kESDMix : return ( "ESDMIX_" );break;
121 case kMCNoPID : return ( "MCNOPID_" );break;
122 case kMCNormal : return ( "MCNORMAL_" );break;
123 case kMCMix : return ( "MCMIX_" );break;
124 case kMCSignalOnly : return ( "MCSIGNAL_" );break;
125 case kMCBackgroundOnly : return ( "MCBKGONLY_" );break;
126 default:
127 AliWarning ( "Unrecognized value of EPairTypeName argument" );
128 break;
129 }
0cf0c402 130
0f7f8d16 131 return "NOTYPE";
0cf0c402 132}
0f7f8d16 133
134void AliRsnPair::AddCutMgr ( AliRsnCutMgr * theValue )
0cf0c402 135{
0f7f8d16 136 fCutMgrs.Add ( theValue );
0cf0c402 137}
0f7f8d16 138
139void AliRsnPair::ProcessPair ( AliRsnEvent * event,TH1F*hist ,Int_t index )
0cf0c402 140{
0f7f8d16 141 AliDebug ( AliLog::kDebug+2,"<-" );
142
143 switch ( fPairType )
144 {
145 case kESDNoPID :
146 DoESDNoPID ( event,hist,index );
147 break;
148 case kESDNoPIDMix :
149 DoESDNoPIDMix ( event,hist,index );
150 break;
151 case kESDNormal :
152 DoESDNormal ( event,hist,index );
153 break;
154 case kESDMix :
155 DoESDMix ( event,hist,index );
156 break;
157 case kMCNoPID :
158 DoMCNoPID ( event,hist,index );
159 break;
160 case kMCNormal :
161 DoMCNormal ( event,hist,index );
162 break;
163 case kMCSignalOnly :
164 DoMCNormal ( event,hist,index );
165 break;
166 case kMCBackgroundOnly :
167 DoMCNormal ( event,hist,index );
168 break;
169 default:
170 AliWarning ( "Wrong fPaitType Skipping pair..." );
171 break;
172 }
173
174 AliDebug ( AliLog::kDebug+2,"->" );
175}
176
177void AliRsnPair::DoCleanUpAfterOneEvent()
178{
179}
180
181void AliRsnPair::DoLoopPairESD ( AliRsnEvent * event1, TArrayI * array1, AliRsnEvent * event2, TArrayI * array2, TH1F * hist, Int_t index )
182{
183 AliDebug ( AliLog::kDebug+2,"<-" );
184
185 AliDebug ( AliLog::kDebug+2,Form ( "NumArray1 = %d\tNumArray2 = %d",array1->GetSize(),array2->GetSize() ) );
186
187 fCurrentCutMgr= ( AliRsnCutMgr* ) fCutMgrs.UncheckedAt ( index );
188 Int_t startj=0;
189 Double_t effMass=0;
190 Double_t histMin = fPairDef.GetMin();
191 Double_t histMax = fPairDef.GetMax();
192 AliRsnDaughter *daughter1=0;
193 AliRsnDaughter *daughter2=0;
194 Int_t howManuFilledHist=0;
195 for ( Int_t i=0;i<array1->GetSize();i++ )
196 {
197
198
199 daughter1 = ( AliRsnDaughter * ) event1->GetTrack(array1->At ( i ) );
200 if ( !daughter1 ) continue;
201
202 if ( fCurrentCutMgr )
203 if ( ! ( fCurrentCutMgr->IsSelected ( AliRsnCut::kParticle,daughter1 ) ) ) continue;
204
205 daughter2 = 0;
206 if ( fIsSignSame ) startj=i+1;
207 for ( Int_t j=startj;j<array2->GetSize();j++ )
208 {
209 daughter2 = ( AliRsnDaughter * ) event2->GetTrack(array2->At ( j ) );
210 if ( !daughter2 ) continue;
211
212 if ( fCurrentCutMgr )
213 if ( ! ( fCurrentCutMgr->IsSelected ( AliRsnCut::kParticle,daughter2 ) ) ) continue;
214
215// AliRsnPairParticle effMassPart;
216 fEffMassParticle.FillPairParticle( daughter1 ,daughter2 );
217 if ( fCurrentCutMgr )
218 if ( ! ( fCurrentCutMgr->IsSelected ( AliRsnCut::kPair,&fEffMassParticle ) ) ) continue;
219
220
221 if ( fMass[0]<0.0&&fMass[1]<0.0 )
222 effMass = fEffMassParticle.GetESDEffectiveMass() ;
223 else
224 effMass = fEffMassParticle.GetESDEffectiveMass ( fMass[0],fMass[1] ) ;
225
226// if ( fIsSignSame )
227// if ( effMass < 0.988 )
228// {
229 //
230// effMassPart.PrintInfo("pt");
231// AliInfo(Form("effMass = %f",effMass));
232// }
233
234
235 if ( fIsFilledOnlyInHistRange )
236 if ( ! ( ( effMass>=histMin ) && ( effMass<=histMax ) ) ) continue;
237
238 hist->Fill ( effMass );
239
240 howManuFilledHist++;
241 AliDebug ( AliLog::kDebug+2,Form ( "i=%d j=%d",i,j ) );
242 }
243 }
244
245// AliInfo (Form ( "%d",tmpNum));
246
247 AliDebug ( AliLog::kDebug+2,Form ( "NumOfFilledHist = %d",howManuFilledHist ) );
248
249 AliDebug ( AliLog::kDebug+2,"->" );
250}
251
252void AliRsnPair::DoLoopPairMC ( AliRsnEvent * event1, TArrayI * array1, AliRsnEvent * event2, TArrayI * array2, TH1F * hist, Int_t index )
253{
254 AliDebug ( AliLog::kDebug+2,"<-" );
255
256 AliDebug ( AliLog::kDebug+2,Form ( "NumArray1 = %d\tNumArray2 = %d",array1->GetSize(),array2->GetSize() ) );
257
258 fCurrentCutMgr = ( AliRsnCutMgr* ) fCutMgrs.UncheckedAt ( index );
259 Int_t startj=0;
260 Double_t effMass=0;
261 Double_t histMin = fPairDef.GetMin();
262 Double_t histMax = fPairDef.GetMax();
263 AliRsnDaughter *daughter1=0;
264 AliRsnDaughter *daughter2=0;
265 Int_t howManuFilledHist=0;
266 Bool_t isSignal=kFALSE;
267 for ( Int_t i=0;i<array1->GetSize();i++ )
268 {
269
270 daughter1 = ( AliRsnDaughter * ) event1->GetTrack( array1->At ( i ) );
271 if ( !daughter1 ) continue;
272
273 if ( fCurrentCutMgr )
274 if ( ! ( fCurrentCutMgr->IsSelected ( AliRsnCut::kParticle,daughter1 ) ) ) continue;
275
276 daughter2 = 0;
277 if ( fIsSignSame ) startj=i+1;
278 for ( Int_t j=startj;j<array2->GetSize();j++ )
279 {
280 daughter2 = ( AliRsnDaughter * ) event2->GetTrack(array2->At ( j ) );
281 if ( !daughter2 ) continue;
282
283 if ( fCurrentCutMgr )
284 if ( ! ( fCurrentCutMgr->IsSelected ( AliRsnCut::kParticle,daughter2 ) ) ) continue;
285
286// AliRsnPairParticle effMassPart;
287 fEffMassParticle.FillPairParticle( daughter1 ,daughter2 );
288 if ( fCurrentCutMgr )
289 if ( ! ( fCurrentCutMgr->IsSelected ( AliRsnCut::kPair,&fEffMassParticle ) ) ) continue;
290
291
292 if ( ( fPairType == kMCSignalOnly ) || ( fPairType == kMCBackgroundOnly ) )
293 {
294 isSignal = ( daughter1->GetMCInfo()->MotherPDG() == fPairDef.GetMotherPDG() ) && ( daughter2->GetMCInfo()->MotherPDG() == fPairDef.GetMotherPDG() );
295 if ( ( fPairType == kMCSignalOnly ) && ( !isSignal ) ) continue;
296 if ( ( fPairType == kMCBackgroundOnly ) && ( isSignal ) ) continue;
297 }
298
299 if ( fMass[0]<0.0&&fMass[1]<0.0 )
300 effMass = fEffMassParticle.GetMCEffectiveMass() ;
301 else
302 effMass = fEffMassParticle.GetMCEffectiveMass ( fMass[0],fMass[1] ) ;
303
304// if ( fIsSignSame )
305// if ( effMass < 0.988 )
306// {
307 //
308// effMassPart.PrintInfo("pt");
309// AliInfo(Form("effMass = %f",effMass));
310// }
311
312
313 if ( fIsFilledOnlyInHistRange )
314 if ( ! ( ( effMass>=histMin ) && ( effMass<=histMax ) ) ) continue;
315
316 hist->Fill ( effMass );
317
318 howManuFilledHist++;
319 AliDebug ( AliLog::kDebug+2,Form ( "i=%d j=%d",i,j ) );
0cf0c402 320 }
0f7f8d16 321 }
322
323// AliInfo (Form ( "%d",tmpNum));
324
325 AliDebug ( AliLog::kDebug+2,Form ( "NumOfFilledHist = %d",howManuFilledHist ) );
326
327 AliDebug ( AliLog::kDebug+2,"->" );
328}
329
330void AliRsnPair::DoESDNoPID ( AliRsnEvent * event, TH1F * hist ,Int_t index )
331{
332
333 Char_t chargeChar1 = fPairDef.GetCharge ( 0 );
334 Char_t chargeChar2 = fPairDef.GetCharge ( 1 );
335
336 Int_t chargeIndex1 = fPairDef.GetCharge ( 0 ) =='+'? 0 : 1;
337 Int_t chargeIndex2 = fPairDef.GetCharge ( 1 ) =='+'? 0 : 1;
338
339 fIsSignSame = ( chargeIndex1 == chargeIndex2 );
340 Int_t numOfTracks = event->GetMultiplicity();
341// if (numOfTracks<=0) return;
342
343// AliInfo(Form("%d", numOfTracks));
344 Int_t counter1=0,counter2=0;
345 TArrayI array1 ( numOfTracks ),array2 ( numOfTracks );
346 TArrayI *arraytmp=0;
347// AliRsnDaughter *dtmp=0;
348 Int_t j;
349 for ( Int_t i=0; i < AliRsnPID::kSpecies ;i++ )
350 {
351 arraytmp = ( TArrayI* ) event->GetTracksArray ( chargeChar1, (AliRsnPID::EType )i );
352 for ( j=0;j< arraytmp->GetSize();j++ )
353 {
354 array1.AddAt ( arraytmp->At ( j ),counter1++ );
0cf0c402 355 }
0f7f8d16 356 arraytmp = ( TArrayI* ) event->GetTracksArray ( chargeChar2, (AliRsnPID::EType )i );
357 for ( j=0;j< arraytmp->GetSize();j++ )
358 {
359 array2.AddAt ( arraytmp->At ( j ),counter2++ );
0cf0c402 360 }
0f7f8d16 361 }
362
363 array1.Set ( counter1 );
364 array2.Set ( counter2 );
365
366// AliInfo(Form("%d %d",array1.GetSize(),array2.GetSize()));
367 DoLoopPairESD ( event,&array1,event,&array2,hist,index );
368
0cf0c402 369}
0f7f8d16 370
371void AliRsnPair::DoESDNoPIDMix ( AliRsnEvent * event, TH1F * hist, Int_t index )
0cf0c402 372{
0f7f8d16 373
374 Char_t chargeChar1 = fPairDef.GetCharge ( 0 );
375 Char_t chargeChar2 = fPairDef.GetCharge ( 1 );
376
377 Int_t chargeIndex1 = fPairDef.GetCharge ( 0 ) =='+'? 0 : 1;
378 Int_t chargeIndex2 = fPairDef.GetCharge ( 1 ) =='+'? 0 : 1;
379
380 fIsSignSame = ( chargeIndex1 == chargeIndex2 );
381
382 Long64_t currBuffIndex = GetRsnMVEventBuffer()->GetEventsBufferIndex();
383 if ( currBuffIndex < 2 ) return;
384
385
386 AliRsnEvent *evCurrEvent = ( AliRsnEvent * ) GetRsnMVEventBuffer()->GetEvent ( currBuffIndex-1 );
387 if ( ! evCurrEvent ) {AliWarning ( Form ( "Event Not found" ) ); return;}
388
389 Int_t numOfTracks = evCurrEvent->GetMultiplicity();
390 Int_t counter1=0;
391 TArrayI arrayCurrEvent ( numOfTracks );
392 TArrayI *arraytmp=0;
393 Int_t j;
394 for ( Int_t i=0; i < AliRsnPID::kSpecies ;i++ )
395 {
396 arraytmp = ( TArrayI* ) evCurrEvent->GetTracksArray ( chargeChar1,(AliRsnPID::EType ) i );
397 for ( j=0;j< arraytmp->GetSize();j++ )
398 {
399 arrayCurrEvent.AddAt ( arraytmp->At ( j ),counter1++ );
400 }
401 }
402
403 arrayCurrEvent.Set ( counter1 );
404
405 Int_t numMix = 0;
406 for ( Int_t i=currBuffIndex-2;i>=0;i-- )
407 {
408 if ( ++numMix>fNumOfMixEvent ) break;
409
410
411 AliRsnEvent *evMix = ( AliRsnEvent * ) GetRsnMVEventBuffer()->GetEvent ( i ) ;
412// if ( ! evMix ) {AliWarning ( Form ( "Event evMix Not found" ) ); continue;}
413 numOfTracks = evMix->GetMultiplicity();
414 Int_t counter2=0;
415 TArrayI arrayMix ( numOfTracks );
416 arraytmp=0;
417 for ( Int_t i=0; i < AliRsnPID::kSpecies ;i++ )
418 {
419 arraytmp = ( TArrayI* ) evMix->GetTracksArray ( chargeChar2,(AliRsnPID::EType ) i );
420 if (arraytmp->GetSize() > numOfTracks) {AliError(Form("%d %d",arraytmp->GetSize(),numOfTracks));continue;}
421 for ( j=0;j< arraytmp->GetSize();j++ )
422 {
423 arrayMix.AddAt ( arraytmp->At ( j ),counter2++ );
424 }
425 }
0cf0c402 426
0f7f8d16 427 arrayMix.Set ( counter2 );
428 DoLoopPairESD ( evCurrEvent,&arrayCurrEvent,evMix,&arrayMix,hist,index );
429 }
0cf0c402 430}
0f7f8d16 431
432void AliRsnPair::DoESDNormal ( AliRsnEvent * event, TH1F * hist ,Int_t index )
433{
434
435 Int_t chargeIndex1 = fPairDef.GetCharge ( 0 ) =='+'? 0 : 1;
436 Int_t chargeIndex2 = fPairDef.GetCharge ( 1 ) =='+'? 0 : 1;
437 fIsSignSame = ( chargeIndex1 == chargeIndex2 );
438
439 TArrayI *array1 = ( TArrayI* ) event->GetTracksArray ( chargeIndex1, fPairDef.GetType( 0 ) );
440 TArrayI *array2 = ( TArrayI* ) event->GetTracksArray ( chargeIndex2, fPairDef.GetType( 1 ) );
441
442 DoLoopPairESD ( event, array1,event,array2,hist,index );
443}
444
445void AliRsnPair::PrepareMixForPair ( AliRsnEvent * event,TTree *tree )
446{
447}
448
449void AliRsnPair::DoESDMix ( AliRsnEvent * event, TH1F * hist, Int_t index )
450{
451 Int_t chargeIndex1 = fPairDef.GetCharge ( 0 ) =='+'? 0 : 1;
452 Int_t chargeIndex2 = fPairDef.GetCharge ( 1 ) =='+'? 0 : 1;
453 fIsSignSame = ( chargeIndex1 == chargeIndex2 );
454
455 Long64_t currBuffIndex = GetRsnMVEventBuffer()->GetEventsBufferIndex();
456 if ( currBuffIndex < 2 ) return;
457
458 AliRsnEvent *evCurrEvent = ( AliRsnEvent * ) GetRsnMVEventBuffer()->GetEvent ( currBuffIndex-1 );
459 if ( ! evCurrEvent ) {AliWarning ( Form ( "Event Not found" ) ); return;}
460 TArrayI *arrayCurrEvent = ( TArrayI* ) evCurrEvent->GetTracksArray ( chargeIndex1, fPairDef.GetType ( 0 ) );
461
462 Int_t numMix = 0;
463 TArrayI* arrayMix=0;
464 for ( Int_t i=currBuffIndex-2;i>=0;i-- )
465 {
466 if ( ++numMix>fNumOfMixEvent ) break;
467
468
469 AliRsnEvent *evMix = ( AliRsnEvent * ) GetRsnMVEventBuffer()->GetEvent ( i ) ;
470 if ( ! evMix ) {AliWarning ( Form ( "Event Not found" ) ); continue;}
471 arrayMix = ( TArrayI* ) evMix->GetTracksArray ( chargeIndex2,fPairDef.GetType ( 1 ) );
472 DoLoopPairESD ( evCurrEvent,arrayCurrEvent,evMix,arrayMix,hist,index );
473 }
474
475}
476
477void AliRsnPair::DoMCNoPID ( AliRsnEvent * event, TH1F * hist ,Int_t index )
0cf0c402 478{
0f7f8d16 479
480/*
481 Int_t chargeIndex1 = fPairDef.GetCharge ( 0 ) =='+'? 0 : 1;
482 Int_t chargeIndex2 = fPairDef.GetCharge ( 1 ) =='+'? 0 : 1;
483 fIsSignSame = ( chargeIndex1 == chargeIndex2 );
484
485// TRefArray array1,array2;
486// TRefArray *arraytmp=0;
487// AliRsnDaughter *dtmp=0;
488// for ( Int_t i=0; i < AliRsnPID::kSpecies ;i++ )
489// {
490// arraytmp = ( TRefArray* ) event->GetMCTrackRefs ( chargeIndex1, i );
491// for ( Int_t j=0;j< arraytmp->GetEntriesFast();j++ )
492// {
493// dtmp = ( AliRsnDaughter * ) arraytmp->At ( j );
494// array1.Add ( dtmp );
495// }
496// arraytmp = ( TRefArray* ) event->GetMCTrackRefs ( chargeIndex2, i );
497// for ( Int_t j=0;j< arraytmp->GetEntriesFast();j++ )
498// {
499// dtmp = ( AliRsnDaughter * ) arraytmp->At ( j );
500// array2.Add ( dtmp );
501// }
502// }
503// DoLoopPairMC ( &array1,&array2,hist,index );
504
505 Int_t numOfTracks = event->GetMultiplicity();
506// AliInfo(Form("%d",numOfTracks));
507 Int_t counter1=0,counter2=0;
508 TArrayI array1 ( numOfTracks ),array2 ( numOfTracks );
509 TArrayI *arraytmp=0;
510 Int_t j;
511 for ( Int_t i=0; i < AliRsnPID::kSpecies ;i++ )
512 {
513 arraytmp = ( TArrayI* ) event->GetMCTrackArray ( chargeIndex1, i );
514 for ( j=0;j< arraytmp->GetSize();j++ )
515 {
516 array1.AddAt ( arraytmp->At ( j ),counter1++ );
517 }
518 arraytmp = ( TArrayI* ) event->GetMCTrackArray ( chargeIndex2, i );
519 for ( j=0;j< arraytmp->GetSize();j++ )
520 {
521 array2.AddAt ( arraytmp->At ( j ),counter2++ );
522 }
523 }
524
525 array1.Set ( counter1 );
526 array2.Set ( counter2 );
527
528// AliInfo(Form("%d %d",array1.GetSize(),array2.GetSize()));
529 DoLoopPairMC ( event,&array1,event,&array2,hist,index );*/
530
0cf0c402 531}
0f7f8d16 532
533void AliRsnPair::DoMCNormal ( AliRsnEvent * event, TH1F * hist ,Int_t index )
0cf0c402 534{
0f7f8d16 535// Int_t chargeIndex1 = fPairDef.GetCharge ( 0 ) =='+'? 0 : 1;
536// Int_t chargeIndex2 = fPairDef.GetCharge ( 1 ) =='+'? 0 : 1;
537// fIsSignSame = ( chargeIndex1 == chargeIndex2 );
538// // TRefArray *array1 = ( TRefArray* ) event->GetMCTrackRefs ( chargeIndex1, ( Int_t ) fPairDef.GetESDParticle ( 0 ) );
539// // TRefArray *array2 = ( TRefArray* ) event->GetMCTrackRefs ( chargeIndex2, ( Int_t ) fPairDef.GetESDParticle ( 1 ) );
540// //
541// // DoLoopPairMC ( array1,array2,hist,index );
542//
543// TArrayI *array1 = ( TArrayI* ) event->GetMCTrackArray ( chargeIndex1, ( Int_t ) fPairDef.GetESDParticle ( 0 ) );
544// TArrayI *array2 = ( TArrayI* ) event->GetMCTrackArray ( chargeIndex2, ( Int_t ) fPairDef.GetESDParticle ( 1 ) );
545// DoLoopPairMC ( event, array1, event,array2,hist,index );
546//
547
0cf0c402 548}
0f7f8d16 549
550