1 #ifndef ALIHFEVARMANAGER_H
2 #define ALIHFEVARMANAGER_H
4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
22 // Class AliHFEvarManager
23 // Common place for definiton of variables to be filled into the
24 // correction framework container
25 // More information can be found inside the implementation file
34 typedef class THnSparseT<TArrayF> THnSparseF;
38 class AliHFEcontainer;
39 class AliHFEsignalCuts;
43 class AliHFEvarManager : public TNamed{
55 AliHFEvarManager(const Char_t *name);
56 AliHFEvarManager(const AliHFEvarManager &ref);
57 AliHFEvarManager &operator=(const AliHFEvarManager &ref);
58 void Copy(TObject &o) const;
61 void SetOwner(Bool_t owner = kTRUE) { SetBit(kOwner, owner); }
62 Bool_t IsOwner() const { return TestBit(kOwner); }
64 void AddVariable(TString name);
65 Bool_t IsVariableDefined(TString name);
66 void DefineVariables(AliHFEcontainer *cont);
67 void NewTrack(AliVParticle *track, AliVParticle *mcTrack = NULL, Float_t centrality = 99.0, Int_t aprioriPID = -1, Bool_t signal = kTRUE);
68 Bool_t IsSignalTrack() const { return fSignalTrack; }
69 void FillContainer(AliCFContainer *cont, Int_t step, Bool_t useMC = kFALSE) const;
70 void FillContainer(AliHFEcontainer *cont, const Char_t *contname, UInt_t step, Bool_t useMC = kFALSE, Double_t externalWeight = 1.) const;
71 void FillContainerStepname(AliHFEcontainer *cont, const Char_t *contname, const Char_t *step, Bool_t useMC = kFALSE, Double_t externalWeight = 1.) const;
72 void FillCorrelationMatrix(THnSparseF *matrix) const;
74 void SetSignalCuts(AliHFEsignalCuts *signal) { fSignal = signal; }
75 void SetWeightFactors(TH3F *weightFactors);
76 void SetWeightFactorsFunction(TF3*weightFactorsFunction);
78 struct AliHFEvariable : public TNamed{
81 AliHFEvariable(const Char_t *name, const Char_t *title, UInt_t fCode, UInt_t nBins, Double_t min, Double_t max, Bool_t isLogarithmic = kFALSE);
82 AliHFEvariable(const AliHFEvariable &ref);
83 AliHFEvariable &operator=(const AliHFEvariable &ref);
86 UInt_t GetVarCode() const { return fCode; }
87 UInt_t GetNumberOfBins() const { return fNBins; }
88 Double_t GetMinimum() const { return fMin; }
89 Double_t GetMaximum() const { return fMax; }
90 Int_t IsLogarithmic() const { return fIsLogarithmic; }
92 UInt_t fCode; // Unique variable code
93 UInt_t fNBins; // Number of bins
94 Double_t fMin; // Minimum
95 Double_t fMax; // Maximum
96 Bool_t fIsLogarithmic; // Logarithmic binning
98 ClassDef(AliHFEvarManager::AliHFEvariable, 1) // HFE variable definition
102 Double_t GetValue(AliVParticle *track, UInt_t code, Float_t centrality = 99.0, Int_t aprioriPID = -1) const;
103 void FillArray(AliVParticle *track, Double_t *container, Float_t centrality = 99.0, Int_t aprioriPID = -1) const;
104 Double_t FindWeight(Double_t pt, Double_t eta, Double_t phi) const;
110 TObjArray *fVariables; // Variables to process
111 Double_t *fContent; //! Cache values for track in classmember
112 Double_t *fContentMC; //! Cache content of the asssociated MC track in class member
113 Double_t fWeightFactor; // Cache weighting factor
114 Bool_t fSignalTrack; // Signal Track
115 Bool_t fWeighting; // Weighting or not for the efficiency maps
116 AliHFEsignalCuts *fSignal; // MC Signal Definition
117 TH3F *fWeightFactors; // Weight factors
118 TF3 *fWeightFactorsFunction; // Weight factors
120 ClassDef(AliHFEvarManager, 1) // The variable Manager for the HFE Analysis
123 #endif /* ALIHFEVARMANAGER_H */