StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ntupleEvent.h
1  /***************************************************************************
2  *
3  * 12 July 2000
4  *
5  * Author: Dominik Flierl, flierl@bnl.gov
6  ***************************************************************************
7  *
8  * Description:
9  * fill event information into an ntuple in order to determine the cuts
10  *
11  ***************************************************************************/
12 #ifndef ntupleEvent_hh
13 #define ntupleEvent_hh
14 
15 #ifdef __ROOT__
16 #include "StHbtMaker/Infrastructure/StHbtTFile.hh"
17 #include "StHbtMaker/Base/StHbtEventCut.h"
18 
19 class ntupleEvent : public StHbtEventCut {
20  // define ntuple content in a nested struct
21  struct mEvent_t
22  {
23  int ctbMult;
24  int numOfTpcHits;
25  int numOfTracks;
26  int numOfGoodTracks;
27  float vertexZ;
28  float vertexX;
29  float vertexY;
30  };
31 
32 public:
33  ntupleEvent() ;
34  ~ntupleEvent() ;
35 
36  // this one has to be provided
37  StHbtString Report() ;
38 
39  // called for every event, returns in this case always true
40  bool Pass(const StHbtEvent*);
41 
42  // access the tree from
43  StHbtTree* getNtupleEvent() { return mTree; } ;
44 
45 private:
46  // my tree
47  StHbtTree* mTree ;
48  // my tree consists of mEvents
49  mEvent_t mEvent ;
50 
51  ClassDef(ntupleEvent, 0)
52 } ;
53 
54 #endif //_ROOT_
55 #endif // ntupleEvent_hh