StHbtStarGenReader.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef StHbtStarGenReader_hh
  2. #define StHbtStarGenReader_hh
  3. #include "StHbtMaker/Base/StHbtEventReader.hh"
  4. #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
  5. #include "StHbtMaker/Infrastructure/StHbtEnumeration.hh"
  6. #include "StEvent/StEnumerations.h"
  7. #include "StMaker.h"
  8. #include "TSystem.h"
  9. #include "TChain.h"
  10. #include "StChain.h"
  11. #include "TRandom3.h"
  12. #include <StarGenerator/EVENT/StarGenParticle.h>
  13. #include <StarGenerator/EVENT/StarGenEvent.h>
  14. #include <string>
  15. #include <stdlib.h>
  16. #include <TDatabasePDG.h>
  17. #include <TVectorT.h>
  18. #include <TMatrixTLazy.h>
  19. #include <TMatrixDSymEigen.h>
  20. using namespace std;
  21. class StFlowEvent;
  22. class StIOMaker;
  23. class TTree;
  24. class TFile;
  25. //--------------------------------------------------------------------------
  26. //
  27. class StHbtStarGenReader : public StHbtEventReader
  28. {
  29. public:
  30. StHbtStarGenReader(const char *dirName, const char *fileName,
  31. const char *filter = ".", int maxFiles = 1e9, bool debug = false);
  32. StHbtEvent *ReturnHbtEvent();
  33. void PrintTotalTracks();
  34. void DoDebug(bool debug = false);
  35. StHbtString Report();
  36. int GetNEvents();
  37. private:
  38. //
  39. // General variables
  40. //
  41. string mDir;
  42. string mFileName;
  43. string mFilter;
  44. //
  45. // Internal variables
  46. //
  47. TDatabasePDG *db;
  48. bool mDebug;
  49. unsigned int mEventIndex;
  50. unsigned int mNEvents;
  51. TChain *mTChain;
  52. TTree *mTree;
  53. StarGenEvent *mSGEvent;
  54. float mTotalTracks;
  55. int mMaxFiles;
  56. TRandom3 *randy;
  57. bool mSphFlag;
  58. float sphLo, sphHi;
  59. float mPCut;
  60. TMatrixTSym<double> *matrix; // transverse sphericity matrix
  61. int InitRead(string dir, string fileName,
  62. string filter, int maxFiles);
  63. int FillChain(TChain *aChain, const char *fileName,
  64. int faxFiles);
  65. int FillChain(TChain *chain, char *dir,
  66. const char *filter, int maxFiles);
  67. void UninitRead();
  68. float dedxMean(float mass, float momentum);
  69. StHbtEvent *Read();
  70. ClassDef(StHbtStarGenReader, 1)
  71. };
  72. #endif