AliPhysics  master (3d17d9d)
AliESDtools.h
Go to the documentation of this file.
1 #ifndef ALIESDTOOLS_H
2 #define ALIESDTOOLS_H
3 
4 class AliPIDResponse;
5 class TTreeSRedirector;
6 class TTreeStream;
7 class TTree;
8 class TGraph;
9 class TH1F;
10 class AliExternalTrackParam;
11 class AliESDEvent;
12 class AliESDfriend;
13 //class TVectorF;
14 #include "TNamed.h"
15 
16 class AliESDtools : public TNamed {
17  public:
18  AliESDtools();
19  void Init(TTree* tree, AliESDEvent *event= nullptr);
20  void SetStreamer(TTreeSRedirector *streamer){fStreamer=streamer;}
21  static Double_t LoadESD(Int_t entry, Int_t verbose=0);
24  Int_t CacheITSVertexInformation(Bool_t doReset=1, Double_t dcaCut=0.05, Double_t dcaZcut=0.15);
25  Int_t CacheTOFEventInformation(Bool_t dumpStreamer=0);
27  void TPCVertexFit(TH1F *hisVertex);
28  Int_t GetNearestTrack(const AliExternalTrackParam * trackMatch, Int_t indexSkip, AliESDEvent*event, Int_t trackType, Int_t paramType, AliExternalTrackParam & paramNearest);
29  void ProcessITSTPCmatchOut(AliESDEvent *const esdEvent, AliESDfriend *const esdFriend, TTreeStream *pcstream);
30  Double_t CachePileupVertexTPC(Int_t entry, Int_t doReset=0, Int_t verbose=0);
31  //
34  // static functions for querying cached variables in TTree formula
36  static Double_t GetTrackCounters(Int_t index, Int_t toolIndex){return (*fgInstance->fCacheTrackCounters)[index];}
37  static Double_t GetTrackTPCCountersZ(Int_t index, Int_t toolIndex){return (*fgInstance->fCacheTrackTPCCountersZ)[index];}
38  static Double_t GetTrackdEdxRatio(Int_t index, Int_t toolIndex){return (*fgInstance->fCacheTrackdEdxRatio)[index];}
39  static Double_t GetTrackNcl(Int_t index, Int_t toolIndex){return (*fgInstance->fCacheTrackNcl)[index];}
40  static Double_t GetTrackChi2(Int_t index, Int_t toolIndex){return (*fgInstance->fCacheTrackChi2)[index];}
41  static Double_t GetTrackMatchEff(Int_t index, Int_t toolIndex){return (*fgInstance->fCacheTrackMatchEff)[index];}
44  static Double_t GetVertexInfo(Int_t index){return (*fgInstance->fTPCVertexInfo)[index];}
45  static Int_t SetDefaultAliases(TTree* tree);
46  static Double_t SCachePileupVertexTPC(Int_t entry, Int_t doReset, Int_t verbose=0){ return fgInstance->CachePileupVertexTPC(entry, doReset, verbose);}
47  static Double_t SCacheITSVertexInformation(Bool_t doReset=1, Double_t dcaCut=0.05, Double_t dcaZcut=0.15){ return fgInstance->CacheITSVertexInformation(doReset, dcaCut, dcaZcut);}
48  //
49  static Double_t SCacheTOFEventInformation(Bool_t dumpStreamer){return fgInstance->CacheTOFEventInformation(dumpStreamer);}
50  static Double_t SGetTOFHitInfo(Int_t number, Int_t coord);
51  //
52  Int_t fVerbose; // verbosity flag
55  AliPIDResponse * fPIDResponse;
56  Bool_t fTaskMode; // analysis task mode
57  TH1F *fHisITSVertex; // ITS z vertex histogram
58  TH1F *fHisTPCVertexA; // TPC z vertex A side
59  TH1F *fHisTPCVertexC; // TPC z vertex C side
60  TH1F *fHisTPCVertex; //
63 
64  TVectorF * fTPCVertexInfo; // TPC vertex info
65  TVectorF * fITSVertexInfo; // ITS vertex info
66  TH1F * fHistPhiTPCCounterA; // helper histogram phi counters
67  TH1F * fHistPhiTPCCounterC; // helper histogram phi counters
68  TH1F * fHistPhiTPCCounterAITS; // helper histogram phi counters
69  TH1F * fHistPhiTPCCounterCITS; // helper histogram phi counters
70  TH1F * fHistPhiITSCounterA; // helper histogram phi counters
71  TH1F * fHistPhiITSCounterC; // helper histogram phi counters
72  TVectorF * fCacheTrackCounters; // track counter
73  TVectorF * fCacheTrackTPCCountersZ; // track counter with DCA z cut
74  TVectorF * fCacheTrackdEdxRatio; // dEdx info counter
75  TVectorF * fCacheTrackNcl; // ncl counter
76  TVectorF * fCacheTrackChi2; // chi2 counter
77  TVectorF * fCacheTrackMatchEff; // matchEff counter
78  TGraph * fLumiGraph; // graph for the interaction rate info for a run
79  //
80  TTreeSRedirector * fStreamer;
82  private:
85  ClassDef(AliESDtools, 1)
86 };
87 
88 #endif
Set of tools to define derived ESD variables. To be used in the AnalysisTasks, but can be used also i...
Definition: AliESDtools.h:16
static Double_t GetTrackTPCCountersZ(Int_t index, Int_t toolIndex)
Definition: AliESDtools.h:37
double Double_t
Definition: External.C:58
TTreeSRedirector * fStreamer
Definition: AliESDtools.h:80
TVectorF * fCacheTrackMatchEff
Definition: AliESDtools.h:77
static Double_t GetMeanHisTPCVertexA()
Definition: AliESDtools.h:42
Int_t DumpEventVariables()
TH1F * fHistPhiITSCounterA
Definition: AliESDtools.h:70
TVectorF * fCacheTrackTPCCountersZ
Definition: AliESDtools.h:73
TVectorF * fCacheTrackChi2
Definition: AliESDtools.h:76
void SetStreamer(TTreeSRedirector *streamer)
Definition: AliESDtools.h:20
static AliESDtools * fgInstance
streamer
Definition: AliESDtools.h:81
static Double_t GetTrackMatchEff(Int_t index, Int_t toolIndex)
Definition: AliESDtools.h:41
TVectorF * fITSVertexInfo
Definition: AliESDtools.h:65
static Double_t SGetTOFHitInfo(Int_t number, Int_t coord)
TH1F * fHistPhiTPCCounterCITS
Definition: AliESDtools.h:69
Int_t GetNearestTrack(const AliExternalTrackParam *trackMatch, Int_t indexSkip, AliESDEvent *event, Int_t trackType, Int_t paramType, AliExternalTrackParam &paramNearest)
Double_t CachePileupVertexTPC(Int_t entry, Int_t doReset=0, Int_t verbose=0)
static Double_t SCacheITSVertexInformation(Bool_t doReset=1, Double_t dcaCut=0.05, Double_t dcaZcut=0.15)
Definition: AliESDtools.h:47
Int_t CacheITSVertexInformation(Bool_t doReset=1, Double_t dcaCut=0.05, Double_t dcaZcut=0.15)
TH1F * fHisTPCVertexC
Definition: AliESDtools.h:59
static Int_t SCalculateEventVariables(Int_t entry)
Definition: AliESDtools.h:35
void Init(TTree *tree, AliESDEvent *event=nullptr)
TH1F * fHisTPCVertexCCut
Definition: AliESDtools.h:62
void TPCVertexFit(TH1F *hisVertex)
static Int_t SetDefaultAliases(TTree *tree)
TVectorF * fTPCVertexInfo
Definition: AliESDtools.h:64
TH1F * fHisITSVertex
Definition: AliESDtools.h:57
int Int_t
Definition: External.C:63
TH1F * fHistPhiTPCCounterAITS
Definition: AliESDtools.h:68
AliESDtools & operator=(const AliESDtools &)
TH1F * fHistPhiTPCCounterA
Definition: AliESDtools.h:66
static Double_t GetTrackCounters(Int_t index, Int_t toolIndex)
Definition: AliESDtools.h:36
static Double_t GetMeanHisTPCVertexC()
Definition: AliESDtools.h:43
static Double_t SCacheTOFEventInformation(Bool_t dumpStreamer)
Definition: AliESDtools.h:49
Int_t CalculateEventVariables()
Bool_t fTaskMode
PID response object.
Definition: AliESDtools.h:56
static Double_t GetTrackNcl(Int_t index, Int_t toolIndex)
Definition: AliESDtools.h:39
TH1F * fHisTPCVertexACut
Definition: AliESDtools.h:61
TTree * fESDtree
Definition: AliESDtools.h:53
Int_t fVerbose
Definition: AliESDtools.h:52
TH1F * fHisTPCVertexA
Definition: AliESDtools.h:58
static Double_t GetTrackdEdxRatio(Int_t index, Int_t toolIndex)
Definition: AliESDtools.h:38
void ProcessITSTPCmatchOut(AliESDEvent *const esdEvent, AliESDfriend *const esdFriend, TTreeStream *pcstream)
Int_t CacheTOFEventInformation(Bool_t dumpStreamer=0)
cache TOF information for the mutplicity
static Int_t SDumpEventVariables()
Definition: AliESDtools.h:33
TVectorF * fCacheTrackNcl
Definition: AliESDtools.h:75
static Double_t GetVertexInfo(Int_t index)
Definition: AliESDtools.h:44
TGraph * fLumiGraph
Definition: AliESDtools.h:78
Int_t CacheTPCEventInformation()
caching
static Double_t GetTrackChi2(Int_t index, Int_t toolIndex)
Definition: AliESDtools.h:40
static Double_t SCachePileupVertexTPC(Int_t entry, Int_t doReset, Int_t verbose=0)
Definition: AliESDtools.h:46
static Double_t LoadESD(Int_t entry, Int_t verbose=0)
TH1F * fHistPhiITSCounterC
Definition: AliESDtools.h:71
TH1F * fHistPhiTPCCounterC
Definition: AliESDtools.h:67
TH1F * fHisTPCVertex
Definition: AliESDtools.h:60
AliESDEvent * fEvent
esd Tree pointer - class is not owner
Definition: AliESDtools.h:54
bool Bool_t
Definition: External.C:53
TVectorF * fCacheTrackdEdxRatio
Definition: AliESDtools.h:74
AliPIDResponse * fPIDResponse
esd event pointer - class is not owner
Definition: AliESDtools.h:55
TTree * tree
TVectorF * fCacheTrackCounters
Definition: AliESDtools.h:72