00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef StHiMicroMaker_hh
00030 #define StHiMicroMaker_hh
00031
00032 #ifndef __CINT__
00033 #include <utility>
00034 #endif
00035
00036 #include "StMaker.h"
00037
00038 #include "TString.h"
00039 #include "TFile.h"
00040 #include "TTree.h"
00041 #include "TNtuple.h"
00042 #include "StChain/StMaker.h"
00043
00044
00045
00046
00047 class StHiMicroEvent;
00048
00049 #include "StPhysicalHelixD.hh"
00050 #include "StThreeVectorF.hh"
00051 class StEvent;
00052 class StTrack;
00053 class StIOMaker;
00054
00055
00056
00057 #ifndef ST_NO_NAMESPACES
00058 using std::string;
00059 #endif
00060
00061 class StHiMicroMaker : public StMaker {
00062 public:
00063
00064 StHiMicroMaker(const Char_t *makerName="micro");
00065 ~StHiMicroMaker();
00066
00067 void Clear(Option_t *option="");
00068 Int_t Init();
00069 Int_t InitRun(int runumber);
00070 Int_t Make();
00071 Int_t Finish();
00072
00073 void setDebug(Int_t debug=1) { mDebug = debug; }
00074 void setSaveAllEvents(bool val=false) {mSaveAllEvents = val;}
00075
00076 bool SaveAllEvents() const {return mSaveAllEvents;}
00077
00078 void setHitLoop(Int_t doit=1) { mHitLoop=doit; }
00079 void setVertexZCut(Float_t x) { mVertexZCut=x; }
00080 void setOutDir(const char* dir= "./") { mOutDir = dir; }
00081
00082
00083 private:
00084 void fillEvent(StEvent*);
00085 Int_t fillTracks(StEvent*);
00086 void dump(StTrack* prTrack,StTrack* glTrack);
00087 Float_t computeXY(const StThreeVectorF&, const StTrack*);
00088 double dcaz(const StPhysicalHelixD& helix, const StThreeVectorF& point);
00089 double dcaz(const StPhysicalHelixD& helix, const StThreeVectorF& point, const StTrack* track);
00090
00091 Int_t openFile();
00092 Int_t closeFile();
00093
00094 bool accept(StEvent*);
00095 bool accept(StTrack*);
00096 bool acceptCentrality(StTrack*);
00097 bool goodGlobal(StTrack*);
00098 bool goodGlobalA(StTrack*);
00099 bool goodGlobalB(StTrack*);
00100 bool goodGlobalC(StTrack*);
00101 bool goodGlobalD(StTrack*);
00102 bool goodGlobalE(StTrack*);
00103 bool goodGlobalFlag(StTrack*);
00104
00105 TString mDSTName;
00106 TFile* mDSTFile;
00107 TTree* mDSTTree;
00108 StIOMaker* mIOMaker;
00109 TString mInFileName;
00110 TString mOutDir;
00111
00112 Int_t mNEvent;
00113 Int_t mNAcceptedEvent;
00114 Int_t mNAcceptedTrack;
00115 bool mSaveAllEvents;
00116 Int_t mDebug;
00117 Float_t mVertexZCut;
00118 Int_t mHitLoop;
00119
00120 StHiMicroEvent* mHiMicroEvent;
00121
00122
00123 ClassDef(StHiMicroMaker,1)
00124 };
00125 #endif