Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HFReco.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HFReco.C
2 
3 #pragma GCC diagnostic push
4 
5 #pragma GCC diagnostic ignored "-Wundefined-internal"
6 
7 #include <kfparticle_sphenix/KFParticle_sPHENIX.h>
8 #include <resonancejettagging/ResonanceJetTagging.h>
10 
11 #pragma GCC diagnostic pop
12 
13 R__LOAD_LIBRARY(libkfparticle_sphenix.so)
14 
15 namespace HFjets
16 {
17 namespace Enable
18 {
19  bool KFPARTICLE_SAVE_NTUPLE = false;
23  bool KFPARTICLE_CALO_INFO = false;
24  bool KFPARTICLE_ALL_PV_INFO = false;
25  int KFPARTICLE_VERBOSITY = INT_MAX;
26  bool runTracking = false;
27  bool runTruthTrigger = true;
28  string reconstructionName = "myTestReco"; //Used for naming output folder, file and nodes
29 } // namespace Enable
30 
31 
32 
33 
34 namespace KFPARTICLE
35 {
36  bool runQA = false;
37 
39  std::string D0toK3piName = "D0TOK3PI";
40  std::pair<float, float> D0MassRange(1.7, 2.0);
41  bool D0Trigger = false;
42  bool runD0toKpiReco = false;
43  std::string D0toKpiDecayDescriptor = "[" + D0Name + " -> K^- pi^+]cc";
44  bool runD0toK3piReco = false;
45  std::string D0toK3piDecayDescriptor = "[" + D0Name + " -> K^- pi^- pi^+ pi^+]cc";
46 
48  std::pair<float, float> DplusMassRange(1.7, 2.00);
49  bool DplusTrigger = false;
50  bool runDplustoK2piReco = false;
51  std::string DplustoK2piDecayDescriptor = "[" + DplusName + " -> K^- pi^+ pi^+]cc";
52 
53  std::string LambdacName = "Lambdac";
54  std::pair<float, float> LambdacMassRange(2.15, 2.45);
55  bool LambdacTrigger = false;
56  bool runLambdactopKpiReco = false;
57  std::string LambdacDecayDescriptor = "[" + LambdacName + " -> proton^+ K^- pi^+]cc";
58 }
59 
60 namespace KFParticleBaseCut
61 {
63  bool constrainToPV = true;
64  float minTrackPT = 0.7; // GeV
65  float maxTrackchi2nDoF = 5; // An 3
66  float minTrackIPchi2 = 0; // IP = DCA of track with vertex AuAu 9, An 9
67  float minTrackIP = 0.0025; // cm, An 0 AuAu 0.008
68  float maxVertexchi2nDoF = 5;
69  float maxTrackTrackDCA = 0.008; // cm An 0.03
70  float minMotherPT = 1.5; // GeV An 0
71 } // namespace KFParticleBaseCut
72 
73 
75 {
76 
78 
79  std::string particle_name;
80  switch (tag) {
81  case ResonanceJetTagging::TAG::D0:
82  particle_name = KFPARTICLE::D0Name;
83  break;
84  case ResonanceJetTagging::TAG::D0TOK3PI:
85  particle_name = KFPARTICLE::D0toK3piName;
86  break;
87  case ResonanceJetTagging::TAG::DPLUS:
88  particle_name = KFPARTICLE::DplusName;
89  break;
90  case ResonanceJetTagging::TAG::LAMBDAC:
91  particle_name = KFPARTICLE::LambdacName;
92  break;
93  default:
94  std::cout<<"ERROR:decay parameters not set, ABORTING!";
96  break;
97 
98  }
99 
100  KFParticle_sPHENIX *kfparticle = new KFParticle_sPHENIX("KFParticle_" + particle_name + "_Reco");
101 
102  switch (tag) {
103  case ResonanceJetTagging::TAG::D0:
106  kfparticle->setOutputName("KFParticleOutput_" + KFPARTICLE::D0Name + "_reconstruction.root");
107  break;
108  case ResonanceJetTagging::TAG::D0TOK3PI:
111  kfparticle->setOutputName("KFParticleOutput_" + KFPARTICLE::D0toK3piName + "_reconstruction.root");
112  break;
113  case ResonanceJetTagging::TAG::DPLUS:
116  kfparticle->setOutputName("KFParticleOutput_" + KFPARTICLE::DplusName + "_reconstruction.root");
117  break;
118  case ResonanceJetTagging::TAG::LAMBDAC:
121  kfparticle->setOutputName("KFParticleOutput_" + KFPARTICLE::LambdacName + "_reconstruction.root");
122  break;
123  default:
124  std::cout<<"ERROR:decay parameters not set, ABORTING!";
126  break;
127  }
128 
136 
137 
138  //Track parameters
144 
145  //Vertex parameters
149 
150  //Parent param
152 
153  switch (tag) {
154  case ResonanceJetTagging::TAG::D0:
155  kfparticle->setMinimumMass(KFPARTICLE::D0MassRange.first);
156  kfparticle->setMaximumMass(KFPARTICLE::D0MassRange.second);
157  kfparticle->setMinDIRA(0.9); //AuAu 0.98 An 0.98
158  kfparticle->setMotherIPchi2(3);
159  kfparticle->setFlightDistancechi2(0);
160  // kfparticle->setNumberOfTracks(2);
161  kfparticle->setMaximumDaughterDCA(KFParticleBaseCut::maxTrackTrackDCA); //AuAu 0.005 An 0.03
162  break;
163  case ResonanceJetTagging::TAG::D0TOK3PI:
164  kfparticle->setMinimumMass(KFPARTICLE::D0MassRange.first);
165  kfparticle->setMaximumMass(KFPARTICLE::D0MassRange.second);
166  kfparticle->setMinDIRA(0.95);
167  kfparticle->setMotherIPchi2(15);
168  kfparticle->setFlightDistancechi2(0);
169  // kfparticle->setNumberOfTracks(4);
171  break;
172  case ResonanceJetTagging::TAG::DPLUS:
173  kfparticle->setMinimumMass(KFPARTICLE::DplusMassRange.first);
174  kfparticle->setMaximumMass(KFPARTICLE::DplusMassRange.second);
175  std::cout<<"ERROR: TAG::DPLUS decay parameters not set, ABORTING!";
177  break;
178  case ResonanceJetTagging::TAG::LAMBDAC:
179  kfparticle->setMinimumMass(KFPARTICLE::LambdacMassRange.first);
180  kfparticle->setMaximumMass(KFPARTICLE::LambdacMassRange.second);
181  std::cout<<"ERROR: TAG::Lambdac decay parameters not set, ABORTING!";
183  break;
184  default:
185  std::cout<<"ERROR:decay parameters not set, ABORTING!";
187  break;
188  }
189 
190  se->registerSubsystem(kfparticle);
191 
192  //KFPARTICLE::runD0Reco = true;
193 
194  return 0;
195 }
196 } // namespace HFjets
197