Class Reference for E1039 Core & Analysis Software
SQVertexing.h
Go to the documentation of this file.
1 #ifndef _SQVERTEXING_H
2 #define _SQVERTEXING_H
3 
4 #include <TRandom2.h>
5 #include <fun4all/SubsysReco.h>
6 
7 #include "GFField.h"
8 #include "GFTrack.h"
9 
10 class TString;
11 class TVector3;
12 class SQTrack;
13 class SQTrackVector;
14 class SQDimuonVector;
15 class SRecEvent;
16 class SRecTrack;
17 class SRecDimuon;
18 
20 
24 class SQVertexing: public SubsysReco
25 {
26 public:
27  SQVertexing(const std::string& name = "SQVertexing", int sign1 = 1, int sign2 = -1);
28  ~SQVertexing();
29 
30  int Init(PHCompositeNode* topNode=0);
31  int InitRun(PHCompositeNode* topNode=0);
32  int process_event(PHCompositeNode* topNode);
33  int End(PHCompositeNode* topNode);
34 
35  void set_legacy_rec_container(const bool enable = true) { legacyContainer_in = enable; legacyContainer_out = enable; }
36  void set_legacy_in_container(const bool enable = true) { legacyContainer_in = enable; }
37  void set_legacy_out_container(const bool enable = true) { legacyContainer_out = enable; }
38  void set_single_retracking(const bool enable = true) { enableSingleRetracking = true; }
39 
40  void set_geom_file_name(const std::string& geomFileName) { geom_file_name = geomFileName; }
41  bool processOneDimuon(SRecTrack* track1, SRecTrack* track2, SRecDimuon& dimuon);
42  bool processOneMuon(SRecTrack* track);
43 
44 private:
45  int InitField(PHCompositeNode* topNode=0);
46  int InitGeom(PHCompositeNode* topNode=0);
47  int MakeNodes(PHCompositeNode* topNode);
48  int GetNodes(PHCompositeNode* topNode);
49 
50  double swimTrackToVertex(SQGenFit::GFTrack& track, double z, TVector3* pos = nullptr, TVector3* mom = nullptr);
51  double refitTrkToVtx(SQGenFit::GFTrack& track, double z, TVector3* pos = nullptr, TVector3* mom = nullptr);
52  double refitTrkToVtx(SRecTrack* track, double z, TVector3* pos = nullptr, TVector3* mom = nullptr);
53  double findDimuonZVertex(SRecDimuon& dimuon, SQGenFit::GFTrack& track1, SQGenFit::GFTrack& track2);
54  double calcZsclp(double p);
55 
56  bool legacyContainer_in, legacyContainer_out;
57  bool enableSingleRetracking;
58 
59  int charge1, charge2;
60 
61  TRandom2 rndm;
62 
63  std::string geom_file_name;
64  SQGenFit::GFField* gfield;
65 
66  SRecEvent* recEvent;
67  SQTrackVector* recTrackVec;
68 
69  SQDimuonVector* recDimuonVec;
70 };
71 
72 #endif
An SQ interface class to hold a list of SQDimuon objects.
An SQ interface class to hold a list of SQTrack objects.
Definition: SQTrackVector.h:19
An SQ interface class to hold one true or reconstructed track.
Definition: SQTrack.h:8
SubsysReco module to carry out the vertexing (i.e. forming dimuons).
Definition: SQVertexing.h:25
int process_event(PHCompositeNode *topNode)
int Init(PHCompositeNode *topNode=0)
Definition: SQVertexing.cxx:79
SQVertexing(const std::string &name="SQVertexing", int sign1=1, int sign2=-1)
Definition: SQVertexing.cxx:62
int InitRun(PHCompositeNode *topNode=0)
Definition: SQVertexing.cxx:85
void set_legacy_out_container(const bool enable=true)
Definition: SQVertexing.h:37
bool processOneMuon(SRecTrack *track)
void set_legacy_rec_container(const bool enable=true)
Definition: SQVertexing.h:35
void set_single_retracking(const bool enable=true)
Definition: SQVertexing.h:38
void set_geom_file_name(const std::string &geomFileName)
Definition: SQVertexing.h:40
int End(PHCompositeNode *topNode)
Called at the end of all processing.
bool processOneDimuon(SRecTrack *track1, SRecTrack *track2, SRecDimuon &dimuon)
void set_legacy_in_container(const bool enable=true)
Definition: SQVertexing.h:36