StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFlowDirectCumulantMaker.h
1 //
3 // $Id: StFlowDirectCumulantMaker.h,v 1.2 2014/08/06 11:43:14 jeromel Exp $
4 //
5 // Authors: Dhevan Gangadharan, UCLA, Dec 2009
6 //
8 //
9 // Description: Maker to analyze Flow using direct cumulants
10 //
12 
13 #ifndef StFlowDirectCumulantMaker_H
14 #define StFlowDirectCumulantMaker_H
15 #include "StMaker.h"
16 #include "StFlowMaker/StFlowConstants.h"
17 #include "TString.h"
18 class StFlowEvent;
19 class StFlowSelection;
20 class TH2D;
21 
23 
24 
25  public:
26 
27  struct EventEntries{
28  TH2D *cent_yields;
29  };
30  struct EventEntries Entries[Flow::SPECIES];
31 
32  struct structure4{
33  TH2D *Sum_Singles; // correlations
34  TH2D *Sum_Squares; // for errors
35  };
36 
37  struct structure3{
38  struct structure4 Species[Flow::SPECIES];
39  };
40  struct structure2{
41  struct structure3 Phase[Flow::PHASES];
42  };
43 
44  struct structure1{
45  struct structure2 Type[Flow::TYPES];
46  };
47 
48  struct structure1 Term[Flow::TERMS];
49 
50  TH1D *Event_counter;
51  TH1D *Event_counterWeighted;
52 
54  StFlowDirectCumulantMaker(const Char_t* name="FlowDirectCumulant");
56  StFlowDirectCumulantMaker(const Char_t* name,
57  const StFlowSelection& pFlowSelect);
58  StFlowDirectCumulantMaker(const StFlowDirectCumulantMaker &from) {};
59  virtual ~StFlowDirectCumulantMaker();
60 
61  Int_t Init();
62  Int_t Make();
63  Int_t Finish();
64  virtual const char *GetCVS() const {static const char cvs[]=
65  "Tag $Name: $ $Id: StFlowDirectCumulantMaker.h,v 1.2 2014/08/06 11:43:14 jeromel Exp $ built " __DATE__ " " __TIME__ ;
66  return cvs;}
67 
68 private:
69 
70  void GetMweights();
71  void FillParticleArrays();
72  void CalculateTerms();
73  void CalculateSumTerms(Bool_t);
74  void Combinations(Bool_t, int, int);
75  void CalculateCorrelationsIntegrated();
76  void CalculateCorrelationsDifferential();
77  void Fill_Histograms();
78  void ClearTerms();
79 
80  int TERM1,TERM2,TERM3,TERM4,TERM5;
81  int TERM6,TERM7,TERM8,TERM9,TERM10;
82  int DIF,INT;
83  int COS,SIN;
84 
85  double Mweights[30][1000];
86 
87  int grefmult, zbin;
88  int id_p[Flow::MAXMULT]; // for primaries
89  double phi_p[Flow::MAXMULT];
90  double pt_p[Flow::MAXMULT];
91  int ptbin_p[Flow::MAXMULT];
92  double weights_p[Flow::MAXMULT];
93  int p_count;
94  double ref_combos_4, ref_combos_3, ref_combos_2, ref_combos_1, ref_combos_0; // no. of comb.
95 
96  double pt_bins[Flow::PTBINS];
97  int pt_bin_counter_p[Flow::PTBINS];
98 
99  double sum_1_cos_diff[Flow::SPECIES][Flow::PTBINS], sum_1_sin_diff[Flow::SPECIES][Flow::PTBINS];
100  double sum_2_cos_diff[Flow::SPECIES][Flow::PTBINS], sum_2_sin_diff[Flow::SPECIES][Flow::PTBINS];
101  double sum_3_cos_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS], sum_3_sin_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS];
102  double sum_4_cos_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS], sum_4_sin_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS];
103  double sum_5_cos_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS], sum_5_sin_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS];
104  double sum_6_cos_sin_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS], sum_6_sin_cos_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS];
105  double sum_7_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS], sum_8_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS];
106  double sum_9_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS], sum_10_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS];
107  double sum_11_cos_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS], sum_11_sin_diff[Flow::SPECIES][Flow::PTBINS][Flow::PTBINS];
108 
109  double sum_1_cos_full[Flow::SPECIES], sum_1_sin_full[Flow::SPECIES];
110  double sum_2_cos_full[Flow::SPECIES], sum_2_sin_full[Flow::SPECIES];
111 
112  double sum_1_cos[Flow::SPECIES][Flow::PTBINS], sum_1_sin[Flow::SPECIES][Flow::PTBINS];
113  double sum_2_cos[Flow::SPECIES][Flow::PTBINS], sum_2_sin[Flow::SPECIES][Flow::PTBINS];
114  double sum_3_cos[Flow::SPECIES][Flow::PTBINS], sum_3_sin[Flow::SPECIES][Flow::PTBINS];
115  double sum_4_cos[Flow::SPECIES][Flow::PTBINS], sum_4_sin[Flow::SPECIES][Flow::PTBINS];
116  double sum_5_cos[Flow::SPECIES][Flow::PTBINS], sum_5_sin[Flow::SPECIES][Flow::PTBINS];
117  double sum_6_cos_sin[Flow::SPECIES][Flow::PTBINS], sum_6_sin_cos[Flow::SPECIES][Flow::PTBINS];
118  double sum_7[Flow::SPECIES][Flow::PTBINS], sum_8[Flow::SPECIES][Flow::PTBINS];
119  double sum_9[Flow::SPECIES][Flow::PTBINS], sum_10[Flow::SPECIES][Flow::PTBINS];
120  double sum_11_cos[Flow::SPECIES][Flow::PTBINS], sum_11_sin[Flow::SPECIES][Flow::PTBINS];
121 
122  double sum_1_cos_reference[Flow::SPECIES][Flow::PTBINS], sum_1_sin_reference[Flow::SPECIES][Flow::PTBINS];
123  double sum_2_cos_reference[Flow::SPECIES][Flow::PTBINS], sum_2_sin_reference[Flow::SPECIES][Flow::PTBINS];
124  double sum_3_cos_reference[Flow::SPECIES][Flow::PTBINS], sum_3_sin_reference[Flow::SPECIES][Flow::PTBINS];
125  double sum_11_cos_reference[Flow::SPECIES][Flow::PTBINS], sum_11_sin_reference[Flow::SPECIES][Flow::PTBINS];
126  double Cumulant_Terms[Flow::TERMS][Flow::TYPES][Flow::PHASES][Flow::SPECIES][Flow::PTBINS];
127 
128  StFlowEvent* pFlowEvent;
129  StFlowSelection* pFlowSelect;
130 
131  TString MakerName;
132 
133  ClassDef(StFlowDirectCumulantMaker,0) // macro for rootcint
134 };
135 
136 #endif
137