00001 // 00002 // This is a STAR typical comment header. You should modify 00003 // it to reflect your changes. 00004 // As a minimum it should contain the name of the author, the 00005 // date it was written/modified, and a short description of what 00006 // the class is meant to do. The cvs strings $X$ (where X=Id, Log) 00007 // are not needed when you do not intend to put the file under 00008 // cvs control. Remove them. 00009 // 00023 /* ------------------------------------------------------------------------- 00024 * $Log: StAnalysisMaker.h,v $ 00025 * Revision 2.10 2012/05/07 13:59:44 fisyak 00026 * enhance print out for primary vertixes 00027 * 00028 * Revision 2.9 2012/03/22 23:45:16 fisyak 00029 * Compress output for Event summary 00030 * 00031 * Revision 2.8 2010/09/01 14:33:57 fisyak 00032 * Clean ups 00033 * 00034 * Revision 2.7 2009/11/10 20:17:59 fisyak 00035 * Add print out for StEvent track and hits 00036 * 00037 * Revision 2.6 2009/11/03 15:13:22 fisyak 00038 * Comment print out, wait till StEvent will be mofidied 00039 * 00040 * Revision 2.5 2009/11/03 15:03:56 fisyak 00041 * Add static method to print StEvent 00042 * 00043 * Revision 2.4 2003/09/10 19:47:02 perev 00044 * ansi corrs 00045 * 00046 * Revision 2.3 2002/04/28 00:10:28 jeromel 00047 * doxygen basic dox added. GetCVS() had wrong signature : corrected to avoid 00048 * propagation of this typo in new makers. 00049 * 00050 * Revision 2.2 2000/07/12 05:23:28 ullrich 00051 * Updated for better use as template for actual analysis. 00052 * 00053 * Revision 2.1 1999/12/30 01:54:57 ogilvie 00054 * added countPrimaryPions as example how to use PID 00055 * 00056 * Revision 2.0 1999/11/04 16:10:03 ullrich 00057 * Revision for new StEvent 00058 * 00059 * ------------------------------------------------------------------------- 00060 */ 00061 00062 // 00063 // Every header file should have these macros to protect 00064 // from being included multiple times in the same scope. 00065 // If you change the name of the class change the name 00066 // of the macro. 00067 // 00068 #ifndef StAnalysisMaker_hh 00069 #define StAnalysisMaker_hh 00070 00071 // 00072 // Include files. StMaker.h is needed since your maker 00073 // inherits from StMaker. 00074 #include "StMaker.h" 00075 #include "TString.h" 00076 00077 // 00078 // Forward declarations. 00079 // It is always a good idea to reduce the dependencies 00080 // to other header files. This can be achieved by 00081 // forward declaring classes which are only referenced 00082 // but not contained (by value) in the class decleration. 00083 // In the implementation then one onviously has to include 00084 // the referring header. Another advantage of this 00085 // technique is that the these classes do not get passed 00086 // through rootcint. 00087 // 00088 class StEvent; 00089 class StTrack; 00090 00091 // 00092 // The class declaration. Every maker has to 00093 // inherit from StMaker. 00094 // 00095 class StAnalysisMaker : public StMaker { 00096 public: 00097 00098 StAnalysisMaker(const Char_t *name="analysis"); // constructor 00099 ~StAnalysisMaker() {} // destructor 00100 00101 Int_t Make(); // invoked for every event 00102 Int_t Finish(); // called once at the end 00103 static void summarizeEvent(StEvent *event=0, Int_t mEventCounter=0); 00104 static void PrintStEvent(TString opt="vpg"); 00105 static void PrintTpcHits(Int_t sector = 0, Int_t row = 0, Bool_t plot = kFALSE, Int_t IdTruth=-1); 00106 static void PrintSvtHits(); 00107 static void PrintSsdHits(); 00108 static void PrintRnDHits(); 00109 virtual const char *GetCVS() const { 00110 static const char cvs[]="Tag $Name: $ $Id: StAnalysisMaker.h,v 2.10 2012/05/07 13:59:44 fisyak Exp $ built "__DATE__" "__TIME__ ; 00111 return cvs; 00112 } 00113 00114 private: 00115 // 00116 // Add your data member and new methods here. 00117 // The "//!" means that rootcint is not adding 00118 // the data member to the streamer. Don't worry 00119 // if you don't know what this means. 00120 // In general it is a good idea in analysis makers 00121 // to always add the //! after a member. 00122 // 00123 00124 // 00125 // Methods (== member functions) 00126 // Remember: these are just examples! 00127 // 00128 Bool_t accept(StEvent*); // this method serves as an event filter 00129 Bool_t accept(StTrack*); // and this is used to select tracks 00130 00131 // 00132 // Data members 00133 // Note, that it is recommended to start all member names with 00134 // an 'm'. This makes it easier to read the code later. 00135 // 00136 Int_t mEventCounter; 00137 00138 // 00139 // This is needed to make your maker known to root4star. 00140 // It must be always the last statement in the class. 00141 // Note that this is a macro, that's why the ';' is missing. 00142 // 00143 ClassDef(StAnalysisMaker,0) 00144 }; 00145 #endif
1.5.9