ntupleEvent.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /***************************************************************************
  2. *
  3. * $Id: 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. #ifdef __ROOT__
  15. #include "StHbtMaker/Infrastructure/StHbtTFile.hh"
  16. #include "StHbtMaker/Base/StHbtEventCut.h"
  17. class ntupleEvent : public StHbtEventCut {
  18. // define ntuple content in a nested struct
  19. struct mEvent_t
  20. {
  21. int ctbMult;
  22. int numOfTpcHits;
  23. int numOfTracks;
  24. int numOfGoodTracks;
  25. float vertexZ;
  26. float vertexX;
  27. float vertexY;
  28. };
  29. public:
  30. ntupleEvent() ;
  31. ~ntupleEvent() ;
  32. // this one has to be provided
  33. StHbtString Report() ;
  34. // called for every event, returns in this case always true
  35. bool Pass(const StHbtEvent*);
  36. // access the tree from
  37. StHbtTree* getNtupleEvent() { return mTree; } ;
  38. private:
  39. // my tree
  40. StHbtTree* mTree ;
  41. // my tree consists of mEvents
  42. mEvent_t mEvent ;
  43. ClassDef(ntupleEvent, 0)
  44. } ;
  45. #endif //_ROOT_
  46. #endif // ntupleEvent_hh