1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 #ifndef ALIFLOWANALYSISWITHSCALARPRODUCT_H
8 #define ALIFLOWANALYSISWITHSCALARPRODUCT_H
10 class AliFlowTrackSimple;
11 class AliFlowEventSimple;
12 class AliFlowCommonHist;
13 class AliFlowCommonHistResults;
16 #include "AliFlowAnalysis.h"
24 /////////////////////////////////////////////////////////////////////////////
25 // Description: Maker to analyze Flow from the Event Plane method.
26 // Adaptation based on Scalar Product
27 // authors: Naomi van del Kolk (kolk@nikhef.nl)
28 // Ante Bilandzic (anteb@nikhef.nl)
29 // mods: Carlos Perez (cperez@nikhef.nl)
30 /////////////////////////////////////////////////////////////////////////////
32 class AliFlowAnalysisWithScalarProduct : public AliFlowAnalysis {
35 AliFlowAnalysisWithScalarProduct(); //default constructor
36 virtual ~AliFlowAnalysisWithScalarProduct(); //destructor
38 void Init(); //Define output objects
39 void Make(AliFlowEventSimple* anEvent); //Main routine
40 void GetOutputHistograms(TList *outputListHistos); //Copy output objects from TList
41 void Finish(); //Fill results
42 void WriteHistograms(TDirectoryFile *outputFileName) const; //writes histograms locally (for OnTheFly)
45 void SetHarmonic(Int_t iHarmonic) { fHarmonic = iHarmonic; }
46 void SetApplyCorrectionForNUA(Bool_t iVal) { fApplyCorrectionForNUA = iVal?1:0; }
47 void SetNormalizationType(Int_t iVal) { fNormalizationType = iVal; }
48 void SetDebug(Bool_t bVal) { fDebug = bVal; }
49 void SetBookOnlyBasicCCH(Bool_t bVal) { fMinimalBook = bVal; }
50 void SetTotalQvector(Int_t iVal) { fTotalQvector = iVal; }
52 void SetUsePhiWeights(Bool_t bVal) { fUsePhiWeights = bVal; }
53 void SetWeightsList(TList* const aWeightsList) { fWeightsList = (TList*)aWeightsList->Clone(); }
55 TList* GetHistList() const { return fHistList; }
56 TProfile* GetHistProConfig() const { return fHistProConfig; }
57 TProfile* GetHistProUQ(Int_t iRFPorPOI, Int_t iPTorETA) const { return fHistProUQ[iRFPorPOI][iPTorETA]; }
58 TProfile* GetHistProQaQbNorm() const { return fHistProQaQbNorm; }
59 TProfile* GetHistProNUAq() const { return fHistProNUAq; }
60 TProfile* GetHistProNUAu(Int_t iRFPorPOI, Int_t iPTorETA, Int_t iIMorRE) const { return fHistProNUAu[iRFPorPOI][iPTorETA][iIMorRE]; }
61 TH1D* GetHistSumOfWeights() const { return fHistSumOfWeights; }
62 TProfile* GetHistProUQQaQb( Int_t iRFPorPOI, Int_t iPTorETA ) const { return fHistProUQQaQb[iRFPorPOI][iPTorETA]; }
63 TH1D* GetHistSumOfWeightsu(Int_t iRFPorPOI, Int_t iPTorETA, Int_t iWeight) const { return fHistSumOfWeightsu[iRFPorPOI][iPTorETA][iWeight]; }
64 AliFlowCommonHist* GetCommonHists() const { return fCommonHists; }
65 AliFlowCommonHistResults* GetCommonHistsRes() const { return fCommonHistsRes; }
68 AliFlowAnalysisWithScalarProduct(const AliFlowAnalysisWithScalarProduct& anAnalysis); //copy constructor
69 AliFlowAnalysisWithScalarProduct& operator=(const AliFlowAnalysisWithScalarProduct& anAnalysis); //assignment operator
70 Double_t CalculateStatisticalError( Int_t RFPorPOI, Int_t PTorETA, Int_t bin, Double_t errV ) const;
71 Double_t ComputeResolution( Double_t x ) const;
72 Double_t FindXi( Double_t res, Double_t prec ) const;
75 Int_t fDebug ; // flag for analysis: more print statements
76 Bool_t fMinimalBook; // flag to turn off QA and minimize FlowCommonHist
77 Int_t fUsePhiWeights; // use phi weights
78 Int_t fApplyCorrectionForNUA; // apply correction for non-uniform acceptance
79 Int_t fHarmonic; // harmonic
80 Int_t fNormalizationType; // 0: EP mode || 1: SP mode
81 Int_t fTotalQvector; // 1:Qa 2:Qb 3:QaQb
83 TList* fWeightsList; // list holding input histograms with phi weights
84 TList* fHistList; // list to hold all output histograms
85 TProfile* fHistProConfig; // configuration values
86 TProfile* fHistProQaQbNorm; // average of QaQb
87 TH1D* fHistSumOfWeights; // holds sum of Na*Nb and (Na*Nb)^2
88 TProfile* fHistProNUAq; // NUA related qq
91 TProfile* fHistProQNorm; // QNorm
92 TProfile* fHistProQaQb; // QaQb
93 TProfile* fHistProQaQbM; // QaQb/MaMb
94 TH2D* fHistMaMb; // MaMb
95 TH2D* fHistQNormQaQbNorm; // QNorm vs QaQbNorm
96 TH2D* fHistQaNormMa; // QaNorm Ma
97 TH2D* fHistQbNormMb; // QbNorm Mb
98 TH1D* fResolution; // Resolution
99 TH1D* fHistQaQb; // QaQb
100 TH1D* fHistQaQbCos; // QaQbCos
101 TH1I* fHistNumberOfSubtractedDaughters; //how many daughters were subtracted during Q calculation?
103 AliFlowCommonHist* fCommonHists; // control histograms
104 AliFlowCommonHist* fCommonHistsuQ; // control histograms
105 AliFlowCommonHistResults* fCommonHistsRes; // results histograms
107 TH1F* fPhiWeightsSub[2]; // histogram holding phi weights for subevents
108 TProfile* fHistProUQ[2][2]; // uQ for RP|POI PT|ETA
109 TProfile* fHistProUQQaQb[2][2]; // holds weighted average of <QuQaQb> for RP|POI PT|ETA
110 TH1D* fHistSumOfWeightsu[2][2][3]; // holds sums of 0: Nq', 1: Nq'^2, 2: Nq'*Na*Nb
111 TProfile* fHistProNUAu[2][2][2]; // NUA related qq for RP|POI PT|ETA
113 ClassDef(AliFlowAnalysisWithScalarProduct,1) // class version