MpdTpcSector.cxx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #include "MpdTpcSector.h"
  2. #include <TMath.h>
  3. #include <TF1.h>
  4. #include <cassert>
  5. #include <algorithm>
  6. #include <set>
  7. #include<iostream>
  8. #include<fstream>
  9. #include <string>
  10. #include <cmath>
  11. #include <sstream>
  12. using namespace std;
  13. ClassImp(TpcSector)
  14. TpcSector::TpcSector() {
  15. _tpcLength = 170;
  16. _outerPadHeight = 1.8;
  17. _outerPadWidth = 0.5;
  18. _innerPadHeight = 1.2;
  19. _innerPadWidth = 0.5;
  20. _nSectors = 24;
  21. _nTimeBins = 512;
  22. _rMin = 40.3;
  23. _maxX = 30.73; // 32.08 - 1.35
  24. _minX = 9.295; // 10.645 - 1.35
  25. _sectInnerHeight = 32.4;
  26. _sectOuterHeight = 46.8;
  27. _sectHeight = 79.2; // 80.0 - 0.4 - 0.4
  28. Float_t tang = (_maxX - _minX) / _sectHeight;
  29. _midX = _minX + tang * _sectInnerHeight;
  30. Int_t nOuterPads_min = (Int_t) (_midX / _outerPadWidth);
  31. Int_t nInnerPads_min = (Int_t) (_minX / _innerPadWidth);
  32. _nInnerRows = 27; //(UInt_t) (_sectInnerHeight / _innerPadHeight);
  33. _nOuterRows = 26; //(UInt_t) (_sectOuterHeight / _outerPadHeight);
  34. _nRows = _nInnerRows + _nOuterRows;
  35. _numPadsInRow = new Int_t [_nRows];
  36. _numInnerPadsInRow = new Int_t [_nInnerRows];
  37. _numOuterPadsInRow = new Int_t [_nOuterRows];
  38. for (UInt_t k = 0; k < _nInnerRows; ++k) {
  39. Float_t w = k * _innerPadHeight * tang;
  40. Int_t nExtraPads = (UInt_t) (w / _innerPadWidth);
  41. _numPadsInRow[k] = nInnerPads_min + nExtraPads;
  42. _numInnerPadsInRow[k] = nInnerPads_min + nExtraPads;
  43. }
  44. for (UInt_t k = 0; k < _nOuterRows; ++k) {
  45. Float_t w = k * _outerPadHeight * tang;
  46. Int_t nExtraPads = (UInt_t) (w / _outerPadWidth);
  47. _numPadsInRow[_nInnerRows + k] = nOuterPads_min + nExtraPads;
  48. _numOuterPadsInRow[k] = nOuterPads_min + nExtraPads;
  49. }
  50. }
  51. TpcSector::~TpcSector() {
  52. delete [] _numInnerPadsInRow;
  53. delete [] _numOuterPadsInRow;
  54. }