TpcCommon.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef _TPC_COMMON_H_
  2. #define _TPC_COMMON_H_
  3. #include <Rtypes.h>
  4. #include <TObject.h>
  5. #include <TObjArray.h>
  6. #include <TClonesArray.h>
  7. #include <TMath.h>
  8. #include <TH2.h>
  9. #include <TH3.h>
  10. #include <iostream>
  11. #include <vector>
  12. /************************************************************************/
  13. /* Constants */
  14. /************************************************************************/
  15. const UInt_t kTPC_SECTORS_NUMBER = 24;
  16. const UInt_t kTPC_ROWS_IN_SECTOR = 50;
  17. const UInt_t kTPC_PADS_IN_ROW = 200;
  18. const UInt_t kTPC_TIMEBINS_IN_PAD = 512;
  19. // Drift velocity
  20. const Double_t kTPC_DRIFT_SPEED = 5.55 * 10 / 1000.; // mm/ns
  21. // in samples/ns
  22. const Double_t kTPC_READOUT_FREQUENCY = (12.5 * 1000. * 1000.) / (1000. * 1000. * 1000.);
  23. /************************************************************************/
  24. /* Macros */
  25. /************************************************************************/
  26. #define COUNTOF(arr) (unsigned long)( sizeof(arr)/sizeof(arr[0]) )
  27. /************************************************************************/
  28. /* Inline functions */
  29. /************************************************************************/
  30. inline double Deg2Rad(double deg)
  31. {
  32. return deg * TMath::Pi() / 180.;
  33. }
  34. inline double Rad2Deg(double rad)
  35. {
  36. return rad * 180. / TMath::Pi();
  37. }
  38. #endif // _TPC_COMMON_H_