ROOT logo
#ifndef ALIPERFORMANCEDEdx_H
#define ALIPERFORMANCEDEdx_H

//------------------------------------------------------------------------------
// Class to keep information from comparison of 
// reconstructed and MC particle tracks (TPC dE/dx).   
// 
// Author: J.Otwinowski 04/02/2008 
// Changes by M.Knichel 15/10/2010
//------------------------------------------------------------------------------

class TCanvas;
class TH1F;
class TH2F;
class TNamed;
class TString;

class AliESDEvent; 
class AliESDfriend; 
class AliMCEvent;
class AliESDtrack;
class AliStack; 
class AliRecInfoCuts;
class AliMCInfoCuts;

#include "THnSparse.h"
#include "AliPerformanceObject.h"

class AliPerformanceDEdx : public AliPerformanceObject {
public :
  AliPerformanceDEdx(const Char_t* name="AliPerformanceDEdx", const Char_t* title="AliPerformanceDEdx",Int_t analysisMode=0, Bool_t hptGenerator=kFALSE);
  
  virtual ~AliPerformanceDEdx();

  // Init data members
  virtual void Init();

  // Execute analysis
  virtual void  Exec(AliMCEvent* const mcEvent, AliESDEvent *const esdEvent, AliESDfriend *const esdFriend, const Bool_t bUseMC, const Bool_t bUseESDfriend);

  // Merge output objects (needed by PROOF) 
  virtual Long64_t Merge(TCollection* const list);

  // Analyse output histograms
  virtual void Analyse();

  // Get analysis folder
  virtual TFolder* GetAnalysisFolder() const {return fAnalysisFolder;}
  
  static Bool_t GetMergeTHnSparse() { return fgMergeTHnSparse; }
  static void SetMergeTHnSparse(Bool_t mergeTHnSparse) {fgUseMergeTHnSparse = kTRUE; fgMergeTHnSparse = mergeTHnSparse; }

  // Create folder for analysed histograms
  TFolder *CreateFolder(TString folder = "folderDEdx",TString title = "Analysed DEdx histograms");

  // Export objects to folder
  TFolder *ExportToFolder(TObjArray * array=0);

  // Process events
  void  ProcessTPC(AliStack* const stack, AliESDtrack *const esdTrack); // not implemented
  void  ProcessInnerTPC(AliStack* const stack, AliESDtrack *const esdTrack, AliESDEvent *const esdEvent);
  void  ProcessTPCITS(AliStack* const stack, AliESDtrack *const esdTrack);      // not implemented
  void  ProcessConstrained(AliStack* const stack, AliESDtrack *const esdTrack); // not implemented

  
  // produce summary (currently not used)
  virtual TTree* CreateSummary();

  // Selection cuts
  void SetAliRecInfoCuts(AliRecInfoCuts* const cuts=0) {fCutsRC = cuts;}
  void SetAliMCInfoCuts(AliMCInfoCuts* const cuts=0)   {fCutsMC = cuts;} 

  AliRecInfoCuts*  GetAliRecInfoCuts() const {return fCutsRC;}
  AliMCInfoCuts*   GetAliMCInfoCuts()  const {return fCutsMC;}

  //
  // TPC dE/dx 
  //
  THnSparse* GetDeDxHisto() const {return fDeDxHisto;}
  TObjArray* GetHistos() const { return fFolderObj; }

private:

  static Bool_t fgMergeTHnSparse;
  static Bool_t fgUseMergeTHnSparse;
  
  // TPC dE/dx 
  THnSparseF *fDeDxHisto; //-> signal:phi:y:z:snp:tgl:ncls:p:nclsDEdx:nclsF
  TObjArray* fFolderObj; // array of analysed histograms
  
  // Selection cuts
  AliRecInfoCuts*  fCutsRC; // selection cuts for reconstructed tracks
  AliMCInfoCuts*   fCutsMC; // selection cuts for MC tracks

  // analysis folder 
  TFolder *fAnalysisFolder; // folder for analysed histograms
  

  AliPerformanceDEdx(const AliPerformanceDEdx&); // not implemented
  AliPerformanceDEdx& operator=(const AliPerformanceDEdx&); // not implemented

  ClassDef(AliPerformanceDEdx,4);
};

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