Newer
Older
TB_Chris / TbAlgorithms / src / .svn / text-base / TbClusterAssociator.h.svn-base
  1. #pragma once
  2.  
  3. // Tb/TbKernel
  4. #include "TbKernel/TbAlgorithm.h"
  5.  
  6. /** @class TbClusterAssociator TbClusterAssociator.h
  7. *
  8. */
  9.  
  10. class TbClusterAssociator : public TbAlgorithm {
  11. public:
  12. /// Constructor
  13. TbClusterAssociator(const std::string& name, ISvcLocator* pSvcLocator);
  14. /// Destructor
  15. virtual ~TbClusterAssociator() {}
  16.  
  17. virtual StatusCode initialize(); ///< Algorithm initialization
  18. virtual StatusCode execute(); ///< Algorithm execution
  19.  
  20. private:
  21. std::vector<unsigned int> m_duts;
  22. std::string m_trackLocation;
  23. std::string m_clusterLocation;
  24.  
  25. /// Flag to use individual pixel hits or cluster coordinate for association.
  26. bool m_useHits;
  27. /// Flag to associate clusters to more than one track or not.
  28. bool m_reuseClusters;
  29. /// Time window
  30. double m_twindow;
  31. /// Spatial window
  32. double m_xwindow;
  33. /// Chi2 cut
  34. double m_maxChi2;
  35.  
  36. /// Check if a cluster has hits within the tolerance window.
  37. bool match(const LHCb::TbCluster* cluster, const double x,
  38. const double y) const;
  39. };