ntupleTrack.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /***************************************************************************
  2. *
  3. * $Id: 12 July 2000
  4. *
  5. * Author: Dominik Flierl, flierl@bnl.gov
  6. ***************************************************************************
  7. *
  8. * Description:
  9. * fill track information into an ntuple in order to determine the cuts
  10. *
  11. ***************************************************************************/
  12. #ifndef ntupleTrack_hh
  13. #define ntupleTrack_hh
  14. #include "StHbtMaker/Infrastructure/StHbtTFile.hh"
  15. #include "StHbtMaker/Base/StHbtTrackCut.h"
  16. #ifdef __ROOT__
  17. class ntupleTrack : public StHbtTrackCut
  18. {
  19. // define ntuple content in a nested struct
  20. struct mTrack_t
  21. {
  22. int charge;
  23. int nhits;
  24. float dca;
  25. float pt;
  26. float p;
  27. float px;
  28. float py;
  29. float pz;
  30. float prapidity;
  31. };
  32. private:
  33. // my tree
  34. StHbtTree* mTree ;
  35. // my tree consists of mtracks
  36. mTrack_t mtrack ;
  37. public:
  38. ntupleTrack();
  39. ~ntupleTrack();
  40. // called for every track, returns in this case always true
  41. bool Pass(const StHbtTrack*);
  42. // this one has to be provided
  43. StHbtString Report();
  44. // access the tree from
  45. StHbtTree* GetNtupleTrack() { return mTree; } ;
  46. ClassDef(ntupleTrack, 0)
  47. };
  48. #endif // ifdeff ROOT
  49. #endif // ifdeff ntupleTrack_hh