Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MvtxAlign.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MvtxAlign.h
1 #ifndef __PHG4SVTXCLUSTERIZER_H__
2 #define __PHG4SVTXCLUSTERIZER_H__
3 
4 #include <fun4all/SubsysReco.h>
5 #include <phool/PHTimeServer.h>
6 #include <map>
7 #include <limits.h>
8 
10 #include <trackbase/TrkrDefUtil.h>
11 
13 
14 class MvtxAlign : public SubsysReco {
15 
16 public:
17 
18  struct AlignmentPar {
19  double dx;
20  double dy;
21  double dz;
22  };
23 
24 
25  MvtxAlign(const std::string &name = "MvtxAlign");
26  virtual ~MvtxAlign() {}
27 
29  int Init(PHCompositeNode *topNode) {return 0;}
30 
32  int InitRun(PHCompositeNode *topNode);
33 
35  int process_event(PHCompositeNode *topNode);
36 
38  int End(PHCompositeNode *topNode) {return 0;}
39 
41  void AddAlignmentPar(TrkrDefs::hitsetkey key, double dx, double dy, double dz);
42 
44  void PrintAlignmentPars(std::ostream &os = std::cout) const;
45 
47  void SetAlignmentParFileDir(const std::string fdir) { fdir_ = fdir; }
48 
50  void SetAlignmentParFromFile(const bool yn) { apff_ = yn; }
51 
52 private:
53 
54  // read the alignment parameters from file based on run number
56 
57  // node tree storage pointers
59 
60  // storage object for misalignments
61  std::map<TrkrDefs::hitsetkey, AlignmentPar> alignmap_;
62 
63  // directory for alignment parameter files
66  bool apff_; // alignment par from file
67 
69 };
70 
71 #endif