ROOT logo
 /**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

//-----------------------------------------------------------------------
// This class compares the global reconstruction with the TPConly reconstruction
// Author : Marta Verweij - UU
//-----------------------------------------------------------------------

#ifndef ALIPWG4HIGHPTQATPCONLY_H
#define ALIPWG4HIGHPTQATPCONLY_H

#include "AliAnalysisTask.h"

class TH1F;
class TH2F;
class TH3F;
class TList;

class AliESDEvent;
class AliESDfriend;
class AliESDfriendTrack;
class AliVEvent;
class AliESDtrackCuts;
class AliESDtrack;
class AliESDVertex;

class AliPWG4HighPtQATPConly: public AliAnalysisTask {

 public:
  AliPWG4HighPtQATPConly();
  AliPWG4HighPtQATPConly(const char *name);
  ~AliPWG4HighPtQATPConly() {;}

  virtual void   LocalInit();
  virtual void   ConnectInputData(Option_t *);
  virtual void   CreateOutputObjects();
  virtual void   Exec(Option_t *option);
  virtual void   Terminate(Option_t *);

  Bool_t SelectEvent();    //decides if event is used for analysis

  void SetCutType(Int_t ctype) {fCutType = ctype;}
  void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
  void SetCutsITS(AliESDtrackCuts* trackCutsITS) {fTrackCutsITS = trackCutsITS;}
  void SetPtMax(Float_t ptmax) {fPtMax = ptmax;}

  Int_t GetCutType() {return fCutType;}
  Float_t GetPtMax()           {return fPtMax;}

 protected:

 private:

  void InitHistPointers();
  AliPWG4HighPtQATPConly(const AliPWG4HighPtQATPConly&);
  AliPWG4HighPtQATPConly& operator=(const AliPWG4HighPtQATPConly&);

  AliESDEvent  *fESD;              //! ESD object
  AliESDfriend *fESDfriend;        //! ESD friend object

  const AliESDVertex   *fVtx;     //! vertex object

  Int_t fCutType;                 // Cut Type set in AddTask*
  AliESDtrackCuts *fTrackCuts;    // TrackCuts for global vs TPConly comparison
  AliESDtrackCuts *fTrackCutsITS; // TrackCuts including ITSrefit

  Float_t fPtMax;                 // Maximum pT for histograms
  
  TH1F *fNEventAll;                             //! Event counter
  TH1F *fNEventSel;                             //! Event counter: Selected events for analysis
  TH1F *fNEventReject;                          //! Book keeping of reason of rejecting events

  TH1F *fPtAll;                                 //! Pt spectrum all charged particles
  TH1F *fPtSel;                                 //! Pt spectrum all selected charged particles by fTrackCuts
  TH2F *fPtAllminPtTPCvsPtAll;                  //! Momentum resolution (global vs TPConly)
  TH3F *fPtAllminPtTPCvsPtAllEtaPos;            //! Momentum resolution (global vs TPConly) vs Eta for positive particles
  TH3F *fPtAllminPtTPCvsPtAllEtaNeg;            //! Momentum resolution (global vs TPConly) vs Eta for negative particles
  TH3F *fPtAllminPtTPCvsPtAllNPointTPC;         //! Momentum resolution vs NPointTPC
  TH3F *fPtAllminPtTPCvsPtAllDCAR;              //! Momentum resolution vs DCAR
  TH3F *fPtAllminPtTPCvsPtAllDCAZ;              //! Momentum resolution vs DCAZ
  TH3F *fPtAllminPtTPCvsPtAllPhi;               //! Momentum resolution vs Phi
  TH3F *fPtAllminPtTPCvsPtAllNPointITS;         //! Momentum resolution vs NPointITS
  TH3F *fPtAllminPtTPCvsPtAllNSigmaToVertex;    //! Momentum resolution vs NSigmaToVertes
  TH3F *fPtAllminPtTPCvsPtAllChi2C;             //! Momentum resolution vs Chi2Constrained
  TH3F *fPtAllminPtTPCvsPtAllRel1PtUncertainty; //! Momentum resolution vs relUncertainty1Pt
  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusTPC;   //! Momentum resolution vs Chi2PerNClusTPC
  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITS;   //! Momentum resolution vs Chi2PerNClusITS

  TH3F *fPtAllminPtTPCvsNPointTPCPhi;           //! Momentum resolution vs NPointTPC vs Phi
  TH3F *fPtAllminPtTPCvsNPointITSPhi;           //! Momentum resolution vs NPointITS vs Phi
  TH3F *fPtAllminPtTPCvsRel1PtUncertaintyPhi;   //! Momentum resolution vs Rel1PtUncertainty vs Phi

  TH2F *fEtaPhiOutliers;                        //! Eta Phi for outliers in momentum resolution
 
  TH1F *fPtSelITSouter;                              //! Pt at ITS outer wall for all selected charged particles by fTrackCuts
  TH2F *fPtITSouterminPtTPCvsPtAll;                  //! Momentum resolution (global vs ITSouter-TPCinner)
  TH3F *fPtITSouterminPtTPCvsPtAllEtaPos;            //! Momentum resolution (global vs ITSouter-TPCinner) vs Eta for positive particles
  TH3F *fPtITSouterminPtTPCvsPtAllEtaNeg;            //! Momentum resolution (global vs ITSouter-TPCinner) vs Eta for negative particles
  TH3F *fPtITSouterminPtTPCvsPtAllNPointTPC;         //! Momentum resolution vs NPointTPC
  TH3F *fPtITSouterminPtTPCvsPtAllDCAR;              //! Momentum resolution vs DCAR
  TH3F *fPtITSouterminPtTPCvsPtAllDCAZ;              //! Momentum resolution vs DCAZ
  TH3F *fPtITSouterminPtTPCvsPtAllPhi;               //! Momentum resolution vs Phi
  TH3F *fPtITSouterminPtTPCvsPtAllNPointITS;         //! Momentum resolution vs NPointITS
  TH3F *fPtITSouterminPtTPCvsPtAllNSigmaToVertex;    //! Momentum resolution vs NSigmaToVertes
  TH3F *fPtITSouterminPtTPCvsPtAllChi2C;             //! Momentum resolution vs Chi2Constrained
  TH3F *fPtITSouterminPtTPCvsPtAllRel1PtUncertainty; //! Momentum resolution vs relUncertainty1Pt
  TH3F *fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC;   //! Momentum resolution vs Chi2PerNClusTPC
  TH3F *fPtITSouterminPtTPCvsPtAllChi2PerNClusITS;   //! Momentum resolution vs Chi2PerNClusITS
 
  TH2F *fPtAllminPtTPCvsPtAllITSLayer0;              //! Track has at least 1st SPD layer
  TH2F *fPtAllminPtTPCvsPtAllITSLayer1;              //! Track has at least 2nd SPD layer and not 1st SPD
  TH2F *fPtAllminPtTPCvsPtAllITSLayer2;              //! Track has at least 1st SDD layer and not SPD layers
  TH2F *fPtAllminPtTPCvsPtAllITSLayer3;              //! Track has at least 1st SDD layer and not SPD layers and not 1st SDD
  TH2F *fPtAllminPtTPCvsPtAllITSLayer4;              //! Track has at least 1st SSD layer and not SPD or SDD layers
  TH2F *fPtAllminPtTPCvsPtAllITSLayer5;              //! Track has at least 1st SSD layer and not SPD or SDD layers or 1st SSD

  TH2F *fPtAllminPtTPCvsPtAllNoSPD;                  //! Track has no signal in SPD layers
  TH2F *fPtAllminPtTPCvsPtAllNoSDD;                  //! Track has no signal in SDD layers
  TH2F *fPtAllminPtTPCvsPtAllNoSSD;                  //! Track has no signal in SSD layers

  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITSLayer0;  //! Track has at least 1st SPD layer
  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITSLayer1;  //! Track has at least 2nd SPD layer and not 1st SPD
  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITSLayer2;  //! Track has at least 1st SDD layer and not SPD layers
  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITSLayer3;  //! Track has at least 1st SDD layer and not SPD layers and not 1st SDD
  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITSLayer4;  //! Track has at least 1st SSD layer and not SPD or SDD layers
  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITSLayer5;  //! Track has at least 1st SSD layer and not SPD or SDD layers or 1st SSD

  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITSNoSPD;   //! Track has no signal in SPD layers
  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITSNoSDD;   //! Track has no signal in SDD layers
  TH3F *fPtAllminPtTPCvsPtAllChi2PerNClusITSNoSSD;   //! Track has no signal in SSD layers

  TList *fHistList; //! List of Histograms
  
  TH1F *fPtAllTPC;     //! Pt spectrum all charged particles
  TH1F *fPtSelTPC;     //! Pt spectrum all selected charged particles by fTrackCuts
  TH1F *fPtSelTPCITS;  //! Pt spectrum all selected charged particles by fTrackCutsITS
  TList *fHistListTPC; //! List of Histograms
  
  TH1F *fPtSelITS;                              //! Pt spectrum all selected charged particles by fTrackCutsITS
  TH2F *fPtITSminPtTPCvsPtITS;                  //! Momentum resolution (global with ITSrefit vs TPConly)
  TH3F *fPtITSminPtTPCvsPtITSEtaPos;            //! Momentum resolution (global with ITSrefit vs TPConly) vs Eta for positive particles
  TH3F *fPtITSminPtTPCvsPtITSEtaNeg;            //! Momentum resolution (global with ITSrefit vs TPConly) vs Eta for negative particles
  TH3F *fPtITSminPtTPCvsPtITSNPointTPC;         //! Momentum resolution vs NPointTPC 
  TH3F *fPtITSminPtTPCvsPtITSDCAR;              //! Momentum resolution vs DCAR
  TH3F *fPtITSminPtTPCvsPtITSDCAZ;              //! Momentum resolution vs DCAZ
  TH3F *fPtITSminPtTPCvsPtITSPhi;               //! Momentum resolution vs Phi
  TH3F *fPtITSminPtTPCvsPtITSNPointITS;         //! Momentum resolution vs NPointITS
  TH3F *fPtITSminPtTPCvsPtITSNSigmaToVertex;    //! Momentum resolution vs NSigmaToVertex
  TH3F *fPtITSminPtTPCvsPtITSChi2C;             //! Momentum resolution vs Chi2Constrained
  TH3F *fPtITSminPtTPCvsPtITSRel1PtUncertainty; //! Momentum resolution vs relUncertainty1Pt
  TH3F *fPtITSminPtTPCvsPtITSChi2PerNClusTPC;   //! Momentum resolution vs Chi2PerNClusTPC
  TH3F *fPtITSminPtTPCvsPtITSChi2PerNClusITS;   //! Momentum resolution vs Chi2PerNClusITS

  TH3F *fPtITSminPtTPCvsNPointTPCPhi;           //! Momentum resolution vs NPointTPC vs Phi
  TH3F *fPtITSminPtTPCvsNPointITSPhi;           //! Momentum resolution vs NPointITS vs Phi
  TH3F *fPtITSminPtTPCvsRel1PtUncertaintyPhi;   //! Momentum resolution vs Rel1PtUncertainty vs Phi

  TH3F *fPtRel1PtUncertaintyChi2PerClusTPC;     //! Global Pt vs relUncertainty1Pt vs Chi2PerClusTPC

  TList *fHistListITS; //! List of Histograms

  ClassDef(AliPWG4HighPtQATPConly,1) 
  
};
#endif
 AliPWG4HighPtQATPConly.h:1
 AliPWG4HighPtQATPConly.h:2
 AliPWG4HighPtQATPConly.h:3
 AliPWG4HighPtQATPConly.h:4
 AliPWG4HighPtQATPConly.h:5
 AliPWG4HighPtQATPConly.h:6
 AliPWG4HighPtQATPConly.h:7
 AliPWG4HighPtQATPConly.h:8
 AliPWG4HighPtQATPConly.h:9
 AliPWG4HighPtQATPConly.h:10
 AliPWG4HighPtQATPConly.h:11
 AliPWG4HighPtQATPConly.h:12
 AliPWG4HighPtQATPConly.h:13
 AliPWG4HighPtQATPConly.h:14
 AliPWG4HighPtQATPConly.h:15
 AliPWG4HighPtQATPConly.h:16
 AliPWG4HighPtQATPConly.h:17
 AliPWG4HighPtQATPConly.h:18
 AliPWG4HighPtQATPConly.h:19
 AliPWG4HighPtQATPConly.h:20
 AliPWG4HighPtQATPConly.h:21
 AliPWG4HighPtQATPConly.h:22
 AliPWG4HighPtQATPConly.h:23
 AliPWG4HighPtQATPConly.h:24
 AliPWG4HighPtQATPConly.h:25
 AliPWG4HighPtQATPConly.h:26
 AliPWG4HighPtQATPConly.h:27
 AliPWG4HighPtQATPConly.h:28
 AliPWG4HighPtQATPConly.h:29
 AliPWG4HighPtQATPConly.h:30
 AliPWG4HighPtQATPConly.h:31
 AliPWG4HighPtQATPConly.h:32
 AliPWG4HighPtQATPConly.h:33
 AliPWG4HighPtQATPConly.h:34
 AliPWG4HighPtQATPConly.h:35
 AliPWG4HighPtQATPConly.h:36
 AliPWG4HighPtQATPConly.h:37
 AliPWG4HighPtQATPConly.h:38
 AliPWG4HighPtQATPConly.h:39
 AliPWG4HighPtQATPConly.h:40
 AliPWG4HighPtQATPConly.h:41
 AliPWG4HighPtQATPConly.h:42
 AliPWG4HighPtQATPConly.h:43
 AliPWG4HighPtQATPConly.h:44
 AliPWG4HighPtQATPConly.h:45
 AliPWG4HighPtQATPConly.h:46
 AliPWG4HighPtQATPConly.h:47
 AliPWG4HighPtQATPConly.h:48
 AliPWG4HighPtQATPConly.h:49
 AliPWG4HighPtQATPConly.h:50
 AliPWG4HighPtQATPConly.h:51
 AliPWG4HighPtQATPConly.h:52
 AliPWG4HighPtQATPConly.h:53
 AliPWG4HighPtQATPConly.h:54
 AliPWG4HighPtQATPConly.h:55
 AliPWG4HighPtQATPConly.h:56
 AliPWG4HighPtQATPConly.h:57
 AliPWG4HighPtQATPConly.h:58
 AliPWG4HighPtQATPConly.h:59
 AliPWG4HighPtQATPConly.h:60
 AliPWG4HighPtQATPConly.h:61
 AliPWG4HighPtQATPConly.h:62
 AliPWG4HighPtQATPConly.h:63
 AliPWG4HighPtQATPConly.h:64
 AliPWG4HighPtQATPConly.h:65
 AliPWG4HighPtQATPConly.h:66
 AliPWG4HighPtQATPConly.h:67
 AliPWG4HighPtQATPConly.h:68
 AliPWG4HighPtQATPConly.h:69
 AliPWG4HighPtQATPConly.h:70
 AliPWG4HighPtQATPConly.h:71
 AliPWG4HighPtQATPConly.h:72
 AliPWG4HighPtQATPConly.h:73
 AliPWG4HighPtQATPConly.h:74
 AliPWG4HighPtQATPConly.h:75
 AliPWG4HighPtQATPConly.h:76
 AliPWG4HighPtQATPConly.h:77
 AliPWG4HighPtQATPConly.h:78
 AliPWG4HighPtQATPConly.h:79
 AliPWG4HighPtQATPConly.h:80
 AliPWG4HighPtQATPConly.h:81
 AliPWG4HighPtQATPConly.h:82
 AliPWG4HighPtQATPConly.h:83
 AliPWG4HighPtQATPConly.h:84
 AliPWG4HighPtQATPConly.h:85
 AliPWG4HighPtQATPConly.h:86
 AliPWG4HighPtQATPConly.h:87
 AliPWG4HighPtQATPConly.h:88
 AliPWG4HighPtQATPConly.h:89
 AliPWG4HighPtQATPConly.h:90
 AliPWG4HighPtQATPConly.h:91
 AliPWG4HighPtQATPConly.h:92
 AliPWG4HighPtQATPConly.h:93
 AliPWG4HighPtQATPConly.h:94
 AliPWG4HighPtQATPConly.h:95
 AliPWG4HighPtQATPConly.h:96
 AliPWG4HighPtQATPConly.h:97
 AliPWG4HighPtQATPConly.h:98
 AliPWG4HighPtQATPConly.h:99
 AliPWG4HighPtQATPConly.h:100
 AliPWG4HighPtQATPConly.h:101
 AliPWG4HighPtQATPConly.h:102
 AliPWG4HighPtQATPConly.h:103
 AliPWG4HighPtQATPConly.h:104
 AliPWG4HighPtQATPConly.h:105
 AliPWG4HighPtQATPConly.h:106
 AliPWG4HighPtQATPConly.h:107
 AliPWG4HighPtQATPConly.h:108
 AliPWG4HighPtQATPConly.h:109
 AliPWG4HighPtQATPConly.h:110
 AliPWG4HighPtQATPConly.h:111
 AliPWG4HighPtQATPConly.h:112
 AliPWG4HighPtQATPConly.h:113
 AliPWG4HighPtQATPConly.h:114
 AliPWG4HighPtQATPConly.h:115
 AliPWG4HighPtQATPConly.h:116
 AliPWG4HighPtQATPConly.h:117
 AliPWG4HighPtQATPConly.h:118
 AliPWG4HighPtQATPConly.h:119
 AliPWG4HighPtQATPConly.h:120
 AliPWG4HighPtQATPConly.h:121
 AliPWG4HighPtQATPConly.h:122
 AliPWG4HighPtQATPConly.h:123
 AliPWG4HighPtQATPConly.h:124
 AliPWG4HighPtQATPConly.h:125
 AliPWG4HighPtQATPConly.h:126
 AliPWG4HighPtQATPConly.h:127
 AliPWG4HighPtQATPConly.h:128
 AliPWG4HighPtQATPConly.h:129
 AliPWG4HighPtQATPConly.h:130
 AliPWG4HighPtQATPConly.h:131
 AliPWG4HighPtQATPConly.h:132
 AliPWG4HighPtQATPConly.h:133
 AliPWG4HighPtQATPConly.h:134
 AliPWG4HighPtQATPConly.h:135
 AliPWG4HighPtQATPConly.h:136
 AliPWG4HighPtQATPConly.h:137
 AliPWG4HighPtQATPConly.h:138
 AliPWG4HighPtQATPConly.h:139
 AliPWG4HighPtQATPConly.h:140
 AliPWG4HighPtQATPConly.h:141
 AliPWG4HighPtQATPConly.h:142
 AliPWG4HighPtQATPConly.h:143
 AliPWG4HighPtQATPConly.h:144
 AliPWG4HighPtQATPConly.h:145
 AliPWG4HighPtQATPConly.h:146
 AliPWG4HighPtQATPConly.h:147
 AliPWG4HighPtQATPConly.h:148
 AliPWG4HighPtQATPConly.h:149
 AliPWG4HighPtQATPConly.h:150
 AliPWG4HighPtQATPConly.h:151
 AliPWG4HighPtQATPConly.h:152
 AliPWG4HighPtQATPConly.h:153
 AliPWG4HighPtQATPConly.h:154
 AliPWG4HighPtQATPConly.h:155
 AliPWG4HighPtQATPConly.h:156
 AliPWG4HighPtQATPConly.h:157
 AliPWG4HighPtQATPConly.h:158
 AliPWG4HighPtQATPConly.h:159
 AliPWG4HighPtQATPConly.h:160
 AliPWG4HighPtQATPConly.h:161
 AliPWG4HighPtQATPConly.h:162
 AliPWG4HighPtQATPConly.h:163
 AliPWG4HighPtQATPConly.h:164
 AliPWG4HighPtQATPConly.h:165
 AliPWG4HighPtQATPConly.h:166
 AliPWG4HighPtQATPConly.h:167
 AliPWG4HighPtQATPConly.h:168
 AliPWG4HighPtQATPConly.h:169
 AliPWG4HighPtQATPConly.h:170
 AliPWG4HighPtQATPConly.h:171
 AliPWG4HighPtQATPConly.h:172
 AliPWG4HighPtQATPConly.h:173
 AliPWG4HighPtQATPConly.h:174
 AliPWG4HighPtQATPConly.h:175
 AliPWG4HighPtQATPConly.h:176
 AliPWG4HighPtQATPConly.h:177