StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEStructEventReader.h
1 /**********************************************************************
2  *
3  * $Id: StEStructEventReader.h,v 1.3 2012/11/16 21:19:06 prindle Exp $
4  *
5  * Author: Jeff Porter
6  *
7  **********************************************************************
8  *
9  * Description: Abstract event reader class
10  *
11  ***********************************************************************/
12 #ifndef __STESTRUCTEVENTREADER__H
13 #define __STESTRUCTEVENTREADER__H
14 
15 // -> for rootcint preprocessing
16 #include "TROOT.h"
17 
18 //-> forward declaration
19 class StEStructEvent;
20 class StEStructTrack;
21 class StEStructEventCuts;
22 #include "StEStructPool/AnalysisMaker/StEStructTrackCuts.h"
23 
25 
26 
27 public:
28  StEStructEventCuts* mECuts;
29  StEStructTrackCuts* mTCuts;
30 
31  virtual ~StEStructEventReader();
32  virtual StEStructEvent* next() = 0;
33  virtual bool done() = 0;
34 
35  virtual void setEventCuts(StEStructEventCuts* cuts);
36  virtual void setTrackCuts(StEStructTrackCuts* cuts);
37  bool hasEventCuts();
38  bool hasTrackCuts();
39  StEStructEventCuts* EventCuts() {return mECuts;};
40  StEStructTrackCuts* TrackCuts() {return mTCuts;};
41 
42  // now expanding the class to return quantities that may
43  // be available only to an event generator. Here we'll not make
44  // pure virtual but return nominal values...
45 
46  virtual double getImpact(); // typically impact parameter
47  virtual double getBinary(); // typically N binary collisions
48  virtual double getParticipants(); // typically N participants
49  virtual double getNPartonic(); // charactorisation of N-partons (pythia)
50 
51 
52  ClassDef(StEStructEventReader,1)
53 
54 };
55 
56 inline double StEStructEventReader::getImpact(){ return 0.; };
57 inline double StEStructEventReader::getBinary(){ return 1.; };
58 inline double StEStructEventReader::getParticipants(){ return 2.; };
59 inline double StEStructEventReader::getNPartonic(){ return 0.; };
60 
61 inline bool StEStructEventReader::hasEventCuts() {
62  return (mECuts) ? true : false;
63 }
64 
65 inline bool StEStructEventReader::hasTrackCuts() {
66  return (mTCuts) ? true : false;
67 }
68 
69 inline void StEStructEventReader::setEventCuts(StEStructEventCuts *cuts) {
70 // if(mECuts) delete mECuts;
71  mECuts = cuts;
72 }
73 
74 inline void StEStructEventReader::setTrackCuts(StEStructTrackCuts *cuts) {
75 // if(mTCuts) delete mTCuts;
76  mTCuts = cuts;
77 }
78 
79 #endif
80 
81 /***********************************************************************
82  *
83  * $Log: StEStructEventReader.h,v $
84  * Revision 1.3 2012/11/16 21:19:06 prindle
85  * Moved EventCuts, TrackCuts to EventReader. Affects most readers.
86  * Added support to write and read EStructEvents.
87  * Cuts: 3D histo support, switch to control filling of histogram for reading EStructEvents
88  * EventCuts: A few new cuts
89  * MuDstReader: Add 2D to some histograms, treat ToFCut, PrimaryCuts, VertexRadius histograms like other cut histograms.
90  * QAHists: Add refMult
91  * TrackCuts: Add some hijing cuts.
92  *
93  * Revision 1.2 2006/04/04 22:05:05 porter
94  * a handful of changes:
95  * - changed the StEStructAnalysisMaker to contain 1 reader not a list of readers
96  * - added StEStructQAHists object to contain histograms that did exist in macros or elsewhere
97  * - made centrality event cut taken from StEStructCentrality singleton
98  * - put in ability to get any max,min val from the cut class - one must call setRange in class
99  *
100  * Revision 1.1 2003/10/15 18:20:32 porter
101  * initial check in of Estruct Analysis maker codes.
102  *
103  *
104  *********************************************************************/
105 
106 
107 
108