Recover correctly the collision geometry.
[u/mrichter/AliRoot.git] / PWG3 / dielectron / AliDielectronCFdraw.h
CommitLineData
6551594b 1#ifndef ALIDIELECTRONCFDRAW_H
2#define ALIDIELECTRONCFDRAW_H
3/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//#############################################################
7//# #
8//# Class AliDielectronCF #
9//# Dielectron Correction Framework Draw helper #
10//# #
11//# Authors: #
12//# Anton Andronic, GSI / A.Andronic@gsi.de #
13//# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de #
14//# Julian Book, Uni Ffm / Julian.Book@cern.ch #
15//# Frederick Kramer, Uni Ffm, / Frederick.Kramer@cern.ch #
16//# Magnus Mager, CERN / Magnus.Mager@cern.ch #
17//# WooJin J. Park, GSI / W.J.Park@gsi.de #
18//# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch #
19//# #
20//#############################################################
21
22
23
24#include <TNamed.h>
25#include <AliCFContainer.h>
26
27class TObjArray;
28class TSeqCollection;
a655b716 29class AliCFEffGrid;
6551594b 30class TH1;
31
32class AliCFContainer;
33
34class AliDielectronCFdraw : public TNamed {
35public:
36 AliDielectronCFdraw();
37 AliDielectronCFdraw(const char* name, const char* title);
a655b716 38 AliDielectronCFdraw(AliCFContainer *cont);
39 AliDielectronCFdraw(const char* filename);
40
41 virtual ~AliDielectronCFdraw() {;}
42
6551594b 43 void SetCFContainer(AliCFContainer * const container) {fCfContainer=container;}
44 void SetCFContainers(const TSeqCollection *arr);
45
46 void SetCFContainers(const char* filename);
47
48 AliCFContainer* GetCFContainer() const {return fCfContainer;}
49
50 void SetRangeUser(Int_t ivar, Double_t min, Double_t max, const char* slices="");
51 void SetRangeUser(const char* varname, Double_t min, Double_t max, const char* slices="");
52
53 void UnsetRangeUser(Int_t ivar, const char* slices="");
54 void UnsetRangeUser(const char* varname, const char* slices="");
55
56// virtual void Draw(const Option_t* /*option*/ = "") {;}
a655b716 57 //Draw Projections
6551594b 58 void Draw(const Option_t* varnames, const char* opt="", const char* slices="");
59 void Draw(Int_t var, const char* opt="", const char* slices="");
60 void Draw(Int_t var0, Int_t var1, const char* opt="", const char* slices="");
61 void Draw(Int_t var0, Int_t var1, Int_t var2, const char* opt="", const char* slices="");
a655b716 62
63 TObjArray* CollectHistosProj(Int_t dim, Int_t *vars, const char* slices);
6551594b 64 TH1* Project(Int_t ndim, Int_t *vars, Int_t slice);
a655b716 65
66 //Draw efficiencies
67 void DrawEfficiency(const char* varnames, const char* nominators, Int_t denominator=0, const char* opt="sameleg");
68 void DrawEfficiency(Int_t var, const char* nominators, Int_t denominator=0, const char* opt="sameleg");
69 void DrawEfficiency(Int_t var0, Int_t var1, const char* nominators, Int_t denominator=0, const char* opt="sameleg");
70 void DrawEfficiency(Int_t var0, Int_t var1, Int_t var2, const char* nominators, Int_t denominator=0, const char* opt="sameleg");
71
72 TObjArray* CollectHistosEff(Int_t dim, Int_t *vars, const char* nominators, Int_t denominator);
73 TH1* ProjectEff(Int_t ndim, Int_t *vars);
74
6551594b 75
a655b716 76 void Draw(const TObjArray *arr, const char* opt="");
6551594b 77private:
78 AliCFContainer *fCfContainer; // CF container
a655b716 79 AliCFEffGrid *fEffGrid; // Efficiency calculation
80
6551594b 81 AliDielectronCFdraw(const AliDielectronCFdraw &c);
82 AliDielectronCFdraw &operator=(const AliDielectronCFdraw &c);
83
84 ClassDef(AliDielectronCFdraw,0) // CF draw helper class
85};
86
87//
88// Inline functions
89//
90inline void AliDielectronCFdraw::SetRangeUser(const char* varname, Double_t min, Double_t max, const char* slices)
91{
92 SetRangeUser(fCfContainer->GetVar(varname),min,max,slices);
93}
94
95//________________________________________________________________
96inline void AliDielectronCFdraw::UnsetRangeUser(const char* varname, const char* slices)
97{
98 UnsetRangeUser(fCfContainer->GetVar(varname),slices);
99}
100#endif
101