ROOT logo
#ifndef ALIPERFORMANCEDCA_H
#define ALIPERFORMANCEDCA_H

//------------------------------------------------------------------------------
// Class to keep information from comparison of 
// reconstructed and MC particle tracks (DCA - Distance of Closest Approach 
// to the vertex).   
// 
// Author: J.Otwinowski 04/02/2008 
//------------------------------------------------------------------------------

class AliESDEvent; 
class AliESDfriend; 
class AliStack; 
class AliRecInfoCuts;
class AliMCInfoCuts;
class AliESDVertex;
class AliESDtrack;
class TH3;
class TH2;
class TH1;
class TString;
class TNamed;

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

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

  virtual ~AliPerformanceDCA();

  // 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;}

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

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

  void ProcessConstrained(AliStack* const stack, AliESDtrack *const esdTrack);
  void ProcessTPC(AliStack* const stack, AliESDtrack *const esdTrack, AliESDEvent* const esdEvent);
  void ProcessTPCITS(AliStack* const stack, AliESDtrack *const esdTrack, AliESDEvent* const esdEvent);

  // 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;}

  // getters
  THnSparse* GetDCAHisto() const {return fDCAHisto;}

  // Make stat histograms
  TH1F* MakeStat1D(TH2 *hist, Int_t delta1, Int_t type);
  TH2F* MakeStat2D(TH3 *hist, Int_t delta0, Int_t delta1, Int_t type);

private:

  // DCA histograms
  THnSparseF *fDCAHisto; //-> dca_r:dca_z:eta:pt:phi 
 
  // Global cuts objects
  AliRecInfoCuts* fCutsRC; // selection cuts for reconstructed tracks
  AliMCInfoCuts*  fCutsMC;  // selection cuts for MC tracks

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

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

  ClassDef(AliPerformanceDCA,1);
};

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