StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEStructBuffer.h
1 /**********************************************************************
2  *
3  * $Id: StEStructBuffer.h,v 1.5 2011/08/02 20:34:02 prindle Exp $
4  *
5  * Author: Jeff Porter
6  *
7  **********************************************************************
8  *
9  * Description: Data buffer to hold events for mixing per z-vertex
10  *
11  *
12  ***********************************************************************/
13 #ifndef STEBYEBUFFER_H
14 #define STEBYEBUFFER_H
15 
16 #include "StEStructBinning.h"
17 
18 #define MAXBUFFERSIZE 4 // now the actual buffer size
19 #define DELTANMAX 50 // max multiplicity difference in mixed events
20 
21 class TFile;
22 class StEStructEvent;
23 class TH1F;
24 
26 
27  StEStructEvent** mEvent;
28  int mnumEvents; // total number of events in buffer
29  int mcurEvent; // index to current event
30  int mnumMixed; // number of successfully returned events
31  int mnumDeleted;
32  int mnumInput;
33 
34  public:
35 
37  virtual ~StEStructBuffer();
38 
39  StEStructEvent* nextEvent(int mult);
40  void addEvent(StEStructEvent* event);
41  void resetCounter();
42  int numEventsIn();
43  int numEventsDeleted();
44 
45  void Print(); // useful for testing and debugging
46 
47 };
48 
49 
50 inline void StEStructBuffer::resetCounter(){ mcurEvent=-1; mnumMixed=0; };
51 
52 inline int StEStructBuffer::numEventsIn(){ return mnumInput; };
53 inline int StEStructBuffer::numEventsDeleted(){ return mnumDeleted; };
54 
55 
56 #endif
57 /***********************************************************************
58  *
59  * $Log: StEStructBuffer.h,v $
60  * Revision 1.5 2011/08/02 20:34:02 prindle
61  * More detailed histograms for event mixing.
62  * Buffer: increased mixed events to 4 (from 2)
63  * CutBin: added mode 9 for exploration of p_t space, fixed place in mode 5 where
64  * histogram was written before checking it existed.
65  * OneBuffer: added ZDC coincidence rate to event sorting space.
66  *
67  * Revision 1.4 2007/01/26 17:17:09 msd
68  * Implemented new binning scheme: dEta stored in array with bin centered at zero, dPhi array has bins centered at zero and pi. Final DEtaDPhi has 25x25 bins with dPhi bin width of pi/12 so all major angles are centered in bins.
69  *
70  * Revision 1.3 2006/04/04 22:10:12 porter
71  * a handful of changes (specific to correlations)
72  * - added StEStructQAHists so that if NOT input frm Maker, each analysis has its own
73  * - used ability to get any max,min val from the cut class - or z-vertex binning
74  * - put z-vertex binning into 1 place
75  * - switched back 1st line of pair cut method to keep pair if good, not to reject if bad.
76  * - Pair cut object is now pointer in correlations
77  * - some diagnostic printouts available from macro
78  * - Duncan's delta-phi binning change
79  *
80  * Revision 1.2 2005/09/14 17:14:23 msd
81  * Large update, added new pair-cut system, added pair density plots for new analysis mode (4), added event mixing cuts (rewrote buffer for this)
82  *
83  * Revision 1.1 2003/10/15 18:20:46 porter
84  * initial check in of Estruct Analysis maker codes.
85  *
86  *
87  *********************************************************************/
88