AliRoot Core  3dc7879 (3dc7879)
AliMCEventHandler.cxx
Go to the documentation of this file.
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 // Class AliMCEventHandler
19 // This class gives access to MC truth during the analysis.
20 // Monte Carlo truth is containe in the kinematics tree (produced particles) and
21 // the tree of reference hits.
22 //
23 // Origin: Andreas Morsch, CERN, andreas.morsch@cern.ch
24 //---------------------------------------------------------------------------------
25 
26 
27 
28 #include "AliMCEventHandler.h"
29 #include "AliMCEvent.h"
30 #include "AliMCParticle.h"
31 #include "AliPDG.h"
32 #include "AliTrackReference.h"
33 #include "AliHeader.h"
34 #include "AliStack.h"
35 #include "AliLog.h"
36 
37 #include <TTree.h>
38 #include <TSystem.h>
39 #include <TTreeCache.h>
40 #include <TFile.h>
41 #include <TList.h>
42 #include <TParticle.h>
43 #include <TString.h>
44 #include <TClonesArray.h>
45 #include <TDirectoryFile.h>
46 #include <TGrid.h>
47 
48 ClassImp(AliMCEventHandler)
49 
52  fMCEvent(0),
53  fFileE(0),
54  fFileK(0),
55  fFileTR(0),
56  fTreeE(0),
57  fTreeK(0),
58  fTreeTR(0),
59  fDirK(0),
60  fDirTR(0),
61  fParticleSelected(0),
62  fLabelMap(0),
63  fNEvent(-1),
64  fEvent(-1),
65  fPathName(new TString("./")),
66  fkExtension(""),
67  fFileNumber(0),
68  fEventsPerFile(0),
69  fReadTR(kTRUE),
70  fInitOk(kFALSE),
71  fSubsidiaryHandlers(0),
72  fEventsInContainer(0),
73  fPreReadMode(kLmPreRead), // was kNoPreRead
74  fCacheSize(0),
75  fCacheTK(0),
76  fCacheTR(0)
77 {
78  //
79  // Default constructor
80  //
81  // Be sure to add all particles to the PDG database
83 }
84 
85 AliMCEventHandler::AliMCEventHandler(const char* name, const char* title) :
86  AliInputEventHandler(name, title),
87  fMCEvent(),
88  fFileE(0),
89  fFileK(0),
90  fFileTR(0),
91  fTreeE(0),
92  fTreeK(0),
93  fTreeTR(0),
94  fDirK(0),
95  fDirTR(0),
96  fParticleSelected(0),
97  fLabelMap(0),
98  fNEvent(-1),
99  fEvent(-1),
100  fPathName(new TString("./")),
101  fkExtension(""),
102  fFileNumber(0),
103  fEventsPerFile(0),
104  fReadTR(kTRUE),
105  fInitOk(kFALSE),
106  fSubsidiaryHandlers(0),
107  fEventsInContainer(0),
108  fPreReadMode(kLmPreRead), // was kNoPreRead
109  fCacheSize(0),
110  fCacheTK(0),
111  fCacheTR(0)
112 {
113  //
114  // Constructor
115  //
116  // Be sure to add all particles to the PDG database
118 }
120 {
121  // Destructor
122  delete fPathName;
123  delete fMCEvent;
124  delete fFileE;
125  delete fFileK;
126  delete fFileTR;
127  delete fCacheTK;
128  delete fCacheTR;
129 }
130 
131 Bool_t AliMCEventHandler::Init(Option_t* opt)
132 {
133  // Initialize input
134  //
135  if (!(strcmp(opt, "proof")) || !(strcmp(opt, "local"))) return kTRUE;
136  //
137  if (fPathName->BeginsWith("alien://") && !gGrid && !TGrid::Connect("alien://")) {
138  AliFatal("Failed to connect to alien");
139  }
140  fFileE = TFile::Open(Form("%sgalice.root", fPathName->Data()));
141  if (!fFileE) {
142  AliError(Form("AliMCEventHandler:galice.root not found in directory %s ! \n", fPathName->Data()));
143  fInitOk = kFALSE;
144  return kFALSE;
145  }
146 
147  // check if AliRun refers to some background file of embedding
148  TObjArray* embBKGPaths = 0;
149  fFileE->GetObject(AliStack::GetEmbeddingBKGPathsKey(),embBKGPaths);
150  if (embBKGPaths) {
151  AliInfo("galice.root contains paths of background for embedding");
152  embBKGPaths->Print();
153  for (int ib=0;ib<embBKGPaths->GetEntriesFast();ib++) {
155  // if needed, add subsidiary handlers
157  TString pth = gSystem->DirName(embBKGPaths->At(ib)->GetName());
158  // check if the path is relative
159  if ( !pth.BeginsWith("/") && !pth.BeginsWith("alien://")) {
160  TString pths = fPathName->Data();
161  if (pths.EndsWith("#")) { // archive is used
162  int indSl = pths.Last('/')+1;
163  if (!pth.EndsWith("/")) pth += "/";
164  pths.Insert(indSl,pth);
165  }
166  else {
167  pths += pth; // pths ends by "/"
168  }
169  pth = pths;
170  }
171  hs->SetInputPath(pth.Data());
172  hs->SetReadTR(fReadTR);
173  AliInfoF("Set subsidiary event#%d path to %s",ib,hs->GetInputPath()->Data());
174  }
175  delete embBKGPaths;
176  }
177  //
178  // Tree E
179  fFileE->GetObject("TE", fTreeE);
180  // Connect Tree E to the MCEvent
181  if (!fMCEvent) fMCEvent = new AliMCEvent();
183  fNEvent = fTreeE->GetEntries();
184  //
185  // Tree K
186  fFileK = TFile::Open(Form("%sKinematics%s.root", fPathName->Data(), fkExtension));
187  if (!fFileK) {
188  AliError(Form("AliMCEventHandler:Kinematics.root not found in directory %s ! \n", fPathName->Data()));
189  fInitOk = kFALSE;
190  return kTRUE;
191  }
192 
193  fEventsPerFile = fFileK->GetNkeys() - fFileK->GetNProcessIDs();
194  //
195  // Tree TR
196  if (fReadTR) {
197  fFileTR = TFile::Open(Form("%sTrackRefs%s.root", fPathName->Data(), fkExtension));
198  if (!fFileTR) {
199  AliError(Form("AliMCEventHandler:TrackRefs.root not found in directory %s ! \n", fPathName->Data()));
200  //fInitOk = kFALSE;
201  //return kTRUE;
202  }
203  }
204  //
205  // Reset the event number
206  fEvent = -1;
207  fFileNumber = 0;
208  AliInfo(Form("Number of events in this directory %5d \n", fNEvent));
209  fInitOk = kTRUE;
210 
211 
212  if (fSubsidiaryHandlers) {
213  TIter next(fSubsidiaryHandlers);
214  AliMCEventHandler *handler;
215  while((handler = (AliMCEventHandler*)next())) {
216  handler->Init(opt);
217  handler->SetPreReadMode(kNoPreRead); //RS prereading will be handled by top event handler
218  //handler->SetNumberOfEventsInContainer(fNEvent); // RS not needed and will break embedding with rep.factor>1
219  }
220  }
221 
222  return kTRUE;
223 }
224 
226 {
227  // Load the event number iev
228  //
229  // Calculate the file number
230  if (!fInitOk) return kFALSE;
231 
232  Int_t inew = iev / fEventsPerFile;
233  Bool_t firsttree = (fTreeK==0) ? kTRUE : kFALSE;
234 // Bool_t newtree = firsttree;
235  if (inew != fFileNumber) {
236 // newtree = kTRUE;
237  fFileNumber = inew;
238  if (!OpenFile(fFileNumber)){
239  return kFALSE;
240  }
241  }
242  // Folder name
243  char folder[20];
244  snprintf(folder, 20, "Event%d", iev);
245  // TreeE
246  fTreeE->GetEntry(iev);
247  // Tree K
248  fFileK->GetObject(folder, fDirK);
249  if (!fDirK) {
250  AliWarning(Form("AliMCEventHandler: Event #%5d - Cannot get kinematics\n", iev));
251  return kFALSE;
252  }
253 
254  fDirK ->GetObject("TreeK", fTreeK);
255  if (!fTreeK) {
256  AliError(Form("AliMCEventHandler: Event #%5d - Cannot get TreeK\n",iev));
257  return kFALSE;
258  }
259  // Connect TreeK to MCEvent
261  //Tree TR
262  if (fFileTR) {
263  // Check which format has been read
264  fFileTR->GetObject(folder, fDirTR);
265  if (!fDirTR) {
266  AliError(Form("AliMCEventHandler: Event #%5d - Cannot get track references\n",iev));
267  return kFALSE;
268  }
269 
270  fDirTR->GetObject("TreeTR", fTreeTR);
271  //
272  if (!fTreeTR) {
273  AliError(Form("AliMCEventHandler: Event #%5d - Cannot get TreeTR\n",iev));
274  return kFALSE;
275  }
276  // Connect TR to MCEvent
278  }
279  // Now setup the caches if not yet done
280  if (fCacheSize) {
281  fTreeK->SetCacheSize(fCacheSize);
282  fCacheTK = (TTreeCache*) fFileK->GetCacheRead(fTreeK);
283  TTreeCache::SetLearnEntries(1);
284  fTreeK->AddBranchToCache("*",kTRUE);
285  if (firsttree) Info("LoadEvent","Read cache enabled %lld bytes for TreeK",fCacheSize);
286  if (fDirTR && fTreeTR) {
287  fTreeTR->SetCacheSize(fCacheSize);
288  fCacheTR = (TTreeCache*) fFileTR->GetCacheRead(fTreeTR);
289  TTreeCache::SetLearnEntries(1);
290  fTreeTR->AddBranchToCache("*",kTRUE);
291  if (firsttree) Info("LoadEvent","Read cache enabled %lld bytes for TreeTR",fCacheSize);
292  }
293 // } else {
294  // We need to reuse the previous caches and every new event is a new tree
295 // if (fCacheTK) {
296 // fCacheTK->ResetCache();
297 // if (fFileK) fFileK->SetCacheRead(fCacheTK, fTreeK);
298 // fCacheTK->UpdateBranches(fTreeK);
299 // }
300 // if (fCacheTR) {
301 // fCacheTR->ResetCache();
302 // if (fFileTR) fFileTR->SetCacheRead(fCacheTR, fTreeTR);
303 // fCacheTR->UpdateBranches(fTreeTR);
304 // }
305  }
306  return kTRUE;
307 }
308 
310 {
311  // Open file i
312  fInitOk = kFALSE;
313  if (i > 0) {
314  fkExtension = Form("%d", i);
315  } else {
316  fkExtension = "";
317  }
318 
319  if (fFileK && fCacheTK) fFileK->SetCacheRead(0, fTreeK);
320  delete fFileK;
321  fFileK = TFile::Open(Form("%sKinematics%s.root", fPathName->Data(), fkExtension));
322  if (!fFileK) {
323  AliError(Form("AliMCEventHandler:Kinematics%s.root not found in directory %s ! \n", fkExtension, fPathName->Data()));
324  delete fMCEvent; fMCEvent=0;
325  return fInitOk;
326  }
327 
328  fInitOk = kTRUE;
329  if (fReadTR) {
330  if (fFileTR && fCacheTR) fFileTR->SetCacheRead(0, fTreeTR);
331  delete fFileTR;
332  fFileTR = TFile::Open(Form("%sTrackRefs%s.root", fPathName->Data(), fkExtension));
333  if (!fFileTR) {
334  AliError(Form("AliMCEventHandler:TrackRefs%s.root not found in directory %s ! \n", fkExtension, fPathName->Data()));
335  return fInitOk;
336  }
337  }
338  return fInitOk;
339 }
340 
341 Bool_t AliMCEventHandler::BeginEvent(Long64_t entry)
342 {
343  // Begin event
344  if (!fInitOk) return kFALSE;
345  fParticleSelected.Delete();
346  fLabelMap.Delete();
347  // Read the next event
348 
349  if (fEventsInContainer != 0) {
350  entry = (Long64_t) ( entry * Float_t(fNEvent) / Float_t (fEventsInContainer));
351  }
352 
353 
354  if (entry == -1) {
355  fEvent++;
356  entry = fEvent;
357  } else {
358  fEvent = entry;
359  }
360 
361  if (entry >= fNEvent) {
362  AliWarning(Form("AliMCEventHandler: Event number out of range %5lld %5d\n", entry, fNEvent));
363  return kFALSE;
364  }
365 
366  Bool_t result = LoadEvent(entry);
367 
368  if (fSubsidiaryHandlers) {
369  // RS: event ID's are not necessarily the same: bg event may repeat for multiple signal events
370  int repFactor = fMCEvent->Header()->GetSgPerBgEmbedded();
371  if (repFactor>0) entry /= repFactor; //RS bg entry corresponding to signal one
372 
373  TIter next(fSubsidiaryHandlers);
374  AliMCEventHandler *handler;
375  while((handler = (AliMCEventHandler*)next())) {
376  handler->BeginEvent(entry);
377  }
378  next.Reset();
379  while((handler = (AliMCEventHandler*)next())) {
380  if (!handler->MCEvent()) continue;
381  fMCEvent->AddSubsidiaryEvent(handler->MCEvent());
382  }
383  fMCEvent->InitEvent();
384  }
385 
386  if (fPreReadMode == kLmPreRead) {
387  fMCEvent->PreReadAll();
388  }
389 
390  return result;
391 
392 }
393 
395  // taking the absolute values here, need to take care
396  // of negative daughter and mother
397  // IDs when setting!
398  if (!fInitOk) return;
399  if (TMath::Abs(i) >= AliMCEvent::BgLabelOffset()) i = fMCEvent->BgLabelToIndex(TMath::Abs(i));
400  if(!IsParticleSelected(TMath::Abs(i)))fParticleSelected.Add(TMath::Abs(i),1);
401 }
402 
404  // taking the absolute values here, need to take
405  // care with negative daughter and mother
406  // IDs when setting!
407  return (fParticleSelected.GetValue(TMath::Abs(i))==1);
408 }
409 
410 
412 
413  //
414  // this should be called once all selections where done
415  //
416 
417  fLabelMap.Delete();
418  if(!fMCEvent){
419  fParticleSelected.Delete();
420  return;
421  }
422 
424 
425  Int_t iNew = 0;
426  for(int i = 0;i < fMCEvent->GetNumberOfTracks();++i){
427  if(IsParticleSelected(i)){
428  fLabelMap.Add(i,iNew);
429  iNew++;
430  }
431  }
432 }
433 
435  // Gets the label from the new created Map
436  // Call CreatLabelMap before
437  // otherwise only 0 returned
438  return fLabelMap.GetValue(TMath::Abs(i));
439 }
440 
442 
443  //
444  // Make sure that each particle has at least it's predecessors
445  // selected so that we have the complete ancestry tree
446  // Private, should be only called by CreateLabelMap
447 
448  if(!fMCEvent){
449  fParticleSelected.Delete();
450  return;
451  }
452 
453  Int_t nprim = fMCEvent->GetNumberOfPrimaries();
454 
455  for(int i = 0;i < fMCEvent->GetNumberOfTracks(); ++i){
456  if(i < nprim){
457  SelectParticle(i);// take all primaries
458  continue;
459  }
460 
461  if(!IsParticleSelected(i))continue;
462 
463  AliMCParticle* mcpart = (AliMCParticle*) fMCEvent->GetTrack(i);
464  Int_t imo = mcpart->GetMother();
465  while((imo >= nprim)&&!IsParticleSelected(imo)){
466  // Mother not yet selected
467  SelectParticle(imo);
468  mcpart = (AliMCParticle*) fMCEvent->GetTrack(imo);
469  imo = mcpart->GetMother();
470  }
471  // after last step we may have an unselected primary
472  // mother
473  if(imo>=0){
474  if(!IsParticleSelected(imo))
475  SelectParticle(imo);
476  }
477  }// loop over all tracks
478 }
479 
480 Int_t AliMCEventHandler::GetParticleAndTR(Int_t i, TParticle*& particle, TClonesArray*& trefs)
481 {
482  // Retrieve entry i
483  if (!fInitOk) {
484  return 0;
485  } else {
486  return (fMCEvent->GetParticleAndTR(i, particle, trefs));
487  }
488 }
489 
490 void AliMCEventHandler::DrawCheck(Int_t i, Int_t search)
491 {
492  // Retrieve entry i and draw momentum vector and hits
493  fMCEvent->DrawCheck(i, search);
494 }
495 
496 Bool_t AliMCEventHandler::Notify(const char *path)
497 {
498  // Notify about directory change
499  // The directory is taken from the 'path' argument
500  // Reconnect trees
501  TString fileName(path);
502  TString dirname = gSystem->DirName(fileName);
503  TString basename = gSystem->BaseName(fileName);
504  Int_t index = basename.Index("#");
505  basename = basename(0, index+1);
506  fileName = dirname;
507  fileName += "/";
508  fileName += basename;
509  /*
510  if (fileName.BeginsWith("root:")) {
511  fileName.Append("?ZIP=");
512  }
513  */
514  *fPathName = fileName;
515  AliInfo(Form("Path: -%s-\n", fPathName->Data()));
516 
517  ResetIO();
518  InitIO("");
519 
520 // Handle subsidiary handlers
521  if (fSubsidiaryHandlers) {
522  TIter next(fSubsidiaryHandlers);
523  AliMCEventHandler *handler;
524  while((handler = (AliMCEventHandler*) next())) {
525  TString* spath = handler->GetInputPath();
526  if (spath->Contains("merged")) {
527  if (! fPathName->IsNull()) {
528  handler->Notify(Form("%s/../.", fPathName->Data()));
529  } else {
530  handler->Notify("../");
531  }
532  }
533  }
534  }
535 
536  return kTRUE;
537 }
538 
540 {
541 // Clear header and stack
542 
543  if (fInitOk) fMCEvent->Clean();
544 
545 // Delete Tree E
546  delete fTreeE; fTreeE = 0;
547 
548 // Reset files
549  if (fFileE) {delete fFileE; fFileE = 0;}
550  if (fFileK) {delete fFileK; fFileK = 0;}
551  if (fFileTR) {delete fFileTR; fFileTR = 0; fMCEvent->ConnectTreeTR(0);}
552  fkExtension="";
553  fInitOk = kFALSE;
554 
555  if (fSubsidiaryHandlers) {
556  TIter next(fSubsidiaryHandlers);
557  AliMCEventHandler *handler;
558  while((handler = (AliMCEventHandler*)next())) {
559  handler->ResetIO();
560  }
561  }
562 
563 }
564 
565 
567 {
568  // Clean-up after each event
569  if (fFileK && fCacheTK) {
570  fTreeK->SetCacheSize(0);
571  fCacheTK = 0;
572  fFileK->SetCacheRead(0, fTreeK);
573  }
574  if (fFileTR && fCacheTR) {
575  fTreeTR->SetCacheSize(0);
576  fCacheTR = 0;
577  fFileTR->SetCacheRead(0, fTreeTR);
578  }
579  delete fDirTR; fDirTR = 0;
580  delete fDirK; fDirK = 0;
581  if (fInitOk) fMCEvent->FinishEvent();
582 
583  if (fSubsidiaryHandlers) {
584  TIter next(fSubsidiaryHandlers);
585  AliMCEventHandler *handler;
586  while((handler = (AliMCEventHandler*)next())) {
587  handler->FinishEvent();
588  }
589  }
590 
591  return kTRUE;
592 }
593 
595 {
596  // Dummy
597  return kTRUE;
598 }
599 
601 {
602  // Dummy
603  return kTRUE;
604 }
605 
606 
608 {
609  // Set the input path name
610  delete fPathName;
611  TString tmps = fname;
612  if (tmps.IsNull()) {
613  tmps = "./";
614  }
615  else if (!tmps.EndsWith("#")) { // not archive ?
616  if (!tmps.EndsWith("/")) tmps += "/";
617  }
618  fPathName = new TString(tmps);
619 }
620 
622 {
623  // Add a subsidiary handler. For example for background events
624 
625  if (!fSubsidiaryHandlers) fSubsidiaryHandlers = new TList();
626  fSubsidiaryHandlers->Add(handler);
627 }
TFile * fFileTR
File with TreeK.
virtual void AddSubsidiaryEvent(AliMCEvent *event)
Definition: AliMCEvent.cxx:684
virtual void SetPreReadMode(PreReadMode_t mode)
TFile * Open(const char *filename, Long64_t &nevents)
virtual void SetReadTR(Bool_t flag)
virtual Int_t GetNumberOfPrimaries() const
Definition: AliMCEvent.h:128
virtual void FinishEvent()
Definition: AliMCEvent.cxx:245
TTree * fTreeE
File with TreeTR.
AliHeader * Header()
Definition: AliMCEvent.h:115
#define TObjArray
virtual void DrawCheck(Int_t i, Int_t search)
Definition: AliMCEvent.cxx:269
virtual void InitEvent()
Definition: AliMCEvent.cxx:826
Bool_t IsParticleSelected(Int_t i)
const char * path
Int_t fFileNumber
File name extension.
TTree * fTreeK
TreeE (Event Headers)
TExMap fParticleSelected
Directory for TR Tree.
virtual Bool_t FinishEvent()
virtual void ConnectTreeK(TTree *tree)
Definition: AliMCEvent.cxx:121
TString * fPathName
Current event.
virtual void ConnectTreeTR(TTree *tree)
Definition: AliMCEvent.cxx:169
static void AddParticlesToPdgDataBase()
Definition: AliPDG.cxx:31
virtual Int_t BgLabelToIndex(Int_t label)
Definition: AliMCEvent.cxx:768
#define AliInfoF(message,...)
Definition: AliLog.h:499
virtual Int_t GetMother() const
Definition: AliMCParticle.h:76
Int_t GetSgPerBgEmbedded() const
Definition: AliHeader.h:67
void DrawCheck(Int_t i, Int_t search=0)
TString fileName(const char *dir, int runNumber, const char *da, int i, const char *type)
virtual Bool_t LoadEvent(Int_t iev)
virtual void ConnectTreeE(TTree *tree)
Definition: AliMCEvent.cxx:115
TExMap fLabelMap
List of selected MC particles for t.
#define AliWarning(message)
Definition: AliLog.h:541
virtual Bool_t BeginEvent(Long64_t entry)
static const char * GetEmbeddingBKGPathsKey()
Definition: AliStack.h:93
Int_t fEventsPerFile
Input file number.
Int_t fNEvent
Stores the Map of MC (ESDLabel,AODlabel)
virtual Int_t GetParticleAndTR(Int_t i, TParticle *&particle, TClonesArray *&trefs)
Definition: AliMCEvent.cxx:188
virtual Bool_t Notify()
TDirectoryFile * fDirTR
Directory for Kine Tree.
const Char_t * fkExtension
Input file path.
virtual AliVParticle * GetTrack(Int_t i) const
Definition: AliMCEvent.cxx:540
#define AliInfo(message)
Definition: AliLog.h:484
static Int_t BgLabelOffset()
Definition: AliMCEvent.h:138
virtual void ResetIO()
virtual void Clean()
Definition: AliMCEvent.cxx:230
TTreeCache * fCacheTR
Cache for kinematics tree.
Int_t fEvent
Number of events.
virtual Bool_t Init(Option_t *opt)
void SelectParticle(Int_t i)
#define AliFatal(message)
Definition: AliLog.h:640
Int_t fEventsInContainer
List of subsidiary MC handlers (for example for Background)
TTree * fTreeTR
TreeK (kinematics tree)
virtual Int_t GetNumberOfTracks() const
Definition: AliMCEvent.h:98
PreReadMode_t fPreReadMode
Number of events in container class.
Int_t GetNewLabel(Int_t i)
virtual Bool_t InitIO(Option_t *opt)
TFile * fFileE
MC Event.
virtual void PreReadAll()
Definition: AliMCEvent.cxx:854
AliMCEvent * MCEvent() const
Bool_t OpenFile(Int_t i)
TFile * fFileK
File with TreeE.
Int_t GetParticleAndTR(Int_t i, TParticle *&particle, TClonesArray *&trefs)
virtual void AddSubsidiaryHandler(AliMCEventHandler *handler)
virtual Bool_t TerminateIO()
#define AliError(message)
Definition: AliLog.h:591
virtual void SetInputPath(const char *fname)
Bool_t fReadTR
Number of events per file.
TDirectoryFile * fDirK
TreeTR (track references tree)
virtual Bool_t Terminate()
char * fname
virtual TString * GetInputPath() const
AliMCEvent * fMCEvent