Major dielectron framework update; includes "alignment" to updates in
[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
ffbede40 64 TObjArray* CollectHistosProj(const Int_t vars[3], const char* slices);
65 TH1* Project(const Int_t vars[3], Int_t slice);
2a14a7b1 66 TH1* Project(const Option_t* var, Int_t slice);
67
a655b716 68 //Draw efficiencies
554e40f8 69 void DrawEfficiency(const char* varnames, const char* numerators, Int_t denominator=0, const char* opt="sameleg2");
70 void DrawEfficiency(Int_t var, const char* numerators, Int_t denominator=0, const char* opt="sameleg", Int_t type=0);
71 void DrawEfficiency(Int_t var0, Int_t var1, const char* numerators, Int_t denominator=0, const char* opt="sameleg", Int_t type=0);
72 void DrawEfficiency(Int_t var0, Int_t var1, Int_t var2, const char* numerators, Int_t denominator=0, const char* opt="sameleg", Int_t type=0);
a655b716 73
ffbede40 74 TObjArray* CollectHistosEff(const Int_t vars[3], const char* numerators, Int_t denominator, Int_t type=0);
75 TH1* ProjectEff(const Int_t vars[3]);
554e40f8 76
77 Double_t GetAverageEfficiency(Int_t numerator, Int_t denominator, Double_t &effErr);
a655b716 78
572b0139 79 const TVectorD& GetData() const {return fVdata;}
a655b716 80 void Draw(const TObjArray *arr, const char* opt="");
6551594b 81private:
82 AliCFContainer *fCfContainer; // CF container
a655b716 83 AliCFEffGrid *fEffGrid; // Efficiency calculation
572b0139 84
85 TVectorD fVdata; // vector with data, like mean efficiencies
a655b716 86
6551594b 87 AliDielectronCFdraw(const AliDielectronCFdraw &c);
88 AliDielectronCFdraw &operator=(const AliDielectronCFdraw &c);
89
90 ClassDef(AliDielectronCFdraw,0) // CF draw helper class
91};
92
93//
94// Inline functions
95//
96inline void AliDielectronCFdraw::SetRangeUser(const char* varname, Double_t min, Double_t max, const char* slices)
97{
98 SetRangeUser(fCfContainer->GetVar(varname),min,max,slices);
99}
100
101//________________________________________________________________
102inline void AliDielectronCFdraw::UnsetRangeUser(const char* varname, const char* slices)
103{
104 UnsetRangeUser(fCfContainer->GetVar(varname),slices);
105}
106#endif
107