StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEStructPhiWeight.h
1 /**********************************************************************
2  *
3  * $Id: StEStructPhiWeight.h,v 1.1 2006/04/26 18:58:15 dkettler Exp $
4  *
5  * Author: David Kettler
6  *
7  **********************************************************************
8  *
9  * Description: Analysis code for 2pt-analysis.
10  * The analysis runs as follows:
11  * 1D and 2D arrays (in yt,eta,phi) are setup
12  * and filled for each of the 6 pair types:
13  * Sibling (++,+- & -+, --)
14  * Mixed (++,+- & -+, --)
15  * The 2D versions are additionally divided into yt1,yt2 slices
16  * and (via the StEStructBuffer) z-vertex
17  * After arrays are filled (looped over all events/job), Histograms are
18  * created, filled, and written out to the data file for further
19  * processing.
20  *
21  *
22  ***********************************************************************/
23 #ifndef __STESTRUCTPHIWEIGHT__H
24 #define __STESTRUCTPHIWEIGHT__H
25 
26 
27 #include "TROOT.h"
28 #include "StEStructPool/AnalysisMaker/StEStructAnalysis.h"
29 #include "StEStructPool/EventMaker/StEStructCentrality.h"
30 //#include "StEStructPairCuts.h"
31 //#include "StEStructBinning.h"
32 //#include "StEStructBuffer.h"
33 
34 class TFile;
35 class TH1F;
36 //class TH2F;
37 class StEStructEvent;
38 class StTimer;
39 class StEStructQAHists;
40 
42  private:
43  char* moutFileName;
44  char* mqaoutFileName;
45  int nPhiBins;
46  float phiMin;
47  float phiMax;
48  TH1F* mPhiHist;
49  StEStructQAHists* mQAHists;
50 
51  public:
54 
55  StEStructEvent* mCurrentEvent;
56 
57  void setOutputFileName(const char* outFileName);
58  void setQAOutputFileName(const char* qaoutFileName);
59  void setQAHists( StEStructQAHists* qaHists );
60  void setCutFile(const char* cutFileName, StEStructCentrality *cent); // no-op, see below
61  bool doEvent(StEStructEvent* event);
62  void finish();
63 
64 
65  // new method; should be pure-virtual but make it 'no-opt' so older codes
66  // won't be required to implement it
67  void logStats(ostream& os);
68 
69  ClassDef(StEStructPhiWeight,1)
70 };
71 
72 inline void StEStructPhiWeight::setOutputFileName(const char* fName){
73  if(!fName) return;
74  moutFileName=new char[strlen(fName)+1];
75  strcpy(moutFileName,fName);
76 }
77 inline void StEStructPhiWeight::setQAOutputFileName(const char* fName){
78  if(!fName) return;
79  mqaoutFileName=new char[strlen(fName)+1];
80  strcpy(mqaoutFileName,fName);
81 }
82 inline void StEStructPhiWeight::setQAHists(StEStructQAHists* qahists){
83  mQAHists = qahists;
84 }
85 
86 inline void StEStructPhiWeight::setCutFile(const char* cutFileName, StEStructCentrality *cent)
87  // doesn't do anything, just here to have consistant interface with the 2pt correlation analysis
88 { }
89 
90 inline void StEStructPhiWeight::logStats(ostream& os){
91  os << "<stats></stats>";
92 };
93 
94 #endif
95 
96 
97 /***********************************************************************
98  *
99  * $Log: StEStructPhiWeight.h,v $
100  * Revision 1.1 2006/04/26 18:58:15 dkettler
101  * Simple version of weight calculation analysis
102  *
103  *
104  *********************************************************************/
105 
106 
107 
108 
109 
StEStructPhiWeight()
for QA histogramming