MpdDchHitProducer.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //------------------------------------------------------------------------------------------------------------------------
  2. #ifndef __MPD_DCH_HIT_PRODUCER_H
  3. #define __MPD_DCH_HIT_PRODUCER_H 1
  4. #include <map>
  5. #include "FairTask.h"
  6. #include "TList.h"
  7. #include "TVector3.h"
  8. class TClonesArray;
  9. class TObjectArray;
  10. class MpdDchHit;
  11. class TRandom;
  12. class TH1D;
  13. class TH2D;
  14. //------------------------------------------------------------------------------------------------------------------------
  15. class MpdDchHitProducer : public FairTask
  16. {
  17. TRandom *pRandom;
  18. TClonesArray *pHitCollection;
  19. TClonesArray *pDchPoints;
  20. TClonesArray *pMCTracks;
  21. TList fList;
  22. Bool_t fDoTest;
  23. Double_t fRSigma, fRPhiSigma; // [cm] default 2mm in R, 200um in R-Phi
  24. TH1D *htOccup, *htWireN, *htMCTime;
  25. TH2D *htXYlocal, *htRvsR;
  26. TH1D *htGasDrift,*htGasDriftA, *htTime, *htTimeA, *htPerp, *htPerpA;
  27. typedef multimap<Double_t, Int_t> occupMap;
  28. typedef occupMap::iterator occupIter;
  29. occupMap fMapOccup;
  30. void Rotate(Int_t proj, Double_t x,Double_t y, Double_t& xRot, Double_t& yRot, Bool_t back=false);
  31. Double_t GetDriftLenght(Int_t proj, Int_t gasgap, Double_t x, Double_t& wirePos);
  32. Double_t GetTShift(Double_t driftLength, Double_t wirePos, Double_t R, Double_t&);
  33. Bool_t HitExist(Double_t delta);
  34. Double_t GetPhi(Int_t proj);
  35. Int_t WireID(Int_t uid, Double_t wirePos, Double_t R);
  36. MpdDchHit* AddHit(Int_t index, Int_t detID, const TVector3& posHit, const TVector3& posHitErr,
  37. Int_t trackIndex, Int_t pointIndex, Int_t flag);
  38. public:
  39. MpdDchHitProducer(const char* fileGeo, Int_t verbose = 1, Bool_t DoTest = false);
  40. ~MpdDchHitProducer();
  41. InitStatus Init();
  42. void Exec(Option_t* opt);
  43. void Finish();
  44. void SetErrors(Double_t errR, Double_t errRphi){ fRSigma = errR; fRPhiSigma = errRphi; };
  45. ClassDef(MpdDchHitProducer,1);
  46. };
  47. //------------------------------------------------------------------------------------------------------------------------
  48. #endif