Project
Loading...
Searching...
No Matches
O2MCApplication.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#include <cstdlib>
13
15#include <fairmq/Channel.h>
16#include <fairmq/Message.h>
17#include <fairmq/Device.h>
18#include <fairmq/Parts.h>
20#include <TMessage.h>
21#include <sstream>
22#include <SimConfig/SimConfig.h>
27#include <cassert>
29#include <TGeoManager.h>
30#include <fstream>
31#include <FairVolume.h>
35#include <filesystem>
39#include <TGeoParallelWorld.h>
40#include <TGeoVolume.h>
41#include <TBuffer3D.h>
42#include <TGeoTessellated.h>
44#include <unordered_set>
45#include "SimConfig/G4Params.h"
46
47namespace o2
48{
49namespace steer
50{
51// helper function to send trivial data
52template <typename T>
53void TypedVectorAttach(const char* name, fair::mq::Channel& channel, fair::mq::Parts& parts)
54{
55 static auto mgr = FairRootManager::Instance();
56 auto vector = mgr->InitObjectAs<const std::vector<T>*>(name);
57 if (vector) {
58 auto buffer = (char*)&(*vector)[0];
59 auto buffersize = vector->size() * sizeof(T);
60 fair::mq::MessagePtr message(channel.NewMessage(
61 buffer, buffersize,
62 [](void* data, void* hint) {}, buffer));
63 parts.AddPart(std::move(message));
64 }
65}
66
68{
70
71 // check the max time of flight condition
72 const auto tof = fMC->TrackTime();
74 if (tof > params.TOFMAX) {
75 fMC->StopTrack();
76 return;
77 }
78
79 mLongestTrackTime = std::max((double)mLongestTrackTime, tof);
80
82 // we can kill tracks here based on our
83 // custom detector specificities
84
85 // Note that this is done in addition to the generic
86 // R + Z-cut mechanism at VMC level.
87
88 float x, y, z;
89 fMC->TrackPosition(x, y, z);
90
91 // this function is implementing a basic z-dependent R cut
92 // can be generalized later on
93 auto outOfR = [x, y, this](float z) {
94 // for the moment for cases when we have ZDC enabled
95 if (std::abs(z) > mCutParams.tunnelZ) {
97 return true;
98 }
99 }
100 return false;
101 };
102
103 if (z > mCutParams.ZmaxA ||
104 -z > mCutParams.ZmaxC ||
105 outOfR(z)) {
106 fMC->StopTrack();
107 return;
108 }
109 }
110
112 mTrackRefFcn(fMC);
113 }
114
115 // dispatch now to stepping function in FairRoot
116 FairMCApplication::Stepping();
117}
118
120{
121 // dispatch first to function in FairRoot
122 FairMCApplication::PreTrack();
123}
124
126{
127 // fill the mapping
128 mModIdToName.clear();
130 for (int i = 0; i < fModules->GetEntries(); ++i) {
131 auto mod = static_cast<FairModule*>(fModules->At(i));
132 if (mod) {
133 mModIdToName[mod->GetModId()] = mod->GetName();
134 int did = o2::detectors::DetID::nameToID(mod->GetName());
135 if (did >= 0) {
136 dmask |= o2::detectors::DetID::getMask(did);
137 }
138 }
139 }
140 gGeoManager->SetUniqueID(dmask.to_ulong());
141 FairMCApplication::ConstructGeometry();
142
143 std::ofstream voltomodulefile("MCStepLoggerVolMap.dat");
144 // construct the volume name to module name mapping useful for StepAnalysis
145 auto vollist = gGeoManager->GetListOfVolumes();
146 for (int i = 0; i < vollist->GetEntries(); ++i) {
147 auto vol = static_cast<TGeoVolume*>(vollist->At(i));
148 auto iter = fModVolMap.find(vol->GetNumber());
149 voltomodulefile << vol->GetName() << ":" << mModIdToName[iter->second] << "\n";
150 }
151}
152
154{
155 // load special cuts which might be given from the outside first.
157 matMgr.loadCutsAndProcessesFromJSON(o2::base::MaterialManager::ESpecial::kTRUE);
158 matMgr.SetLowEnergyNeutronTransport(mCutParams.lowneut);
159 // During the following, FairModule::SetSpecialPhysicsCuts will be called for each module
160 FairMCApplication::InitGeometry();
161 matMgr.writeCutsAndProcessesToJSON();
162 // now the sensitive volumes are set up in fVolMap and we can query them
163 for (auto e : fVolMap) {
164 // since fVolMap contains multiple entries (if multiple copies), this may
165 // write to the same entry multiple times
166 mSensitiveVolumes[e.first] = e.second->GetName();
167 }
168 std::ofstream sensvolfile("MCStepLoggerSenVol.dat");
169 for (auto e : mSensitiveVolumes) {
170 sensvolfile << e.first << ":" << e.second << "\n";
171 }
172}
173
175{
176 for (auto det : listDetectors) {
177 if (dynamic_cast<o2::base::Detector*>(det)) {
178 ((o2::base::Detector*)det)->addAlignableVolumes();
179 }
180 }
181
182 // we stream out both unaligned geometry (to allow for
183 // dynamic post-alignment) as well as the aligned version
184 // which can be used by digitization etc. immediately
185 auto& confref = o2::conf::SimConfig::Instance();
186 auto geomfile = o2::base::NameConf::getGeomFileName(confref.getOutPrefix());
187 // since in general the geometry is a CCDB object, it must be exported under the standard name
188 gGeoManager->SetName(std::string(o2::base::NameConf::CCDBOBJECT).c_str());
189 gGeoManager->Export(geomfile.c_str());
190
191 // apply alignment for included detectors AFTER exporting ideal geometry
192 auto& aligner = o2::base::Aligner::Instance();
193 aligner.applyAlignment(confref.getTimestamp());
194
195 // export aligned geometry into different file
196 auto alignedgeomfile = o2::base::NameConf::getAlignedGeomFileName(confref.getOutPrefix());
197 gGeoManager->Export(alignedgeomfile.c_str());
198
200
201 // fill parallel world geometry if activated
202 if (param.useParallelWorld) {
203 TGeoParallelWorld* pw = gGeoManager->CreateParallelWorld("priority_sensors");
204 if (param.usePwGeoBVH) {
205 pw->SetAccelerationMode(TGeoParallelWorld::AccelerationMode::kBVH);
206 }
207 if (param.usePwCaching) {
208 TGeoNavigator::SetPWSafetyCaching(true);
209 }
210 for (auto det : listDetectors) {
211 if (dynamic_cast<o2::base::Detector*>(det)) {
212 ((o2::base::Detector*)det)->fillParallelWorld();
213 }
214 }
215 gGeoManager->SetUseParallelWorldNav(true);
216 }
217
218 // performs possible optimizations (shape replacements on the runtime geometry)
220
221 // return original return value of misalignment procedure
222 return true;
223}
224
226{
227 auto& g4Params = o2::conf::G4Params::Instance();
228 if (g4Params.navmode != o2::conf::EG4Nav::kTGeo) {
229 return;
230 }
231
232 // Replace TGeo shapes by other ones for performance or other reasons.
233 // Should only affect runtime of simulation.
234
235 // TODO: make this configurable via external JSON rules/macro
236
237 // Also delete original shapes for memory reasons
238
239 // We follow a visitor pattern on a geom hierarchy
240 // for now replace a TGeoTessellate by our own implementation
241 std::unordered_set<TGeoVolume*> volumes_visited;
242 std::unordered_set<TGeoShape*> old_shape_pointers;
243
244 std::function<void(TGeoNode*)> visit;
245 visit = [&](TGeoNode* node) -> void {
246 if (!node) {
247 return;
248 }
249 auto vol = node->GetVolume();
250 if (volumes_visited.find(vol) != volumes_visited.end()) {
251 return;
252 }
253 volumes_visited.insert(vol);
254
255 // transform the shape of this volume
256 auto shape = vol->GetShape();
257 if (shape->IsA() == TGeoTessellated::Class()) {
258 auto tsl = static_cast<TGeoTessellated*>(shape);
259
260 // make a new O2Tessellated until ROOT has proper support for navigation in TGeoTessellated
261 std::cout << "Converting to O2Tessellated for vol " << vol->GetName() << "\n";
262 auto replacement_shape = new o2::base::O2Tessellated(*tsl, false);
263 vol->SetShape(replacement_shape);
264 old_shape_pointers.insert(shape);
265 }
266 // other cases could come here
267
268 for (int i = 0; i < vol->GetNdaughters(); ++i) {
269 auto child_node = vol->GetNode(i);
270 visit(child_node);
271 }
272 };
273
274 visit(gGeoManager->GetTopNode());
275
276 for (auto ptr : old_shape_pointers) {
277 delete ptr;
278 ptr = nullptr;
279 }
280}
281
283{
284 LOG(info) << "This event/chunk did " << mStepCounter << " steps";
285 LOG(info) << "Longest track time is " << mLongestTrackTime;
286
287 auto header = static_cast<o2::dataformats::MCEventHeader*>(fMCEventHeader);
289 header->setDetId2HitBitLUT(o2::base::Detector::getDetId2HitBitIndex());
290
291 static_cast<o2::data::Stack*>(GetStack())->updateEventStats();
292}
293
295{
297
298 auto header = static_cast<o2::dataformats::MCEventHeader*>(fMCEventHeader);
299 auto& confref = o2::conf::SimConfig::Instance();
300
301 if (confref.isFilterOutNoHitEvents() && header->getMCEventStats().getNHits() == 0) {
302 LOG(info) << "Discarding current event due to no hits";
303 SetSaveCurrentEvent(false);
304 }
305
306 // dispatch to function in FairRoot
307 FairMCApplication::FinishEvent();
308}
309
311{
312 // dispatch first to function in FairRoot
313 FairMCApplication::BeginEvent();
314
315 // register event header with our stack
316 auto header = static_cast<o2::dataformats::MCEventHeader*>(fMCEventHeader);
317 static_cast<o2::data::Stack*>(GetStack())->setMCEventStats(&header->getMCEventStats());
318
319 mStepCounter = 0;
321}
322
324{
325 //
326 // Add particles needed for ALICE (not present in Geant3 or Geant4)
327 // Code ported 1-1 from AliRoot
328 //
329
330 LOG(info) << "Adding custom particles to VMC";
331
332 //Hypertriton
333 TVirtualMC::GetMC()->DefineParticle(1010010030, "HyperTriton", kPTHadron, 2.991134, 1.0, 2.632e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE);
334 //Anti-Hypertriton
335 TVirtualMC::GetMC()->DefineParticle(-1010010030, "AntiHyperTriton", kPTHadron, 2.991134, 1.0, 2.632e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE);
336
337 //Hyper hydrogen 4 ground state
338 TVirtualMC::GetMC()->DefineParticle(1010010040, "Hyperhydrog4", kPTHadron, 3.922434, 1.0, 2.08e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
339 //Anti-Hyper hydrogen 4 ground state
340 TVirtualMC::GetMC()->DefineParticle(-1010010040, "AntiHyperhydrog4", kPTHadron, 3.922434, 1.0, 2.08e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
341
342 //Hyper helium 4 ground state
343 TVirtualMC::GetMC()->DefineParticle(1010020040, "Hyperhelium4", kPTHadron, 3.921728, 2.0, 2.50e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
344 //Anti-Hyper helium 4 ground state
345 TVirtualMC::GetMC()->DefineParticle(-1010020040, "AntiHyperhelium4", kPTHadron, 3.921728, 2.0, 2.50e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
346
347 // Lithium 4 ground state
348 TVirtualMC::GetMC()->DefineParticle(1000030040, "Lithium4", kPTHadron, 3.7513, 3.0, 9.1e-23, "Ion", 0.003, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
349 // Anti-Lithium 4 ground state
350 TVirtualMC::GetMC()->DefineParticle(-1000030040, "AntiLithium4", kPTHadron, 3.7513, 3.0, 9.1e-23, "Ion", 0.003, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
351
352 //Hyper helium 5
353 TVirtualMC::GetMC()->DefineParticle(1010020050, "Hyperhelium5", kPTHadron, 4.839961, 2.0, 2.74e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 5, kFALSE);
354 //Anti-Hyper helium 5
355 TVirtualMC::GetMC()->DefineParticle(-1010020050, "AntiHyperhelium5", kPTHadron, 4.839961, 2.0, 2.74e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 5, kFALSE);
356
357 //Double Hyper hydrogen 4
358 TVirtualMC::GetMC()->DefineParticle(1020010040, "DoubleHyperhydrogen4", kPTHadron, 4.106, 1.0, 2.632e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
359 //Double Anti-Hyper hydrogen 4
360 TVirtualMC::GetMC()->DefineParticle(-1020010040, "DoubleAntiHyperhydrogen4", kPTHadron, 4.106, 1.0, 2.632e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
361
362 // 4Xi(-)H
363 TVirtualMC::GetMC()->DefineParticle(1120010040, "4XiH", kPTHadron, 4.128, 1.0, 1.639e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
364 // Anti-4Xi(-)H
365 TVirtualMC::GetMC()->DefineParticle(-1120010040, "Anti4XiH", kPTHadron, 4.128, 1.0, 1.639e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
366 // 4Xi(-)He
367 TVirtualMC::GetMC()->DefineParticle(1120020040, "4XiHe", kPTHadron, 4.128, 1.0, 1.639e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
368 // Anti-4Xi(-)He
369 TVirtualMC::GetMC()->DefineParticle(-1120020040, "Anti4XiHe", kPTHadron, 4.128, 1.0, 1.639e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
370
371 // Hyper helium 4 sigma
372 TVirtualMC::GetMC()->DefineParticle(1110020040, "Hyperhelium4sigma", kPTHadron, 3.995, 2.0, 8.018e-11, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
373 // Anti-Hyper helium 4 sigma
374 TVirtualMC::GetMC()->DefineParticle(-1110020040, "AntiHyperhelium4sigma", kPTHadron, 3.995, 2.0, 8.018e-11, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 4, kFALSE);
375
376 //Lambda-Neutron
377 TVirtualMC::GetMC()->DefineParticle(1010000020, "LambdaNeutron", kPTNeutron, 2.054, 0.0, 2.632e-10, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
378
379 //Anti-Lambda-Neutron
380 TVirtualMC::GetMC()->DefineParticle(-1010000020, "AntiLambdaNeutron", kPTNeutron, 2.054, 0.0, 2.632e-10, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
381
382 //H-Dibaryon
383 TVirtualMC::GetMC()->DefineParticle(1020000020, "Hdibaryon", kPTNeutron, 2.23, 0.0, 2.632e-10, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
384
385 //Anti-H-Dibaryon
386 TVirtualMC::GetMC()->DefineParticle(-1020000020, "AntiHdibaryon", kPTNeutron, 2.23, 0.0, 2.632e-10, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
387
388 //Xi-Proton
389 TVirtualMC::GetMC()->DefineParticle(1020010020, "Xi0Proton", kPTHadron, 2.248, 1.0, 1.333e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
390
391 //Anti-Xi-Proton
392 TVirtualMC::GetMC()->DefineParticle(-1020010020, "AntiXi0Proton", kPTHadron, 2.248, 1.0, 1.333e-10, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
393
394 //Lambda-Neutron-Neutron
395 TVirtualMC::GetMC()->DefineParticle(1010000030, "LambdaNeutronNeutron", kPTNeutron, 2.99, 0.0, 2.632e-10, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE);
396
397 //Anti-Lambda-Neutron-Neutron
398 TVirtualMC::GetMC()->DefineParticle(-1010000030, "AntiLambdaNeutronNeutron", kPTNeutron, 2.99, 0.0, 2.632e-10, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE);
399
400 //Omega-Proton
401 TVirtualMC::GetMC()->DefineParticle(1030000020, "OmegaProton", kPTNeutron, 2.592, 0.0, 2.632e-10, "Hadron", 0.0, 2, 1, 0, 0, 0, 0, 0, 2, kFALSE);
402
403 //Anti-Omega-Proton
404 TVirtualMC::GetMC()->DefineParticle(-1030000020, "AntiOmegaProton", kPTNeutron, 2.592, 0.0, 2.632e-10, "Hadron", 0.0, 2, 1, 0, 0, 0, 0, 0, 2, kFALSE);
405
406 //Omega-Neutron
407 TVirtualMC::GetMC()->DefineParticle(1030010020, "OmegaNeutron", kPTHadron, 2.472, 1.0, 2.190e-22, "Hadron", 0.0, 2, 1, 0, 0, 0, 0, 0, 2, kFALSE);
408
409 //Anti-Omega-Neutron
410 TVirtualMC::GetMC()->DefineParticle(-1030010020, "AntiOmegaNeutron", kPTHadron, 2.472, 1.0, 2.190e-22, "Hadron", 0.0, 2, 1, 0, 0, 0, 0, 0, 2, kFALSE);
411
412 //Omega-Omega
413 TVirtualMC::GetMC()->DefineParticle(1060020020, "OmegaOmega", kPTHadron, 3.229, 2.0, 2.632e-10, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
414
415 //Anti-Omega-Omega
416 TVirtualMC::GetMC()->DefineParticle(-1060020020, "AntiOmegaOmega", kPTHadron, 3.229, 2.0, 2.632e-10, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
417
418 //Lambda(1405)-Proton
419 TVirtualMC::GetMC()->DefineParticle(1010010021, "Lambda1405Proton", kPTHadron, 2.295, 1.0, 1.316e-23, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
420
421 //Anti-Lambda(1405)-Proton
422 TVirtualMC::GetMC()->DefineParticle(-1010010021, "AntiLambda1405Proton", kPTHadron, 2.295, 1.0, 1.316e-23, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
423
424 //Lambda(1405)-Lambda(1405)
425 TVirtualMC::GetMC()->DefineParticle(1020000021, "Lambda1405Lambda1405", kPTNeutron, 2.693, 0.0, 1.316e-23, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
426
427 //Anti-Lambda(1405)-Lambda(1405)
428 TVirtualMC::GetMC()->DefineParticle(-1020000021, "AntiLambda1405Lambda1405", kPTNeutron, 2.693, 0.0, 1.316e-23, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
429
430 //c-deuteron
431 TVirtualMC::GetMC()->DefineParticle(2010010020, "CDeuteron", kPTHadron, 3.226, 1.0, 2.0e-13, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE);
432 //Anti-c-deuteron
433 TVirtualMC::GetMC()->DefineParticle(-2010010020, "AntiCDeuteron", kPTHadron, 3.226, 1.0, 2.0e-13, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 3, kFALSE);
434
435 //c-triton
436 TVirtualMC::GetMC()->DefineParticle(2010010030, "CTriton", kPTHadron, 4.162, 1.0, 2.0e-13, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
437 //Anti-c-Hypertriton
438 TVirtualMC::GetMC()->DefineParticle(-2010010030, "AntiCTriton", kPTHadron, 4.162, 1.0, 2.0e-13, "Ion", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kFALSE);
439
440 //Resonances not in Generators
441 // f0(980) assume 70 MeV as width (PDG: 40 to 100 MeV)
442 TVirtualMC::GetMC()->DefineParticle(9010221, "f0_980", kPTNeutron, 0.98, 0.0, 9.403e-24, "Hadron", 7e-2, 0, 1, 1, 0, 0, 1, 0, 0, kTRUE);
443
444 // f2(1270) (PDG: width = 186 MeV)
445 TVirtualMC::GetMC()->DefineParticle(225, "f2_1270", kPTNeutron, 1.275, 0.0, 3.538e-24, "Hadron", 0.186, 2, 1, 1, 0, 0, 1, 0, 0, kTRUE);
446
447 // f1(1285) (PDG: width = 24.20 MeV) Spin/Parity might not be correct
448 TVirtualMC::GetMC()->DefineParticle(20223, "f1_1285", kPTNeutron, 1.28210, 0.0, 1e-24, "Hadron", 0.02420, 3, 1, 0, 0, 0, 0, 0, 1, kTRUE);
449 // f1(1420) (PDG: width = 54 MeV) Spin/Parity might not be correct
450 TVirtualMC::GetMC()->DefineParticle(20333, "f1_1420", kPTNeutron, 1.42640, 0.0, 1e-24, "Hadron", 0.05490, 3, 1, 0, 0, 0, 0, 0, 1, kTRUE);
451
452 // lambda1405 (PDG: width = 50 MeV)
453 TVirtualMC::GetMC()->DefineParticle(102132, "Lambda1405", kPTNeutron, 1.405, 0.0, 1.316e-23, "Hadron", 0.050, 0, 1, 0, 0, 0, 0, 0, 2, kTRUE);
454 TVirtualMC::GetMC()->DefineParticle(-102132, "AntiLambda1405", kPTNeutron, 1.405, 0.0, 1.316e-23, "Hadron", 0.050, 0, 1, 0, 0, 0, 0, 0, 2, kTRUE);
455
456 // Glueball hunting family
457 // Their life times are not known, so we set them to 1e-24
458 // f0(1370) (PDG: width = 200-500 MeV) Spin/Parity might not be correct
459 TVirtualMC::GetMC()->DefineParticle(10221, "f0_1370", kPTNeutron, 1.37, 0.0, 1e-24, "Hadron", 0.2, 1, 1, 1, 0, 0, 1, 0, 0, kTRUE);
460 // a2(1320) (PDG: width = 107.8 MeV)
461 TVirtualMC::GetMC()->DefineParticle(115, "a2_1320", kPTNeutron, 1.3182, 0.0, 6.1e-24, "Hadron", 0.1078, 2, 1, 1, 1, 0, -1, 0, 0, kTRUE);
462 // f0(1500) (PDG: width = 112 MeV)
463 TVirtualMC::GetMC()->DefineParticle(9030221, "f0_1500", kPTNeutron, 1.506, 0.0, 1e-24, "Hadron", 0.112, 0, 1, 1, 0, 0, 1, 0, 0, kTRUE);
464 // f0(1710) (PDG: width = 150 MeV)
465 TVirtualMC::GetMC()->DefineParticle(10331, "f0_1710", kPTNeutron, 1.71, 0.0, 4.4e-24, "Hadron", 0.150, 0, 1, 1, 0, 0, 1, 0, 0, kTRUE);
466 // f2(1525) (PDG: width = 84 MeV)
467 TVirtualMC::GetMC()->DefineParticle(335, "f2_1525", kPTNeutron, 1.525, 0.0, 7.798e-24, "Hadron", 0.084, 2, 1, 1, 0, 0, 1, 0, 0, kTRUE);
468
469 // Xi_0(1820)
470 TVirtualMC::GetMC()->DefineParticle(123324, "Xi_0_1820", kPTNeutron, 1.8234, 0.0, 2.742550e-23, "Hadron", 0.024, 3, -1, 0, 1, 1, 0, 0, 1, kTRUE);
471 TVirtualMC::GetMC()->DefineParticle(-123324, "Xi_0_Bar_1820", kPTNeutron, 1.8234, 0.0, 2.742550e-23, "Hadron", 0.024, 3, -1, 0, 1, -1, 0, 0, -1, kTRUE);
472
473 int xi_0_1820_mode[6][3] = {{0}};
474 float xi_0_1820_ratio[6] = {100.f, 0.f, 0.f, 0.f, 0.f, 0.f};
475 xi_0_1820_mode[0][0] = 3122; // Lambda
476 xi_0_1820_mode[0][1] = 310; // K0s
477 TVirtualMC::GetMC()->SetDecayMode(123324, xi_0_1820_ratio, xi_0_1820_mode);
478 xi_0_1820_mode[0][0] = -3122; // Lambda-bar
479 TVirtualMC::GetMC()->SetDecayMode(-123324, xi_0_1820_ratio, xi_0_1820_mode);
480
481 // Xi-+(1820)
482 TVirtualMC::GetMC()->DefineParticle(123314, "Xi_Minus_1820", kPTHadron, 1.8234, -1.0, 2.742550e-23, "Hadron", 0.024, 3, -1, 0, 1, -1, 0, 0, 1, kTRUE);
483 TVirtualMC::GetMC()->DefineParticle(-123314, "Xi_Plus_1820", kPTHadron, 1.8234, 1.0, 2.742550e-23, "Hadron", 0.024, 3, -1, 0, 1, 1, 0, 0, -1, kTRUE);
484
485 int xi_charged_1820_mode[6][3] = {{0}};
486 float xi_charged_1820_ratio[6] = {100.f, 0.f, 0.f, 0.f, 0.f, 0.f};
487 xi_charged_1820_mode[0][0] = 3122; // Lambda
488 xi_charged_1820_mode[0][1] = -321; // K-
489 TVirtualMC::GetMC()->SetDecayMode(123314, xi_charged_1820_ratio, xi_charged_1820_mode);
490 xi_charged_1820_mode[0][0] = -3122; // Lambda-bar
491 xi_charged_1820_mode[0][1] = 321; // K+
492 TVirtualMC::GetMC()->SetDecayMode(-123314, xi_charged_1820_ratio, xi_charged_1820_mode);
493
494 // Ps - hidden strange (s-sbar) pentaquarks
495 TVirtualMC::GetMC()->DefineParticle(9322134, "Ps_2100", kPTHadron, 2.1, 1.0, 1.6455e-23, "Hadron", 4.e-2, 3, -1, 0, 0, 0, 0, 0, 1, kTRUE);
496 TVirtualMC::GetMC()->DefineParticle(-9322134, "AntiPs_2100", kPTHadron, 2.1, -1.0, 1.6455e-23, "Hadron", 4.e-2, 3, -1, 0, 0, 0, 0, 0, -1, kTRUE);
497 TVirtualMC::GetMC()->DefineParticle(9322136, "Ps_2500", kPTHadron, 2.5, 1.0, 1.6455e-23, "Hadron", 4.e-2, 5, 1, 0, 0, 0, 0, 0, 1, kTRUE);
498 TVirtualMC::GetMC()->DefineParticle(-9322136, "AntiPs_2500", kPTHadron, 2.5, -1.0, 1.6455e-23, "Hadron", 4.e-2, 5, 1, 0, 0, 0, 0, 0, -1, kTRUE);
499
500 Int_t psmode[6][3] = {0};
501 Float_t psratio[6] = {0.f};
502 psratio[0] = 100.;
503
504 psmode[0][0] = 333; // phi
505 psmode[0][1] = 2212; // proton
506 TVirtualMC::GetMC()->SetDecayMode(9322134, psratio, psmode);
507 TVirtualMC::GetMC()->SetDecayMode(9322136, psratio, psmode);
508
509 psmode[0][1] = -2212; // anti-proton
510 TVirtualMC::GetMC()->SetDecayMode(-9322134, psratio, psmode);
511 TVirtualMC::GetMC()->SetDecayMode(-9322136, psratio, psmode);
512
513 //Omega(2012)
514 for (int j = 1; j < 6; j++) {
515 psmode[j][0] = psmode[j][1] = 0;
516 psratio[j] = 0.;
517 }
518
519 TVirtualMC::GetMC()->DefineParticle(3335, "Omega2012", kPTHadron, 2.012, -1.0, 1.0285e-22, "Hadron", 0.0064, 3, -1, 0, 0, 0, 0, 0, 1, kTRUE);
520 psmode[0][0] = 3312; // Xi-
521 psmode[0][1] = 310; // K0S
522 psratio[0] = 100.;
523 TVirtualMC::GetMC()->SetDecayMode(3335, psratio, psmode);
524
525 TVirtualMC::GetMC()->DefineParticle(-3335, "AntiOmega2012", kPTHadron, 2.012, 1.0, 1.0285e-22, "Hadron", 0.0064, 3, 1, 0, 0, 0, 0, 0, -1, kTRUE);
526 psmode[0][0] = -3312; // anti-Xi+
527 psmode[0][1] = 310; // K0S
528 psratio[0] = 100.;
529 TVirtualMC::GetMC()->SetDecayMode(-3335, psratio, psmode);
530
531 // d*(2380) - dibaryon resonance
532 TVirtualMC::GetMC()->DefineParticle(900010020, "d*_2380", kPTHadron, 2.38, 1.0, 0.94e-23, "Ion", 0.07, 6, 1, 0, 0, 0, 0, 0, 2, kTRUE);
533 TVirtualMC::GetMC()->DefineParticle(-900010020, "d*_2380_bar", kPTHadron, 2.38, -1.0, 0.94e-23, "Ion", 0.07, 6, 1, 0, 0, 0, 0, 0, -2, kTRUE);
534
535 Int_t dstmode[6][3] = {0};
536 Float_t dstratio[6] = {0.f};
537 dstratio[0] = 100; // For now we implement only the mode of interest
538 // d* -> d pi+ pi-
539 dstmode[0][0] = 1000010020; // deuteron
540 dstmode[0][1] = -211; // negative pion
541 dstmode[0][2] = 211; // positive pion
542 TVirtualMC::GetMC()->SetDecayMode(900010020, dstratio, dstmode);
543
544 dstmode[0][0] = -1000010020; // anti-deuteron
545 TVirtualMC::GetMC()->SetDecayMode(-900010020, dstratio, dstmode);
546
547 // Heavy vector mesons
548 // D*+
549 TVirtualMC::GetMC()->DefineParticle(413, "D*+", kPTHadron, 2.0103, 1.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
550 // D*-
551 TVirtualMC::GetMC()->DefineParticle(-413, "D*-", kPTHadron, 2.0103, -1.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
552 // D*0
553 TVirtualMC::GetMC()->DefineParticle(423, "D*0", kPTHadron, 2.0007, 0.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
554 // D*0bar
555 TVirtualMC::GetMC()->DefineParticle(-423, "D*0bar", kPTHadron, 2.0007, 0.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
556 // D*_s+
557 TVirtualMC::GetMC()->DefineParticle(433, "D*_s+", kPTHadron, 2.1123, 1.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
558 // D*_s-
559 TVirtualMC::GetMC()->DefineParticle(-433, "D*_s-", kPTHadron, 2.1123, -1.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
560 // B*0
561 TVirtualMC::GetMC()->DefineParticle(513, "B*0", kPTHadron, 5.3251, 0.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
562 // B*0bar
563 TVirtualMC::GetMC()->DefineParticle(-513, "B*0bar", kPTHadron, 5.3251, 0.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
564 // B*+
565 TVirtualMC::GetMC()->DefineParticle(523, "B*+", kPTHadron, 5.3251, 1.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
566 // B*-
567 TVirtualMC::GetMC()->DefineParticle(-523, "B*-", kPTHadron, 5.3251, -1.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
568 // B*_s0
569 TVirtualMC::GetMC()->DefineParticle(533, "B*_s0", kPTHadron, 5.4128, 0.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
570 // B*_s0bar
571 TVirtualMC::GetMC()->DefineParticle(-533, "B*_s0bar", kPTHadron, 5.4128, 0.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
572 // B*_c+
573 TVirtualMC::GetMC()->DefineParticle(543, "B*_c+", kPTHadron, 6.6020, 1.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
574 // B*_c-
575 TVirtualMC::GetMC()->DefineParticle(-543, "B*_c-", kPTHadron, 6.6020, -1.0, 0.0, "Hadron", 0.0, 1, -1, 0, 0, 0, 0, 0, 0, kTRUE);
576
577 // Charm pentaquarks
578 // Theta_c: isospin singlet with J=1/2+ (see https://arxiv.org/abs/hep-ph/0409121)
579 TVirtualMC::GetMC()->DefineParticle(9422111, "Anti-Theta_c_3100", kPTHadron, 3.099, 0., 6.9e-21, "Hadron", 83.e-6, 1, 1, 0, 0, 0, 0, 0, -1, kTRUE);
580 TVirtualMC::GetMC()->DefineParticle(-9422111, "Theta_c_3100", kPTHadron, 3.099, 0., 6.9e-21, "Hadron", 83.e-6, 1, 1, 0, 0, 0, 0, 0, 1, kTRUE);
581
582 for (int j = 1; j < 6; j++) {
583 psmode[j][0] = psmode[j][1] = 0;
584 psratio[j] = 0.;
585 }
586 psmode[0][0] = 413; // D*+
587 psmode[0][1] = -2212; // anti-p
588 psratio[0] = 100.;
589 TVirtualMC::GetMC()->SetDecayMode(9422111, psratio, psmode);
590 psmode[0][0] = -413; // D*-
591 psmode[0][1] = 2212; // p
592 TVirtualMC::GetMC()->SetDecayMode(-9422111, psratio, psmode);
593
594 // Define the 2- and 3-body phase space decay for the Hyper-Triton
595 Int_t mode[6][3];
596 Float_t bratio[6];
597
598 for (Int_t kz = 0; kz < 6; kz++) {
599 bratio[kz] = 0.;
600 mode[kz][0] = 0;
601 mode[kz][1] = 0;
602 mode[kz][2] = 0;
603 }
604 bratio[0] = 50.;
605 mode[0][0] = 1000020030; // Helium3
606 mode[0][1] = -211; // negative pion
607
608 bratio[1] = 50.;
609 mode[1][0] = 1000010020; // deuteron
610 mode[1][1] = 2212; // proton
611 mode[1][2] = -211; // negative pion
612
613 TVirtualMC::GetMC()->SetDecayMode(1010010030, bratio, mode);
614
615 // Define the 2- and 3-body phase space decay for the Anti-Hyper-Triton
616 Int_t amode[6][3];
617 Float_t abratio[6];
618
619 for (Int_t kz = 0; kz < 6; kz++) {
620 abratio[kz] = 0.;
621 amode[kz][0] = 0;
622 amode[kz][1] = 0;
623 amode[kz][2] = 0;
624 }
625 abratio[0] = 50.;
626 amode[0][0] = -1000020030; // anti- Helium3
627 amode[0][1] = 211; // positive pion
628 abratio[1] = 50.;
629 amode[1][0] = -1000010020; // anti-deuteron
630 amode[1][1] = -2212; // anti-proton
631 amode[1][2] = 211; // positive pion
632
633 TVirtualMC::GetMC()->SetDecayMode(-1010010030, abratio, amode);
634
636
637 // Define the 2- and 3-body phase space decay for the Hyper Hydrogen 4
638
639 Int_t mode3[6][3];
640 Float_t bratio3[6];
641
642 for (Int_t kz = 0; kz < 6; kz++) {
643 bratio3[kz] = 0.;
644 mode3[kz][0] = 0;
645 mode3[kz][1] = 0;
646 mode3[kz][2] = 0;
647 }
648 bratio3[0] = 50.;
649 mode3[0][0] = 1000020040; // Helium4
650 mode3[0][1] = -211; // negative pion
651
652 bratio3[1] = 50.;
653 mode3[1][0] = 1000010030; // tritium
654 mode3[1][1] = 2212; // proton
655 mode3[1][2] = -211; // negative pion
656
657 TVirtualMC::GetMC()->SetDecayMode(1010010040, bratio3, mode3);
658
659 // Define the 2- and 3-body phase space decay for the Hyper Hydrogen 4
660 Int_t amode3[6][3];
661 Float_t abratio3[6];
662
663 for (Int_t kz = 0; kz < 6; kz++) {
664 abratio3[kz] = 0.;
665 amode3[kz][0] = 0;
666 amode3[kz][1] = 0;
667 amode3[kz][2] = 0;
668 }
669 abratio3[0] = 50.;
670 amode3[0][0] = -1000020040; // anti- Helium4
671 amode3[0][1] = 211; // positive pion
672 abratio3[1] = 50.;
673 amode3[1][0] = -1000010030; // anti-tritium
674 amode3[1][1] = -2212; // anti-proton
675 amode3[1][2] = 211; // positive pion
676
677 TVirtualMC::GetMC()->SetDecayMode(-1010010040, abratio3, amode3);
678
679 // Define the 3-body phase space decay for the Hyper Helium 4
680 Int_t mode4[6][3];
681 Float_t bratio4[6];
682
683 for (Int_t kz = 0; kz < 6; kz++) {
684 bratio4[kz] = 0.;
685 mode4[kz][0] = 0;
686 mode4[kz][1] = 0;
687 mode4[kz][2] = 0;
688 }
689 bratio4[0] = 50.;
690 mode4[0][0] = 1000020030; // Helium3
691 mode4[0][1] = -211; // negative pion
692 mode4[0][2] = 2212; // proton
693
694 bratio4[1] = 50.;
695 mode4[1][0] = 1000030040; // lithium-4
696 mode4[1][1] = -211; // negative pion
697
698 TVirtualMC::GetMC()->SetDecayMode(1010020040, bratio4, mode4);
699
700 // Define the 2-body phase space decay for the Anti-Hyper Helium 4
701 Int_t amode4[6][3];
702 Float_t abratio4[6];
703
704 for (Int_t kz = 0; kz < 6; kz++) {
705 abratio4[kz] = 0.;
706 amode4[kz][0] = 0;
707 amode4[kz][1] = 0;
708 amode4[kz][2] = 0;
709 }
710 abratio4[0] = 50.;
711 amode4[0][0] = -1000020030; // anti-Helium 3
712 amode4[0][1] = 211; // positive pion
713 amode4[0][2] = -2212; // anti proton
714
715 abratio4[1] = 50.;
716 amode4[1][0] = -1000030040; // antilithium-4
717 amode4[1][1] = 211; // positive pion
718
719 TVirtualMC::GetMC()->SetDecayMode(-1010020040, abratio4, amode4);
720
721 // Define the 2-body phase space decay for the Lithium 4
722 Int_t model4[6][3];
723 Float_t bratiol4[6];
724
725 for (Int_t kz = 0; kz < 6; kz++) {
726 bratiol4[kz] = 0.;
727 model4[kz][0] = 0;
728 model4[kz][1] = 0;
729 model4[kz][2] = 0;
730 }
731 bratiol4[0] = 100.;
732 model4[0][0] = 1000020030; // Helium3
733 model4[0][1] = 2212; // proton
734
735 TVirtualMC::GetMC()->SetDecayMode(1000030040, bratiol4, model4);
736
737 // Define the 2-body phase space decay for the Anti-Lithium 4
738 Int_t amodel4[6][3];
739 Float_t abratiol4[6];
740
741 for (Int_t kz = 0; kz < 6; kz++) {
742 abratiol4[kz] = 0.;
743 amodel4[kz][0] = 0;
744 amodel4[kz][1] = 0;
745 amodel4[kz][2] = 0;
746 }
747 abratiol4[0] = 100.;
748 amodel4[0][0] = -1000020030; // Anti-Helium3
749 amodel4[0][1] = -2212; // Anti-proton
750
751 TVirtualMC::GetMC()->SetDecayMode(-1000030040, abratiol4, amodel4);
752
753 // Define the 3-body phase space decay for the Hyper Helium 5
754 Int_t mode41[6][3];
755 Float_t bratio41[6];
756
757 for (Int_t kz = 0; kz < 6; kz++) {
758 bratio41[kz] = 0.;
759 mode41[kz][0] = 0;
760 mode41[kz][1] = 0;
761 mode41[kz][2] = 0;
762 }
763 bratio41[0] = 50.;
764 mode41[0][0] = 1000020040; // Helium4
765 mode41[0][1] = -211; // negative pion
766 mode41[0][2] = 2212; // proton
767 bratio41[1] = 50.;
768 mode41[1][0] = 1000020030; // Helium3
769 mode41[1][1] = -211; // negative pion
770 mode41[1][2] = 1000010020; // Deuteron
771
772 TVirtualMC::GetMC()->SetDecayMode(1010020050, bratio41, mode41);
773
774 // Define the 2-body phase space decay for the Anti-Hyper Helium 5
775 Int_t amode41[6][3];
776 Float_t abratio41[6];
777
778 for (Int_t kz = 0; kz < 6; kz++) {
779 abratio41[kz] = 0.;
780 amode41[kz][0] = 0;
781 amode41[kz][1] = 0;
782 amode41[kz][2] = 0;
783 }
784 abratio41[0] = 50.;
785 amode41[0][0] = -1000020040; // anti-Helium 4
786 amode41[0][1] = 211; // positive pion
787 amode41[0][2] = -2212; // anti proton
788 abratio41[1] = 50.;
789 amode41[1][0] = -1000020030; // anti-Helium 3
790 amode41[1][1] = 211; // positive pion
791 amode41[1][2] = -1000010020; // anti deuteron
792
793 TVirtualMC::GetMC()->SetDecayMode(-1010020050, abratio41, amode41);
794
795 // Define the 3-body phase space decay for the Double Hyper Hydrogen 4
796 Int_t mode42[6][3];
797 Float_t bratio42[6];
798
799 for (Int_t kz = 0; kz < 6; kz++) {
800 bratio42[kz] = 0.;
801 mode42[kz][0] = 0;
802 mode42[kz][1] = 0;
803 mode42[kz][2] = 0;
804 }
805 bratio42[0] = 50.;
806 mode42[0][0] = 1010020040; // Hyper-Helium4
807 mode42[0][1] = -211; // negative pion
808
809 bratio42[1] = 50.;
810 mode42[1][0] = 1010010030; // Hypertriton
811 mode42[1][1] = 2212; // proton
812 mode42[1][2] = -211; // negative pion
813
814 TVirtualMC::GetMC()->SetDecayMode(1020010040, bratio42, mode42);
815
816 // Define the 2-body phase space decay for the Anti Double Hyper Hydrogen 4
817 Int_t amode42[6][3];
818 Float_t abratio42[6];
819
820 for (Int_t kz = 0; kz < 6; kz++) {
821 abratio42[kz] = 0.;
822 amode42[kz][0] = 0;
823 amode42[kz][1] = 0;
824 amode42[kz][2] = 0;
825 }
826 abratio42[0] = 50.;
827 amode42[0][0] = -1010020040; // anti-Hyper-Helium 4
828 amode42[0][1] = 211; // positive pion
829
830 abratio42[1] = 50.;
831 amode42[1][0] = -1010010030; // anti-Hypertriton
832 amode42[1][1] = -2212; // antiproton
833 amode42[1][2] = 211; // positive pion
834
835 TVirtualMC::GetMC()->SetDecayMode(-1020010040, abratio42, amode42);
836
837 // Define the decay for the 4Xi(-)He
838 Int_t mode4XiHe[6][3];
839 Float_t bratio4XiHe[6];
840
841 for (Int_t kz = 0; kz < 6; kz++) {
842 bratio4XiHe[kz] = 0.;
843 mode4XiHe[kz][0] = 0;
844 mode4XiHe[kz][1] = 0;
845 mode4XiHe[kz][2] = 0;
846 }
847 bratio4XiHe[0] = 33.;
848 mode4XiHe[0][0] = 1010020040; // HyperHelium4
849 mode4XiHe[0][1] = -211; // negative pion
850
851 bratio4XiHe[1] = 33.;
852 mode4XiHe[1][0] = 3122; // lambda
853 mode4XiHe[1][1] = 1000020030; // helium-3
854 mode4XiHe[1][2] = -211; // negative pion
855
856 bratio4XiHe[2] = 33.;
857 mode4XiHe[2][0] = 1000030040; // lithium-4
858 mode4XiHe[2][1] = -211; // negative pion
859 mode4XiHe[2][2] = -211; // negative pion
860
861 TVirtualMC::GetMC()->SetDecayMode(1120020040, bratio4XiHe, mode4XiHe);
862
863 // Define the decay for the Anti-4Xi(-)He
864 Int_t amode4XiHe[6][3];
865 Float_t abratio4XiHe[6];
866
867 for (Int_t kz = 0; kz < 6; kz++) {
868 abratio4XiHe[kz] = 0.;
869 amode4XiHe[kz][0] = 0;
870 amode4XiHe[kz][1] = 0;
871 amode4XiHe[kz][2] = 0;
872 }
873 abratio4XiHe[0] = 33.;
874 amode4XiHe[0][0] = -1010020040; // antiHyperHelium-4
875 amode4XiHe[0][1] = 211; // positive pion
876
877 abratio4XiHe[1] = 33.;
878 amode4XiHe[1][0] = -3122; // antilambda
879 amode4XiHe[1][1] = -1000020030; // antihelium-3
880 amode4XiHe[1][2] = 211; // positive pion
881
882 abratio4XiHe[2] = 33.;
883 amode4XiHe[2][0] = -1000030040; // antilithium-4
884 amode4XiHe[2][1] = 211; // positive pion
885 amode4XiHe[2][2] = 211; // positive pion
886
887 TVirtualMC::GetMC()->SetDecayMode(-1120020040, abratio4XiHe, amode4XiHe);
888
889 // Define the decay for the 4Xi(-)H
890 Int_t mode4XiH[6][3];
891 Float_t bratio4XiH[6];
892
893 for (Int_t kz = 0; kz < 6; kz++) {
894 bratio4XiH[kz] = 0.;
895 mode4XiH[kz][0] = 0;
896 mode4XiH[kz][1] = 0;
897 mode4XiH[kz][2] = 0;
898 }
899 bratio4XiH[0] = 33.;
900 mode4XiH[0][0] = 1010010040; // HyperHydrogen4
901 mode4XiH[0][1] = -211; // negative pion
902
903 bratio4XiH[1] = 33.;
904 mode4XiH[1][0] = 3122; // lambda
905 mode4XiH[1][1] = 1000010030; // triton
906 mode4XiH[1][2] = -211; // negative pion
907
908 bratio4XiH[2] = 33.;
909 mode4XiH[2][0] = 1000020040; // alpha
910 mode4XiH[2][1] = -211; // negative pion
911 mode4XiH[2][2] = -211; // negative pion
912
913 TVirtualMC::GetMC()->SetDecayMode(1120010040, bratio4XiH, mode4XiH);
914
915 // Define the decay for the Anti-4Xi(-)H
916 Int_t amode4XiH[6][3];
917 Float_t abratio4XiH[6];
918
919 for (Int_t kz = 0; kz < 6; kz++) {
920 abratio4XiH[kz] = 0.;
921 amode4XiH[kz][0] = 0;
922 amode4XiH[kz][1] = 0;
923 amode4XiH[kz][2] = 0;
924 }
925 abratio4XiH[0] = 33.;
926 amode4XiH[0][0] = -1010010040; // antiHyperHydrogen-4
927 amode4XiH[0][1] = 211; // positive pion
928
929 abratio4XiH[1] = 33.;
930 amode4XiH[1][0] = -3122; // antilambda
931 amode4XiH[1][1] = -1000010030; // antitriton
932 amode4XiH[1][2] = 211; // positive pion
933
934 abratio4XiH[2] = 33.;
935 amode4XiH[2][0] = -1000020040; // antialpha
936 amode4XiH[2][1] = 211; // positive pion
937 amode4XiH[2][2] = 211; // positive pion
938
939 TVirtualMC::GetMC()->SetDecayMode(-1120010040, abratio4XiH, amode4XiH);
940
941 // Define the 2- and 3-body phase space decay for the Hyper Helium 4 sigma
942 Int_t mode4s[6][3];
943 Float_t bratio4s[6];
944
945 for (Int_t kz = 0; kz < 6; kz++) {
946 bratio4s[kz] = 0.;
947 mode4s[kz][0] = 0;
948 mode4s[kz][1] = 0;
949 mode4s[kz][2] = 0;
950 }
951 bratio4s[0] = 20.;
952 mode4s[0][0] = 1000020040; // Helium4
953 mode4s[0][1] = 111; // pion0
954 bratio4s[1] = 40.;
955 mode4s[1][0] = 1000010030; // tritium
956 mode4s[1][2] = 2212; // proton
957 mode4s[1][1] = 111; // pion0
958 bratio4s[2] = 40.;
959 mode4s[2][0] = 1000010030; // tritium
960 mode4s[2][2] = 211; // pion+
961 mode4s[2][1] = 2112; // neutron
962
963 TVirtualMC::GetMC()->SetDecayMode(1110020040, bratio4s, mode4s);
964
965 // Define the 2- and 3-body phase space decay for the Anti Hyper Helium 4 sigma
966 Int_t amode4s[6][3];
967 Float_t abratio4s[6];
968
969 for (Int_t kz = 0; kz < 6; kz++) {
970 abratio4s[kz] = 0.;
971 amode4s[kz][0] = 0;
972 amode4s[kz][1] = 0;
973 amode4s[kz][2] = 0;
974 }
975 abratio4s[0] = 20.;
976 amode4s[0][0] = -1000020040; // anti-Helium4
977 amode4s[0][1] = 111; // pion0
978 abratio4s[1] = 40.;
979 amode4s[1][0] = -1000010030; // anti-tritium
980 amode4s[1][2] = -2212; // anti-proton
981 amode4s[1][1] = 111; // pion0
982 abratio4s[2] = 40.;
983 amode4s[2][0] = -1000010030; // anti-tritium
984 amode4s[2][2] = -211; // pion-
985 amode4s[2][1] = -2112; // anti-neutron
986
987 TVirtualMC::GetMC()->SetDecayMode(-1110020040, abratio4s, amode4s);
988
989 // Define the 2-body phase space decay for the Lambda-neutron boundstate
990 Int_t mode1[6][3];
991 Float_t bratio1[6];
992
993 for (Int_t kz = 0; kz < 6; kz++) {
994 bratio1[kz] = 0.;
995 mode1[kz][0] = 0;
996 mode1[kz][1] = 0;
997 mode1[kz][2] = 0;
998 }
999 bratio1[0] = 100.;
1000 mode1[0][0] = 1000010020; // deuteron
1001 mode1[0][1] = -211; // negative pion
1002
1003 TVirtualMC::GetMC()->SetDecayMode(1010000020, bratio1, mode1);
1004
1005 // Define the 2-body phase space decay for the Anti-Lambda-neutron boundstate
1006 Int_t amode1[6][3];
1007 Float_t abratio1[6];
1008
1009 for (Int_t kz = 0; kz < 6; kz++) {
1010 abratio1[kz] = 0.;
1011 amode1[kz][0] = 0;
1012 amode1[kz][1] = 0;
1013 amode1[kz][2] = 0;
1014 }
1015 abratio1[0] = 100.;
1016 amode1[0][0] = -1000010020; // anti-deuteron
1017 amode1[0][1] = 211; // positive pion
1018
1019 TVirtualMC::GetMC()->SetDecayMode(-1010000020, abratio1, amode1);
1020
1021 // Define the 2-body phase space decay for the H-Dibaryon
1022 Int_t mode2[6][3];
1023 Float_t bratio2[6];
1024
1025 for (Int_t kz = 0; kz < 6; kz++) {
1026 bratio2[kz] = 0.;
1027 mode2[kz][0] = 0;
1028 mode2[kz][1] = 0;
1029 mode2[kz][2] = 0;
1030 }
1031 bratio2[0] = 100.;
1032 mode2[0][0] = 3122; // Lambda
1033 mode2[0][1] = 2212; // proton
1034 mode2[0][2] = -211; // negative pion
1035
1036 TVirtualMC::GetMC()->SetDecayMode(1020000020, bratio2, mode2);
1037
1038 // Define the 2-body phase space decay for the Anti-H-Dibaryon
1039 Int_t amode2[6][3];
1040 Float_t abratio2[6];
1041
1042 for (Int_t kz = 0; kz < 6; kz++) {
1043 abratio2[kz] = 0.;
1044 amode2[kz][0] = 0;
1045 amode2[kz][1] = 0;
1046 amode2[kz][2] = 0;
1047 }
1048 abratio2[0] = 100.;
1049 amode2[0][0] = -3122; // anti-deuteron
1050 amode2[0][1] = -2212; // anti-proton
1051 amode2[0][2] = 211; // positive pion
1052
1053 TVirtualMC::GetMC()->SetDecayMode(-1020000020, abratio2, amode2);
1054
1055 // Define the 2-body phase space decay for the Xi0P
1056 Int_t mode5[6][3];
1057 Float_t bratio5[6];
1058
1059 for (Int_t kz = 0; kz < 6; kz++) {
1060 bratio5[kz] = 0.;
1061 mode5[kz][0] = 0;
1062 mode5[kz][1] = 0;
1063 mode5[kz][2] = 0;
1064 }
1065 bratio5[0] = 100.;
1066 mode5[0][0] = 3122; // Lambda
1067 mode5[0][1] = 2212; // proton
1068
1069 TVirtualMC::GetMC()->SetDecayMode(1020010020, bratio5, mode5);
1070
1071 // Define the 2-body phase space decay for the Anti-Xi0P
1072 Int_t amode5[6][3];
1073 Float_t abratio5[6];
1074
1075 for (Int_t kz = 0; kz < 6; kz++) {
1076 abratio5[kz] = 0.;
1077 amode5[kz][0] = 0;
1078 amode5[kz][1] = 0;
1079 amode5[kz][2] = 0;
1080 }
1081 abratio5[0] = 100.;
1082 amode5[0][0] = -3122; // anti-Lambda
1083 amode5[0][1] = -2212; // anti-proton
1084
1085 TVirtualMC::GetMC()->SetDecayMode(-1020010020, abratio5, amode5);
1086
1087 // Define the 2-body phase space decay for the Lambda-Neutron-Neutron
1088 Int_t mode6[6][3];
1089 Float_t bratio6[6];
1090
1091 for (Int_t kz = 0; kz < 6; kz++) {
1092 bratio6[kz] = 0.;
1093 mode6[kz][0] = 0;
1094 mode6[kz][1] = 0;
1095 mode6[kz][2] = 0;
1096 }
1097 bratio6[0] = 100.;
1098 mode6[0][0] = 1000010030; // triton
1099 mode6[0][1] = -211; // pion
1100
1101 TVirtualMC::GetMC()->SetDecayMode(1010000030, bratio6, mode6);
1102
1103 // Define the 2-body phase space decay for the Anti-Lambda-Neutron-Neutron
1104 Int_t amode6[6][3];
1105 Float_t abratio6[6];
1106
1107 for (Int_t kz = 0; kz < 6; kz++) {
1108 abratio6[kz] = 0.;
1109 amode6[kz][0] = 0;
1110 amode6[kz][1] = 0;
1111 amode6[kz][2] = 0;
1112 }
1113 abratio6[0] = 100.;
1114 amode6[0][0] = -1000010030; // anti-triton
1115 amode6[0][1] = 211; // pion
1116
1117 TVirtualMC::GetMC()->SetDecayMode(-1010000030, abratio6, amode6);
1118
1119 // Define the 3-body phase space decay for the Omega-Proton
1120 Int_t mode7[6][3];
1121 Float_t bratio7[6];
1122
1123 for (Int_t kz = 0; kz < 6; kz++) {
1124 bratio7[kz] = 0.;
1125 mode7[kz][0] = 0;
1126 mode7[kz][1] = 0;
1127 mode7[kz][2] = 0;
1128 }
1129 bratio7[0] = 100.;
1130 mode7[0][0] = 3122; // Lambda
1131 mode7[0][1] = -321; // negative Kaon
1132 mode7[0][2] = 2212; // proton
1133
1134 TVirtualMC::GetMC()->SetDecayMode(1030000020, bratio7, mode7);
1135
1136 // Define the 3-body phase space decay for the Anti-Omega-Proton
1137 Int_t amode7[6][3];
1138 Float_t abratio7[6];
1139
1140 for (Int_t kz = 0; kz < 6; kz++) {
1141 abratio7[kz] = 0.;
1142 amode7[kz][0] = 0;
1143 amode7[kz][1] = 0;
1144 amode7[kz][2] = 0;
1145 }
1146 abratio7[0] = 100.;
1147 amode7[0][0] = -3122; // anti-Lambda
1148 amode7[0][1] = 321; // positive kaon
1149 amode7[0][2] = -2212; // anti-proton
1150
1151 TVirtualMC::GetMC()->SetDecayMode(-1030000020, abratio7, amode7);
1152
1153 // Define the 2-body phase space decay for the Omega-Neutron
1154 Int_t mode8[6][3];
1155 Float_t bratio8[6];
1156
1157 for (Int_t kz = 0; kz < 6; kz++) {
1158 bratio8[kz] = 0.;
1159 mode8[kz][0] = 0;
1160 mode8[kz][1] = 0;
1161 mode8[kz][2] = 0;
1162 }
1163 bratio8[0] = 100.;
1164 mode8[0][0] = 3122; // Lambda
1165 mode8[0][1] = 3312; // negative Xi
1166
1167 TVirtualMC::GetMC()->SetDecayMode(1030010020, bratio8, mode8);
1168
1169 // Define the 2-body phase space decay for the Anti-Omega-Neutron
1170 Int_t amode8[6][3];
1171 Float_t abratio8[6];
1172
1173 for (Int_t kz = 0; kz < 6; kz++) {
1174 abratio8[kz] = 0.;
1175 amode8[kz][0] = 0;
1176 amode8[kz][1] = 0;
1177 amode8[kz][2] = 0;
1178 }
1179 abratio8[0] = 100.;
1180 amode8[0][0] = -3122; // anti-Lambda
1181 amode8[0][1] = -3312; // positive Xi
1182
1183 TVirtualMC::GetMC()->SetDecayMode(-1030010020, abratio8, amode8);
1184
1185 // Define the 3-body phase space decay for the Omega-Omega
1186 Int_t mode9[6][3];
1187 Float_t bratio9[6];
1188
1189 for (Int_t kz = 0; kz < 6; kz++) {
1190 bratio9[kz] = 0.;
1191 mode9[kz][0] = 0;
1192 mode9[kz][1] = 0;
1193 mode9[kz][2] = 0;
1194 }
1195 bratio9[0] = 100.;
1196 mode9[0][0] = 3334; // negative Omega
1197 mode9[0][1] = 3312; // negative Xi
1198
1199 TVirtualMC::GetMC()->SetDecayMode(1060020020, bratio9, mode9);
1200
1201 // Define the 3-body phase space decay for the Anti-Omega-Omega
1202 Int_t amode9[6][3];
1203 Float_t abratio9[6];
1204
1205 for (Int_t kz = 0; kz < 6; kz++) {
1206 abratio9[kz] = 0.;
1207 amode9[kz][0] = 0;
1208 amode9[kz][1] = 0;
1209 amode9[kz][2] = 0;
1210 }
1211 abratio9[0] = 100.;
1212 amode9[0][0] = -3334; // positive Omega
1213 amode9[0][1] = -3312; // positive Xi
1214
1215 TVirtualMC::GetMC()->SetDecayMode(-1060020020, abratio9, amode9);
1216
1217 // Define the 2- and 3-body phase space decay for the Lambda(1405)-Proton
1218 Int_t mode10[6][3];
1219 Float_t bratio10[6];
1220
1221 for (Int_t kz = 0; kz < 6; kz++) {
1222 bratio10[kz] = 0.;
1223 mode10[kz][0] = 0;
1224 mode10[kz][1] = 0;
1225 mode10[kz][2] = 0;
1226 }
1227 bratio10[0] = 50.;
1228 mode10[0][0] = 3122; // Lambda
1229 mode10[0][1] = 2212; // proton
1230 bratio10[1] = 50.;
1231 mode10[1][0] = 2212; // proton
1232 mode10[1][1] = -321; // negative kaon
1233 mode10[1][2] = 2212; // proton
1234
1235 TVirtualMC::GetMC()->SetDecayMode(1010010021, bratio10, mode10);
1236
1237 // Define the 2- and 3-body phase space decay for the Anti-Lambda(1405)-Proton
1238 Int_t amode10[6][3];
1239 Float_t abratio10[6];
1240
1241 for (Int_t kz = 0; kz < 6; kz++) {
1242 abratio10[kz] = 0.;
1243 amode10[kz][0] = 0;
1244 amode10[kz][1] = 0;
1245 amode10[kz][2] = 0;
1246 }
1247 abratio10[0] = 50.;
1248 amode10[0][0] = -3122; // anti-Lambda
1249 amode10[0][1] = -2212; // anti-proton
1250 abratio10[1] = 50.;
1251 amode10[1][0] = -2212; // anti-proton
1252 amode10[1][1] = 321; // positive kaon
1253 amode10[1][2] = -2212; // anti-proton
1254
1255 TVirtualMC::GetMC()->SetDecayMode(-1010010021, abratio10, amode10);
1256
1257 // Define the 3-body phase space decay for the Lambda(1405)-Lambda(1405)
1258 Int_t mode11[6][3];
1259 Float_t bratio11[6];
1260
1261 for (Int_t kz = 0; kz < 6; kz++) {
1262 bratio11[kz] = 0.;
1263 mode11[kz][0] = 0;
1264 mode11[kz][1] = 0;
1265 mode11[kz][2] = 0;
1266 }
1267 bratio11[0] = 50.;
1268 mode11[0][0] = 3122; // Lambda
1269 mode11[0][1] = 3122; // Lambda
1270 bratio11[1] = 50.;
1271 mode11[1][0] = 3122; // Lambda
1272 mode11[1][1] = 2212; // proton
1273 mode11[1][2] = -211; // negative pion
1274
1275 TVirtualMC::GetMC()->SetDecayMode(1020000021, bratio11, mode11);
1276
1277 // Define the 3-body phase space decay for the Anti-Lambda(1405)-Lambda(1405)
1278 Int_t amode11[6][3];
1279 Float_t abratio11[6];
1280
1281 for (Int_t kz = 0; kz < 6; kz++) {
1282 abratio11[kz] = 0.;
1283 amode11[kz][0] = 0;
1284 amode11[kz][1] = 0;
1285 amode11[kz][2] = 0;
1286 }
1287 abratio11[0] = 50.;
1288 amode11[0][0] = -3122; // anti-Lambda
1289 amode11[0][1] = -3122; // anti-Lambda
1290 abratio11[1] = 50.;
1291 amode11[1][0] = -3122; // anti-Lambda
1292 amode11[1][1] = -2212; // anti-proton
1293 amode11[1][2] = 211; // positive pion
1294
1295 TVirtualMC::GetMC()->SetDecayMode(-1020000021, abratio11, amode11);
1296
1297 // Define the decays for the c-triton
1298 Int_t ctmode[6][3];
1299 Float_t ctbratio[6];
1300
1301 for (Int_t kz = 0; kz < 6; kz++) {
1302 ctbratio[kz] = 0.;
1303 ctmode[kz][0] = 0;
1304 ctmode[kz][1] = 0;
1305 ctmode[kz][2] = 0;
1306 }
1307 ctbratio[0] = 50.;
1308 ctmode[0][0] = 1000020030; // Helium3
1309 ctmode[0][1] = 310; // K0s
1310
1311 ctbratio[1] = 50.;
1312 ctmode[1][0] = 1000020030; // Helium3
1313 ctmode[1][1] = -321; // negative kaon
1314 ctmode[1][2] = 211; // positive pion
1315
1316 TVirtualMC::GetMC()->SetDecayMode(2010010030, ctbratio, ctmode);
1317
1318 // Define the decays for the anti-c-triton
1319 Int_t actmode[6][3];
1320 Float_t actbratio[6];
1321
1322 for (Int_t kz = 0; kz < 6; kz++) {
1323 actbratio[kz] = 0.;
1324 actmode[kz][0] = 0;
1325 actmode[kz][1] = 0;
1326 actmode[kz][2] = 0;
1327 }
1328 actbratio[0] = 50.;
1329 actmode[0][0] = -1000020030; // Helium3
1330 actmode[0][1] = 310; // K0s
1331
1332 actbratio[1] = 50.;
1333 actmode[1][0] = -1000020030; // Helium3
1334 actmode[1][1] = 321; // negative kaon
1335 actmode[1][2] = -211; // positive pion
1336
1337 TVirtualMC::GetMC()->SetDecayMode(-2010010030, actbratio, actmode);
1338
1339 // Define the decays for the c-deuteron
1340 Int_t cdmode[6][3];
1341 Float_t cdbratio[6];
1342
1343 for (Int_t kz = 0; kz < 6; kz++) {
1344 cdbratio[kz] = 0.;
1345 cdmode[kz][0] = 0;
1346 cdmode[kz][1] = 0;
1347 cdmode[kz][2] = 0;
1348 }
1349 cdbratio[0] = 50.;
1350 cdmode[0][0] = 1000010020; // deuteron
1351 cdmode[0][1] = -321; // negative kaon
1352 cdmode[0][2] = 211; // positive pion
1353
1354 cdbratio[1] = 50.;
1355 cdmode[1][0] = 1000010020; // deuteron
1356 cdmode[1][1] = 310; // K0s
1357
1358 TVirtualMC::GetMC()->SetDecayMode(2010010020, cdbratio, cdmode);
1359
1360 // Define the decays for the anti-c-deuteron
1361 Int_t acdmode[6][3];
1362 Float_t acdbratio[6];
1363
1364 for (Int_t kz = 0; kz < 6; kz++) {
1365 acdbratio[kz] = 0.;
1366 acdmode[kz][0] = 0;
1367 acdmode[kz][1] = 0;
1368 acdmode[kz][2] = 0;
1369 }
1370 acdbratio[0] = 50.;
1371 acdmode[0][0] = -1000010020; // deuteron
1372 acdmode[0][1] = 321; // negative kaon
1373 acdmode[0][2] = -211; // positive pion
1374
1375 acdbratio[1] = 50.;
1376 acdmode[1][0] = -1000010020; // deuteron
1377 acdmode[1][1] = 310; // K0s
1378
1379 TVirtualMC::GetMC()->SetDecayMode(-2010010020, acdbratio, acdmode);
1380
1382
1383 // Define the 2-body phase space decay for the f0(980)
1384 // Int_t mode[6][3];
1385 // Float_t bratio[6];
1386
1387 for (Int_t kz = 0; kz < 6; kz++) {
1388 bratio[kz] = 0.;
1389 mode[kz][0] = 0;
1390 mode[kz][1] = 0;
1391 mode[kz][2] = 0;
1392 }
1393 bratio[0] = 100.;
1394 mode[0][0] = 211; // pion
1395 mode[0][1] = -211; // pion
1396
1397 TVirtualMC::GetMC()->SetDecayMode(9010221, bratio, mode);
1398
1399 // Define the 2-body phase space decay for the f2(1270)
1400
1401 // for (Int_t kz = 0; kz < 6; kz++) {
1402 // bratio[kz] = 0.;
1403 // mode[kz][0] = 0;
1404 // mode[kz][1] = 0;
1405 // mode[kz][2] = 0;
1406 // }
1407 // bratio[0] = 100.;
1408 // mode[0][0] = 211; // pion
1409 // mode[0][1] = -211; // pion
1410
1411 // TVirtualMC::GetMC()->SetDecayMode(225, bratio, mode);
1412
1413 // Define the 2-body phase space decay for the resonances: f0(1500), f2(1525), f0(1710), f0(1370), a2(1320), f2(1270)
1414 for (Int_t kz = 0; kz < 6; kz++) {
1415 bratio[kz] = 0.;
1416 mode[kz][0] = 0;
1417 mode[kz][1] = 0;
1418 mode[kz][2] = 0;
1419 }
1420 bratio[0] = 100.;
1421 mode[0][0] = 310; // K0s
1422 mode[0][1] = 310; // K0s
1423
1424 TVirtualMC::GetMC()->SetDecayMode(9030221, bratio, mode); // f0(1500)
1425 TVirtualMC::GetMC()->SetDecayMode(335, bratio, mode); // f2(1525)
1426 TVirtualMC::GetMC()->SetDecayMode(10331, bratio, mode); // f0(1710)
1427 TVirtualMC::GetMC()->SetDecayMode(10221, bratio, mode); // f0(1370)
1428 TVirtualMC::GetMC()->SetDecayMode(115, bratio, mode); // a2(1320)
1429 TVirtualMC::GetMC()->SetDecayMode(225, bratio, mode); // f2(1270)
1430
1431 // Define the 3-body phase space decay for the resonances: f1(1285), f1(1420)
1432 for (Int_t kz = 0; kz < 6; kz++) {
1433 bratio[kz] = 0.;
1434 mode[kz][0] = 0;
1435 mode[kz][1] = 0;
1436 mode[kz][2] = 0;
1437 }
1438
1439 bratio2[0] = 50.;
1440 mode[0][0] = 310; // K0s
1441 mode[0][1] = -321; // anti-K
1442 mode[0][2] = 211; // pion+
1443
1444 bratio2[1] = 50.;
1445 mode[1][0] = 310; // K0s
1446 mode[1][1] = 321; // K
1447 mode[1][2] = -211; // pion-
1448
1449 TVirtualMC::GetMC()->SetDecayMode(20223, bratio2, mode); // f1(1285)
1450 TVirtualMC::GetMC()->SetDecayMode(20333, bratio2, mode); // f1(1420)
1451
1452 // Define the decay modes for the Lambda(1405)
1453 for (Int_t kz = 0; kz < 6; kz++) {
1454 bratio[kz] = 0.;
1455 mode[kz][0] = 0;
1456 mode[kz][1] = 0;
1457 mode[kz][2] = 0;
1458 }
1459 // 33.3 % sigma-pi+, sigma+pi-, sigma0pi0
1460 bratio[0] = 33.3;
1461 mode[0][0] = 3112; // Sigma-
1462 mode[0][1] = 211; // negative pion
1463 bratio[1] = 33.3;
1464 mode[1][0] = 3222; // Sigma+
1465 mode[1][1] = -211; // positive pion
1466 bratio[2] = 33.3;
1467 mode[2][0] = 3212; // Sigma0
1468 mode[2][1] = 111; // neutral pion
1469 TVirtualMC::GetMC()->SetDecayMode(102132, bratio, mode); // Lambda(1405)
1470 // Define the decay modes for the Anti-Lambda(1405)
1471 for (Int_t kz = 0; kz < 6; kz++) {
1472 abratio[kz] = 0.;
1473 amode[kz][0] = 0;
1474 amode[kz][1] = 0;
1475 amode[kz][2] = 0;
1476 }
1477 // 33.3 % sigma-pi-, sigma-pi+, sigma0pi0
1478 abratio[0] = 33.3;
1479 amode[0][0] = -3112; // AntiSigma-
1480 amode[0][1] = -211; // positive pion
1481 abratio[1] = 33.3;
1482 amode[1][0] = -3222; // AntiSigma+
1483 amode[1][1] = 211; // negative pion
1484 abratio[2] = 33.3;
1485 amode[2][0] = -3212; // Sigma0
1486 amode[2][1] = 111; // negative pion
1487 TVirtualMC::GetMC()->SetDecayMode(-102132, abratio, amode); // Anti-Lambda(1405)
1488
1489 // Lambda1520/Lambda1520bar
1490
1491 TVirtualMC::GetMC()->DefineParticle(102134, "Lambda1520", kPTNeutron, 1.5195, 0.0, 4.22e-23, "Hadron", 0.0156, 3, -1, 0, 0, 0, 0, 0, 1, kTRUE);
1492 TVirtualMC::GetMC()->DefineParticle(-102134, "Lambda1520bar", kPTNeutron, 1.5195, 0.0, 4.22e-23, "Hadron", 0.0156, 3, -1, 0, 0, 0, 0, 0, -1, kTRUE);
1493
1494 // Lambda1520 decay modes
1495 Int_t lmode[9][3];
1496 Float_t lbratio[9];
1497 for (Int_t kz = 0; kz < 9; kz++) {
1498 lbratio[kz] = 0.;
1499 lmode[kz][0] = 0;
1500 lmode[kz][1] = 0;
1501 lmode[kz][2] = 0;
1502 }
1503
1504 // L(1520) -> p K-
1505 lbratio[0] = 0.229944;
1506 lmode[0][0] = 2212;
1507 lmode[0][1] = -321;
1508
1509 // L(1520) -> n K0
1510 lbratio[1] = 0.229944;
1511 lmode[1][0] = 2112;
1512 lmode[1][1] = -311;
1513
1514 // L(1520) -> Sigma+ pi-
1515 lbratio[2] = 0.143076;
1516 lmode[2][0] = 3222;
1517 lmode[2][1] = -211;
1518
1519 // L(1520) -> Sigma0 pi0
1520 lbratio[3] = 0.143076;
1521 lmode[3][0] = 3212;
1522 lmode[3][1] = 111;
1523
1524 // L(1520) -> Sigma- pi+
1525 lbratio[4] = 0.143076;
1526 lmode[4][0] = 3112;
1527 lmode[4][1] = 211;
1528
1529 // L(1520) -> Sigma*- pi+
1530 lbratio[5] = 0.034066;
1531 lmode[5][0] = 3114;
1532 lmode[5][1] = 211;
1533
1534 // L(1520) -> Sigma*0 pi0
1535 lbratio[6] = 0.034066;
1536 lmode[6][0] = 3214;
1537 lmode[6][1] = 111;
1538
1539 // L(1520) -> Sigma*+ pi-
1540 lbratio[7] = 0.034066;
1541 lmode[7][0] = 3224;
1542 lmode[7][1] = -211;
1543
1544 // L(1520) -> Lambda gamma
1545 lbratio[8] = 0.008687;
1546 lmode[8][0] = 3122;
1547 lmode[8][1] = 22;
1548
1549 TVirtualMC::GetMC()->SetDecayMode(102134, lbratio, lmode);
1550
1551 // Lambda1520bar decay modes
1552
1553 // L(1520)bar -> p- K+
1554 lbratio[0] = 0.229944;
1555 lmode[0][0] = -2212;
1556 lmode[0][1] = 321;
1557
1558 // L(1520)bar -> nbar K0bar
1559 lbratio[1] = 0.229944;
1560 lmode[1][0] = -2112;
1561 lmode[1][1] = 311;
1562
1563 // L(1520)bar -> Sigmabar- pi+
1564 lbratio[2] = 0.143076;
1565 lmode[2][0] = -3222;
1566 lmode[2][1] = 211;
1567
1568 // L(1520)bar -> Sigma0bar pi0
1569 lbratio[3] = 0.143076;
1570 lmode[3][0] = -3212;
1571 lmode[3][1] = 111;
1572
1573 // L(1520)bar -> Sigmabar+ pi-
1574 lbratio[4] = 0.143076;
1575 lmode[4][0] = -3112;
1576 lmode[4][1] = -211;
1577
1578 // L(1520)bar -> anti-Sigma*- pi-
1579 lbratio[5] = 0.034066;
1580 lmode[5][0] = -3114;
1581 lmode[5][1] = -211;
1582
1583 // L(1520)bar -> anti-Sigma*0 pi0
1584 lbratio[6] = 0.034066;
1585 lmode[6][0] = -3214;
1586 lmode[6][1] = 111;
1587
1588 // L(1520)bar -> anti-Sigma*+ pi+
1589 lbratio[7] = 0.034066;
1590 lmode[7][0] = -3224;
1591 lmode[7][1] = 211;
1592
1593 // L(1520)bar -> Anti-Lambda gamma
1594 lbratio[8] = 0.008687;
1595 lmode[8][0] = -3122;
1596 lmode[8][1] = 22;
1597
1598 TVirtualMC::GetMC()->SetDecayMode(-102134, lbratio, lmode);
1599
1600 // --------------------------------------------------------------------
1601
1602 //Sexaquark (uuddss): compact, neutral and stable hypothetical bound state (arxiv.org/abs/1708.08951)
1603 TVirtualMC::GetMC()->DefineParticle(900000020, "Sexaquark", kPTUndefined, 2.0, 0.0, 4.35e+17, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, 2, kTRUE);
1604 TVirtualMC::GetMC()->DefineParticle(-900000020, "AntiSexaquark", kPTUndefined, 2.0, 0.0, 4.35e+17, "Hadron", 0.0, 0, 1, 0, 0, 0, 0, 0, -2, kTRUE);
1605}
1606
1608{
1609 // dispatch first to function in FairRoot
1610 FairMCApplication::AddParticles();
1611
1612 // register special particles for ALICE
1613 // TODO: try to make use of FairRoot if easier or more customizable
1615
1617 LOG(info) << "Printing \'SimUserDecay\' parameters";
1618 LOG(info) << param;
1619
1620 // check if there are PDG codes requested for user decay
1621 if (param.pdglist.empty()) {
1622 return;
1623 }
1624
1625 // loop over PDG codes in the string
1626 std::stringstream ss(param.pdglist);
1627 int pdg;
1628 while (ss >> pdg) {
1629 LOG(info) << "Setting user decay for PDG " << pdg;
1630 TVirtualMC::GetMC()->SetUserDecay(pdg);
1631 }
1632}
1633
1635{
1637 LOG(info) << "Initializing the hook for TrackReferences during stepping";
1638 auto expandedTrackRefHookFileName = o2::utils::expandShellVarsInFileName(mCutParams.stepTrackRefHookFile);
1639 if (std::filesystem::exists(expandedTrackRefHookFileName)) {
1640 // if this file exists we will compile the hook on the fly
1641 mTrackRefFcn = o2::conf::GetFromMacro<TrackRefFcn>(mCutParams.stepTrackRefHookFile, "trackRefHook()", "o2::steer::O2MCApplicationBase::TrackRefFcn", "o2mc_stepping_trackref_hook");
1642 LOG(info) << "Hook initialized from file " << expandedTrackRefHookFileName;
1643 } else {
1644 LOG(error) << "Did not file TrackRefHook file " << expandedTrackRefHookFileName << " ; Will not execute hook";
1645 mTrackRefFcn = [](TVirtualMC const*) {}; // do nothing
1646 }
1647 }
1648}
1649
1651{
1653 for (auto det : listActiveDetectors) {
1654 if (dynamic_cast<o2::base::Detector*>(det)) {
1655 ((o2::base::Detector*)det)->initializeLate();
1656 }
1657 }
1658}
1659
1660void O2MCApplication::attachSubEventInfo(fair::mq::Parts& parts, o2::data::SubEventInfo const& info) const
1661{
1662 // parts.AddPart(std::move(mSimDataChannel->NewSimpleMessage(info)));
1664}
1665
1666// helper function to fetch data from FairRootManager branch and serialize it
1667// returns handle to container
1668template <typename T>
1669const T* attachBranch(std::string const& name, fair::mq::Channel& channel, fair::mq::Parts& parts)
1670{
1671 auto mgr = FairRootManager::Instance();
1672 // check if branch is present
1673 if (mgr->GetBranchId(name) == -1) {
1674 LOG(error) << "Branch " << name << " not found";
1675 return nullptr;
1676 }
1677 auto data = mgr->InitObjectAs<const T*>(name.c_str());
1678 if (data) {
1679 o2::base::attachTMessage(*data, channel, parts);
1680 }
1681 return data;
1682}
1683
1685{
1686 mSubEventInfo = i;
1687 // being communicated a SubEventInfo also means we get a FairMCEventHeader
1688 fMCEventHeader = &mSubEventInfo->mMCEventHeader;
1689}
1690
1692{
1693 fair::mq::Parts simdataparts;
1694
1695 // fill these parts ... the receiver has to unpack similary
1696 // TODO: actually we could just loop over branches in FairRootManager at this moment?
1697 mSubEventInfo->npersistenttracks = static_cast<o2::data::Stack*>(GetStack())->getMCTracks()->size();
1698 mSubEventInfo->nprimarytracks = static_cast<o2::data::Stack*>(GetStack())->GetNprimary();
1699 attachSubEventInfo(simdataparts, *mSubEventInfo);
1700 auto tracks = attachBranch<std::vector<o2::MCTrack>>("MCTrack", *mSimDataChannel, simdataparts);
1701 attachBranch<std::vector<o2::TrackReference>>("TrackRefs", *mSimDataChannel, simdataparts);
1702 assert(tracks->size() == mSubEventInfo->npersistenttracks);
1703
1704 for (auto det : listActiveDetectors) {
1705 if (dynamic_cast<o2::base::Detector*>(det)) {
1706 ((o2::base::Detector*)det)->attachHits(*mSimDataChannel, simdataparts);
1707 }
1708 }
1709 LOG(info) << "sending message with " << simdataparts.Size() << " parts";
1710 mSimDataChannel->Send(simdataparts);
1711}
1712} // namespace steer
1713} // namespace o2
Definition of the Detector class.
std::unique_ptr< expressions::Node > node
int32_t i
Definition of the Names Generator class.
uint32_t j
Definition RawData.h:0
TBranch * ptr
static std::vector< int > const & getDetId2HitBitIndex()
Definition Detector.h:221
static MaterialManager & Instance()
static std::string getAlignedGeomFileName(const std::string_view prefix="")
Definition NameConf.cxx:46
static std::string getGeomFileName(const std::string_view prefix="")
Definition NameConf.cxx:40
static constexpr std::string_view CCDBOBJECT
Definition NameConf.h:66
static SimConfig & Instance()
Definition SimConfig.h:111
static constexpr int nameToID(char const *name, int id=First)
Definition DetID.h:155
static mask_t getMask(const std::string_view detList)
detector masks from any non-alpha-num delimiter-separated list (empty if NONE is supplied)
Definition DetID.cxx:42
void finishEventCommon()
some common parts of finishEvent
o2::conf::SimCutParams const & mCutParams
std::map< int, std::string > mSensitiveVolumes
std::map< int, std::string > mModIdToName
o2::data::SubEventInfo * mSubEventInfo
generic channel on which to send sim data
fair::mq::Channel * mSimDataChannel
void attachSubEventInfo(fair::mq::Parts &, o2::data::SubEventInfo const &info) const
void setSubEventInfo(o2::data::SubEventInfo *i)
static ShmManager & Instance()
Definition ShmManager.h:61
GLint GLenum GLint x
Definition glcorearb.h:403
GLenum mode
Definition glcorearb.h:266
GLuint buffer
Definition glcorearb.h:655
GLuint const GLchar * name
Definition glcorearb.h:781
GLint y
Definition glcorearb.h:270
GLenum const GLfloat * params
Definition glcorearb.h:272
GLboolean * data
Definition glcorearb.h:298
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLuint GLsizei const GLchar * message
Definition glcorearb.h:2517
GLenum GLfloat param
Definition glcorearb.h:271
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
void attachTMessage(Container const &hits, fair::mq::Channel &channel, fair::mq::Parts &parts)
Definition Detector.h:266
const T * attachBranch(std::string const &name, fair::mq::Channel &channel, fair::mq::Parts &parts)
void addSpecialParticles()
void TypedVectorAttach(const char *name, fair::mq::Channel &channel, fair::mq::Parts &parts)
std::string expandShellVarsInFileName(std::string const &input)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string stepTrackRefHookFile
Definition SimParams.h:27
o2::dataformats::MCEventHeader mMCEventHeader
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"