]>
Commit | Line | Data |
---|---|---|
959ea9d8 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | // | |
16 | // Class for spectrum correction | |
17 | // Subtraction of hadronic background, Unfolding of the data and | |
18 | // Renormalization done here | |
19 | // For more information see the implementation file | |
20 | // | |
21 | #ifndef ALIHFECORRECTSPECTRUMBASE_H | |
22 | #define ALIHFECORRECTSPECTRUMBASE_H | |
23 | ||
24 | #ifndef ROOT_TNamed | |
25 | #include <TNamed.h> | |
26 | #endif | |
27 | ||
28 | class TGraphErrors; | |
29 | class TObject; | |
30 | class TH1; | |
31 | class TF1; | |
32 | class TList; | |
33 | class TObjArray; | |
34 | class AliCFContainer; | |
35 | class AliHFEcontainer; | |
36 | class AliCFDataGrid; | |
37 | class AliCFEffGrid; | |
38 | ||
39 | class AliHFECorrectSpectrumBase : public TNamed{ | |
40 | public: | |
41 | enum CFContainer_t{ | |
63bdf450 | 42 | kDataContainer = 0, |
959ea9d8 | 43 | kBackgroundData = 1, |
44 | kMCContainerMC = 2, | |
45 | kMCContainerESD = 3, | |
46 | kMCContainerCharmMC = 4, | |
63bdf450 | 47 | kMCWeightedContainerNonHFEESD = 5, |
959ea9d8 | 48 | kMCWeightedContainerConversionESD = 6, |
63bdf450 | 49 | kDataContainerV0 = 7, |
50 | kMCWeightedContainerNonHFEESDSig = 8, | |
51 | kMCWeightedContainerConversionESDSig = 9, | |
52 | kPhotonicBackground = 10, | |
53 | kNbCFContainers = 11 | |
959ea9d8 | 54 | }; |
55 | ||
56 | enum Chargetype_t{ | |
57 | kNegCharge = -1, | |
58 | kPosCharge = 1, | |
59 | kAllCharge = 0 | |
60 | }; | |
61 | ||
62 | AliHFECorrectSpectrumBase(const char* name); | |
63 | ~AliHFECorrectSpectrumBase(); | |
64 | ||
65 | ||
63bdf450 | 66 | virtual Bool_t Init(const AliHFEcontainer */*datahfecontainer*/, const AliHFEcontainer */*mchfecontainer*/, const AliHFEcontainer */*bghfecontainer*/, const AliHFEcontainer */*v0hfecontainer*/,AliCFContainer */*photoniccontainerD*/) { return kTRUE;}; |
67 | virtual Bool_t Correct(Bool_t /*subtractcontamination*/, Bool_t /*subtractphotonic*/) { return kTRUE;}; | |
959ea9d8 | 68 | |
69 | TGraphErrors *Normalize(THnSparse * const spectrum) const; | |
70 | TGraphErrors *Normalize(AliCFDataGrid * const spectrum) const; | |
71 | TGraphErrors *NormalizeTH1(TH1 *input) const; | |
72 | void CorrectFromTheWidth(TH1D *h1) const; | |
73 | void CorrectStatErr(AliCFDataGrid *backgroundGrid) const; | |
74 | ||
75 | void SetCorrelation(THnSparseF * const correlation) {fCorrelation = correlation; }; | |
76 | void SetContainer(AliCFContainer *cont, AliHFECorrectSpectrumBase::CFContainer_t type); | |
77 | void SetEfficiencyFunction(TF1 *efficiencyFunction) { fEfficiencyFunction = efficiencyFunction; }; | |
78 | ||
79 | void SetNumberOfEvents(Int_t nEvents) { fNEvents = nEvents; }; | |
80 | void SetMCEffStep(Int_t step) { fStepMC = step; }; | |
81 | void SetMCTruthStep(Int_t step) { fStepTrue = step; }; | |
82 | void SetStepToCorrect(Int_t step) { fStepData = step; }; | |
83 | void SetStepBeforeCutsV0(Int_t step) { fStepBeforeCutsV0 = step; }; | |
84 | void SetStepAfterCutsV0(Int_t step) { fStepAfterCutsV0 = step; }; | |
85 | void SetNbDimensions(Int_t nbDimensions) { fNbDimensions = nbDimensions; }; | |
86 | void SetChargeChoosen(Chargetype_t chargechoosen) {fChargeChoosen = chargechoosen; }; | |
87 | void SetEtaRange(Double_t etamin, Double_t etamax) { fEtaRange[0] = etamin; fEtaRange[1] = etamax; fEtaSelected = kTRUE; } | |
88 | void SetSmoothing(Bool_t setSmoothing) {fSetSmoothing = setSmoothing;}; | |
89 | void SetTestOneBinCentrality(Double_t centralitymin, Double_t centralitymax) { fTestCentralityLow = centralitymin; fTestCentralityHigh = centralitymax;} | |
90 | void SetStepGuessedUnfolding(Int_t stepGuessedUnfolding) { fStepGuessedUnfolding = stepGuessedUnfolding; }; | |
91 | void SetNumberOfIteration(Int_t numberOfIteration) { fNumberOfIterations = numberOfIteration; }; | |
92 | ||
93 | ||
94 | ||
95 | protected: | |
96 | AliHFECorrectSpectrumBase(const AliHFECorrectSpectrumBase &ref); | |
97 | AliHFECorrectSpectrumBase &operator=(const AliHFECorrectSpectrumBase &ref); | |
98 | virtual void Copy(TObject &o) const; | |
99 | AliCFContainer *GetContainer(AliHFECorrectSpectrumBase::CFContainer_t contt); | |
7483e78e | 100 | AliCFContainer *GetSlicedContainer(AliCFContainer *cont, Int_t ndim, Int_t *dimensions,Int_t source=-1,Chargetype_t charge=kAllCharge,Int_t centralitylow=-1, Int_t centralityhigh=-1, Bool_t doCentralityProjection = kTRUE); |
101 | THnSparseF *GetSlicedCorrelation(THnSparseF *correlationmatrix,Int_t nDim, Int_t *dimensions,Chargetype_t charge=kAllCharge,Int_t centralitylow=-1, Int_t centralityhigh=-1, Bool_t doCentralityProjection = kTRUE) const; | |
959ea9d8 | 102 | TObject* GetSpectrum(const AliCFContainer * const c, Int_t step); |
103 | TObject* GetEfficiency(const AliCFContainer * const c, Int_t step, Int_t step0); | |
104 | ||
105 | TObjArray *fCFContainers; // List of Correction Framework Containers | |
106 | THnSparseF *fCorrelation; // Correlation Matrices | |
107 | TF1 *fEfficiencyFunction; // Efficiency Function | |
108 | ||
109 | Bool_t fEtaSelected; // Switch for eta selection | |
110 | Bool_t fSetSmoothing; // Set smoothing | |
111 | ||
112 | Int_t fNbDimensions; // Number of dimensions for the correction | |
113 | Int_t fNEvents; // Number of Events | |
114 | Int_t fStepMC; // MC step (for unfolding) | |
115 | Int_t fStepTrue; // MC step of the final spectrum | |
116 | Int_t fStepData; // Data Step (various applications) | |
117 | Int_t fStepBeforeCutsV0; // Before cuts V0 | |
118 | Int_t fStepAfterCutsV0; // After cuts V0 | |
119 | Int_t fStepGuessedUnfolding; // Step for first guessed unfolding | |
120 | Int_t fNumberOfIterations; // Number of iterations | |
121 | Chargetype_t fChargeChoosen; // Select positive or negative electrons | |
122 | ||
123 | Double_t fEtaRange[2]; // Eta range | |
124 | Double_t fEtaRangeNorm[2]; // Eta range used in the normalization | |
125 | ||
126 | Int_t fTestCentralityLow; // To test one bin in centrality only | |
127 | Int_t fTestCentralityHigh; // To test one bin in centrality only | |
128 | ||
129 | ||
130 | ||
131 | private: | |
132 | ||
133 | ||
134 | ||
135 | ClassDef(AliHFECorrectSpectrumBase, 1) | |
136 | }; | |
137 | #endif | |
138 |