Belle II Software development
SVDdEdxValidationCollectorModule.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <svd/modules/svddEdxValidationCollector/SVDdEdxValidationCollectorModule.h>
9
10#include <analysis/dataobjects/ParticleList.h>
11#include <analysis/variables/Variables.h>
12#include <analysis/variables/PIDVariables.h>
13#include <analysis/VariableManager/Manager.h>
14#include <analysis/VariableManager/Utility.h>
15#include <reconstruction/dataobjects/VXDDedxTrack.h>
16#include <mdst/dataobjects/Track.h>
17
18#include <TTree.h>
19
20using namespace std;
21using namespace Belle2;
22using namespace Belle2::Variable;
23
24//-----------------------------------------------------------------
25// Register the Module
26//-----------------------------------------------------------------
27REG_MODULE(SVDdEdxValidationCollector);
28
29//-----------------------------------------------------------------
30// Implementation
31//-----------------------------------------------------------------
32
34{
35 // Set module properties
36
37 setDescription("Collector module used to create the ROOT ntuples used to produce dE/dx calibration payloads");
39
40 addParam("LambdaListName", m_LambdaListName, "Name of the Lambda particle list", std::string("Lambda0:cut"));
41 addParam("DstarListName", m_DstarListName, "Name of the Dstar particle list", std::string("D*+:cut"));
42 addParam("GammaListName", m_GammaListName, "Name of the Gamma particle list", std::string("gamma:cut"));
43}
44
46{
47 B2INFO("Initialisation of the trees");
48 std::string objectNameLambda = "Lambda";
49 std::string objectNameDstar = "Dstar";
50 std::string objectNameGamma = "Gamma";
51 // Data object creation --------------------------------------------------
52 TTree* LambdaTree = new TTree(objectNameLambda.c_str(), "");
53 TTree* DstarTree = new TTree(objectNameDstar.c_str(), "");
54 TTree* GammaTree = new TTree(objectNameGamma.c_str(), "");
55
56 // Event info for all trees
57 LambdaTree->Branch<int>("event", &m_evt);
58 LambdaTree->Branch<int>("exp", &m_exp);
59 LambdaTree->Branch<int>("run", &m_run);
60 LambdaTree->Branch<double>("time", &m_time);
61
62 DstarTree->Branch<int>("event", &m_evt);
63 DstarTree->Branch<int>("exp", &m_exp);
64 DstarTree->Branch<int>("run", &m_run);
65 DstarTree->Branch<double>("time", &m_time);
66
67 GammaTree->Branch<int>("event", &m_evt);
68 GammaTree->Branch<int>("exp", &m_exp);
69 GammaTree->Branch<int>("run", &m_run);
70 GammaTree->Branch<double>("time", &m_time);
71
72 // Specific decay info for all trees
73 LambdaTree->Branch<double>("InvM", &m_InvMLambda);
74 LambdaTree->Branch<double>("ProtonMomentum", &m_protonp);
75 LambdaTree->Branch<double>("ProtonSVDdEdx", &m_protonSVDdEdx);
76
77 DstarTree->Branch<double>("InvM", &m_InvMDstar);
78 DstarTree->Branch<double>("D0InvM", &m_InvMD0);
79 DstarTree->Branch<double>("deltaM", &m_DeltaM);
80 DstarTree->Branch<double>("KaonMomentum", &m_kaonp);
81 DstarTree->Branch<double>("KaonSVDdEdx", &m_kaonSVDdEdx);
82 DstarTree->Branch<double>("PionDMomentum", &m_pionDp);
83 DstarTree->Branch<double>("PionDSVDdEdx", &m_pionDSVDdEdx);
84 DstarTree->Branch<double>("SlowPionMomentum", &m_slowPionp);
85 DstarTree->Branch<double>("SlowPionSVDdEdx", &m_slowPionSVDdEdx);
86
87 GammaTree->Branch<double>("InvM", &m_InvMGamma);
88 GammaTree->Branch<double>("FirstElectronMomentum", &m_firstElectronp);
89 GammaTree->Branch<double>("FirstElectronSVDdEdx", &m_firstElectronSVDdEdx);
90 GammaTree->Branch<double>("SecondElectronMomentum", &m_secondElectronp);
91 GammaTree->Branch<double>("SecondElectronSVDdEdx", &m_secondElectronSVDdEdx);
92
93 // Add a plethora of potentially useful PID variables
94 LambdaTree->Branch<double>("ProtonElectronIDALL", &m_protonElectronIDALL);
95 LambdaTree->Branch<double>("ProtonPionIDALL", &m_protonPionIDALL);
96 LambdaTree->Branch<double>("ProtonKaonIDALL", &m_protonKaonIDALL);
97 LambdaTree->Branch<double>("ProtonProtonIDALL", &m_protonProtonIDALL);
98 LambdaTree->Branch<double>("ProtonElectronIDnoSVD", &m_protonElectronIDnoSVD);
99 LambdaTree->Branch<double>("ProtonPionIDnoSVD", &m_protonPionIDnoSVD);
100 LambdaTree->Branch<double>("ProtonKaonIDnoSVD", &m_protonKaonIDnoSVD);
101 LambdaTree->Branch<double>("ProtonProtonIDnoSVD", &m_protonProtonIDnoSVD);
102 LambdaTree->Branch<double>("ProtonElectronIDSVDonly", &m_protonElectronIDSVDonly);
103 LambdaTree->Branch<double>("ProtonPionIDSVDonly", &m_protonPionIDSVDonly);
104 LambdaTree->Branch<double>("ProtonKaonIDSVDonly", &m_protonKaonIDSVDonly);
105 LambdaTree->Branch<double>("ProtonProtonIDSVDonly", &m_protonProtonIDSVDonly);
106
107 LambdaTree->Branch<double>("ProtonBinaryProtonKaonIDALL", &m_protonBinaryProtonKaonIDALL);
108 LambdaTree->Branch<double>("ProtonBinaryProtonPionIDALL", &m_protonBinaryProtonPionIDALL);
109 LambdaTree->Branch<double>("ProtonBinaryProtonElectronIDALL", &m_protonBinaryProtonElectronIDALL);
110 LambdaTree->Branch<double>("ProtonBinaryProtonKaonIDnoSVD", &m_protonBinaryProtonKaonIDnoSVD);
111 LambdaTree->Branch<double>("ProtonBinaryProtonPionIDnoSVD", &m_protonBinaryProtonPionIDnoSVD);
112 LambdaTree->Branch<double>("ProtonBinaryProtonElectronIDnoSVD", &m_protonBinaryProtonElectronIDnoSVD);
113 LambdaTree->Branch<double>("ProtonBinaryProtonKaonIDSVDonly", &m_protonBinaryProtonKaonIDSVDonly);
114 LambdaTree->Branch<double>("ProtonBinaryProtonPionIDSVDonly", &m_protonBinaryProtonPionIDSVDonly);
115 LambdaTree->Branch<double>("ProtonBinaryProtonElectronIDSVDonly", &m_protonBinaryProtonElectronIDSVDonly);
116
117 LambdaTree->Branch<double>("ProtonBinaryKaonProtonIDALL", &m_protonBinaryKaonProtonIDALL);
118 LambdaTree->Branch<double>("ProtonBinaryPionProtonIDALL", &m_protonBinaryPionProtonIDALL);
119 LambdaTree->Branch<double>("ProtonBinaryElectronProtonIDALL", &m_protonBinaryElectronProtonIDALL);
120 LambdaTree->Branch<double>("ProtonBinaryKaonProtonIDnoSVD", &m_protonBinaryKaonProtonIDnoSVD);
121 LambdaTree->Branch<double>("ProtonBinaryPionProtonIDnoSVD", &m_protonBinaryPionProtonIDnoSVD);
122 LambdaTree->Branch<double>("ProtonBinaryElectronProtonIDnoSVD", &m_protonBinaryElectronProtonIDnoSVD);
123 LambdaTree->Branch<double>("ProtonBinaryKaonProtonIDSVDonly", &m_protonBinaryKaonProtonIDSVDonly);
124 LambdaTree->Branch<double>("ProtonBinaryPionProtonIDSVDonly", &m_protonBinaryPionProtonIDSVDonly);
125 LambdaTree->Branch<double>("ProtonBinaryElectronProtonIDSVDonly", &m_protonBinaryElectronProtonIDSVDonly);
126
127 DstarTree->Branch<double>("KaonElectronIDALL", &m_kaonElectronIDALL);
128 DstarTree->Branch<double>("KaonPionIDALL", &m_kaonPionIDALL);
129 DstarTree->Branch<double>("KaonKaonIDALL", &m_kaonKaonIDALL);
130 DstarTree->Branch<double>("KaonProtonIDALL", &m_kaonProtonIDALL);
131 DstarTree->Branch<double>("KaonElectronIDnoSVD", &m_kaonElectronIDnoSVD);
132 DstarTree->Branch<double>("KaonPionIDnoSVD", &m_kaonPionIDnoSVD);
133 DstarTree->Branch<double>("KaonKaonIDnoSVD", &m_kaonKaonIDnoSVD);
134 DstarTree->Branch<double>("KaonProtonIDnoSVD", &m_kaonProtonIDnoSVD);
135 DstarTree->Branch<double>("KaonElectronIDSVDonly", &m_kaonElectronIDSVDonly);
136 DstarTree->Branch<double>("KaonPionIDSVDonly", &m_kaonPionIDSVDonly);
137 DstarTree->Branch<double>("KaonKaonIDSVDonly", &m_kaonKaonIDSVDonly);
138 DstarTree->Branch<double>("KaonProtonIDSVDonly", &m_kaonProtonIDSVDonly);
139
140 DstarTree->Branch<double>("KaonBinaryKaonProtonIDALL", &m_kaonBinaryKaonProtonIDALL);
141 DstarTree->Branch<double>("KaonBinaryKaonPionIDALL", &m_kaonBinaryKaonPionIDALL);
142 DstarTree->Branch<double>("KaonBinaryKaonElectronIDALL", &m_kaonBinaryKaonElectronIDALL);
143 DstarTree->Branch<double>("KaonBinaryKaonProtonIDnoSVD", &m_kaonBinaryKaonProtonIDnoSVD);
144 DstarTree->Branch<double>("KaonBinaryKaonPionIDnoSVD", &m_kaonBinaryKaonPionIDnoSVD);
145 DstarTree->Branch<double>("KaonBinaryKaonElectronIDnoSVD", &m_kaonBinaryKaonElectronIDnoSVD);
146 DstarTree->Branch<double>("KaonBinaryKaonProtonIDSVDonly", &m_kaonBinaryKaonProtonIDSVDonly);
147 DstarTree->Branch<double>("KaonBinaryKaonPionIDSVDonly", &m_kaonBinaryKaonPionIDSVDonly);
148 DstarTree->Branch<double>("KaonBinaryKaonElectronIDSVDonly", &m_kaonBinaryKaonElectronIDSVDonly);
149
150 DstarTree->Branch<double>("KaonBinaryProtonKaonIDALL", &m_kaonBinaryProtonKaonIDALL);
151 DstarTree->Branch<double>("KaonBinaryPionKaonIDALL", &m_kaonBinaryPionKaonIDALL);
152 DstarTree->Branch<double>("KaonBinaryElectronKaonIDALL", &m_kaonBinaryElectronKaonIDALL);
153 DstarTree->Branch<double>("KaonBinaryProtonKaonIDnoSVD", &m_kaonBinaryProtonKaonIDnoSVD);
154 DstarTree->Branch<double>("KaonBinaryPionKaonIDnoSVD", &m_kaonBinaryPionKaonIDnoSVD);
155 DstarTree->Branch<double>("KaonBinaryElectronKaonIDnoSVD", &m_kaonBinaryElectronKaonIDnoSVD);
156 DstarTree->Branch<double>("KaonBinaryProtonKaonIDSVDonly", &m_kaonBinaryProtonKaonIDSVDonly);
157 DstarTree->Branch<double>("KaonBinaryPionKaonIDSVDonly", &m_kaonBinaryPionKaonIDSVDonly);
158 DstarTree->Branch<double>("KaonBinaryElectronKaonIDSVDonly", &m_kaonBinaryElectronKaonIDSVDonly);
159
160 DstarTree->Branch<double>("PionDElectronIDALL", &m_pionDElectronIDALL);
161 DstarTree->Branch<double>("PionDPionIDALL", &m_pionDPionIDALL);
162 DstarTree->Branch<double>("PionDKaonIDALL", &m_pionDKaonIDALL);
163 DstarTree->Branch<double>("PionDProtonIDALL", &m_pionDProtonIDALL);
164 DstarTree->Branch<double>("PionDElectronIDnoSVD", &m_pionDElectronIDnoSVD);
165 DstarTree->Branch<double>("PionDPionIDnoSVD", &m_pionDPionIDnoSVD);
166 DstarTree->Branch<double>("PionDKaonIDnoSVD", &m_pionDKaonIDnoSVD);
167 DstarTree->Branch<double>("PionDProtonIDnoSVD", &m_pionDProtonIDnoSVD);
168 DstarTree->Branch<double>("PionDElectronIDSVDonly", &m_pionDElectronIDSVDonly);
169 DstarTree->Branch<double>("PionDPionIDSVDonly", &m_pionDPionIDSVDonly);
170 DstarTree->Branch<double>("PionDKaonIDSVDonly", &m_pionDKaonIDSVDonly);
171 DstarTree->Branch<double>("PionDProtonIDSVDonly", &m_pionDProtonIDSVDonly);
172
173 DstarTree->Branch<double>("PionDBinaryPionProtonIDALL", &m_pionDBinaryPionProtonIDALL);
174 DstarTree->Branch<double>("PionDBinaryPionKaonIDALL", &m_pionDBinaryPionKaonIDALL);
175 DstarTree->Branch<double>("PionDBinaryPionElectronIDALL", &m_pionDBinaryPionElectronIDALL);
176 DstarTree->Branch<double>("PionDBinaryPionProtonIDnoSVD", &m_pionDBinaryPionProtonIDnoSVD);
177 DstarTree->Branch<double>("PionDBinaryPionKaonIDnoSVD", &m_pionDBinaryPionKaonIDnoSVD);
178 DstarTree->Branch<double>("PionDBinaryPionElectronIDnoSVD", &m_pionDBinaryPionElectronIDnoSVD);
179 DstarTree->Branch<double>("PionDBinaryPionProtonIDSVDonly", &m_pionDBinaryPionProtonIDSVDonly);
180 DstarTree->Branch<double>("PionDBinaryPionKaonIDSVDonly", &m_pionDBinaryPionKaonIDSVDonly);
181 DstarTree->Branch<double>("PionDBinaryPionElectronIDSVDonly", &m_pionDBinaryPionElectronIDSVDonly);
182
183 DstarTree->Branch<double>("PionDBinaryProtonPionIDALL", &m_pionDBinaryProtonPionIDALL);
184 DstarTree->Branch<double>("PionDBinaryKaonPionIDALL", &m_pionDBinaryKaonPionIDALL);
185 DstarTree->Branch<double>("PionDBinaryElectronPionIDALL", &m_pionDBinaryElectronPionIDALL);
186 DstarTree->Branch<double>("PionDBinaryProtonPionIDnoSVD", &m_pionDBinaryProtonPionIDnoSVD);
187 DstarTree->Branch<double>("PionDBinaryKaonPionIDnoSVD", &m_pionDBinaryKaonPionIDnoSVD);
188 DstarTree->Branch<double>("PionDBinaryElectronPionIDnoSVD", &m_pionDBinaryElectronPionIDnoSVD);
189 DstarTree->Branch<double>("PionDBinaryProtonPionIDSVDonly", &m_pionDBinaryProtonPionIDSVDonly);
190 DstarTree->Branch<double>("PionDBinaryKaonPionIDSVDonly", &m_pionDBinaryKaonPionIDSVDonly);
191 DstarTree->Branch<double>("PionDBinaryElectronPionIDSVDonly", &m_pionDBinaryElectronPionIDSVDonly);
192
193 DstarTree->Branch<double>("SlowPionElectronIDALL", &m_slowPionElectronIDALL);
194 DstarTree->Branch<double>("SlowPionPionIDALL", &m_slowPionPionIDALL);
195 DstarTree->Branch<double>("SlowPionKaonIDALL", &m_slowPionKaonIDALL);
196 DstarTree->Branch<double>("SlowPionProtonIDALL", &m_slowPionProtonIDALL);
197 DstarTree->Branch<double>("SlowPionElectronIDnoSVD", &m_slowPionElectronIDnoSVD);
198 DstarTree->Branch<double>("SlowPionPionIDnoSVD", &m_slowPionPionIDnoSVD);
199 DstarTree->Branch<double>("SlowPionKaonIDnoSVD", &m_slowPionKaonIDnoSVD);
200 DstarTree->Branch<double>("SlowPionProtonIDnoSVD", &m_slowPionProtonIDnoSVD);
201 DstarTree->Branch<double>("SlowPionElectronIDSVDonly", &m_slowPionElectronIDSVDonly);
202 DstarTree->Branch<double>("SlowPionPionIDSVDonly", &m_slowPionPionIDSVDonly);
203 DstarTree->Branch<double>("SlowPionKaonIDSVDonly", &m_slowPionKaonIDSVDonly);
204 DstarTree->Branch<double>("SlowPionProtonIDSVDonly", &m_slowPionProtonIDSVDonly);
205
206 DstarTree->Branch<double>("SlowPionBinaryPionProtonIDALL", &m_slowPionBinaryPionProtonIDALL);
207 DstarTree->Branch<double>("SlowPionBinaryPionKaonIDALL", &m_slowPionBinaryPionKaonIDALL);
208 DstarTree->Branch<double>("SlowPionBinaryPionElectronIDALL", &m_slowPionBinaryPionElectronIDALL);
209 DstarTree->Branch<double>("SlowPionBinaryPionProtonIDnoSVD", &m_slowPionBinaryPionProtonIDnoSVD);
210 DstarTree->Branch<double>("SlowPionBinaryPionKaonIDnoSVD", &m_slowPionBinaryPionKaonIDnoSVD);
211 DstarTree->Branch<double>("SlowPionBinaryPionElectronIDnoSVD", &m_slowPionBinaryPionElectronIDnoSVD);
212 DstarTree->Branch<double>("SlowPionBinaryPionProtonIDSVDonly", &m_slowPionBinaryPionProtonIDSVDonly);
213 DstarTree->Branch<double>("SlowPionBinaryPionKaonIDSVDonly", &m_slowPionBinaryPionKaonIDSVDonly);
214 DstarTree->Branch<double>("SlowPionBinaryPionElectronIDSVDonly", &m_slowPionBinaryPionElectronIDSVDonly);
215
216 DstarTree->Branch<double>("SlowPionBinaryProtonPionIDALL", &m_slowPionBinaryProtonPionIDALL);
217 DstarTree->Branch<double>("SlowPionBinaryKaonPionIDALL", &m_slowPionBinaryKaonPionIDALL);
218 DstarTree->Branch<double>("SlowPionBinaryElectronPionIDALL", &m_slowPionBinaryElectronPionIDALL);
219 DstarTree->Branch<double>("SlowPionBinaryProtonPionIDnoSVD", &m_slowPionBinaryProtonPionIDnoSVD);
220 DstarTree->Branch<double>("SlowPionBinaryKaonPionIDnoSVD", &m_slowPionBinaryKaonPionIDnoSVD);
221 DstarTree->Branch<double>("SlowPionBinaryElectronPionIDnoSVD", &m_slowPionBinaryElectronPionIDnoSVD);
222 DstarTree->Branch<double>("SlowPionBinaryProtonPionIDSVDonly", &m_slowPionBinaryProtonPionIDSVDonly);
223 DstarTree->Branch<double>("SlowPionBinaryKaonPionIDSVDonly", &m_slowPionBinaryKaonPionIDSVDonly);
224 DstarTree->Branch<double>("SlowPionBinaryElectronPionIDSVDonly", &m_slowPionBinaryElectronPionIDSVDonly);
225
226 GammaTree->Branch<double>("FirstElectronElectronIDALL", &m_firstElectronElectronIDALL);
227 GammaTree->Branch<double>("FirstElectronPionIDALL", &m_firstElectronPionIDALL);
228 GammaTree->Branch<double>("FirstElectronKaonIDALL", &m_firstElectronKaonIDALL);
229 GammaTree->Branch<double>("FirstElectronProtonIDALL", &m_firstElectronProtonIDALL);
230 GammaTree->Branch<double>("FirstElectronElectronIDnoSVD", &m_firstElectronElectronIDnoSVD);
231 GammaTree->Branch<double>("FirstElectronPionIDnoSVD", &m_firstElectronPionIDnoSVD);
232 GammaTree->Branch<double>("FirstElectronKaonIDnoSVD", &m_firstElectronKaonIDnoSVD);
233 GammaTree->Branch<double>("FirstElectronProtonIDnoSVD", &m_firstElectronProtonIDnoSVD);
234 GammaTree->Branch<double>("FirstElectronElectronIDSVDonly", &m_firstElectronElectronIDSVDonly);
235 GammaTree->Branch<double>("FirstElectronPionIDSVDonly", &m_firstElectronPionIDSVDonly);
236 GammaTree->Branch<double>("FirstElectronKaonIDSVDonly", &m_firstElectronKaonIDSVDonly);
237 GammaTree->Branch<double>("FirstElectronProtonIDSVDonly", &m_firstElectronProtonIDSVDonly);
238
239 GammaTree->Branch<double>("FirstElectronBinaryElectronProtonIDALL", &m_firstElectronBinaryElectronProtonIDALL);
240 GammaTree->Branch<double>("FirstElectronBinaryElectronKaonIDALL", &m_firstElectronBinaryElectronKaonIDALL);
241 GammaTree->Branch<double>("FirstElectronBinaryElectronPionIDALL", &m_firstElectronBinaryElectronPionIDALL);
242 GammaTree->Branch<double>("FirstElectronBinaryElectronProtonIDnoSVD", &m_firstElectronBinaryElectronProtonIDnoSVD);
243 GammaTree->Branch<double>("FirstElectronBinaryElectronKaonIDnoSVD", &m_firstElectronBinaryElectronKaonIDnoSVD);
244 GammaTree->Branch<double>("FirstElectronBinaryElectronPionIDnoSVD", &m_firstElectronBinaryElectronPionIDnoSVD);
245 GammaTree->Branch<double>("FirstElectronBinaryElectronProtonIDSVDonly", &m_firstElectronBinaryElectronProtonIDSVDonly);
246 GammaTree->Branch<double>("FirstElectronBinaryElectronKaonIDSVDonly", &m_firstElectronBinaryElectronKaonIDSVDonly);
247 GammaTree->Branch<double>("FirstElectronBinaryElectronPionIDSVDonly", &m_firstElectronBinaryElectronPionIDSVDonly);
248
249 GammaTree->Branch<double>("FirstElectronBinaryProtonElectronIDALL", &m_firstElectronBinaryProtonElectronIDALL);
250 GammaTree->Branch<double>("FirstElectronBinaryKaonElectronIDALL", &m_firstElectronBinaryKaonElectronIDALL);
251 GammaTree->Branch<double>("FirstElectronBinaryPionElectronIDALL", &m_firstElectronBinaryPionElectronIDALL);
252 GammaTree->Branch<double>("FirstElectronBinaryProtonElectronIDnoSVD", &m_firstElectronBinaryProtonElectronIDnoSVD);
253 GammaTree->Branch<double>("FirstElectronBinaryKaonElectronIDnoSVD", &m_firstElectronBinaryKaonElectronIDnoSVD);
254 GammaTree->Branch<double>("FirstElectronBinaryPionElectronIDnoSVD", &m_firstElectronBinaryPionElectronIDnoSVD);
255 GammaTree->Branch<double>("FirstElectronBinaryProtonElectronIDSVDonly", &m_firstElectronBinaryProtonElectronIDSVDonly);
256 GammaTree->Branch<double>("FirstElectronBinaryKaonElectronIDSVDonly", &m_firstElectronBinaryKaonElectronIDSVDonly);
257 GammaTree->Branch<double>("FirstElectronBinaryPionElectronIDSVDonly", &m_firstElectronBinaryPionElectronIDSVDonly);
258
259 // We register the objects so that our framework knows about them.
260 // Don't try and hold onto the pointers or fill these objects directly
261 // Use the getObjectPtr functions to access collector objects
262 registerObject<TTree>(objectNameLambda, LambdaTree);
263 registerObject<TTree>(objectNameDstar, DstarTree);
264 registerObject<TTree>(objectNameGamma, GammaTree);
265}
266
267VXDDedxTrack const* getSVDDedxFromParticle(Particle const* particle)
268{
269 const Track* track = particle->getTrack();
270 if (!track) {
271 return nullptr;
272 }
273
274 const VXDDedxTrack* dedxTrack = track->getRelatedTo<VXDDedxTrack>();
275 if (!dedxTrack) {
276 return nullptr;
277 }
278 return dedxTrack;
279}
280
282{
283
284 m_evt = m_emd->getEvent();
285 m_run = m_emd->getRun();
286 m_exp = m_emd->getExperiment();
287 m_time = m_emd->getTime() / 1e9 / 3600.; // from ns to hours
288
292
293
294 if (!LambdaParticles.isValid() && !DstarParticles.isValid() && !GammaParticles.isValid())
295 return;
296
297 static Manager::FunctionPtr electronPIDSVDOnlyFunction = pidProbabilityExpert({"11", "SVD"});
298 static Manager::FunctionPtr pionPIDSVDOnlyFunction = pidProbabilityExpert({"211", "SVD"});
299 static Manager::FunctionPtr kaonPIDSVDOnlyFunction = pidProbabilityExpert({"321", "SVD"});
300 static Manager::FunctionPtr protonPIDSVDOnlyFunction = pidProbabilityExpert({"2212", "SVD"});
301 static Manager::FunctionPtr binaryKaonProtonPIDSVDOnlyFunction = pidPairProbabilityExpert({"321", "2212", "SVD"});
302 static Manager::FunctionPtr binaryPionProtonPIDSVDOnlyFunction = pidPairProbabilityExpert({"211", "2212", "SVD"});
303 static Manager::FunctionPtr binaryElectronProtonPIDSVDOnlyFunction = pidPairProbabilityExpert({"11", "2212", "SVD"});
304 static Manager::FunctionPtr binaryProtonKaonPIDSVDOnlyFunction = pidPairProbabilityExpert({"2212", "321", "SVD"});
305 static Manager::FunctionPtr binaryProtonPionPIDSVDOnlyFunction = pidPairProbabilityExpert({"2212", "211", "SVD"});
306 static Manager::FunctionPtr binaryProtonElectronPIDSVDOnlyFunction = pidPairProbabilityExpert({"2212", "11", "SVD"});
307 static Manager::FunctionPtr binaryKaonElectronPIDSVDOnlyFunction = pidPairProbabilityExpert({"321", "11", "SVD"});
308 static Manager::FunctionPtr binaryElectronKaonPIDSVDOnlyFunction = pidPairProbabilityExpert({"11", "321", "SVD"});
309 static Manager::FunctionPtr binaryPionElectronPIDSVDOnlyFunction = pidPairProbabilityExpert({"211", "11", "SVD"});
310 static Manager::FunctionPtr binaryElectronPionPIDSVDOnlyFunction = pidPairProbabilityExpert({"11", "211", "SVD"});
311
312 if (LambdaParticles->getListSize() > 0) {
313 for (unsigned int iParticle = 0; iParticle < LambdaParticles->getListSize(); ++iParticle) {
314
315 std::vector<int> indicesLambda = LambdaParticles->getParticle(0)->getDaughterIndices();
316 if (indicesLambda.size() != 2)
317 return;
318 const Particle* partLambda = LambdaParticles->getParticle(0);
319 const Particle* partPFromLambda = LambdaParticles->getParticle(0)->getDaughter(0);
320 // const Particle* partPiFromLambda = LambdaParticles->getParticle(0)->getDaughter(1);
321
322 const VXDDedxTrack* dedxTrackPFromLambda = getSVDDedxFromParticle(partPFromLambda);
323 // const VXDDedxTrack* dedxTrackPiFromLambda = getSVDDedxFromParticle(partPiFromLambda);
324
325 m_InvMLambda = partLambda->getMass();
326 m_protonp = partPFromLambda->getMomentumMagnitude();
327
328 if (!dedxTrackPFromLambda) {
329 m_protonSVDdEdx = -999.0;
330 } else {
331 m_protonSVDdEdx = dedxTrackPFromLambda->getDedx(Const::EDetector::SVD);
332 }
333
334
335
336 m_protonElectronIDALL = Variable::electronID(partPFromLambda);
337 m_protonPionIDALL = Variable::pionID(partPFromLambda);
338 m_protonKaonIDALL = Variable::kaonID(partPFromLambda);
339 m_protonProtonIDALL = Variable::protonID(partPFromLambda);
340 m_protonElectronIDnoSVD = Variable::electronID_noSVD(partPFromLambda);
341 m_protonPionIDnoSVD = Variable::pionID_noSVD(partPFromLambda);
342 m_protonKaonIDnoSVD = Variable::kaonID_noSVD(partPFromLambda);
343 m_protonProtonIDnoSVD = Variable::protonID_noSVD(partPFromLambda);
344 m_protonElectronIDSVDonly = std::get<double>(electronPIDSVDOnlyFunction(partPFromLambda));
345 m_protonPionIDSVDonly = std::get<double>(pionPIDSVDOnlyFunction(partPFromLambda));
346 m_protonKaonIDSVDonly = std::get<double>(kaonPIDSVDOnlyFunction(partPFromLambda));
347 m_protonProtonIDSVDonly = std::get<double>(protonPIDSVDOnlyFunction(partPFromLambda));
348
349 m_protonBinaryProtonKaonIDALL = Variable::binaryPID(partPFromLambda, {2212., 321.});
350 m_protonBinaryProtonPionIDALL = Variable::binaryPID(partPFromLambda, {2212., 211.});
351 m_protonBinaryProtonElectronIDALL = Variable::binaryPID(partPFromLambda, {2212., 11.});
352 m_protonBinaryProtonKaonIDnoSVD = Variable::binaryPID_noSVD(partPFromLambda, {2212., 321.});
353 m_protonBinaryProtonPionIDnoSVD = Variable::binaryPID_noSVD(partPFromLambda, {2212., 211.});
354 m_protonBinaryProtonElectronIDnoSVD = Variable::binaryPID_noSVD(partPFromLambda, {2212., 11.});
355 m_protonBinaryProtonKaonIDSVDonly = std::get<double>(binaryProtonKaonPIDSVDOnlyFunction(partPFromLambda));
356 m_protonBinaryProtonPionIDSVDonly = std::get<double>(binaryProtonPionPIDSVDOnlyFunction(partPFromLambda));
357 m_protonBinaryProtonElectronIDSVDonly = std::get<double>(binaryProtonElectronPIDSVDOnlyFunction(partPFromLambda));
358
359 m_protonBinaryKaonProtonIDALL = Variable::binaryPID(partPFromLambda, {321., 2212.});
360 m_protonBinaryPionProtonIDALL = Variable::binaryPID(partPFromLambda, {211., 2212.});
361 m_protonBinaryElectronProtonIDALL = Variable::binaryPID(partPFromLambda, {11., 2212.});
362 m_protonBinaryKaonProtonIDnoSVD = Variable::binaryPID_noSVD(partPFromLambda, {321., 2212.});
363 m_protonBinaryPionProtonIDnoSVD = Variable::binaryPID_noSVD(partPFromLambda, {211., 2212.});
364 m_protonBinaryElectronProtonIDnoSVD = Variable::binaryPID_noSVD(partPFromLambda, {11., 2212.});
365 m_protonBinaryKaonProtonIDSVDonly = std::get<double>(binaryKaonProtonPIDSVDOnlyFunction(partPFromLambda));
366 m_protonBinaryPionProtonIDSVDonly = std::get<double>(binaryPionProtonPIDSVDOnlyFunction(partPFromLambda));
367 m_protonBinaryElectronProtonIDSVDonly = std::get<double>(binaryElectronProtonPIDSVDOnlyFunction(partPFromLambda));
368
369 getObjectPtr<TTree>("Lambda")->Fill();
370 }
371 }
372
373 if (DstarParticles->getListSize() > 0) {
374 for (unsigned int iParticle = 0; iParticle < DstarParticles->getListSize(); ++iParticle) {
375
376 std::vector<int> indicesDstar = DstarParticles->getParticle(0)->getDaughterIndices();
377 if (indicesDstar.size() != 2)
378 return;
379
380 const Particle* partDstar = DstarParticles->getParticle(0);
381 const Particle* partD0 = DstarParticles->getParticle(0)->getDaughter(0);
382 const Particle* partPiS = DstarParticles->getParticle(0)->getDaughter(1);
383 const Particle* partKFromD = DstarParticles->getParticle(0)->getDaughter(0)->getDaughter(0);
384 const Particle* partPiFromD = DstarParticles->getParticle(0)->getDaughter(0)->getDaughter(1);
385
386 const VXDDedxTrack* dedxTrackPiS = getSVDDedxFromParticle(partPiS);
387 const VXDDedxTrack* dedxTrackKFromD = getSVDDedxFromParticle(partKFromD);
388 const VXDDedxTrack* dedxTrackPiFromD = getSVDDedxFromParticle(partPiFromD);
389
390 m_InvMDstar = partDstar->getMass();
391 m_InvMD0 = partD0->getMass();
393
394 m_kaonp = partKFromD->getMomentumMagnitude();
395 if (!dedxTrackKFromD) {
396 m_kaonSVDdEdx = -999.0;
397 } else {
398 m_kaonSVDdEdx = dedxTrackKFromD->getDedx(Const::EDetector::SVD);
399 }
400
401 m_pionDp = partPiFromD->getMomentumMagnitude();
402 if (!dedxTrackPiFromD) {
403 m_pionDSVDdEdx = -999.0;
404 } else {
405 m_pionDSVDdEdx = dedxTrackPiFromD->getDedx(Const::EDetector::SVD);
406 }
407
409 if (!dedxTrackPiS) {
410 m_slowPionSVDdEdx = -999.0;
411 } else {
412 m_slowPionSVDdEdx = dedxTrackPiS->getDedx(Const::EDetector::SVD);
413 }
414
415 static Manager::FunctionPtr binaryKaonPionPIDSVDOnlyFunction = pidPairProbabilityExpert({"321", "211", "SVD"});
416 static Manager::FunctionPtr binaryPionKaonPIDSVDOnlyFunction = pidPairProbabilityExpert({"211", "321", "SVD"});
417
418 m_kaonElectronIDALL = Variable::electronID(partKFromD);
419 m_kaonPionIDALL = Variable::pionID(partKFromD);
420 m_kaonKaonIDALL = Variable::kaonID(partKFromD);
421 m_kaonProtonIDALL = Variable::protonID(partKFromD);
422 m_kaonElectronIDnoSVD = Variable::electronID(partKFromD);
423 m_kaonPionIDnoSVD = Variable::pionID_noSVD(partKFromD);
424 m_kaonKaonIDnoSVD = Variable::kaonID_noSVD(partKFromD);
425 m_kaonProtonIDnoSVD = Variable::protonID_noSVD(partKFromD);
426 m_kaonElectronIDSVDonly = std::get<double>(electronPIDSVDOnlyFunction(partKFromD));
427 m_kaonPionIDSVDonly = std::get<double>(pionPIDSVDOnlyFunction(partKFromD));
428 m_kaonKaonIDSVDonly = std::get<double>(kaonPIDSVDOnlyFunction(partKFromD));
429 m_kaonProtonIDSVDonly = std::get<double>(protonPIDSVDOnlyFunction(partKFromD));
430
431 m_kaonBinaryKaonProtonIDALL = Variable::binaryPID(partKFromD, {321., 2212.});
432 m_kaonBinaryKaonPionIDALL = Variable::binaryPID(partKFromD, {321., 211.});
433 m_kaonBinaryKaonElectronIDALL = Variable::binaryPID(partKFromD, {321., 11.});
434 m_kaonBinaryKaonProtonIDnoSVD = Variable::binaryPID_noSVD(partKFromD, {321., 2212.});
435 m_kaonBinaryKaonPionIDnoSVD = Variable::binaryPID_noSVD(partKFromD, {321., 211.});
436 m_kaonBinaryKaonElectronIDnoSVD = Variable::binaryPID_noSVD(partKFromD, {321., 11.});
437 m_kaonBinaryKaonProtonIDSVDonly = std::get<double>(binaryKaonProtonPIDSVDOnlyFunction(partKFromD));
438
439 m_kaonBinaryKaonPionIDSVDonly = std::get<double>(binaryKaonPionPIDSVDOnlyFunction(partKFromD));
440 m_kaonBinaryKaonElectronIDSVDonly = std::get<double>(binaryKaonElectronPIDSVDOnlyFunction(partKFromD));
441
442 m_kaonBinaryProtonKaonIDALL = Variable::binaryPID(partKFromD, {2212., 321.});
443 m_kaonBinaryPionKaonIDALL = Variable::binaryPID(partKFromD, {211., 321.});
444 m_kaonBinaryElectronKaonIDALL = Variable::binaryPID(partKFromD, {11., 321.});
445 m_kaonBinaryProtonKaonIDnoSVD = Variable::binaryPID_noSVD(partKFromD, {2212., 321.});
446 m_kaonBinaryPionKaonIDnoSVD = Variable::binaryPID_noSVD(partKFromD, {211., 321.});
447 m_kaonBinaryElectronKaonIDnoSVD = Variable::binaryPID_noSVD(partKFromD, {11., 321.});
448 m_kaonBinaryProtonKaonIDSVDonly = std::get<double>(binaryProtonKaonPIDSVDOnlyFunction(partKFromD));
449 m_kaonBinaryPionKaonIDSVDonly = std::get<double>(binaryPionKaonPIDSVDOnlyFunction(partKFromD));
450 m_kaonBinaryElectronKaonIDSVDonly = std::get<double>(binaryElectronKaonPIDSVDOnlyFunction(partKFromD));
451
452
453 m_pionDElectronIDALL = Variable::electronID(partPiFromD);
454 m_pionDPionIDALL = Variable::pionID(partPiFromD);
455 m_pionDKaonIDALL = Variable::kaonID(partPiFromD);
456 m_pionDProtonIDALL = Variable::protonID(partPiFromD);
457 m_pionDElectronIDnoSVD = Variable::electronID_noSVD(partPiFromD);
458 m_pionDPionIDnoSVD = Variable::pionID_noSVD(partPiFromD);
459 m_pionDKaonIDnoSVD = Variable::kaonID_noSVD(partPiFromD);
460 m_pionDProtonIDnoSVD = Variable::protonID_noSVD(partPiFromD);
461 m_pionDElectronIDSVDonly = std::get<double>(electronPIDSVDOnlyFunction(partPiFromD));
462 m_pionDPionIDSVDonly = std::get<double>(pionPIDSVDOnlyFunction(partPiFromD));
463 m_pionDKaonIDSVDonly = std::get<double>(kaonPIDSVDOnlyFunction(partPiFromD));
464 m_pionDProtonIDSVDonly = std::get<double>(protonPIDSVDOnlyFunction(partPiFromD));
465
466 m_pionDBinaryPionProtonIDALL = Variable::binaryPID(partPiFromD, {211., 2212.});
467 m_pionDBinaryPionKaonIDALL = Variable::binaryPID(partPiFromD, {211., 321.});
468 m_pionDBinaryPionElectronIDALL = Variable::binaryPID(partPiFromD, {211., 11.});
469 m_pionDBinaryPionProtonIDnoSVD = Variable::binaryPID_noSVD(partPiFromD, {211., 2212});
470 m_pionDBinaryPionKaonIDnoSVD = Variable::binaryPID_noSVD(partPiFromD, {211., 321.});
471 m_pionDBinaryPionElectronIDnoSVD = Variable::binaryPID_noSVD(partPiFromD, {211., 11.});
472 m_pionDBinaryPionProtonIDSVDonly = std::get<double>(binaryPionProtonPIDSVDOnlyFunction(partPiFromD));
473 m_pionDBinaryPionKaonIDSVDonly = std::get<double>(binaryPionKaonPIDSVDOnlyFunction(partPiFromD));
474 m_pionDBinaryPionElectronIDSVDonly = std::get<double>(binaryPionElectronPIDSVDOnlyFunction(partPiFromD));
475
476 m_pionDBinaryProtonPionIDALL = Variable::binaryPID(partPiFromD, {2212., 211.});
477 m_pionDBinaryKaonPionIDALL = Variable::binaryPID(partPiFromD, {321., 211.});
478 m_pionDBinaryElectronPionIDALL = Variable::binaryPID(partPiFromD, {11., 211.});
479 m_pionDBinaryProtonPionIDnoSVD = Variable::binaryPID_noSVD(partPiFromD, {2212., 211.});
480 m_pionDBinaryKaonPionIDnoSVD = Variable::binaryPID_noSVD(partPiFromD, {321., 211.});
481 m_pionDBinaryElectronPionIDnoSVD = Variable::binaryPID_noSVD(partPiFromD, {11., 211.});
482 m_pionDBinaryProtonPionIDSVDonly = std::get<double>(binaryProtonPionPIDSVDOnlyFunction(partPiFromD));
483 m_pionDBinaryKaonPionIDSVDonly = std::get<double>(binaryKaonPionPIDSVDOnlyFunction(partPiFromD));
484 m_pionDBinaryElectronPionIDSVDonly = std::get<double>(binaryElectronPionPIDSVDOnlyFunction(partPiFromD));
485
486
487 m_slowPionElectronIDALL = Variable::electronID(partPiS);
488 m_slowPionPionIDALL = Variable::pionID(partPiS);
489 m_slowPionKaonIDALL = Variable::kaonID(partPiS);
490 m_slowPionProtonIDALL = Variable::protonID(partPiS);
491 m_slowPionElectronIDnoSVD = Variable::electronID_noSVD(partPiS);
492 m_slowPionPionIDnoSVD = Variable::pionID_noSVD(partPiS);
493 m_slowPionKaonIDnoSVD = Variable::kaonID_noSVD(partPiS);
494 m_slowPionProtonIDnoSVD = Variable::protonID_noSVD(partPiS);
495 m_slowPionElectronIDSVDonly = std::get<double>(electronPIDSVDOnlyFunction(partPiS));
496 m_slowPionPionIDSVDonly = std::get<double>(pionPIDSVDOnlyFunction(partPiS));
497 m_slowPionKaonIDSVDonly = std::get<double>(kaonPIDSVDOnlyFunction(partPiS));
498 m_slowPionProtonIDSVDonly = std::get<double>(protonPIDSVDOnlyFunction(partPiS));
499
500 m_slowPionBinaryPionProtonIDALL = Variable::binaryPID(partPiS, {211., 2212.});
501 m_slowPionBinaryPionKaonIDALL = Variable::binaryPID(partPiS, {211., 321.});
502 m_slowPionBinaryPionElectronIDALL = Variable::binaryPID(partPiS, {211., 11.});
503 m_slowPionBinaryPionProtonIDnoSVD = Variable::binaryPID_noSVD(partPiS, {211., 2212.});
504 m_slowPionBinaryPionKaonIDnoSVD = Variable::binaryPID_noSVD(partPiS, {211., 321.});
505 m_slowPionBinaryPionElectronIDnoSVD = Variable::binaryPID_noSVD(partPiS, {211., 11.});
506 m_slowPionBinaryPionProtonIDSVDonly = std::get<double>(binaryPionProtonPIDSVDOnlyFunction(partPiS));
507 m_slowPionBinaryPionKaonIDSVDonly = std::get<double>(binaryPionKaonPIDSVDOnlyFunction(partPiS));
508 m_slowPionBinaryPionElectronIDSVDonly = std::get<double>(binaryPionElectronPIDSVDOnlyFunction(partPiS));
509
510 m_slowPionBinaryProtonPionIDALL = Variable::binaryPID(partPiS, {2212., 211.});
511 m_slowPionBinaryKaonPionIDALL = Variable::binaryPID(partPiS, {321., 211.});
512 m_slowPionBinaryElectronPionIDALL = Variable::binaryPID(partPiS, {11., 211.});
513 m_slowPionBinaryProtonPionIDnoSVD = Variable::binaryPID_noSVD(partPiS, {2212., 211.});
514 m_slowPionBinaryKaonPionIDnoSVD = Variable::binaryPID_noSVD(partPiS, {321., 211.});
515 m_slowPionBinaryElectronPionIDnoSVD = Variable::binaryPID_noSVD(partPiS, {11., 211.});
516 m_slowPionBinaryProtonPionIDSVDonly = std::get<double>(binaryProtonPionPIDSVDOnlyFunction(partPiS));
517 m_slowPionBinaryKaonPionIDSVDonly = std::get<double>(binaryKaonPionPIDSVDOnlyFunction(partPiS));
518 m_slowPionBinaryElectronPionIDSVDonly = std::get<double>(binaryElectronPionPIDSVDOnlyFunction(partPiS));
519
520 getObjectPtr<TTree>("Dstar")->Fill();
521 }
522 }
523
524 if (GammaParticles->getListSize() > 0) {
525 for (unsigned int iParticle = 0; iParticle < GammaParticles->getListSize(); ++iParticle) {
526 std::vector<int> indicesGamma = GammaParticles->getParticle(0)->getDaughterIndices();
527 if (indicesGamma.size() != 2)
528 return;
529
530 const Particle* partGamma = GammaParticles->getParticle(0);
531 const Particle* partE1FromGamma = GammaParticles->getParticle(0)->getDaughter(0);
532 const Particle* partE2FromGamma = GammaParticles->getParticle(0)->getDaughter(1);
533
534 const VXDDedxTrack* dedxTrackE1FromGamma = getSVDDedxFromParticle(partE1FromGamma);
535 const VXDDedxTrack* dedxTrackE2FromGamma = getSVDDedxFromParticle(partE2FromGamma);
536
537 m_InvMGamma = partGamma->getMass();
538
539 m_firstElectronp = partE1FromGamma->getMomentumMagnitude();
540 if (!dedxTrackE1FromGamma) {
541 m_firstElectronSVDdEdx = -999.0;
542 } else {
543 m_firstElectronSVDdEdx = dedxTrackE1FromGamma->getDedx(Const::EDetector::SVD);
544 }
545
546 m_secondElectronp = partE2FromGamma->getMomentumMagnitude();
547 if (!dedxTrackE2FromGamma) {
549 } else {
550 m_secondElectronSVDdEdx = dedxTrackE2FromGamma->getDedx(Const::EDetector::SVD);
551 }
552
553 m_firstElectronElectronIDALL = Variable::electronID(partE1FromGamma);
554 m_firstElectronPionIDALL = Variable::pionID(partE1FromGamma);
555 m_firstElectronKaonIDALL = Variable::kaonID(partE1FromGamma);
556 m_firstElectronProtonIDALL = Variable::protonID(partE1FromGamma);
557 m_firstElectronElectronIDnoSVD = Variable::electronID_noSVD(partE1FromGamma);
558 m_firstElectronPionIDnoSVD = Variable::pionID_noSVD(partE1FromGamma);
559 m_firstElectronKaonIDnoSVD = Variable::kaonID_noSVD(partE1FromGamma);
560 m_firstElectronProtonIDnoSVD = Variable::protonID_noSVD(partE1FromGamma);
561 m_firstElectronElectronIDSVDonly = std::get<double>(electronPIDSVDOnlyFunction(partE1FromGamma));
562 m_firstElectronPionIDSVDonly = std::get<double>(pionPIDSVDOnlyFunction(partE1FromGamma));
563 m_firstElectronKaonIDSVDonly = std::get<double>(kaonPIDSVDOnlyFunction(partE1FromGamma));
564 m_firstElectronProtonIDSVDonly = std::get<double>(protonPIDSVDOnlyFunction(partE1FromGamma));
565
566 m_firstElectronBinaryElectronProtonIDALL = Variable::binaryPID(partE1FromGamma, {11., 2212.});
567 m_firstElectronBinaryElectronKaonIDALL = Variable::binaryPID(partE1FromGamma, {11., 321.});
568 m_firstElectronBinaryElectronPionIDALL = Variable::binaryPID(partE1FromGamma, {11., 211.});
569 m_firstElectronBinaryElectronProtonIDnoSVD = Variable::binaryPID_noSVD(partE1FromGamma, {11., 2212.});
570 m_firstElectronBinaryElectronKaonIDnoSVD = Variable::binaryPID_noSVD(partE1FromGamma, {11., 321.});
571 m_firstElectronBinaryElectronPionIDnoSVD = Variable::binaryPID_noSVD(partE1FromGamma, {11., 211.});
572 m_firstElectronBinaryElectronProtonIDSVDonly = std::get<double>(binaryElectronProtonPIDSVDOnlyFunction(partE1FromGamma));
573 m_firstElectronBinaryElectronKaonIDSVDonly = std::get<double>(binaryElectronKaonPIDSVDOnlyFunction(partE1FromGamma));
574 m_firstElectronBinaryElectronPionIDSVDonly = std::get<double>(binaryElectronPionPIDSVDOnlyFunction(partE1FromGamma));
575
576 m_firstElectronBinaryProtonElectronIDALL = Variable::binaryPID(partE1FromGamma, {2212., 11.});
577 m_firstElectronBinaryKaonElectronIDALL = Variable::binaryPID(partE1FromGamma, {321., 11.});
578 m_firstElectronBinaryPionElectronIDALL = Variable::binaryPID(partE1FromGamma, {211., 11.});
579 m_firstElectronBinaryProtonElectronIDnoSVD = Variable::binaryPID_noSVD(partE1FromGamma, {2212., 11.});
580 m_firstElectronBinaryKaonElectronIDnoSVD = Variable::binaryPID_noSVD(partE1FromGamma, {321., 11.});
581 m_firstElectronBinaryPionElectronIDnoSVD = Variable::binaryPID_noSVD(partE1FromGamma, {211., 11.});
582 m_firstElectronBinaryProtonElectronIDSVDonly = std::get<double>(binaryProtonElectronPIDSVDOnlyFunction(partE1FromGamma));
583 m_firstElectronBinaryKaonElectronIDSVDonly = std::get<double>(binaryKaonElectronPIDSVDOnlyFunction(partE1FromGamma));
584 m_firstElectronBinaryPionElectronIDSVDonly = std::get<double>(binaryPionElectronPIDSVDOnlyFunction(partE1FromGamma));
585
586 getObjectPtr<TTree>("Gamma")->Fill();
587 }
588 }
589}
Calibration collector module base class.
StoreObjPtr< EventMetaData > m_emd
Current EventMetaData.
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
Class to store reconstructed particles.
Definition: Particle.h:75
double getMomentumMagnitude() const
Returns momentum magnitude.
Definition: Particle.h:569
double getMass() const
Returns invariant mass (= nominal for FS particles)
Definition: Particle.h:507
double m_slowPionKaonIDnoSVD
kaon ID value (all subdetectors except SVD) for the pi from Dstar
double m_secondElectronSVDdEdx
SVD dE/dx response for the second electron.
double m_kaonBinaryProtonKaonIDnoSVD
binary p/K ID value (all subdetectors except SVD) for the K from D
double m_pionDBinaryPionElectronIDnoSVD
binary pi/e ID value (all subdetectors except SVD) for the pi from D
double m_slowPionProtonIDnoSVD
proton ID value (all subdetectors except SVD) for the pi from Dstar
double m_secondElectronp
momentum for the second electron
double m_kaonp
momentum for the kaon from the D0
double m_firstElectronBinaryElectronKaonIDSVDonly
binary e/K ID value (only SVD) for the e+ from gamma
double m_pionDBinaryPionKaonIDSVDonly
binary pi/K ID value (only SVD) for the pi from D
double m_kaonBinaryKaonProtonIDSVDonly
binary K/ ID value (only SVD) for the K from D
double m_firstElectronBinaryKaonElectronIDnoSVD
binary K/e ID value (all subdetectors except SVD) for the e+ from gamma
void prepare() override final
Initialize the module.
double m_kaonSVDdEdx
SVD dE/dx response for the kaon from the D0.
double m_protonBinaryProtonElectronIDALL
binary p/e ID value (all subdetectors) for the p from Lambda
double m_slowPionBinaryPionElectronIDSVDonly
binary pi/e ID value (only SVD) for the pi from Dstar
double m_protonKaonIDSVDonly
kaon ID value (only SVD) for the proton from Lambda
double m_protonProtonIDSVDonly
proton ID value (only SVD) for the proton from Lambda
double m_pionDBinaryProtonPionIDSVDonly
binary p/pi ID value (only SVD) for the pi from D
double m_kaonPionIDSVDonly
pion ID value (only SVD) for the K from D
double m_slowPionElectronIDALL
electron ID value (all subdetectors) for the pion from Dstar
double m_slowPionBinaryKaonPionIDALL
binary K/pi ID value (all subdetectors) for the pi from Dstar
double m_slowPionBinaryProtonPionIDSVDonly
binary p/pi ID value (only SVD) for the pi from Dstar
double m_pionDBinaryElectronPionIDALL
binary e/pi ID value (all subdetectors) for the pi from D
double m_slowPionBinaryPionKaonIDALL
binary pi/K ID value (all subdetectors) for the pi from Dstar
double m_firstElectronBinaryPionElectronIDnoSVD
binary pi/e ID value (all subdetectors except SVD) for the e+ from gamma
double m_firstElectronKaonIDnoSVD
kaon ID value (all subdetectors except SVD) for the e+ from gamma
double m_pionDProtonIDnoSVD
proton ID value (all subdetectors except SVD) for the pi from D
double m_protonProtonIDALL
proton ID value (all subdetectors) for the proton from Lambda
double m_pionDProtonIDSVDonly
proton ID value (only SVD) for the pi from D
std::string m_LambdaListName
Name of the Lambda particle list.
double m_protonProtonIDnoSVD
proton ID value (all subdetectors except SVD) for the p from Lambda
double m_pionDp
momentum for the pion from the D0
double m_firstElectronElectronIDALL
electron ID value (all subdetectors) for the e+ from gamma
double m_pionDElectronIDnoSVD
electron ID value (all subdetectors except SVD) for the pi from D
double m_firstElectronBinaryElectronProtonIDnoSVD
binary e/p ID value (all subdetectors except SVD) for the e+ from gamma
double m_firstElectronElectronIDnoSVD
electron ID value (all subdetectors except SVD) for the e+ from gamma
double m_pionDBinaryElectronPionIDnoSVD
binary e/pi ID value (all subdetectors except SVD) for the pi from D
double m_slowPionBinaryProtonPionIDnoSVD
binary p/pi ID value (all subdetectors except SVD) for the pi from Dstar
double m_protonBinaryProtonElectronIDnoSVD
binary p/e ID value (all subdetectors except SVD) for the p from Lambda
double m_firstElectronBinaryElectronProtonIDALL
binary p/pi ID value (all subdetectors) for the e+ from gamma
double m_protonSVDdEdx
SVD dE/dx response for the proton from the Lambda.
double m_protonBinaryProtonPionIDnoSVD
binary p/pi ID value (all subdetectors except SVD) for the p from Lambda
double m_slowPionBinaryPionProtonIDSVDonly
binary pi/p ID value (only SVD) for the pi from Dstar
double m_slowPionProtonIDALL
proton ID value (all subdetectors) for the pion from Dstar
double m_pionDBinaryKaonPionIDnoSVD
binary K/pi ID value (all subdetectors except SVD) for the pi from D
double m_pionDBinaryPionProtonIDSVDonly
binary pi/p ID value (only SVD) for the pi from D
double m_firstElectronBinaryKaonElectronIDSVDonly
binary K/e ID value (only SVD) for the e+ from gamma
double m_firstElectronBinaryPionElectronIDSVDonly
binary pi/e ID value (only SVD) for the e+ from gamma
double m_InvMDstar
Invariant mass of Dstar candidates.
double m_kaonKaonIDnoSVD
kaon ID value (all subdetectors except SVD) for the K from D
double m_pionDKaonIDSVDonly
kaon ID value (only SVD) for the pi from D
double m_slowPionKaonIDSVDonly
kaon ID value (only SVD) for the pi from Dstar
double m_protonBinaryElectronProtonIDnoSVD
binary e/p ID value (all subdetectors except SVD) for the p from Lambda
double m_firstElectronElectronIDSVDonly
electron ID value (only SVD) for the e+ from gamma
double m_InvMD0
Invariant mass of D0 candidates.
double m_pionDPionIDnoSVD
pion ID value (all subdetectors except SVD) for the pi from D
double m_protonBinaryKaonProtonIDnoSVD
binary K/p ID value (all subdetectors except SVD) for the p from Lambda
double m_firstElectronProtonIDSVDonly
proton ID value (only SVD) for the e+ from gamma
double m_protonBinaryProtonPionIDALL
binary p/pi ID value (all subdetectors) for the p from Lambda
double m_kaonBinaryKaonElectronIDnoSVD
binary K/e ID value (all subdetectors except SVD) for the K from D
double m_protonPionIDnoSVD
pion ID value (all subdetectors except SVD) for the p from Lambda
double m_kaonBinaryPionKaonIDnoSVD
binary pi/K ID value (all subdetectors except SVD) for the K from D
double m_protonPionIDALL
pion ID value (all subdetectors) for the proton from Lambda
double m_pionDBinaryProtonPionIDnoSVD
binary p/pi ID value (all subdetectors except SVD) for the pi from D
double m_firstElectronBinaryKaonElectronIDALL
binary K/e ID value (all subdetectors) for the e+ from gamma
double m_firstElectronPionIDSVDonly
pion ID value (only SVD) for the e+ from gamma
double m_firstElectronBinaryElectronKaonIDALL
binary K/pi ID value (all subdetectors) for the e+ from gamma
double m_pionDBinaryPionKaonIDnoSVD
binary pi/K ID value (all subdetectors except SVD) for the pi from D
double m_protonBinaryProtonElectronIDSVDonly
binary p/e ID value (only SVD) for the p from Lambda
double m_slowPionBinaryKaonPionIDnoSVD
binary K/pi ID value (all subdetectors except SVD) for the pi from Dstar
double m_pionDElectronIDSVDonly
electron ID value (only SVD) for the pi from D
double m_slowPionPionIDSVDonly
pion ID value (only SVD) for the pi from Dstar
double m_kaonBinaryKaonElectronIDALL
binary K/e ID value (all subdetectors) for the K from D
double m_pionDBinaryPionKaonIDALL
binary pi/K ID value (all subdetectors) for the pi from D
double m_firstElectronBinaryElectronPionIDnoSVD
binary e/pi ID value (all subdetectors except SVD) for the e+ from gamma
double m_pionDBinaryProtonPionIDALL
binary p/pi ID value (all subdetectors) for the pi from D
double m_slowPionElectronIDSVDonly
electron ID value (only SVD) for the pi from Dstar
double m_kaonKaonIDALL
kaon ID value (all subdetectors) for the kaon from D
double m_protonBinaryElectronProtonIDALL
binary e/p ID value (all subdetectors) for the p from Lambda
double m_firstElectronPionIDnoSVD
pion ID value (all subdetectors except SVD) for the e+ from gamma
double m_kaonProtonIDSVDonly
proton ID value (only SVD) for the K from D
double m_kaonBinaryProtonKaonIDSVDonly
binary p/K ID value (only SVD) for the K from D
double m_firstElectronKaonIDSVDonly
kaon ID value (only SVD) for the e+ from gamma
double m_slowPionBinaryPionElectronIDALL
binary pi/e ID value (all subdetectors) for the pi from Dstar
double m_kaonBinaryProtonKaonIDALL
binary p/K ID value (all subdetectors) for the K from D
double m_protonBinaryProtonPionIDSVDonly
binary p/pi ID value (only SVD) for the p from Lambda
double m_slowPionSVDdEdx
SVD dE/dx response for the pion from the Dstar.
double m_slowPionBinaryPionProtonIDALL
binary pi/p ID value (all subdetectors) for the pi from Dstar
double m_pionDBinaryPionElectronIDSVDonly
binary pi/e ID value (only SVD) for the pi from D
double m_slowPionp
momentum for the pion from the Dstar
double m_protonKaonIDnoSVD
kaon ID value (all subdetectors except SVD) for the p from Lambda
double m_kaonBinaryPionKaonIDSVDonly
binary pi/K ID value (only SVD) for the K from D
double m_firstElectronProtonIDALL
proton ID value (all subdetectors) for the e+ from gamma
double m_protonBinaryPionProtonIDSVDonly
binary pi/p ID value (only SVD) for the p from Lambda
double m_pionDBinaryKaonPionIDALL
binary K/pi ID value (all subdetectors) for the pi from D
double m_firstElectronBinaryElectronPionIDALL
binary e/pi ID value (all subdetectors) for the e+ from gamma
double m_protonElectronIDnoSVD
electron ID value (all subdetectors except SVD) for the p from Lambda
double m_firstElectronBinaryProtonElectronIDSVDonly
binary p/e ID value (only SVD) for the e+ from gamma
double m_pionDBinaryPionElectronIDALL
binary pi/e ID value (all subdetectors) for the pi from D
double m_pionDBinaryKaonPionIDSVDonly
binary K/pi ID value (only SVD) for the pi from D
double m_InvMGamma
Invariant mass of converted photon candidates.
double m_slowPionPionIDnoSVD
pion ID value (all subdetectors except SVD) for the pi from Dstar
double m_firstElectronBinaryElectronKaonIDnoSVD
binary e/K ID value (all subdetectors except SVD) for the e+ from gamma
double m_protonKaonIDALL
kaon ID value (all subdetectors) for the proton from Lambda
double m_slowPionBinaryPionKaonIDnoSVD
binary pi/K ID value (all subdetectors except SVD) for the pi from Dstar
double m_pionDElectronIDALL
electron ID value (all subdetectors) for the pion from D
double m_firstElectronProtonIDnoSVD
proton ID value (all subdetectors except SVD) for the e+ from gamma
double m_slowPionBinaryElectronPionIDSVDonly
binary e/pi ID value (only SVD) for the pi from Dstar
double m_firstElectronSVDdEdx
SVD dE/dx response for the first electron.
double m_protonBinaryPionProtonIDALL
binary pi/p ID value (all subdetectors) for the p from Lambda
double m_pionDProtonIDALL
proton ID value (all subdetectors) for the pion from D
double m_kaonBinaryKaonPionIDALL
binary K/pi ID value (all subdetectors) for the K from D
double m_firstElectronKaonIDALL
kaon ID value (all subdetectors) for the e+ from gamma
double m_protonBinaryProtonKaonIDSVDonly
binary p/K ID value (only SVD) for the p from Lambda
double m_kaonPionIDALL
pion ID value (all subdetectors) for the kaon from D
double m_protonp
momentum for the proton from the Lambda
double m_kaonProtonIDnoSVD
proton ID value (all subdetectors except SVD) for the K from D
double m_protonBinaryProtonKaonIDALL
binary p/K ID value (all subdetectors) for the p from Lambda
double m_slowPionBinaryElectronPionIDALL
binary e/pi ID value (all subdetectors) for the pi from Dstar
double m_firstElectronBinaryElectronProtonIDSVDonly
binary e/p ID value (only SVD) for the e+ from gamma
double m_pionDKaonIDnoSVD
kaon ID value (all subdetectors except SVD) for the pi from D
double m_slowPionBinaryKaonPionIDSVDonly
binary K/pi ID value (only SVD) for the pi from Dstar
double m_firstElectronPionIDALL
pion ID value (all subdetectors) for the e+ from gamma
double m_slowPionBinaryPionElectronIDnoSVD
binary pi/e ID value (all subdetectors except SVD) for the pi from Dstar
double m_slowPionBinaryElectronPionIDnoSVD
binary e/pi ID value (all subdetectors except SVD) for the pi from Dstar
double m_kaonElectronIDALL
electron ID value (all subdetectors) for the kaon from D
double m_protonBinaryKaonProtonIDSVDonly
binary K/p ID value (only SVD) for the p from Lambda
double m_kaonBinaryKaonPionIDnoSVD
binary K/pi ID value (all subdetectors except SVD) for the K from D
double m_kaonKaonIDSVDonly
kaon ID value (only SVD) for the K from D
double m_protonBinaryKaonProtonIDALL
binary K/p ID value (all subdetectors) for the p from Lambda
double m_InvMLambda
Invariant mass of Lambda candidates.
double m_kaonBinaryKaonElectronIDSVDonly
binary K/e ID value (only SVD) for the K from D
double m_protonBinaryProtonKaonIDnoSVD
binary p/K ID value (all subdetectors except SVD) for the p from Lambda
double m_kaonBinaryElectronKaonIDnoSVD
binary e/K ID value (all subdetectors except SVD) for the K from D
double m_slowPionBinaryPionKaonIDSVDonly
binary pi/K ID value (only SVD) for the pi from Dstar
double m_kaonBinaryKaonProtonIDnoSVD
binary K/p ID value (all subdetectors except SVD) for the K from D
double m_protonElectronIDSVDonly
electron ID value (only SVD) for the proton from Lambda
double m_kaonBinaryKaonProtonIDALL
binary K/p ID value (all subdetectors) for the K from D
double m_slowPionKaonIDALL
kaon ID value (all subdetectors) for the pion from Dstar
double m_protonPionIDSVDonly
pion ID value (only SVD) for the proton from Lambda
double m_pionDBinaryPionProtonIDnoSVD
binary pi/p ID value (all subdetectors except SVD) for the pi from D
double m_kaonBinaryElectronKaonIDSVDonly
binary e/K ID value (only SVD) for the K from D
double m_pionDBinaryElectronPionIDSVDonly
binary e/pi ID value (only SVD) for the pi from D
double m_kaonBinaryKaonPionIDSVDonly
binary K/pi ID value (only SVD) for the K from D
double m_slowPionBinaryProtonPionIDALL
binary p/pi ID value (all subdetectors) for the pi from Dstar
double m_protonBinaryPionProtonIDnoSVD
binary pi/p ID value (all subdetectors except SVD) for the p from Lambda
double m_firstElectronBinaryProtonElectronIDnoSVD
binary p/e ID value (all subdetectors except SVD) for the e+ from gamma
double m_protonElectronIDALL
electron ID value (all subdetectors) for the proton from Lambda
double m_firstElectronBinaryProtonElectronIDALL
binary p/e ID value (all subdetectors) for the e+ from gamma
double m_kaonElectronIDnoSVD
electron ID value (all subdetectors except SVD) for the K from D
std::string m_DstarListName
Name of the Dstar particle list.
double m_kaonBinaryPionKaonIDALL
binary pi/K ID value (all subdetectors) for the K from D
double m_pionDPionIDSVDonly
pion ID value (only SVD) for the pi from D
double m_kaonBinaryElectronKaonIDALL
binary e/K ID value (all subdetectors) for the K from D
double m_pionDSVDdEdx
SVD dE/dx response for the pion from the D0.
double m_pionDPionIDALL
pion ID value (all subdetectors) for the pion from D
double m_protonBinaryElectronProtonIDSVDonly
binary e/p ID value (only SVD) for the p from Lambda
double m_kaonPionIDnoSVD
pion ID value (all subdetectors except SVD) for the K from D
double m_pionDKaonIDALL
kaon ID value (all subdetectors) for the pion from D
double m_slowPionProtonIDSVDonly
proton ID value (only SVD) for the pi from Dstar
double m_firstElectronp
momentum for the first electron
double m_slowPionPionIDALL
pion ID value (all subdetectors) for the pion from Dstar
double m_pionDBinaryPionProtonIDALL
binary pi/p ID value (all subdetectors) for the pi from D
double m_firstElectronBinaryElectronPionIDSVDonly
binary e/pi ID value (only SVD) for the e+ from gamma
double m_firstElectronBinaryPionElectronIDALL
binary pi/e ID value (all subdetectors) for the e+ from gamma
std::string m_GammaListName
Name of the Gamma particle list.
double m_slowPionElectronIDnoSVD
electron ID value (all subdetectors except SVD) for the pi from Dstar
double m_slowPionBinaryPionProtonIDnoSVD
binary pi/p ID value (all subdetectors except SVD) for the pi from Dstar
double m_kaonProtonIDALL
proton ID value (all subdetectors) for the kaon from D
double m_kaonElectronIDSVDonly
electron ID value (only SVD) for the K from D
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
bool isValid() const
Check whether the object was created.
Definition: StoreObjPtr.h:111
Class that bundles various TrackFitResults.
Definition: Track.h:25
Debug output for VXDDedxPID module.
Definition: VXDDedxTrack.h:27
double getDedx(Const::EDetector detector) const
Get dE/dx truncated mean for given detector.
Definition: VXDDedxTrack.h:69
std::function< VarVariant(const Particle *)> FunctionPtr
functions stored take a const Particle* and return VarVariant.
Definition: Manager.h:113
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
VXDDedxTrack const * getSVDDedxFromParticle(Particle const *particle)
SVD dEdx value from particle.
Abstract base class for different kinds of events.
STL namespace.