StFemtoDst.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. * \class StFemtoDst
  3. * \brief The class holds FemtoDst structure
  4. *
  5. * The class keeps the structure of FemtoDst and allows
  6. * one to get event, track, V0 or Xi information
  7. *
  8. * \author Grigory Nigmatkulov; e-mail: nigmatkulov@gmail.com
  9. * \date July 15, 2018
  10. */
  11. #ifndef StFemtoDst_h
  12. #define StFemtoDst_h
  13. // ROOT headers
  14. #include "TClonesArray.h"
  15. // FemtoDst headers
  16. #include "StFemtoArrays.h"
  17. // Forward declarations
  18. class StFemtoEvent;
  19. class StFemtoTrack;
  20. class StFemtoV0;
  21. class StFemtoXi;
  22. //_________________
  23. class StFemtoDst {
  24. public:
  25. /// Default constructor
  26. StFemtoDst() { /* emtpy */}
  27. /// Destructor
  28. ~StFemtoDst() { /* emtpy*/}
  29. /// Set the pointers to the TClonesArrays
  30. static void set(TClonesArray** array);
  31. /// Reset the pointers to the TClonesArrays to 0
  32. static void unset();
  33. /// Return pointer to the n-th TClonesArray
  34. static TClonesArray* femtoArray(Int_t type) { return femtoArrays[type]; }
  35. /// Return pointer to current StFemtoEvent (class holding the event wise information)
  36. static StFemtoEvent* event() { return (StFemtoEvent*)femtoArrays[StFemtoArrays::Event]->UncheckedAt(0); }
  37. /// Return pointer to the i-th track
  38. static StFemtoTrack* track(Int_t i) { return (StFemtoTrack*)femtoArrays[StFemtoArrays::Track]->UncheckedAt(i); }
  39. /// Return pointer to the i-th V0
  40. static StFemtoV0* v0(Int_t i) { return (StFemtoV0*)femtoArrays[StFemtoArrays::V0]->UncheckedAt(i); }
  41. /// REturn pointer to the i-th Xi
  42. static StFemtoXi* xi(Int_t i) { return (StFemtoXi*)femtoArrays[StFemtoArrays::Xi]->UncheckedAt(i); }
  43. /// Return number of tracks in the femto arrays
  44. static UInt_t numberOfTracks() { return femtoArrays[StFemtoArrays::Track]->GetEntries(); }
  45. /// Return number of V0s in the femto femto array
  46. static UInt_t numberOfV0s() { return femtoArrays[StFemtoArrays::V0]->GetEntries(); }
  47. /// Return number of Xis in the femto array
  48. static UInt_t numberOfXis() { return femtoArrays[StFemtoArrays::Xi]->GetEntries(); }
  49. /// Print information
  50. void print() const;
  51. /// Print track information
  52. static void printTracks();
  53. /// Print V0 information
  54. static void printV0s();
  55. /// Print Xi information
  56. static void printXis();
  57. private:
  58. /// Array of TClonesArrays
  59. static TClonesArray** femtoArrays;
  60. };
  61. #endif // StFemtoDst_h