StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHiMicroMaker.h
1 /***************************************************************************
2  *
3  * $Id: StHiMicroMaker.h,v 1.4 2005/07/06 22:20:57 fisyak Exp $
4  *
5  * Author: Bum Choi, UT Austin, Apr 2002
6  *
7  ***************************************************************************
8  *
9  * Description: This Maker creates the highpt uDST's from StEvent
10  * for highpt Analysis.
11  *
12  ***************************************************************************
13  *
14  * $Log: StHiMicroMaker.h,v $
15  * Revision 1.4 2005/07/06 22:20:57 fisyak
16  * Use templated StPhysicalHelixD and StThreeVectorF
17  *
18  * Revision 1.3 2002/05/31 21:50:14 jklay
19  * Fixed the way centrality is calculated, see README
20  *
21  * Revision 1.2 2002/04/03 00:37:41 jklay
22  * Fixed some bugs, added new version of dcaz
23  *
24  * Revision 1.1 2002/04/02 20:00:41 jklay
25  * Bums highpt uDST Maker
26  *
27  *
28  **************************************************************************/
29 #ifndef StHiMicroMaker_hh
30 #define StHiMicroMaker_hh
31 
32 #ifndef __CINT__
33 #include <utility>
34 #endif
35 
36 #include "StMaker.h"
37 
38 #include "TString.h"
39 #include "TFile.h"
40 #include "TTree.h"
41 #include "TNtuple.h"
42 #include "StChain/StMaker.h"
43 
44 // technique is that the these classes do not get passed
45 // through rootcint.
46 //
47 class StHiMicroEvent;
48 
49 #include "StPhysicalHelixD.hh"
50 #include "StThreeVectorF.hh"
51 class StEvent;
52 class StTrack;
53 class StIOMaker;
54 
55 //class StHiMicroEvent;
56 
57 #ifndef ST_NO_NAMESPACES
58 using std::string;
59 #endif
60 
61 class StHiMicroMaker : public StMaker {
62  public:
63 
64  StHiMicroMaker(const Char_t *makerName="micro");
65  ~StHiMicroMaker();
66 
67  void Clear(Option_t *option="");
68  Int_t Init();
69  Int_t InitRun(int runumber);
70  Int_t Make();
71  Int_t Finish();
72 
73  void setDebug(Int_t debug=1) { mDebug = debug; }
74  void setSaveAllEvents(bool val=false) {mSaveAllEvents = val;}
75 
76  bool SaveAllEvents() const {return mSaveAllEvents;}
77 
78  void setHitLoop(Int_t doit=1) { mHitLoop=doit; }
79  void setVertexZCut(Float_t x) { mVertexZCut=x; }
80  void setOutDir(const char* dir= "./") { mOutDir = dir; }
81 
82 
83  private:
84  void fillEvent(StEvent*);
85  Int_t fillTracks(StEvent*);
86  void dump(StTrack* prTrack,StTrack* glTrack);
87  Float_t computeXY(const StThreeVectorF&, const StTrack*);
88  double dcaz(const StPhysicalHelixD& helix, const StThreeVectorF& point);
89  double dcaz(const StPhysicalHelixD& helix, const StThreeVectorF& point, const StTrack* track);
90 
91  Int_t openFile();
92  Int_t closeFile();
93 
94  bool accept(StEvent*); // this method serves as an event filter
95  bool accept(StTrack*); // and this is used to select tracks
96  bool acceptCentrality(StTrack*);
97  bool goodGlobal(StTrack*);
98  bool goodGlobalA(StTrack*);
99  bool goodGlobalB(StTrack*);
100  bool goodGlobalC(StTrack*);
101  bool goodGlobalD(StTrack*);
102  bool goodGlobalE(StTrack*);
103  bool goodGlobalFlag(StTrack*);
104 
105  TString mDSTName;
106  TFile* mDSTFile;
107  TTree* mDSTTree;
108  StIOMaker* mIOMaker;
109  TString mInFileName;
110  TString mOutDir;
111 
112  Int_t mNEvent;
113  Int_t mNAcceptedEvent;
114  Int_t mNAcceptedTrack;
115  bool mSaveAllEvents;
116  Int_t mDebug;
117  Float_t mVertexZCut;
118  Int_t mHitLoop;
119 
120  StHiMicroEvent* mHiMicroEvent;
121 
122 
123  ClassDef(StHiMicroMaker,1)
124 };
125 #endif
void Clear(Option_t *option="")
User defined functions.