]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EPOS/AliGenEposIsajetToPdgConverter.cxx
Implementation of a method (RemoveGraphDuplicates) to take away
[u/mrichter/AliRoot.git] / EPOS / AliGenEposIsajetToPdgConverter.cxx
CommitLineData
54d27e87 1/*
2 * AliGenEposIsajetToPdgConverter.cxx
3 *
4 * Helper class used by TEpos to insert EPOS internal objects and higher
5 * resonances to PDG database.
6 * Quark clusters has has unaltered code, unknown objects have code of
7 * form 6xxxxxxxx, and higher resonances have codes from Particle Physics
8 * Review '96
9 *
10 * Created on: Aug 03, 2009
11 * Author: Piotr Ostrowski, postrow@if.pw.edu.pl
12 */
13
14
15#include "TDatabasePDG.h"
16#include "AliGenEposIsajetToPdgConverter.h"
17#include "stdio.h"
18
19ClassImp(AliGenEposIsajetToPdgConverter)
20
21AliGenEposIsajetToPdgConverter::AliGenEposIsajetToPdgConverter() {
22
23}
24
25AliGenEposIsajetToPdgConverter::~AliGenEposIsajetToPdgConverter() { }
26
27Int_t AliGenEposIsajetToPdgConverter::ConvertIsajetToPdg(Int_t isajet) {
28 if (!sfParticlesAdded) {
29 AddHigherResonances();
30 }
31 TDatabasePDG *pdgDb = TDatabasePDG::Instance();
32 Int_t pdg = pdgDb->ConvertIsajetToPdg(isajet);
33 if(pdg == 0) {
34 pdg = ExtendedMapping(isajet);
35 }
36 if(pdg != 0){
37 return pdg;
38 }
39 if(isajet / 100000000 == 8 || isajet / 100000000 == 7) {
40 AddQuarkCluster(isajet);
41 return isajet;
42 }
43 if(isajet % 100 == 99) {
44 pdg = AddUnknownObject(isajet);
45 }
46
47 if (pdg == 0) {
48 printf("TEpos: Warning, unknown particle, ISAJET: %d\n",isajet);
49 }
50 return pdg;
51}
52
53void AliGenEposIsajetToPdgConverter::AddQuarkCluster(Int_t clusterCode) {
54 TDatabasePDG *pdgDb = TDatabasePDG::Instance();
55 if(!pdgDb->GetParticle(clusterCode)) {
56 pdgDb->AddParticle("Quark cluster", "Quark cluster", 0.0, kFALSE, 0, 0, "EPOS Quark cluster", clusterCode);
57 }
58}
59
60Int_t AliGenEposIsajetToPdgConverter::AddUnknownObject(Int_t code) {
61 Int_t newCode = 600000000 + code;
62 TDatabasePDG *pdgDb = TDatabasePDG::Instance();
63 if(!pdgDb->GetParticle(newCode)) {
64 pdgDb->AddParticle("Unknown EPOS particle", "Unknown EPOS particle", 0.0, kFALSE, 0, 0, "Unknown", newCode);
65 }
66 return newCode;
67}
68
69Int_t AliGenEposIsajetToPdgConverter::ExtendedMapping(Int_t isajet) {
70 Int_t sign = isajet < 0 ? -1 : 1;
71 isajet*=sign;
72 Int_t retVal = 0;
73 switch(isajet) {
74 //diquarks
75 case 1100: retVal=2203; break;
76 case 1200: retVal=2101; break;
77 case 1300: retVal=3201; break;
78 case 2200: retVal=1103; break;
79 case 2300: retVal=3101; break;
80 case 3300: retVal=3303; break;
81
82 case 1112: retVal=2222; break;
83 case 1113: retVal=12224; break;
84 case 1114: retVal=12226; break; //delta++
85 case 2222: retVal=1112; break;
86 case 2223: retVal=11114; break;
87 case 2224: retVal=11116; break; //delta-
88 case 1122: retVal=12212; break;
89 case 1123: retVal=22212; break;
90 case 1125: retVal=32212; break;
91 case 1127: retVal=42212; break; //p*
92 case 1222: retVal=12112; break;
93 case 1223: retVal=22112; break;
94 case 1225: retVal=32112; break;
95 case 1227: retVal=42112; break; //n*
96 case 1124: retVal=2122; break;
97 case 1126: retVal=12214; break;
98 case 1128: retVal=12126; break; //delta+
99 case 1224: retVal=1212; break;
100 case 1226: retVal=12114; break;
101 case 1228: retVal=11216; break; //delta0
102 case 1132: retVal=13222; break;
103 case 1133: retVal=3226; break;
104 case 1134: retVal=23224; break; //sigma+
105 case 1236: retVal=13212; break;
106 case 1237: retVal=3216; break;
107 case 1239: retVal=23214; break; //sigma0
108 case 2232: retVal=13112; break;
109 case 2233: retVal=3116; break;
110 case 2234: retVal=23114; break; //sigma-
111 case 1233: retVal=13122; break;
112 case 1234: retVal=3124; break;
113 case 1235: retVal=33122; break;
114 case 1238: retVal=13126; break; //lambda0
115 }
116 return sign*retVal;
117}
118
119Bool_t AliGenEposIsajetToPdgConverter::sfParticlesAdded = kFALSE;
120
121void AliGenEposIsajetToPdgConverter::AddHigherResonances() {
122 if(sfParticlesAdded)
123 return;
124 sfParticlesAdded=kTRUE;
125 TDatabasePDG *fPdgDb = TDatabasePDG::Instance();
126 //| 332 | F0(975) |
127 fPdgDb->AddAntiParticle("F0_bar", -10221);
128 //| 112 | A0(980) |
129 //| 122 | A+(980) |
130 //| 1112 | DL++(1620) |
131 fPdgDb->AddParticle("delta++", "delta++", 1.630, kFALSE, 0.145, 6, "Baryon", 2222);
132 fPdgDb->AddAntiParticle("delta++_bar", -2222);
133 //| 1113 | DL++(1700) |
134 fPdgDb->AddParticle("delta++", "delta++", 1.700, kFALSE, 0.300, 6, "Baryon", 12224);
135 fPdgDb->AddAntiParticle("delta++_bar", -12224);
136 //| 1114 | DL++(1925) |
137 fPdgDb->AddParticle("delta++", "delta++", 1.960, kFALSE, 0.360, 6, "Baryon", 12226);
138 fPdgDb->AddAntiParticle("delta++_bar", -12226);
139 //| 2222 | DL-(1620) |
140 fPdgDb->AddParticle("delta-", "delta-", 1.630, kFALSE, 0.145, -3, "Baryon", 1112);
141 fPdgDb->AddAntiParticle("delta-_bar", -1112);
142 //| 2223 | DL-(1700) |
143 fPdgDb->AddParticle("delta-", "delta-", 1.700, kFALSE, 0.300, -3, "Baryon", 11114);
144 fPdgDb->AddAntiParticle("delta-_bar", -11114);
145 //| 2224 | DL-(1925) |
146 fPdgDb->AddParticle("delta-", "delta-", 1.960, kFALSE, 0.360, -3, "Baryon", 11116);
147 fPdgDb->AddAntiParticle("delta-_bar", -11116);
148 //| 1122 | N*+(1440) |
149 fPdgDb->AddParticle("p*", "proton (excited)", 1.440, kFALSE, 0.3, 3, "Baryon", 12212);
150 fPdgDb->AddAntiParticle("p*_bar", -12212);
151 //| 1123 | N*+(1530) |
152 fPdgDb->AddParticle("p*", "proton (excited)", 1.535, kFALSE, 0.150, 3, "Baryon", 22212);
153 fPdgDb->AddAntiParticle("p*_bar", -22212);
154 //| 1125 | N*+(1665) |
155 fPdgDb->AddParticle("p*", "proton (excited)", 1.655, kFALSE, 0.165, 3, "Baryon", 32212);
156 fPdgDb->AddAntiParticle("p*_bar", -32212);
157 //| 1127 | N*+(1710) |
158 fPdgDb->AddParticle("p*", "proton (excited)", 1.710, kFALSE, 0.1, 3, "Baryon", 42212);
159 fPdgDb->AddAntiParticle("p*_bar", -42212);
160 //| 1222 | N*0(1440) |
161 fPdgDb->AddParticle("n*", "neutron (excited)", 1.440, kFALSE, 0.3, 3, "Baryon", 12112);
162 fPdgDb->AddAntiParticle("n*_bar", -12112);
163 //| 1223 | N*0(1530) |
164 fPdgDb->AddParticle("n*", "neutron (excited)", 1.535, kFALSE, 0.150, 3, "Baryon", 22112);
165 fPdgDb->AddAntiParticle("n*_bar", -22112);
166 //| 1225 | N*0(1665) |
167 fPdgDb->AddParticle("n*", "neutron (excited)", 1.655, kFALSE, 0.165, 3, "Baryon", 32112);
168 fPdgDb->AddAntiParticle("n*_bar", -32112);
169 //| 1227 | N*0(1710) |
170 fPdgDb->AddParticle("n*", "neutron (excited)", 1.710, kFALSE, 0.1, 3, "Baryon", 42112);
171 fPdgDb->AddAntiParticle("n*_bar", -42112);
172 //| 1124 | DL+(1620) |
173 fPdgDb->AddParticle("delta+", "delta+", 1.630, kFALSE, 0.145, 3, "Baryon", 2122);
174 fPdgDb->AddAntiParticle("delta+_bar", -2122);
175 //| 1126 | DL+(1700) |
176 fPdgDb->AddParticle("delta+", "delta+", 1.700, kFALSE, 0.300, 3, "Baryon", 12214);
177 fPdgDb->AddAntiParticle("delta+_bar", -12214);
178 //| 1128 | DL+(1925) |
179 fPdgDb->AddParticle("delta+", "delta+", 1.960, kFALSE, 0.360, 3, "Baryon", 12126);
180 fPdgDb->AddAntiParticle("delta+_bar", -12126);
181 //| 1224 | DL0(1620) |
182 fPdgDb->AddParticle("delta0", "delta0", 1.630, kFALSE, 0.145, 0, "Baryon", 1212);
183 fPdgDb->AddAntiParticle("delta0_bar", -1212);
184 //| 1226 | DL0(1700) |
185 fPdgDb->AddParticle("delta0", "delta0", 1.700, kFALSE, 0.300, 0, "Baryon", 12114);
186 fPdgDb->AddAntiParticle("delta0_bar", -12114);
187 //| 1228 | DL0(1925) |
188 fPdgDb->AddParticle("delta0", "delta0", 1.960, kFALSE, 0.360, 0, "Baryon", 11216);
189 fPdgDb->AddAntiParticle("delta0_bar", -11216);
190 //| 1233 | L(1405) |
191 fPdgDb->AddParticle("lambda0", "lambda0", 1.406, kFALSE, 0.050, 0, "Baryon", 13122);
192 fPdgDb->AddAntiParticle("lambda0_bar", -13122);
193 //| 1234 | L(1520) |
194 //| 1235 | L(1645) |
195 fPdgDb->AddParticle("lambda0", "lambda0", 1.670, kFALSE, 0.035, 0, "Baryon", 33122);
196 fPdgDb->AddAntiParticle("lambda0_bar", -33122);
197 //| 1238 | L(1845) |
198 fPdgDb->AddParticle("lambda0", "lambda0", 1.830, kFALSE, 0.095, 0, "Baryon", 13126);
199 fPdgDb->AddAntiParticle("lambda0_bar", -13126);
200 //| 1236 | S0(1665) |
201 fPdgDb->AddParticle("sigma0", "sigma0", 1.660, kFALSE, 0.100, 0, "Baryon", 13212);
202 fPdgDb->AddAntiParticle("sigma0_bar", -13212);
203 //| 1237 | S0(1776) |
204 fPdgDb->AddParticle("sigma0", "sigma0", 1.775, kFALSE, 0.120, 0, "Baryon", 3216);
205 fPdgDb->AddAntiParticle("sigma0_bar", -3216);
206 //| 1239 | S0(1930) |
207 fPdgDb->AddParticle("sigma0", "sigma0", 1.940, kFALSE, 0.220, 0, "Baryon", 23214);
208 fPdgDb->AddAntiParticle("sigma0_bar", -23214);
209 //| 1132 | S+(1665) |
210 fPdgDb->AddParticle("sigma+", "sigma+", 1.660, kFALSE, 0.100, 0, "Baryon", 13222);
211 fPdgDb->AddAntiParticle("sigma+_bar", -13222);
212 //| 1133 | S+(1776) |
213 fPdgDb->AddParticle("sigma+", "sigma+", 1.775, kFALSE, 0.120, 0, "Baryon", 3226);
214 fPdgDb->AddAntiParticle("sigma+_bar", -3226);
215 //| 1134 | S+(1930) |
216 fPdgDb->AddParticle("sigma+", "sigma+", 1.940, kFALSE, 0.220, 0, "Baryon", 23224);
217 fPdgDb->AddAntiParticle("sigma+_bar", -23224);
218 //| 2232 | S-(1665) |
219 fPdgDb->AddParticle("sigma-", "sigma-", 1.660, kFALSE, 0.100, 0, "Baryon", 13112);
220 fPdgDb->AddAntiParticle("sigma-_bar", -13112);
221 //| 2233 | S-(1776) |
222 fPdgDb->AddParticle("sigma-", "sigma-", 1.775, kFALSE, 0.120, 0, "Baryon", 3116);
223 fPdgDb->AddAntiParticle("sigma-_bar", -3116);
224 //| 2234 | S-(1930) |
225 fPdgDb->AddParticle("sigma-", "sigma-", 1.940, kFALSE, 0.220, 0, "Baryon", 23114);
226 fPdgDb->AddAntiParticle("sigma-_bar", -23114);
227 //+------+------------+
228
229}