Change Mult binning scheme
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliDielectronSpectrum.h
CommitLineData
572b0139 1#ifndef ALIDIELECTRONSPECTRUM_H
2#define ALIDIELECTRONSPECTRUM_H
3
4/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//#############################################################
8//# #
9//# Class AliDielectronSpectrum #
10//# Manage Cuts on the legs of the pair #
11//# #
12//# Authors: #
13//# Anton Andronic, GSI / A.Andronic@gsi.de #
14//# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de #
15//# Julian Book, Uni Ffm / Julian.Book@cern.ch #
16//# Frederick Kramer, Uni Ffm, / Frederick.Kramer@cern.ch #
17//# Magnus Mager, CERN / Magnus.Mager@cern.ch #
18//# WooJin J. Park, GSI / W.J.Park@gsi.de #
19//# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch #
20//# #
21//#############################################################
22
23#include <TObjArray.h>
24#include <TString.h>
25
26#include <TNamed.h>
27
28class AliCFGridSparse;
29class AliDielectronSignalBase;
30class AliCFGridSparse;
31class AliCFContainer;
32
33class AliDielectronSpectrum : public TNamed {
34public:
35 AliDielectronSpectrum();
36 AliDielectronSpectrum(const char*name, const char* title);
37
38 virtual ~AliDielectronSpectrum();
39
40 void AddMethod(AliDielectronSignalBase * const method) {fSignalMethods.Add(method);}
41
42 void SetCorrectionContainer(AliCFContainer * const container, Int_t nominator, Int_t denominator);
43 void SetSignalContainer(AliCFContainer * const container, Int_t step);
44
45 void SetVariables(const char* vars) { fVariables=vars; }
46
47 void SetStepForSignal(Bool_t step=kTRUE) { fStepSignal=step; }
48 void SetStepForSignificance(Bool_t step=kTRUE) { fStepSignificance=step; }
8df8e382 49 void SetStepForSignalOverBackground(Bool_t step=kTRUE) { fStepSOB=step; }
50 void SetStepForMass(Bool_t step=kTRUE) { fStepMass=step; }
51 void SetStepForMassWidth(Bool_t step=kTRUE) { fStepMassWidth=step; }
52
572b0139 53 void SetNoOwnerSpectrum(Bool_t noOwner=kTRUE) { fOwnerSpectrum=!noOwner; }
8df8e382 54
55 void SetVisualDebug(Bool_t vis=kTRUE) { fVisualDebug=vis; }
56
572b0139 57 AliCFContainer* GetSpectrumContainer() const { return fCFSpectrum; }
58 AliCFGridSparse* GetCorrectionMatrix() const { return fCFCorrMatrix; }
59
60 void Process();
61
62
63private:
64 AliCFContainer *fCFSignal; // CF container with from which to extract the Signal
65 AliCFContainer *fCFCorrection; // CF container from which to extract the correction matrix
66 AliCFContainer *fCFSpectrum; // CF container with extracted signal
67 AliCFGridSparse *fCFCorrMatrix; // correction matrix
68
69 Bool_t fStepSignal; // if to create a step for the signal
70 Bool_t fStepSignificance; // if to create a step for the significance
71 Bool_t fStepSOB; // if to create a step for signal over background
8df8e382 72 Bool_t fStepMass; // if to create a setp for the mass
73 Bool_t fStepMassWidth; // if to create a setp for the mass width
74
572b0139 75 Int_t fSignalStep; // step to use from the signal container
76
77 Int_t fCorrNom; // Nominator to use from corr matrix container
78 Int_t fCorrDenom; // Deominator to use from corr matrix container
79
80 TObjArray fSignalMethods; // array with signal extraction methods
81 TString fVariables; // variable names as a function of which to extract the signal
82
83 Bool_t fOwnerSpectrum; // if we own the creted spectrum
8df8e382 84
85 Bool_t fVisualDebug; // if we want to show the fit and print it
572b0139 86
87 Int_t fNvars; //! number of variables
88 Int_t *fVars; //! variable numbers translated from fVariables
89 Int_t *fNbins; //! number of bins for each variable
90 Int_t *fCurrentBins; //! bin currently selected for each variable
91 Double_t *fCurrentPositions; //! variables values currently selected
92
93 void Fill(Int_t *bin, Int_t step, Double_t value, Double_t error);
94 Bool_t SetupVariables();
95 void CreateCorrectionMatrix();
96 void CreateCFSpectrum();
97 void ExtractSignalInBins(Int_t variable=0);
98
99 AliDielectronSpectrum(const AliDielectronSpectrum &c);
100 AliDielectronSpectrum &operator=(const AliDielectronSpectrum &c);
101
102 ClassDef(AliDielectronSpectrum,1) //Cut class providing cuts for both legs of a pair
103
104};
105
106//
107// inline functions
108//
109inline void AliDielectronSpectrum::SetCorrectionContainer(AliCFContainer * const container, Int_t nominator, Int_t denominator)
110{
111 fCFCorrection=container;
112 fCorrNom=nominator;
113 fCorrDenom=denominator;
114}
115
116inline void AliDielectronSpectrum::SetSignalContainer(AliCFContainer * const container, Int_t step)
117{
118 fCFSignal=container;
119 fSignalStep=step;
120}
121
122#endif