ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4_KFParticle.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4_KFParticle.C
1 #ifndef MACRO_G4KFPARTICLE_C
2 #define MACRO_G4KFPARTICLE_C
3 
4 #include <GlobalVariables.C>
5 
6 #include <kfparticle_sphenix/KFParticle_sPHENIX.h>
7 
9 
10 R__LOAD_LIBRARY(libkfparticle_sphenix.so)
11 
12 namespace Enable
13 {
14  bool KFPARTICLE = false;
15  bool KFPARTICLE_SAVE_NTUPLE = false;
17  bool KFPARTICLE_TRUTH_MATCH = false;
20  std::string KFPARTICLE_TRACKMAP = "SvtxTrackMap";
21  std::string KFPARTICLE_VERTEXMAP = "SvtxVertexMap";
22 } // namespace Enable
23 
24 namespace KFParticleBaseCut
25 {
26  float minTrackPT = 0.5; // GeV
27  float maxTrackchi2nDoF = 2;
28  float minTrackIPchi2 = 15; // IP = DCA of track with vertex
29  float maxVertexchi2nDoF = 2;
30  float maxTrackTrackDCA = 0.05; // cm
31  float minMotherPT = 0; // GeV
32 } // namespace KFParticleBaseCut
33 
34 void KFParticleInit() {} //I guess this line isnt needed
35 
37 {
39 
41 
42  std::string motherName = "Upsilon";
43  KFParticle_sPHENIX *kfparticle = new KFParticle_sPHENIX("KFParticle_" + motherName + "_Reco");
44  kfparticle->Verbosity(verbosity);
45 
50 
51  kfparticle->setContainerName(motherName);
52  kfparticle->setOutputName("KFParticleOutput_" + motherName + "_reconstruction.root");
53 
54  std::pair<std::string, int> daughterList[99];
55  kfparticle->setNumberOfTracks(2);
56  daughterList[0] = make_pair("electron", +1);
57  daughterList[1] = make_pair("electron", -1);
58  kfparticle->getChargeConjugate(false);
59  kfparticle->setDaughters(daughterList);
61  kfparticle->setMinimumTrackIPchi2(0); // Upsilon decays are prompt, tracks are more likely to point to vertex
63 
66 
67  kfparticle->setMotherName(motherName);
68  kfparticle->setMinimumMass(7);
69  kfparticle->setMaximumMass(11);
71  kfparticle->constrainToPrimaryVertex(false);
72 
73  se->registerSubsystem(kfparticle);
74 
75  return;
76 }
77 
78 
80 {
82 
84 
85  std::string motherName = "D0";
86  KFParticle_sPHENIX *kfparticle = new KFParticle_sPHENIX("KFParticle_" + motherName + "_Reco");
87  kfparticle->Verbosity(verbosity);
88 
93 
94  kfparticle->setContainerName(motherName);
95  kfparticle->setOutputName("KFParticleOutput_" + motherName + "_reconstruction.root");
96 
97  std::pair<std::string, int> daughterList[99];
98  kfparticle->setNumberOfTracks(2);
99  daughterList[0] = make_pair("kaon", -1);
100  daughterList[1] = make_pair("pion", +1);
101  kfparticle->getChargeConjugate(true);
102  kfparticle->setDaughters(daughterList);
106 
109 
110  kfparticle->setMotherName(motherName);
111  kfparticle->setMinimumMass(1.750);
112  kfparticle->setMaximumMass(1.950);
114  kfparticle->constrainToPrimaryVertex(false);
115 
116  se->registerSubsystem(kfparticle);
117 
118  return;
119 }
120 
121 
123 {
125 
127 
128  std::string motherName = "Lambdac";
129  KFParticle_sPHENIX *kfparticle = new KFParticle_sPHENIX("KFParticle_" + motherName + "_Reco");
130  kfparticle->Verbosity(verbosity);
131 
136 
137  kfparticle->setContainerName(motherName);
138  kfparticle->setOutputName("KFParticleOutput_" + motherName + "_reconstruction.root");
139 
140  std::pair<std::string, int> daughterList[99];
141  kfparticle->setNumberOfTracks(3);
142  daughterList[0] = make_pair("proton", +1);
143  daughterList[1] = make_pair("kaon", -1);
144  daughterList[2] = make_pair("pion", +1);
145  kfparticle->getChargeConjugate(true);
146  kfparticle->setDaughters(daughterList);
150 
153 
154  kfparticle->setMotherName(motherName);
155  kfparticle->setMinimumMass(2.150);
156  kfparticle->setMaximumMass(2.400);
158  kfparticle->constrainToPrimaryVertex(false);
159 
160  se->registerSubsystem(kfparticle);
161 
162  return;
163 }
164 
165 
166 #endif