Utility.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef QATOOLS_UTILITY_H
  2. #define QATOOLS_UTILITY_H
  3. #include <iostream>
  4. #include <fstream>
  5. #include <vector>
  6. #include <algorithm>
  7. #include <iterator>
  8. #include <cassert>
  9. #include <sstream>
  10. #include <string>
  11. #include <Rtypes.h>
  12. #include <TString.h>
  13. #include <TChain.h>
  14. #include <TEnv.h>
  15. #include <qaEvent.h>
  16. #include <qaParticle.h>
  17. class qaUtility
  18. {
  19. protected:
  20. qaUtility();
  21. virtual ~qaUtility();
  22. static qaUtility *fUtility;
  23. public:
  24. qaUtility(qaUtility &other) = delete;
  25. void operator=(const qaUtility &) = delete;
  26. static qaUtility *GetInstance();
  27. const Double_t error_code = -999.;
  28. const Int_t npid = 10;
  29. const std::vector<Int_t> vpdg = {0, 211, 321, 2212, 2112, 0, -211, -321, -2212, -2112};
  30. const std::vector<Double_t> mpdg = {error_code, 0.13957, 0.493677, 0.938272, 0.88277299, error_code, 0.13957, 0.493677, 0.938272, 0.88277299};
  31. const Int_t maxCentBins = 20;
  32. Int_t Nevents;
  33. Int_t debug;
  34. std::string format;
  35. TChain *initChain(const TString &inputFileName, const char *chainName);
  36. std::vector<Float_t> ParseVector(std::string _input);
  37. Bool_t initCentrality();
  38. Double_t GetCharge(Int_t pdg);
  39. Int_t GetPdgId(Int_t pdg);
  40. ClassDef(qaUtility, 0);
  41. }; // class qaUtility
  42. #endif