-
Notifications
You must be signed in to change notification settings - Fork 499
Expand file tree
/
Copy pathUserDecay.C
More file actions
49 lines (43 loc) · 1.49 KB
/
UserDecay.C
File metadata and controls
49 lines (43 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#if !defined(__CLING__) || defined(__ROOTCLING__)
#include <iostream>
#include "TDatabasePDG.h"
#include "TParticlePDG.h"
#include "TVirtualMC.h"
#endif
void UserDecayConfig()
{
std::cout << "Loading User Decay Config from macro" << std::endl;
TDatabasePDG* db = TDatabasePDG::Instance();
TParticlePDG* p = 0;
Int_t mode[6][3];
Float_t bratio[6];
Int_t AlphaPDG, He5PDG;
p = db->GetParticle("Alpha");
if (p)
AlphaPDG = p->PdgCode();
p = db->GetParticle("He5");
if (p)
He5PDG = p->PdgCode();
for (Int_t kz = 0; kz < 6; kz++) {
bratio[kz] = 0.;
mode[kz][0] = 0;
mode[kz][1] = 0;
mode[kz][2] = 0;
// std::cout << mode[kz][0] << " " << mode[kz][1] << " " << mode[kz][2] << std::endl;
}
bratio[0] = 100.;
mode[0][0] = 2112;
mode[0][1] = AlphaPDG;
/* bratio[1] = 50.;
mode[1][0] =2212 ;
mode[1][1] =AlphaPDG ;
*/
TVirtualMC::GetMC()->SetDecayMode(He5PDG, bratio, mode);
}