Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TracksInJets.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TracksInJets.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef TRACKSINJETS_H
4 #define TRACKSINJETS_H
5 
6 #include <fun4all/SubsysReco.h>
7 #include <particleflowreco/ParticleFlowElement.h>
8 
9 #include <string>
10 #include <TFile.h>
11 #include <TTree.h>
12 
13 class PHCompositeNode;
14 
15 class TracksInJets : public SubsysReco
16 {
17  public:
18 
19  TracksInJets(const std::string& name = "TracksInJets",
20  const std::string& out = "TracksInJets.root");
21 
22  ~TracksInJets() override;
23  void minTruthJetPt(const float pt) { m_minjettruthpt = pt; }
26  int Init(PHCompositeNode *topNode) override;
27  int InitRun(PHCompositeNode *topNode) override;
28  int process_event(PHCompositeNode *topNode) override;
29  int ResetEvent(PHCompositeNode *topNode) override;
30  int End(PHCompositeNode *topNode) override;
31 
32  private:
33 
34  void setBranches();
35  float dR(const float& eta1, const float& eta2,
36  const float& phi1, const float& phi2);
37  std::string m_outfilename = "TracksInJets.root";
38  std::string m_truthjetmapname = "AntiKt_Truth_r04";
39  std::string m_recojetmapname = "AntiKt_ParticleFlow_r04";
40 
41  TFile *m_outfile = nullptr;
42  TTree *m_tree = nullptr;
43 
44  int m_embeddingid = 1;
45  float m_minjettruthpt = 10;
46 
47  float m_truthjetpx;
48  float m_truthjetpy;
49  float m_truthjetpz;
50  float m_truthjete;
51  float m_recojetpx;
52  float m_recojetpy;
53  float m_recojetpz;
54  float m_recojete;
57 
58  std::vector<float> m_truthjettrackpx;
59  std::vector<float> m_truthjettrackpy;
60  std::vector<float> m_truthjettrackpz;
61  std::vector<float> m_truthjettrackpid;
62  std::vector<float> m_truthjettrackvx;
63  std::vector<float> m_truthjettrackvy;
64  std::vector<float> m_truthjettrackvz;
65 
66  std::vector<float> m_recojettrackpx;
67  std::vector<float> m_recojettrackpy;
68  std::vector<float> m_recojettrackpz;
69  std::vector<float> m_recojettracke;
70  std::vector<ParticleFlowElement::PFLOWTYPE> m_recojettracktype;
71  std::vector<float> m_recojettrackvx;
72  std::vector<float> m_recojettrackvy;
73  std::vector<float> m_recojettrackvz;
74  std::vector<float> m_recojettrackpcax;
75  std::vector<float> m_recojettrackpcay;
76  std::vector<float> m_recojettrackpcaz;
77 };
78 
79 #endif // TRACKSINJETS_H