StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFlowAnalysisMaker.h
1 //
3 // $Id: StFlowAnalysisMaker.h,v 1.52 2014/08/06 11:43:14 jeromel Exp $
4 //
5 // Authors: Art Poskanzer and Raimond Snellings, LBNL, Aug 1999
6 // FTPC added by Markus Oldenburg, MPI, Dec 2000
7 //
9 //
10 // Description: Maker to analyze Flow using StFlowEvent
11 //
13 
14 #ifndef StFlowAnalysisMaker_H
15 #define StFlowAnalysisMaker_H
16 #include <Stiostream.h>
17 #include "StMaker.h"
18 #include "StFlowMaker/StFlowConstants.h"
19 #include "TVector2.h"
20 #include "TString.h"
21 class StFlowMaker;
22 class StFlowEvent;
23 class StFlowSelection;
24 class TH1F;
25 class TH1D;
26 class TH2F;
27 class TH2D;
28 class TH3F;
29 class TProfile;
30 class TProfile2D;
31 
32 class StFlowAnalysisMaker : public StMaker {
33 
42 public:
43 
45  StFlowAnalysisMaker(const Char_t* name="FlowAnalysis");
47  StFlowAnalysisMaker(const Char_t* name,
48  const StFlowSelection& pFlowSelect);
50  virtual ~StFlowAnalysisMaker();
51 
52  Int_t Init();
53  Int_t Make();
54  Int_t Finish();
55  void SetHistoRanges(Bool_t ftpc_included = kFALSE);
56  void SetPtRange_for_vEta(Float_t lo, Float_t hi);
57  void SetEtaRange_for_vPt(Float_t lo, Float_t hi);
58  void SetV1Ep1Ep2(Bool_t v1Ep1Ep2 = kTRUE);
59  virtual const char *GetCVS() const {static const char cvs[]=
60  "Tag $Name: $ $Id: StFlowAnalysisMaker.h,v 1.52 2014/08/06 11:43:14 jeromel Exp $ built " __DATE__ " " __TIME__ ;
61  return cvs;}
62 
63 private:
64 
65  Bool_t FillFromFlowEvent();
66  void FillEventHistograms();
67  void FillParticleHistograms();
68  Bool_t mCalcReCentPars;
69 #ifndef __CINT__
70  TVector2 mQ[Flow::nSels][Flow::nHars];
71  Float_t mPsi[Flow::nSels][Flow::nHars];
72  UInt_t mMult[Flow::nSels][Flow::nHars];
73  Float_t m_q[Flow::nSels][Flow::nHars];
74  TVector2 mQSub[Flow::nSels*Flow::nSubs][Flow::nHars];
75  Float_t mPsiSub[Flow::nSels*Flow::nSubs][Flow::nHars];
76  UInt_t mMultSub[Flow::nSels*Flow::nSubs][Flow::nHars];
77  Float_t mRes[Flow::nSels][Flow::nHars];
78  Float_t mResErr[Flow::nSels][Flow::nHars];
79  Float_t mZDCSMD_e_PsiWgt,mZDCSMD_w_PsiWgt,mZDCSMD_f_PsiWgt;
80  Float_t mFlowWeight;
81 #endif /*__CINT__*/
82  TString xLabel;
83  StFlowMaker* pFlowMaker;
84  StFlowEvent* pFlowEvent;
85  StFlowSelection* pFlowSelect;
86 
87  // for single histograms
88  TH1F* mHistTrigger;
89  TH1F* mHistChargeFtpc;
90  TH1F* mHistDcaGlobalTpc;
91  TH1F* mHistDcaGlobalFtpc;
92  TH1F* mHistDcaTpc;
93  TH1F* mHistDcaFtpc;
94  TH1F* mHistChi2Tpc;
95  TH1F* mHistChi2Ftpc;
96  TH1F* mHistFitPtsTpc;
97  TH1F* mHistMaxPtsTpc;
98  TH1F* mHistFitOverMaxTpc;
99  TH1F* mHistFitPtsFtpc;
100  TH1F* mHistMaxPtsFtpc;
101  TH1F* mHistFitOverMaxFtpc;
102  TH1F* mHistOrigMult;
103  TH1F* mHistMultEta;
104  TH1F* mHistMult;
105  TH1F* mHistMultOverOrig;
106  TH1F* mHistMultPart;
107  TH1F* mHistVertexZ;
108  TH2F* mHistVertexXY2D;
109  TH1F* mHistEtaSymTpc;
110  TH1F* mHistEtaSymFtpc;
111  TH3F* mHistEtaPtPhi3D;
112  TH2D* mHistYieldAll2D;
113  TH2D* mHistYieldPart2D;
114  TProfile* mHistBinEta;
115  TProfile* mHistBinPt;
116  TH1F* mHistPidPiPlus;
117  TH1F* mHistPidPiMinus;
118  TH1F* mHistPidProton;
119  TH1F* mHistPidAntiProton;
120  TH1F* mHistPidKplus;
121  TH1F* mHistPidKminus;
122  TH1F* mHistPidDeuteron;
123  TH1F* mHistPidAntiDeuteron;
124  TH1F* mHistPidElectron;
125  TH1F* mHistPidPositron;
126  TH1F* mHistPidPiPlusPart;
127  TH1F* mHistPidPiMinusPart;
128  TH1F* mHistPidProtonPart;
129  TH1F* mHistPidAntiProtonPart;
130  TH1F* mHistPidKplusPart;
131  TH1F* mHistPidKminusPart;
132  TH1F* mHistPidDeuteronPart;
133  TH1F* mHistPidAntiDeuteronPart;
134  TH1F* mHistPidElectronPart;
135  TH1F* mHistPidPositronPart;
136  TProfile* mHistPidMult;
137  TH1F* mHistCent;
138  TH2F* mHistEtaSymVerZ2DTpc;
139  TH2F* mHistEtaSymVerZ2DFtpc;
140  TH2F* mHistCTBvsZDC2D;
141  TH2F* mHistMeanDedxPos2D;
142  TH2F* mHistMeanDedxNeg2D;
143  TH2F* mHistMeanDedxPiPlus2D;
144  TH2F* mHistMeanDedxPiMinus2D;
145  TH2F* mHistMeanDedxProton2D;
146  TH2F* mHistMeanDedxPbar2D;
147  TH2F* mHistMeanDedxKplus2D;
148  TH2F* mHistMeanDedxKminus2D;
149  TH2F* mHistMeanDedxDeuteron2D;
150  TH2F* mHistMeanDedxAntiDeuteron2D;
151  TH2F* mHistMeanDedxPositron2D;
152  TH2F* mHistMeanDedxElectron2D;
153  TH1F* mZDC_SMD_west_vert;
154  TH1F* mZDC_SMD_west_hori;
155  TH1F* mZDC_SMD_east_vert;
156  TH1F* mZDC_SMD_east_hori;
157  TH1D* mHistZDCSMDPsiWgtEast;
158  TH1D* mHistZDCSMDPsiWgtWest;
159  TH1D* mHistZDCSMDPsiWgtTest;
160  TH1D* mHistZDCSMDPsiWgtFull;
161  TH1D* mHistZDCSMDPsiCorTest;
162  TH1D* mHistZDCSMDPsiCorFull;
163 
164  // for each harmonic, each selection, and each sub-event
165  struct histSubHars {
166  TH1F* mHistPsiSubs;
167  };
168  struct histSubs;
169  friend struct histSubs;
170  struct histSubs {
171  struct histSubHars histSubHar[Flow::nHars];
172  };
173  struct histSubs histSub[Flow::nSels*Flow::nSubs];
174 
175  // for each harmonic and each selection
176  struct histFullHars {
177  TH1F* mHistPhiCorr;
178  TH1F* mHistPhiLab;
179  TH1F* mHistPsiSubCorr;
180  TH1F* mHistPsiSubCorrDiff;
181  TH1F* mHistPsi;
182  TProfile* mHistReCentX;
183  TProfile* mHistReCentY;
184  TProfile* mHistQreCent;
185  TH2D* mHistQXY2D;
186  TH2D* mHistQFTPCSubXY2D;
187  TH2D* mHistQTPCSubXY2D;
188  TH1F* mHistPsi_Diff;
189  TH1F* mHistMult;
190  TH1F* mHist_q;
191  TH2D* mHistYield2D;
192  TProfile2D* mHist_vObs2D;
193  TProfile* mHist_vObsEta;
194  TProfile* mHist_vObsPt;
195  TH2D* mHist_v2D;
196  TH1D* mHist_vEta;
197  TH1D* mHist_vPt;
198  };
199 
200  // for two harmonics and each selection
201  struct histTwoHars {
202  TH1D* mHistPhiFarEast;
203  TH1D* mHistPhiEast;
204  TH1D* mHistPhiWest;
205  TH1D* mHistPhiFarWest;
206  TH1D* mHistPhiFtpcFarEast;
207  TH1D* mHistPhiFtpcEast;
208  TH1D* mHistPhiFtpcWest;
209  TH1D* mHistPhiFtpcFarWest;
210  TH1D* mHistPhiWgtFarEast;
211  TH1D* mHistPhiWgtEast;
212  TH1D* mHistPhiWgtWest;
213  TH1D* mHistPhiWgtFarWest;
214  TH1D* mHistPhiWgtFtpcFarEast;
215  TH1D* mHistPhiWgtFtpcEast;
216  TH1D* mHistPhiWgtFtpcWest;
217  TH1D* mHistPhiWgtFtpcFarWest;
218  TH1D* mHistPhiFlatFarEast;
219  TH1D* mHistPhiFlatEast;
220  TH1D* mHistPhiFlatWest;
221  TH1D* mHistPhiFlatFarWest;
222  TH1D* mHistPhiFlatFtpcFarEast;
223  TH1D* mHistPhiFlatFtpcEast;
224  TH1D* mHistPhiFlatFtpcWest;
225  TH1D* mHistPhiFlatFtpcFarWest;
226  };
227 
228  // for each selection
229  struct histFulls;
230  friend struct histFulls;
231  struct histFulls {
232  TProfile* mHistCos;
233  TH1F* mHistRes;
234  TProfile* mHist_vObs;
235  TH1D* mHist_v;
236  struct histFullHars histFullHar[Flow::nHars];
237  struct histTwoHars histTwoHar[2];
238  };
239  struct histFulls histFull[Flow::nSels];
240 
241  TString MakerName;
242 
243  Float_t mEtaMin;
244  Float_t mEtaMax;
245  Int_t mNEtaBins;
246 
247  Float_t mPtRange_for_vEta[2];
248  Float_t mEtaRange_for_vPt[2];
249 
250  Bool_t mV1Ep1Ep2;
251 
252  ClassDef(StFlowAnalysisMaker,0) // macro for rootcint
253 };
254 #endif
255 
257 //
258 // $Log: StFlowAnalysisMaker.h,v $
259 // Revision 1.52 2014/08/06 11:43:14 jeromel
260 // Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
261 //
262 // Revision 1.51 2011/03/10 18:56:25 posk
263 // Added histogram for laboratory azimuthal distribution of particles.
264 //
265 // Revision 1.50 2010/09/30 19:28:12 posk
266 // Instead of reversing the weight for negative pseudrapidity for odd harmonics,
267 // it is now done only for the first harmonic.
268 // Recentering is now done for all harmonics.
269 //
270 // Revision 1.49 2009/11/24 19:29:12 posk
271 // Added reCenter to remove acceptance correlations as an option instead of phiWgt.
272 //
273 // Revision 1.48 2006/02/22 19:36:27 posk
274 // Minor updates.
275 //
276 // Revision 1.47 2004/12/17 22:33:33 aihong
277 // add in full Psi weight for ZDC SMD and fix a few bugs, done by Gang
278 //
279 // Revision 1.46 2004/12/09 23:47:07 posk
280 // Minor changes in code formatting.
281 // Added hist for TPC primary dca to AnalysisMaker.
282 //
283 // Revision 1.45 2004/12/07 23:10:21 posk
284 // Only odd and even phiWgt hists. If the old phiWgt file contains more than
285 // two harmonics, only the first two are read. Now writes only the first two.
286 //
287 // Revision 1.44 2004/05/05 21:13:47 aihong
288 // Gang's code for ZDC-SMD added
289 //
290 // Revision 1.43 2003/11/14 20:00:43 oldi
291 // Implementation of v1{EP1,EP2}. This method is set to be the default for v1 now!
292 // Minor code clean-ups.
293 //
294 // Revision 1.42 2003/09/10 19:47:14 perev
295 // ansi corrs
296 //
297 // Revision 1.41 2003/09/02 17:58:10 perev
298 // gcc 3.2 updates + WarnOff
299 //
300 // Revision 1.40 2003/08/06 20:54:09 oldi
301 // Introduction of possibility to exclude pt ranges for v(eta) and eta regions
302 // for v(pt) histograms. Default behavior stays the same (all available tracks
303 // are included in v(pt) and v(eta)).
304 //
305 // Revision 1.39 2003/05/06 21:33:06 posk
306 // Removed some histograms.
307 //
308 // Revision 1.38 2003/05/06 18:38:06 posk
309 // Removed StFlowTagMaker.
310 //
311 // Revision 1.37 2003/01/10 16:40:33 oldi
312 // Several changes to comply with FTPC tracks:
313 // - Switch to include/exclude FTPC tracks introduced.
314 // The same switch changes the range of the eta histograms.
315 // - Eta symmetry plots for FTPC tracks added and separated from TPC plots.
316 // - PhiWgts and related histograms for FTPC tracks split in FarEast, East,
317 // West, FarWest (depending on vertex.z()).
318 // - Psi_Diff plots for 2 different selections and the first 2 harmonics added.
319 // - Cut to exclude mu-events with no primary vertex introduced.
320 // (This is possible for UPC events and FTPC tracks.)
321 // - Global DCA cut for FTPC tracks added.
322 // - Global DCA cuts for event plane selection separated for TPC and FTPC tracks.
323 // - Charge cut for FTPC tracks added.
324 //
325 // Revision 1.36 2002/11/26 22:11:53 posk
326 // First use of doxygen.
327 //
328 // Revision 1.35 2002/10/28 19:45:55 posk
329 // Eliminate events with Psi=0.
330 //
331 // Revision 1.34 2001/12/11 22:03:56 posk
332 // Four sets of phiWgt histograms.
333 // StFlowMaker StFlowEvent::PhiWeight() changes.
334 // Cumulant histogram names changed.
335 //
336 // Revision 1.33 2001/11/09 21:14:46 posk
337 // Switched from CERNLIB to TMath. Using global dca instead of dca.
338 //
339 // Revision 1.32 2001/08/02 17:41:50 snelling
340 // Added trigger histogram
341 //
342 // Revision 1.31 2001/05/22 20:11:15 posk
343 // Changed dEdx graphs.
344 //
345 // Revision 1.30 2001/04/25 17:45:52 perev
346 // HPcorrs
347 //
348 // Revision 1.29 2000/12/12 15:01:11 posk
349 // Put log comments at end of file.
350 //
351 // Revision 1.28 2000/12/10 02:02:02 oldi
352 // A new member (StTrackTopologyMap mTopology) was added to StFlowPicoTrack.
353 // The evaluation of either a track originates from the FTPC or not is
354 // unambiguous now. The evaluation itself is easily extendible for other
355 // detectors (e.g. SVT+TPC). Old flowpicoevent.root files are treated as if
356 // they contain TPC tracks only (backward compatibility).
357 //
358 // Revision 1.27 2000/12/08 17:04:09 oldi
359 // Phi weights for both FTPCs included.
360 //
361 // Revision 1.24 2000/09/22 22:01:40 posk
362 // Doubly integrated v now contains resolution error.
363 //
364 // Revision 1.23 2000/09/16 22:23:06 snelling
365 // Auto magically switch to rapidity when identified particles are used
366 //
367 // Revision 1.22 2000/09/15 22:52:55 posk
368 // Added Pt weighting for event plane calculation.
369 //
370 // Revision 1.21 2000/09/12 01:31:00 snelling
371 // Added pid histograms for e- e+ and dbar
372 //
373 // Revision 1.20 2000/08/31 18:50:30 posk
374 // Added plotCen.C to plot from a series of files with different centralities.
375 //
376 // Revision 1.19 2000/08/09 21:38:59 snelling
377 // Added monitor histograms
378 //
379 // Revision 1.18 2000/08/01 21:51:20 posk
380 // Added doubly integrated v.
381 //
382 // Revision 1.17 2000/07/03 02:07:49 perev
383 // StEvent: vector<TObject*>
384 //
385 // Revision 1.16 2000/06/30 14:51:19 posk
386 // Using MessageMgr. Added graph for Eta Symmetry vs. Vertex Z.
387 //
388 // Revision 1.15 2000/05/26 21:25:22 posk
389 // Use TProfile2D class and profile projection methods.
390 // Correction needed for >2 subevents.
391 //
392 // Revision 1.14 2000/05/16 17:30:21 snelling
393 // removed the dependencies cint did not like
394 //
395 // Revision 1.13 2000/05/03 16:38:35 posk
396 // Compatable with ROOT 2.24/02.
397 //
398 // Revision 1.12 2000/04/13 22:34:15 posk
399 // Resolution correction is now made.
400 //
401 // Revision 1.11 2000/03/21 00:24:45 posk
402 // Added GetCVS and changed some plot names.
403 //
404 // Revision 1.10 2000/03/15 23:32:04 posk
405 // Added StFlowSelection.
406 //
407 // Revision 1.9 2000/03/02 22:55:34 posk
408 // Changed header file extensions from .hh to .h .
409 //
410 // Revision 1.11 2000/02/29 21:55:14 posk
411 // Removed static const int& statements.
412 //
413 // Revision 1.10 2000/02/18 23:44:53 posk
414 // Added PID and centrality.
415 //
416 // Revision 1.9 2000/02/04 16:26:42 posk
417 // Added correct calculation of event plane resolution for large flow.
418 //
419 // Revision 1.7 2000/01/14 01:35:52 snelling
420 // changed include path ../FlowMaker/ to FlowMaker/
421 //
422 // Revision 1.3 1999/12/04 00:15:40 posk
423 // Works with StFlowEvent which works with the new StEvent
424 //
425 // Revision 1.2 1999/11/24 18:14:07 posk
426 // Now reads event quantities with StFlowEvent methods
427 //
428 // Revision 1.7 1999/11/05 00:02:03 posk
429 // Changed the flow vector, Q, to a TVector2.
430 //
431 // Revision 1.6 1999/10/05 16:54:11 posk
432 // Added getPhiWeight method for making the event plane isotropic.
433 //
StFlowAnalysisMaker(const Char_t *name="FlowAnalysis")
Default constructor.