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