Removing the unnecessary const
[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>
572b0139 25#include <TVectorD.h>
6551594b 26#include <AliCFContainer.h>
27
28class TObjArray;
29class TSeqCollection;
a655b716 30class AliCFEffGrid;
6551594b 31class TH1;
32
33class AliCFContainer;
34
35class AliDielectronCFdraw : public TNamed {
36public:
37 AliDielectronCFdraw();
38 AliDielectronCFdraw(const char* name, const char* title);
a655b716 39 AliDielectronCFdraw(AliCFContainer *cont);
40 AliDielectronCFdraw(const char* filename);
41
42 virtual ~AliDielectronCFdraw() {;}
43
6551594b 44 void SetCFContainer(AliCFContainer * const container) {fCfContainer=container;}
45 void SetCFContainers(const TSeqCollection *arr);
46
47 void SetCFContainers(const char* filename);
48
49 AliCFContainer* GetCFContainer() const {return fCfContainer;}
50
51 void SetRangeUser(Int_t ivar, Double_t min, Double_t max, const char* slices="");
52 void SetRangeUser(const char* varname, Double_t min, Double_t max, const char* slices="");
53
54 void UnsetRangeUser(Int_t ivar, const char* slices="");
55 void UnsetRangeUser(const char* varname, const char* slices="");
56
66b2c564 57 virtual void Draw(const Option_t* varnames = "") { Draw(varnames,"");}
a655b716 58 //Draw Projections
66b2c564 59 void Draw(const Option_t* varnames, const char* opt, const char* slices="");
6551594b 60 void Draw(Int_t var, const char* opt="", const char* slices="");
61 void Draw(Int_t var0, Int_t var1, const char* opt="", const char* slices="");
62 void Draw(Int_t var0, Int_t var1, Int_t var2, const char* opt="", const char* slices="");
a655b716 63
64 TObjArray* CollectHistosProj(Int_t dim, Int_t *vars, const char* slices);
6551594b 65 TH1* Project(Int_t ndim, Int_t *vars, Int_t slice);
a655b716 66
67 //Draw efficiencies
66b2c564 68 void DrawEfficiency(const char* varnames, const char* nominators, Int_t denominator=0, const char* opt="sameleg2");
69 void DrawEfficiency(Int_t var, const char* nominators, Int_t denominator=0, const char* opt="sameleg", Int_t type=0);
70 void DrawEfficiency(Int_t var0, Int_t var1, const char* nominators, Int_t denominator=0, const char* opt="sameleg", Int_t type=0);
71 void DrawEfficiency(Int_t var0, Int_t var1, Int_t var2, const char* nominators, Int_t denominator=0, const char* opt="sameleg", Int_t type=0);
a655b716 72
66b2c564 73 TObjArray* CollectHistosEff(Int_t dim, Int_t *vars, const char* nominators, Int_t denominator, Int_t type=0);
a655b716 74 TH1* ProjectEff(Int_t ndim, Int_t *vars);
75
572b0139 76 const TVectorD& GetData() const {return fVdata;}
a655b716 77 void Draw(const TObjArray *arr, const char* opt="");
6551594b 78private:
79 AliCFContainer *fCfContainer; // CF container
a655b716 80 AliCFEffGrid *fEffGrid; // Efficiency calculation
572b0139 81
82 TVectorD fVdata; // vector with data, like mean efficiencies
a655b716 83
6551594b 84 AliDielectronCFdraw(const AliDielectronCFdraw &c);
85 AliDielectronCFdraw &operator=(const AliDielectronCFdraw &c);
86
87 ClassDef(AliDielectronCFdraw,0) // CF draw helper class
88};
89
90//
91// Inline functions
92//
93inline void AliDielectronCFdraw::SetRangeUser(const char* varname, Double_t min, Double_t max, const char* slices)
94{
95 SetRangeUser(fCfContainer->GetVar(varname),min,max,slices);
96}
97
98//________________________________________________________________
99inline void AliDielectronCFdraw::UnsetRangeUser(const char* varname, const char* slices)
100{
101 UnsetRangeUser(fCfContainer->GetVar(varname),slices);
102}
103#endif
104