Belle II Software light-2406-ragdoll
roe_variables.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 <gtest/gtest.h>
9#include "utilities/TestParticleFactory.h"
10
11#include <analysis/VariableManager/Manager.h>
12#include <analysis/variables/SpecificKinematicVariables.h>
13#include <analysis/variables/Variables.h>
14#include <analysis/variables/ROEVariables.h>
15#include <analysis/dataobjects/Particle.h>
16#include <analysis/dataobjects/ParticleList.h>
17#include <analysis/utility/PCmsLabTransform.h>
18
19#include <mdst/dataobjects/Track.h>
20#include <mdst/dataobjects/ECLCluster.h>
21#include <mdst/dataobjects/KLMCluster.h>
22
23#include <framework/datastore/StoreArray.h>
24#include <framework/logging/Logger.h>
25#include <framework/gearbox/Gearbox.h>
26#include <framework/utilities/TestHelpers.h>
27
28using namespace std;
29using namespace Belle2;
30using namespace Belle2::Variable;
31using namespace ROOT::Math;
32
33namespace {
34 class ROEVariablesTest : public ::testing::Test {
35 protected:
37 void SetUp() override
38 {
39
40 StoreObjPtr<ParticleList> pi0ParticleList("pi0:vartest");
41 StoreObjPtr<ParticleList> b0ParticleList("B0:vartest");
43 pi0ParticleList.registerInDataStore(DataStore::c_DontWriteOut);
44 b0ParticleList.registerInDataStore(DataStore::c_DontWriteOut);
45 StoreArray<ECLCluster> myECLClusters;
46 StoreArray<KLMCluster> myKLMClusters;
48 StoreArray<Track> myTracks;
49 StoreArray<Particle> myParticles;
52 StoreArray<PIDLikelihood> myPIDLikelihoods;
53 myECLClusters.registerInDataStore();
54 myKLMClusters.registerInDataStore();
55 myTFRs.registerInDataStore();
56 myTracks.registerInDataStore();
57 myParticles.registerInDataStore();
58 myROEs.registerInDataStore();
59 myPIDLikelihoods.registerInDataStore();
60 myParticles.registerRelationTo(myROEs);
61 myTracks.registerRelationTo(myPIDLikelihoods);
62 roeobjptr.registerInDataStore("RestOfEvent", DataStore::c_DontWriteOut);
64
65 pi0ParticleList.create();
66 pi0ParticleList->initialize(111, "pi0:vartest");
67 b0ParticleList.create();
68 b0ParticleList->initialize(521, "B0:vartest");
69
71
73 ROOT::Math::XYZVector ipposition(0, 0, 0);
74 double halfEcms = T.getCMSEnergy() / 2;
75
76 PxPyPzEVector e_momentum(0., 0, halfEcms / 2, halfEcms / 2);
77 e_momentum = T.rotateCmsToLab() * e_momentum;
78 PxPyPzEVector p_momentum(0., 0, -halfEcms / 2, halfEcms / 2);
79 p_momentum = T.rotateCmsToLab() * p_momentum;
80
81 PxPyPzEVector b0_momentum(0, 0, 0, halfEcms);
82 b0_momentum = T.rotateCmsToLab() * b0_momentum;
83 factory.produceParticle(string("^B0 -> e- e+"), b0_momentum, ipposition);
84
85 myParticles[0]->set4Vector(e_momentum);
86 myParticles[1]->set4Vector(p_momentum);
87
88 myParticles[0]->print(); // e-
89 PxPyPzEVector fsp1_momentum(0., 0, halfEcms / 4, halfEcms / 4);
90 fsp1_momentum = T.rotateCmsToLab() * fsp1_momentum;
91 PxPyPzEVector fsp2_momentum(0., 0, -halfEcms / 4, halfEcms / 4);
92 fsp2_momentum = T.rotateCmsToLab() * fsp2_momentum;
93 PxPyPzEVector kl_momentum(0., 0, 0.1, 0.5);
94 kl_momentum = T.rotateCmsToLab() * fsp2_momentum;
95 factory.produceParticle(string("^B0 -> [pi0 -> gamma gamma] [K_S0 -> pi+ pi-]"), b0_momentum, ipposition);
96 KLMCluster myROEKLM;
97 KLMCluster* savedROEKLM = myKLMClusters.appendNew(myROEKLM);
98 Particle* roeKLMParticle = myParticles.appendNew(savedROEKLM);
99
100 // Set momentum of daughters
101 myParticles[3]->set4Vector(fsp1_momentum); // gamma
102 myParticles[4]->set4Vector(fsp2_momentum); // gamma
103 myECLClusters[0]->setEnergy(fsp1_momentum.E()); // gamma
104 myECLClusters[1]->setEnergy(fsp2_momentum.E()); // gamma
105 myParticles[6]->set4Vector(fsp1_momentum); // pi+
106 myParticles[7]->set4Vector(fsp2_momentum); // pi-
107 myParticles[3]->print(); // gamma
108 myParticles[4]->print(); // gamma
109 myParticles[7]->set4Vector(kl_momentum); // K_L0
110 myParticles[7]->print(); // K_L0
111 // Create ROE
112 RestOfEvent roe;
113 vector<const Particle*> roeParticlesToAdd;
114 // Add particles to the ROE
115 roeParticlesToAdd.push_back(myParticles[3]);
116 roeParticlesToAdd.push_back(myParticles[4]);
117 roeParticlesToAdd.push_back(myParticles[6]);
118 roeParticlesToAdd.push_back(myParticles[7]);
119 roeParticlesToAdd.push_back(roeKLMParticle);
120 roe.addParticles(roeParticlesToAdd);
121 RestOfEvent* savedROE = myROEs.appendNew(roe);
122 // Add relation ROE - particle (first B)
123 myParticles[2]->addRelationTo(savedROE); // B0
124 savedROE->print();
125 savedROE->initializeMask("my_mask", "test");
126 std::shared_ptr<Variable::Cut> chargedSelection = std::shared_ptr<Variable::Cut>
127 (Variable::Cut::compile("charge > 0")); // - exclude pi
128 std::shared_ptr<Variable::Cut> photonSelection = std::shared_ptr<Variable::Cut>
129 (Variable::Cut::compile("p > 1.5")); // - exclude gamma
130 std::shared_ptr<Variable::Cut> klSelection = std::shared_ptr<Variable::Cut>
131 (Variable::Cut::compile("E < 0")); // - exclude Klong
132 // Add mask, which should have 1 gamma, 1 pi+, 0 K_L0
133 savedROE->updateMaskWithCuts("my_mask", chargedSelection, photonSelection, klSelection);
134 savedROE->print("my_mask");
135 // Add pi0 from ROE to particle list
136 pi0ParticleList->addParticle(5, 111, Particle::c_Unflavored);
137 b0ParticleList->addParticle(2, 521, Particle::c_Unflavored);
138 }
139
141 void TearDown() override
142 {
144 }
145 };
146
147 /*
148 * Test ROE particle composition variables
149 */
150 TEST_F(ROEVariablesTest, ROEParticleCompositionVariables)
151 {
152 StoreArray<Particle> myParticles{};
153 auto part = myParticles[2]; // B0
154 auto* var = Manager::Instance().getVariable("nROE_Charged()");
155 ASSERT_NE(var, nullptr);
156 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 2.0);
157
158 var = Manager::Instance().getVariable("nROE_Charged(my_mask)");
159 ASSERT_NE(var, nullptr);
160 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
161
162 var = Manager::Instance().getVariable("nROE_Charged(all)");
163 ASSERT_NE(var, nullptr);
164 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 2.0);
165
166 var = Manager::Instance().getVariable("nROE_Charged(my_mask, 13)");
167 ASSERT_NE(var, nullptr);
168 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 0.0);
169
170 var = Manager::Instance().getVariable("nROE_Charged(all, 13)");
171 ASSERT_NE(var, nullptr);
172 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 0.0);
173
174 var = Manager::Instance().getVariable("nROE_Charged(my_mask, 211)");
175 ASSERT_NE(var, nullptr);
176 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
177
178 var = Manager::Instance().getVariable("nROE_Photons()");
179 ASSERT_NE(var, nullptr);
180 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 2.0);
181
182 var = Manager::Instance().getVariable("nROE_Photons(my_mask)");
183 ASSERT_NE(var, nullptr);
184 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
185
186 var = Manager::Instance().getVariable("nROE_NeutralHadrons()");
187 ASSERT_NE(var, nullptr);
188 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
189
190 var = Manager::Instance().getVariable("nROE_NeutralHadrons(my_mask)");
191 ASSERT_NE(var, nullptr);
192 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 0.0);
193
194 }
195 /*
196 * Test ROE track/cluster composition variables
197 */
198 TEST_F(ROEVariablesTest, ROETrackClusterCompositionVariables)
199 {
200 StoreArray<Particle> myParticles{};
201 auto part = myParticles[2]; // B0
202
203 auto* var = Manager::Instance().getVariable("nROE_Tracks()");
204 ASSERT_NE(var, nullptr);
205 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 2.0);
206
207 var = Manager::Instance().getVariable("nROE_Tracks(my_mask)");
208 ASSERT_NE(var, nullptr);
209 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
210
211 var = Manager::Instance().getVariable("nROE_Tracks(all)");
212 ASSERT_NE(var, nullptr);
213 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 2.0);
214
215 var = Manager::Instance().getVariable("nROE_ECLClusters()");
216 ASSERT_NE(var, nullptr);
217 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 2.0);
218
219 var = Manager::Instance().getVariable("nROE_ECLClusters(my_mask)");
220 ASSERT_NE(var, nullptr);
221 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
222
223 var = Manager::Instance().getVariable("nROE_NeutralECLClusters()");
224 ASSERT_NE(var, nullptr);
225 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 2.0);
226
227 var = Manager::Instance().getVariable("nROE_NeutralECLClusters(my_mask)");
228 ASSERT_NE(var, nullptr);
229 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
230
231 var = Manager::Instance().getVariable("nROE_KLMClusters");
232 ASSERT_NE(var, nullptr);
233 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
234 }
235 /*
236 * Test ROE recoil frame variable
237 */
238 TEST_F(ROEVariablesTest, ROERecoilFrameVariable)
239 {
241 StoreArray<Particle> myParticles{};
242 auto part = myParticles[2]; // B0
243 auto partNotROE = myParticles[0]; // electron has no ROE
244
245 auto* var = Manager::Instance().getVariable("useROERecoilFrame(E)");
246 ASSERT_NE(var, nullptr);
247 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 5.2986979);
248
250 roeobjptr.object = myROEs[0];
251 roeobjptr.ptr = myROEs[0];
252
253 var = Manager::Instance().getVariable("useROERecoilFrame(E)");
254 ASSERT_NE(var, nullptr);
255 EXPECT_FLOAT_EQ(std::get<double>(var->function(partNotROE)), 2.801749);
256
257 // Clear ptr at the end
258 roeobjptr.object = nullptr;
259 roeobjptr.ptr = nullptr;
260 }
261 /*
262 * Test ROE kinematics variables
263 */
264 TEST_F(ROEVariablesTest, ROEKinematicsVariables)
265 {
266 StoreArray<Particle> myParticles;
267 auto part = myParticles[2]; // B0
268
269 // Tag side 4 vector
270 PxPyPzEVector roe4Vec(0, 0, 0, 0);
271 roe4Vec += myParticles[3]->get4Vector();
272 roe4Vec += myParticles[4]->get4Vector();
273 roe4Vec += myParticles[6]->get4Vector();
274 roe4Vec += myParticles[7]->get4Vector();
275 // Tag side 4 vector in mask
276 PxPyPzEVector mask4Vec(0, 0, 0, 0);
277 mask4Vec += myParticles[3]->get4Vector();
278 mask4Vec += myParticles[6]->get4Vector();
279 // Signal side 4 vector
280 PxPyPzEVector sig4Vec = part->get4Vector();
281
283 double E0 = T.getCMSEnergy() / 2;
284 auto roe4VecCMS = T.rotateLabToCms() * roe4Vec;
285 auto mask4VecCMS = T.rotateLabToCms() * mask4Vec;
286 auto sig4VecCMS = T.rotateLabToCms() * sig4Vec;
287
288 auto* var = Manager::Instance().getVariable("roeCharge()");
289 ASSERT_NE(var, nullptr);
290 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 0.0);
291
292 var = Manager::Instance().getVariable("roeCharge(all)");
293 ASSERT_NE(var, nullptr);
294 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 0.0);
295
296 var = Manager::Instance().getVariable("roeCharge(my_mask)");
297 ASSERT_NE(var, nullptr);
298 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
299
300 var = Manager::Instance().getVariable("roeEextra()");
301 ASSERT_NE(var, nullptr);
302 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), myParticles[3]->getEnergy() + myParticles[4]->getEnergy());
303
304 var = Manager::Instance().getVariable("roeE()");
305 ASSERT_NE(var, nullptr);
306 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), roe4Vec.E());
307
308 var = Manager::Instance().getVariable("useCMSFrame(roeE())");
309 ASSERT_NE(var, nullptr);
310 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), roe4VecCMS.E());
311
312 var = Manager::Instance().getVariable("roeM()");
313 ASSERT_NE(var, nullptr);
314 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), roe4Vec.mag());
315
316 var = Manager::Instance().getVariable("roeP()");
317 ASSERT_NE(var, nullptr);
318 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), roe4Vec.P());
319
320 var = Manager::Instance().getVariable("useCMSFrame(roeP())");
321 ASSERT_NE(var, nullptr);
322 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), roe4VecCMS.P());
323
324 var = Manager::Instance().getVariable("roePTheta()");
325 ASSERT_NE(var, nullptr);
326 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), roe4Vec.Theta());
327
328 var = Manager::Instance().getVariable("useCMSFrame(roePTheta())");
329 ASSERT_NE(var, nullptr);
330 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), roe4VecCMS.Theta());
331
332 var = Manager::Instance().getVariable("roeDeltae()");
333 ASSERT_NE(var, nullptr);
334 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), roe4VecCMS.E() - E0);
335
336 var = Manager::Instance().getVariable("roeDeltae(my_mask)");
337 ASSERT_NE(var, nullptr);
338 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), mask4VecCMS.E() - E0);
339
340 var = Manager::Instance().getVariable("roeMbc()");
341 ASSERT_NE(var, nullptr);
342 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), TMath::Sqrt(E0 * E0 - roe4VecCMS.P2()));
343
344 var = Manager::Instance().getVariable("roeMbc(my_mask)");
345 ASSERT_NE(var, nullptr);
346 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), TMath::Sqrt(E0 * E0 - mask4VecCMS.P2()));
347
348 var = Manager::Instance().getVariable("weDeltae(my_mask,0)");
349 ASSERT_NE(var, nullptr);
350 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), mask4VecCMS.E() + sig4VecCMS.E() - E0);
351
352 var = Manager::Instance().getVariable("weMbc(my_mask,0)");
353 ASSERT_NE(var, nullptr);
354 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), TMath::Sqrt(E0 * E0 - mask4VecCMS.P2()));
355
356 var = Manager::Instance().getVariable("weMbc(all,0)");
357 ASSERT_NE(var, nullptr);
358 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), TMath::Sqrt(E0 * E0 - roe4VecCMS.P2()));
359
360 PxPyPzEVector miss4VecCMS = - (sig4VecCMS + mask4VecCMS);
361 miss4VecCMS.SetE(2 * E0 - (sig4VecCMS.E() + mask4VecCMS.E()));
362
363 var = Manager::Instance().getVariable("weMissM2(my_mask,0)");
364 ASSERT_NE(var, nullptr);
365 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), miss4VecCMS.mag2());
366
367 var = Manager::Instance().getVariable("weMissP(my_mask,0)");
368 ASSERT_NE(var, nullptr);
369 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), miss4VecCMS.P());
370
371 var = Manager::Instance().getVariable("weMissE(my_mask,0)");
372 ASSERT_NE(var, nullptr);
373 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), miss4VecCMS.E());
374
375 }
376 /*
377 * Test specific kinematic variables
378 */
379 TEST_F(ROEVariablesTest, ROESpecificKinematicVariables)
380 {
381 StoreArray<Particle> myParticles{};
382 auto part = myParticles[2]; // B0
383
384 auto* var = Manager::Instance().getVariable("weCosThetaEll()");
385 ASSERT_NE(var, nullptr);
386 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), -0.99899036);
387
388 var = Manager::Instance().getVariable("weXiZ()");
389 ASSERT_NE(var, nullptr);
390 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 0.31122509);
391
392 var = Manager::Instance().getVariable("weQ2lnuSimple(my_mask,0)");
393 ASSERT_NE(var, nullptr);
394 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), -1.7763568e-14);
395
396 // FIXME: This value is the same as for weQ2lnuSimple
397 // More complicated test setup is required to pass abs(cos_angle_nu) < 1
398 var = Manager::Instance().getVariable("weQ2lnu(my_mask,0)");
399 ASSERT_NE(var, nullptr);
400 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), -1.7763568e-14);
401 }
402 /*
403 * Test isInROE variables
404 */
405 TEST_F(ROEVariablesTest, IsInROEVariables)
406 {
407 StoreArray<Particle> myParticles{};
408 auto part = myParticles[2]; // B0
410
412 roeobjptr.object = myROEs[0];
413 roeobjptr.ptr = myROEs[0];
414
415 auto partROE1 = myParticles[3]; // gamma from ROE
416 auto partROE2 = myParticles[5]; // pi from ROE
417 auto partROE3 = myParticles[10]; // K_L0 from ROE
418 auto partROEnotFromMask = myParticles[7]; // pi from ROE not from mask
419 partROEnotFromMask->print(); // gamma
420
421 auto partNotROE = myParticles[0]; // e NOT from ROE
422
423 auto* var = Manager::Instance().getVariable("isInRestOfEvent");
424 ASSERT_NE(var, nullptr);
425 EXPECT_EQ(std::get<double>(var->function(partROE1)), 1);
426
427 var = Manager::Instance().getVariable("isInRestOfEvent");
428 ASSERT_NE(var, nullptr);
429 EXPECT_EQ(std::get<double>(var->function(partROE2)), 1);
430
431 var = Manager::Instance().getVariable("isInRestOfEvent");
432 ASSERT_NE(var, nullptr);
433 EXPECT_EQ(std::get<double>(var->function(partROE3)), 1);
434
435 var = Manager::Instance().getVariable("isInRestOfEvent");
436 ASSERT_NE(var, nullptr);
437 EXPECT_EQ(std::get<double>(var->function(partNotROE)), 0);
438
439 var = Manager::Instance().getVariable("isInRestOfEvent");
440 ASSERT_NE(var, nullptr);
441 EXPECT_EQ(std::get<double>(var->function(partNotROE)), 0);
442
443 var = Manager::Instance().getVariable("passesROEMask(my_mask)");
444 ASSERT_NE(var, nullptr);
445 EXPECT_FLOAT_EQ(std::get<double>(var->function(partROE1)), 1.0);
446
447 var = Manager::Instance().getVariable("passesROEMask(all)");
448 ASSERT_NE(var, nullptr);
449 EXPECT_FLOAT_EQ(std::get<double>(var->function(partROE1)), 1.0);
450
451 var = Manager::Instance().getVariable("passesROEMask(all)");
452 ASSERT_NE(var, nullptr);
453 EXPECT_FLOAT_EQ(std::get<double>(var->function(partNotROE)), 0.0);
454
455 var = Manager::Instance().getVariable("passesROEMask(my_mask)");
456 ASSERT_NE(var, nullptr);
457 EXPECT_FLOAT_EQ(std::get<double>(var->function(partROEnotFromMask)), 0.0);
458
459 var = Manager::Instance().getVariable("nROE_ParticlesInList(pi0:vartest)");
460 ASSERT_NE(var, nullptr);
461 EXPECT_FLOAT_EQ(std::get<double>(var->function(part)), 1.0);
462
463 var = Manager::Instance().getVariable("currentROEIsInList(B0:vartest)");
464 ASSERT_NE(var, nullptr);
465 EXPECT_FLOAT_EQ(std::get<double>(var->function(partROE1)), 1.0);
466
467 var = Manager::Instance().getVariable("currentROEIsInList(pi0:vartest)");
468 ASSERT_NE(var, nullptr);
469 EXPECT_FLOAT_EQ(std::get<double>(var->function(partROE1)), 0.0);
470
471 var = Manager::Instance().getVariable("particleRelatedToCurrentROE(PDG)");
472 ASSERT_NE(var, nullptr);
473 EXPECT_FLOAT_EQ(std::get<double>(var->function(partROE1)), 511.0);
474
475 // Clear ptr at the end
476 roeobjptr.object = nullptr;
477 roeobjptr.ptr = nullptr;
478 }
479}
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
Definition: DataStore.h:71
StoreEntryMap & getStoreEntryMap(EDurability durability)
Get a reference to the object/array map.
Definition: DataStore.h:325
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
Definition: DataStore.h:59
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
void setInitializeActive(bool active)
Setter for m_initializeActive.
Definition: DataStore.cc:94
void reset(EDurability durability)
Frees memory occupied by data store items and removes all objects from the map.
Definition: DataStore.cc:86
static std::unique_ptr< GeneralCut > compile(const std::string &cut)
Creates an instance of a cut and returns a unique_ptr to it, if you need a copy-able object instead y...
Definition: GeneralCut.h:84
KLM cluster data.
Definition: KLMCluster.h:28
Class to hold Lorentz transformations from/to CMS and boost vector.
double getCMSEnergy() const
Returns CMS energy of e+e- (aka.
const ROOT::Math::LorentzRotation rotateLabToCms() const
Returns Lorentz transformation from Lab to CMS.
const ROOT::Math::LorentzRotation rotateCmsToLab() const
Returns Lorentz transformation from CMS to Lab.
Class to store reconstructed particles.
Definition: Particle.h:75
@ c_Unflavored
Is its own antiparticle or we don't know whether it is a particle/antiparticle.
Definition: Particle.h:95
This is a general purpose class for collecting reconstructed MDST data objects that are not used in r...
Definition: RestOfEvent.h:57
void print(const std::string &maskName=c_defaultMaskName, bool unpackComposite=true) const
Prints the contents of a RestOfEvent object to screen.
Definition: RestOfEvent.cc:391
void initializeMask(const std::string &name, const std::string &origin="unknown")
Initialize new mask.
Definition: RestOfEvent.cc:134
void updateMaskWithCuts(const std::string &name, const std::shared_ptr< Variable::Cut > &trackCut=nullptr, const std::shared_ptr< Variable::Cut > &eclCut=nullptr, const std::shared_ptr< Variable::Cut > &klmCut=nullptr, bool updateExisting=false)
Update mask with cuts.
Definition: RestOfEvent.cc:191
void addParticles(const std::vector< const Particle * > &particle)
Add StoreArray indices of given Particles to the list of unused particles in the event.
Definition: RestOfEvent.cc:24
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:246
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Definition: StoreArray.h:140
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
const Var * getVariable(std::string name)
Get the variable belonging to the given key.
Definition: Manager.cc:57
static Manager & Instance()
get singleton instance.
Definition: Manager.cc:25
This is a class, which generates DataStore particles, according to the provided decay string e....
const Belle2::Particle * produceParticle(const std::string &decayString, const ROOT::Math::PxPyPzEVector &momentum, const ROOT::Math::XYZVector &vertex)
Main method to produce particles.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24
STL namespace.
Wraps a stored array/object, stored under unique (name, durability) key.
Definition: StoreEntry.h:22
TObject * ptr
The pointer to the returned object, either equal to 'object' or null, depending on wether the object ...
Definition: StoreEntry.h:51
TObject * object
The pointer to the actual object.
Definition: StoreEntry.h:48