File indexing completed on 2025-08-06 08:21:59
0001 #ifndef __PHG4SVTXCLUSTERIZER_H__
0002 #define __PHG4SVTXCLUSTERIZER_H__
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <phool/PHTimeServer.h>
0006 #include <map>
0007 #include <limits.h>
0008
0009 #include <trackbase/TrkrClusterContainer.h>
0010 #include <trackbase/TrkrDefUtil.h>
0011
0012 class TrkrHitSetContainer;
0013
0014 class MvtxAlign : public SubsysReco {
0015
0016 public:
0017
0018 struct AlignmentPar {
0019 double dx;
0020 double dy;
0021 double dz;
0022 };
0023
0024
0025 MvtxAlign(const std::string &name = "MvtxAlign");
0026 virtual ~MvtxAlign() {}
0027
0028
0029 int Init(PHCompositeNode *topNode) {return 0;}
0030
0031
0032 int InitRun(PHCompositeNode *topNode);
0033
0034
0035 int process_event(PHCompositeNode *topNode);
0036
0037
0038 int End(PHCompositeNode *topNode) {return 0;}
0039
0040
0041 void AddAlignmentPar(TrkrDefs::hitsetkey key, double dx, double dy, double dz);
0042
0043
0044 void PrintAlignmentPars(std::ostream &os = std::cout) const;
0045
0046
0047 void SetAlignmentParFileDir(const std::string fdir) { fdir_ = fdir; }
0048
0049
0050 void SetAlignmentParFromFile(const bool yn) { apff_ = yn; }
0051
0052 private:
0053
0054
0055 int ReadAlignmentParFile();
0056
0057
0058 TrkrClusterContainer* clusters_;
0059
0060
0061 std::map<TrkrDefs::hitsetkey, AlignmentPar> alignmap_;
0062
0063
0064 std::string fdir_;
0065 int runnumber_;
0066 bool apff_;
0067
0068 PHTimeServer::timer _timer;
0069 };
0070
0071 #endif