ROOT logo
#ifndef ALIRECINFOMAKER_H
#define ALIRECINFOMAKER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */



//////////////////////////////////////////////////////////////////////////////
//                          Class AliRecInfoMaker                           //
//   collect together MC info and Rec info for comparison purposes 
//                                           - effieciency studies and so on//                                                                 //
//   marian.ivanov@cern.ch                                                  //
//////////////////////////////////////////////////////////////////////////////


#include "TObject.h"
#include "AliESD.h"
#include "AliESDEvent.h"

#include "AliESDtrack.h"
#include "AliV0.h"
#include "AliESDfriendTrack.h"
#include "AliITStrackMI.h"
class AliTPCseed;
class AliTPCParam;
class AliMCInfo;
class AliGenKinkInfo;
class AliGenV0Info;
class AliESDRecInfo;
class AliESDRecKinkInfo;
class AliESDRecV0Info;


////////////////////////////////////////////////////////////////////////
// 
// Start of implementation of the class AliRecInfoMaker
//
////////////////////////////////////////////////////////////////////////

class AliRecInfoMaker {

public:
  AliRecInfoMaker(const char* fnGenTracks,
	   const char* fnCmpRes      ="cmpTracks.root", 
	   const char* fnGalice      ="galice.root",
	   Int_t nEvents=1, Int_t firstEvent=0);
  static void MakeAliases(TTree *tree); 
  virtual ~AliRecInfoMaker();
  void Reset();
  Int_t Exec();
  Int_t Exec(Int_t nEvents, Int_t firstEventNr);
  Int_t SetIO();
  Int_t SetIO(Int_t eventNr );
  void CreateTreeCmp();
  void CloseOutputFile();
  Bool_t ConnectGenTree();
  Int_t TreeGenLoop(Int_t eventNr);
  Int_t TreeTLoop();
  Int_t BuildKinkInfo0(Int_t eventNr); // build kink info 0
  Int_t BuildV0Info(Int_t eventNr); // build kink info 0
  void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
  void SetNEvents(Int_t i) {fNEvents = i;}
  void SetDebug(Int_t level) {fDebug = level;}

// tmp method, should go to TrackReferenceESD
  static TVector3 TR2Local(AliTrackReference *trackRef,
		    AliTPCParam *paramTPC);
  static AliTPCParam * GetTPCParam();
private:
  AliRecInfoMaker(const AliRecInfoMaker& /*info*/);
  AliRecInfoMaker& operator=(const AliRecInfoMaker& /*info*/) {return *this;}

  Int_t fEventNr;                 //! current event number
  Int_t fNEvents;                 //! number of events to process
  Int_t fFirstEventNr;            //! first event to process
  //
  char  fFnCmp[1000];                   //! output file name with cmp tracks
  TFile *fFileCmp;                //! output file with cmp tracks
  TTree *fTreeCmp;                //! output tree with cmp tracks
  TTree *fTreeCmpKinks;                //! output tree with cmp Kinks
  TTree *fTreeCmpV0;                //! output tree with cmp V0
  //
  char  fFnGenTracks[1000];             //! input file name with gen tracks
  TFile *fFileGenTracks;                //! input files with generated tracks   
  TTree *fTreeGenTracks;           //! tree with generated tracks
  TTree *fTreeGenKinks;            // tree with gen kinks
  TTree *fTreeGenV0;            // tree with gen V0
  //
  //
  //
  AliRunLoader * fLoader;         //! pointer to the run loader
  //TTree *fTreeRecTracks;          //! tree with reconstructed tracks
  //
  Short_t *fIndexRecTracks;         //! index of particle label in the TreeT_ESD
  Short_t *fFakeRecTracks;          //! number of fake tracks
  Short_t *fMultiRecTracks;         //! number of multiple reconstructions
  //
  Short_t *fIndexRecKinks;         //! index of particle label in treeesd
  Short_t *fMultiRecKinks;         //! number of multiple reconstructions
  Short_t *fSignedKinks;           //! indicator that kink was not fake
  //
  Short_t *fIndexRecV0;         //! index of particle label in treeesd
  Short_t *fMultiRecV0;         //! number of multiple reconstructions
  Short_t *fSignedV0;                //! indicator that kink was not fake
  //
  TObjArray *fRecArray;           // container with rec infos
  AliESDEvent *fEvent;             //!event
  AliESDfriend *fESDfriend;              //!event friend
  //
  AliTPCParam* fParamTPC;         //! AliTPCParam
  Int_t fNParticles;              //! number of particles in the input tree genTracks
  Int_t fDebug;                   //! debug flag  
  Int_t fNextTreeGenEntryToRead;    //! last entry already read from genTracks tree
  Int_t fNextKinkToRead;            //! last entry already read from genKinks tree
  Int_t fNextV0ToRead;            //! last entry already read from genV0 tree
  //
  AliMCInfo*  fMCInfo;           //! MC information writen per particle
  AliGenKinkInfo* fGenKinkInfo;      //! MC information writen per Kink
  AliGenV0Info* fGenV0Info;      //! MC information writen per Kink
  AliESDRecInfo*  fRecInfo;          //! Rec. information writen per particle
  AliESDfriendTrack*  fFriend;          //! friend track
  AliESDRecKinkInfo* fRecKinkInfo;    //! reconstructed kink info
  AliESDRecV0Info* fRecV0Info;    //! reconstructed kink info
  //

  ClassDef(AliRecInfoMaker,1)    // class which creates and fills tree with ESDGenTrack objects
};


#endif
 AliRecInfoMaker.h:1
 AliRecInfoMaker.h:2
 AliRecInfoMaker.h:3
 AliRecInfoMaker.h:4
 AliRecInfoMaker.h:5
 AliRecInfoMaker.h:6
 AliRecInfoMaker.h:7
 AliRecInfoMaker.h:8
 AliRecInfoMaker.h:9
 AliRecInfoMaker.h:10
 AliRecInfoMaker.h:11
 AliRecInfoMaker.h:12
 AliRecInfoMaker.h:13
 AliRecInfoMaker.h:14
 AliRecInfoMaker.h:15
 AliRecInfoMaker.h:16
 AliRecInfoMaker.h:17
 AliRecInfoMaker.h:18
 AliRecInfoMaker.h:19
 AliRecInfoMaker.h:20
 AliRecInfoMaker.h:21
 AliRecInfoMaker.h:22
 AliRecInfoMaker.h:23
 AliRecInfoMaker.h:24
 AliRecInfoMaker.h:25
 AliRecInfoMaker.h:26
 AliRecInfoMaker.h:27
 AliRecInfoMaker.h:28
 AliRecInfoMaker.h:29
 AliRecInfoMaker.h:30
 AliRecInfoMaker.h:31
 AliRecInfoMaker.h:32
 AliRecInfoMaker.h:33
 AliRecInfoMaker.h:34
 AliRecInfoMaker.h:35
 AliRecInfoMaker.h:36
 AliRecInfoMaker.h:37
 AliRecInfoMaker.h:38
 AliRecInfoMaker.h:39
 AliRecInfoMaker.h:40
 AliRecInfoMaker.h:41
 AliRecInfoMaker.h:42
 AliRecInfoMaker.h:43
 AliRecInfoMaker.h:44
 AliRecInfoMaker.h:45
 AliRecInfoMaker.h:46
 AliRecInfoMaker.h:47
 AliRecInfoMaker.h:48
 AliRecInfoMaker.h:49
 AliRecInfoMaker.h:50
 AliRecInfoMaker.h:51
 AliRecInfoMaker.h:52
 AliRecInfoMaker.h:53
 AliRecInfoMaker.h:54
 AliRecInfoMaker.h:55
 AliRecInfoMaker.h:56
 AliRecInfoMaker.h:57
 AliRecInfoMaker.h:58
 AliRecInfoMaker.h:59
 AliRecInfoMaker.h:60
 AliRecInfoMaker.h:61
 AliRecInfoMaker.h:62
 AliRecInfoMaker.h:63
 AliRecInfoMaker.h:64
 AliRecInfoMaker.h:65
 AliRecInfoMaker.h:66
 AliRecInfoMaker.h:67
 AliRecInfoMaker.h:68
 AliRecInfoMaker.h:69
 AliRecInfoMaker.h:70
 AliRecInfoMaker.h:71
 AliRecInfoMaker.h:72
 AliRecInfoMaker.h:73
 AliRecInfoMaker.h:74
 AliRecInfoMaker.h:75
 AliRecInfoMaker.h:76
 AliRecInfoMaker.h:77
 AliRecInfoMaker.h:78
 AliRecInfoMaker.h:79
 AliRecInfoMaker.h:80
 AliRecInfoMaker.h:81
 AliRecInfoMaker.h:82
 AliRecInfoMaker.h:83
 AliRecInfoMaker.h:84
 AliRecInfoMaker.h:85
 AliRecInfoMaker.h:86
 AliRecInfoMaker.h:87
 AliRecInfoMaker.h:88
 AliRecInfoMaker.h:89
 AliRecInfoMaker.h:90
 AliRecInfoMaker.h:91
 AliRecInfoMaker.h:92
 AliRecInfoMaker.h:93
 AliRecInfoMaker.h:94
 AliRecInfoMaker.h:95
 AliRecInfoMaker.h:96
 AliRecInfoMaker.h:97
 AliRecInfoMaker.h:98
 AliRecInfoMaker.h:99
 AliRecInfoMaker.h:100
 AliRecInfoMaker.h:101
 AliRecInfoMaker.h:102
 AliRecInfoMaker.h:103
 AliRecInfoMaker.h:104
 AliRecInfoMaker.h:105
 AliRecInfoMaker.h:106
 AliRecInfoMaker.h:107
 AliRecInfoMaker.h:108
 AliRecInfoMaker.h:109
 AliRecInfoMaker.h:110
 AliRecInfoMaker.h:111
 AliRecInfoMaker.h:112
 AliRecInfoMaker.h:113
 AliRecInfoMaker.h:114
 AliRecInfoMaker.h:115
 AliRecInfoMaker.h:116
 AliRecInfoMaker.h:117
 AliRecInfoMaker.h:118
 AliRecInfoMaker.h:119
 AliRecInfoMaker.h:120
 AliRecInfoMaker.h:121
 AliRecInfoMaker.h:122
 AliRecInfoMaker.h:123
 AliRecInfoMaker.h:124
 AliRecInfoMaker.h:125
 AliRecInfoMaker.h:126
 AliRecInfoMaker.h:127
 AliRecInfoMaker.h:128
 AliRecInfoMaker.h:129
 AliRecInfoMaker.h:130