StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StAnalysisMaker.h
1 //
2 // This is a STAR typical comment header. You should modify
3 // it to reflect your changes.
4 // As a minimum it should contain the name of the author, the
5 // date it was written/modified, and a short description of what
6 // the class is meant to do. The cvs strings $X$ (where X=Id, Log)
7 // are not needed when you do not intend to put the file under
8 // cvs control. Remove them.
9 //
23 /* -------------------------------------------------------------------------
24  * $Log: StAnalysisMaker.h,v $
25  * Revision 2.15 2015/07/19 23:02:44 fisyak
26  * Add print out for Sst, Gmt, pp2pp
27  *
28  * Revision 2.14 2014/08/06 11:42:52 jeromel
29  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
30  *
31  * Revision 2.13 2012/12/18 17:16:26 fisyak
32  * Add PrintVertex
33  *
34  * Revision 2.12 2012/10/23 19:44:18 fisyak
35  * Add print out for ToF and Emc hits
36  *
37  * Revision 2.11 2012/09/16 21:59:14 fisyak
38  * Compress print out, add PrintEmcHits
39  *
40  * Revision 2.10 2012/05/07 13:59:44 fisyak
41  * enhance print out for primary vertixes
42  *
43  * Revision 2.9 2012/03/22 23:45:16 fisyak
44  * Compress output for Event summary
45  *
46  * Revision 2.8 2010/09/01 14:33:57 fisyak
47  * Clean ups
48  *
49  * Revision 2.7 2009/11/10 20:17:59 fisyak
50  * Add print out for StEvent track and hits
51  *
52  * Revision 2.6 2009/11/03 15:13:22 fisyak
53  * Comment print out, wait till StEvent will be mofidied
54  *
55  * Revision 2.5 2009/11/03 15:03:56 fisyak
56  * Add static method to print StEvent
57  *
58  * Revision 2.4 2003/09/10 19:47:02 perev
59  * ansi corrs
60  *
61  * Revision 2.3 2002/04/28 00:10:28 jeromel
62  * doxygen basic dox added. GetCVS() had wrong signature : corrected to avoid
63  * propagation of this typo in new makers.
64  *
65  * Revision 2.2 2000/07/12 05:23:28 ullrich
66  * Updated for better use as template for actual analysis.
67  *
68  * Revision 2.1 1999/12/30 01:54:57 ogilvie
69  * added countPrimaryPions as example how to use PID
70  *
71  * Revision 2.0 1999/11/04 16:10:03 ullrich
72  * Revision for new StEvent
73  *
74  * -------------------------------------------------------------------------
75  */
76 
77 //
78 // Every header file should have these macros to protect
79 // from being included multiple times in the same scope.
80 // If you change the name of the class change the name
81 // of the macro.
82 //
83 #ifndef StAnalysisMaker_hh
84 #define StAnalysisMaker_hh
85 
86 //
87 // Include files. StMaker.h is needed since your maker
88 // inherits from StMaker.
89 #include "StMaker.h"
90 #include "TString.h"
91 
92 //
93 // Forward declarations.
94 // It is always a good idea to reduce the dependencies
95 // to other header files. This can be achieved by
96 // forward declaring classes which are only referenced
97 // but not contained (by value) in the class decleration.
98 // In the implementation then one onviously has to include
99 // the referring header. Another advantage of this
100 // technique is that the these classes do not get passed
101 // through rootcint.
102 //
103 class StEvent;
104 class StTrack;
105 
106 //
107 // The class declaration. Every maker has to
108 // inherit from StMaker.
109 //
110 class StAnalysisMaker : public StMaker {
111 public:
112 
113  StAnalysisMaker(const Char_t *name="analysis"); // constructor
114  ~StAnalysisMaker() {} // destructor
115 
116  Int_t Make(); // invoked for every event
117  Int_t Finish(); // called once at the end
118  static void summarizeEvent(StEvent *event=0, Int_t mEventCounter=0);
119  static void PrintStEvent(TString opt="vpgl3");
120  static void PrintVertex(Int_t ivx = -1);
121  static void PrintGlobalTrack(Int_t itk = 0);
122  static void PrintTpcHits(Int_t sector = 0, Int_t row = 0, Int_t plot = 0, Int_t IdTruth=-1);
123  static void PrintToFHits();
124  static void PrintSvtHits();
125  static void PrintSsdHits();
126  static void PrintSstHits();
127  static void PrintRnDHits();
128  static void PrintEmcHits(Int_t det=-1, Int_t mod=-1, const Option_t *opt = "AdcClustersPoints");
129  virtual const char *GetCVS() const {
130  static const char cvs[]="Tag $Name: $ $Id: StAnalysisMaker.h,v 2.15 2015/07/19 23:02:44 fisyak Exp $ built " __DATE__ " " __TIME__ ;
131  return cvs;
132  }
133 
134  private:
135  //
136  // Add your data member and new methods here.
137  // The "//!" means that rootcint is not adding
138  // the data member to the streamer. Don't worry
139  // if you don't know what this means.
140  // In general it is a good idea in analysis makers
141  // to always add the //! after a member.
142  //
143 
144  //
145  // Methods (== member functions)
146  // Remember: these are just examples!
147  //
148  Bool_t accept(StEvent*); // this method serves as an event filter
149  Bool_t accept(StTrack*); // and this is used to select tracks
150 
151  //
152  // Data members
153  // Note, that it is recommended to start all member names with
154  // an 'm'. This makes it easier to read the code later.
155  //
156  Int_t mEventCounter;
157 
158  //
159  // This is needed to make your maker known to root4star.
160  // It must be always the last statement in the class.
161  // Note that this is a macro, that's why the ';' is missing.
162  //
163  ClassDef(StAnalysisMaker,0)
164 };
165 #endif
A typical Analysis Class.
StAnalysisMaker(const Char_t *name="analysis")
The constructor. Initialize you data members here.