MpdNDetAnalysis.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. // --------------------------------------------------------------------//
  2. // MpdNDetAnalysis header file //
  3. // ............................ //
  4. // Created May 2009 //
  5. // ............................ //
  6. // --------------------------------------------------------------------//
  7. #ifndef MPDNDETANALYSIS_H
  8. #define MPDNDETANALYSIS_H
  9. #include "FairTask.h" // keep CBM
  10. #include "FairStack.h" // names
  11. class FairStack;
  12. class TArrayD;
  13. class TH1F;
  14. class TH2F;
  15. class TH1D;
  16. class TH2D;
  17. class TFile;
  18. class MpdNDetAnalysis : public FairTask {
  19. public:
  20. MpdNDetAnalysis();
  21. MpdNDetAnalysis(const char *name, const char *title="NDET analysis");
  22. virtual ~MpdNDetAnalysis();
  23. virtual InitStatus Init();
  24. void Exec(Option_t* option);
  25. void Finish();
  26. void SetDebug(Option_t *debug="") {fDebug = debug;}
  27. void ReadMCTrack();//KM test
  28. void OneEventAnalysis();
  29. void Acceptance();
  30. void WriteOutput();
  31. //---------------------
  32. void AnalyzePrimary();
  33. void AnalyzeMCPointsEdep();
  34. void AnalyzeMCPointsWall();
  35. /* void AnalyzeHits(); */
  36. /* void AnalyzeRecParticles(); */
  37. private:
  38. TClonesArray* fMCtrack; // List of particles in a stack
  39. TClonesArray* fNDetPointLite;// NDET MC points inside NDET
  40. TClonesArray* fNDetPoint;// NDET MC points on entrance to NDET
  41. TClonesArray* fListNDEThits; // NDET hits
  42. TClonesArray* fListNDETrp; // NDET rec.particles
  43. Int_t fEvent; // current event number
  44. Int_t fNprimary; // number of primary tracks
  45. //Test putput root file
  46. TFile *ftest;
  47. TH1F *fhNevents;//Number of processed events
  48. // All Neutrons on the entrance of NDet
  49. TH1F *fhNeut0Pabs; // Abs momentum distribution
  50. TH1F *fhNeut0Pt; // Transverse momentum distribution
  51. TH1F *fhNeut0Eta; // Pseudorapidity distribution
  52. TH1F *fhNeut0Theta; // Polar angle distribution
  53. TH1F *fhNeut0Phi; // Azimuthal angle distribution
  54. TH2F *fhNeut0PtEta; // Transverse momentum vs Eta
  55. TH1F *fhNeut0Rad;
  56. TH2F *fhNeut0RadZ;
  57. TH1F *fhNeut1Pabs; // Abs momentum distribution
  58. TH1F *fhNeut1Pt; // Transverse momentum distribution
  59. TH1F *fhNeut1Eta; // Pseudorapidity distribution
  60. TH1F *fhNeut1Theta; // Polar angle distribution
  61. TH1F *fhNeut1Phi; // Azimuthal angle distribution
  62. TH2F *fhNeut1PtEta; // Transverse momentum vs Eta
  63. TH1F *fhNeut1Rad;
  64. TH2F *fhNeut1RadZ;
  65. TH2F *fhNeut1RadE;
  66. // All Not Neutrons on the entrance of NDet
  67. TH1F *fhProt0Pabs; // Abs momentum distribution
  68. TH1F *fhProt0Pt; // Transverse momentum distribution
  69. TH1F *fhProt0Eta; // Pseudorapidity distribution
  70. TH1F *fhProt0Theta; // Polar angle distribution
  71. TH1F *fhProt0Phi; // Azimuthal angle distribution
  72. TH2F *fhProt0PtEta; // Transverse momentum vs Eta
  73. TH1F *fhProt0Rad;
  74. TH1F *fhProt1Pabs; // Abs momentum distribution
  75. TH1F *fhProt1Pt; // Transverse momentum distribution
  76. TH1F *fhProt1Eta; // Pseudorapidity distribution
  77. TH1F *fhProt1Theta; // Polar angle distribution
  78. TH1F *fhProt1Phi; // Azimuthal angle distribution
  79. TH2F *fhProt1PtEta; // Transverse momentum vs Eta
  80. TH1F *fhProt1Rad;
  81. // MC points
  82. TH1F *fhMcpPabs; // Abs momentum distribution of detected
  83. TH1F *fhMcpPt; // Transverse momentum distribution of detected
  84. TH1F *fhMcpEta; // Pseudorapidity distribution of detected
  85. TH1F *fhMcpTheta; // Polar angle distribution of detected
  86. TH1F *fhMcpPhi; // Azimuthal angle distribution of detected
  87. TH2F *fhMcpPtEta; // Transverse momentum vs Eta of detected
  88. TH2F *fhMcpXY; // (X,Y) coordinates of MC points
  89. TH1D *fhMcpPdgNdet;//MC points PDG code
  90. // Hits
  91. TH2F *fhHitXY; // x,y coordinates of NDET hits
  92. TH1F *fhHitE; // NDET hit energy
  93. // Reconstructed particles
  94. TH1F *fhRecPabs; // reconstructed absolute momentum
  95. TH1F *fhRecPt; // reconstructed pt
  96. TH1F *fhRecYrap; // reconstructed rapidity
  97. TH1F *fhRecPhi; // reconstructed azimuthal angle
  98. // Acceptance
  99. TH2F* fhPtYrap; // Pt and Y rapidity of primary particles
  100. TH2F* fhPtYrapSignal; // Pt and Y rapidity of signal particles
  101. TH2F* fhPtYrapAccept; // acceptance
  102. Option_t *fDebug; //! debug flag
  103. ClassDef(MpdNDetAnalysis,2)
  104. };
  105. #endif