MpdTpcHitProducer.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //---------------------------------------------------------------------------
  2. #ifndef __MPD_TPC_HIT_PRODUCER_H
  3. #define __MPD_TPC_HIT_PRODUCER_H 1
  4. /// \ingroup tpc
  5. /// \class MpdTpcHitProducer
  6. /// \brief Hit producer in MPD TPC
  7. ///
  8. /// \author Alexander Zinchenko, LHEP JINR Dubna
  9. #include "MpdTpcHit.h"
  10. #include "FairTask.h"
  11. #include <TVector3.h>
  12. #include "TClonesArray.h"
  13. //---------------------------------------------------------------------------
  14. class MpdTpcHitProducer : public FairTask
  15. {
  16. public:
  17. MpdTpcHitProducer();
  18. ~MpdTpcHitProducer();
  19. virtual InitStatus Init();
  20. virtual void Exec(Option_t* opt);
  21. void SetModular(Int_t modular) { fModular = modular; } ///< use simple or modular r/out chamber geometry
  22. void SetReal(Int_t real) { fReal = real; } ///< if !=0 apply realistic effects
  23. void SetPersistance(Bool_t choice = kTRUE) { fPersistance = choice; } ///< set persistance flag
  24. private:
  25. virtual void SetParContainers();
  26. void ExecModular(); ///< emulate geometry of readout chambers
  27. void ExecReal(); ///< emulate realistic effects (resolution and 2-hit resolution)
  28. Bool_t TwoHitRes(MpdTpcHit *hit0, MpdTpcHit *hit); ///< apply 2-hit resolution
  29. void ResVsAngle(); ///< apply resolution vs angle
  30. Double_t Proxim(const MpdTpcHit *hit0, const MpdTpcHit *hit); // adjust R-Phi coord. for continuity
  31. MpdTpcHit* AddRawHit(Int_t hitIndx, Int_t detUID, const TVector3& posHit,
  32. const TVector3& posHitErr, Int_t pointIndx, Int_t trackIndx);
  33. Bool_t Interpolate(Int_t np, Int_t& ibeg, Double_t *yp, Double_t *xp, Double_t *zp, Double_t y0,
  34. Double_t& dir, Double_t& xhit, Double_t& zhit);
  35. void ExecNew(); ///< sectored and layered sensitive volume
  36. TClonesArray* fPointArray; // Input array of TpcPoints
  37. TClonesArray* fHitArray; // Output array of TpcHits
  38. Int_t fModular; // not equal 0 if modular structure of r/out chambers
  39. Int_t fReal; // not equal 0 if realistic effects (resolution and 2-hit resolution)
  40. Double_t fZtpc; // TPC half-length
  41. Bool_t fPersistance; // to store or not hits
  42. ClassDef(MpdTpcHitProducer,1);
  43. };
  44. //---------------------------------------------------------------------------
  45. #endif