13 #ifndef Pythia8_DireSplitInfo_H
14 #define Pythia8_DireSplitInfo_H
16 #define DIRE_SPLITINFO_VERSION "2.002"
18 #include "Pythia8/Event.h"
19 #include "Pythia8/PartonSystems.h"
20 #include "Pythia8/DireBasics.h"
34 original_chain(chainIn.original_chain) {}
36 { chain = c.chain; original_chain = c.original_chain;}
return *
this; }
40 void addToChain(
const int iPos,
const Event& state);
42 int iPosEnd() {
return chain.back().first; }
43 int colEnd () {
return chain.back().second.first; }
44 int acolEnd() {
return chain.back().second.second; }
45 int size()
const {
return chain.size(); }
46 bool isInChain (
int iPos);
47 int posInChain (
int iPos);
48 bool colInChain (
int col);
53 string listPos()
const;
58 string list2 ()
const;
60 void clear() { chain.resize(0); original_chain.resize(0); }
62 vector<pair<int,pair<int,int> > > chain;
63 vector<pair<int,pair<int,int> > > original_chain;
66 pair<int,pair<int,int> >& operator[](
int i) {
return chain[i];}
67 const pair<int,pair<int,int> >& operator[](
int i)
const {
return chain[i];}
83 int size()
const {
return chains.size(); }
94 vector<DireSingleColChain> chains;
107 double m2In,
bool isFinalIn) : id(idIn), col(colIn),
108 acol(acolIn), charge(chargeIn), spin(spinIn), m2(m2In), isFinal(isFinalIn)
111 col(in.col()), acol(in.acol()), charge(in.charge()), spin(in.pol()),
112 m2(pow2(in.m())), isFinal(in.isFinal()) {}
114 void store(
int idIn,
int colIn,
int acolIn,
int chargeIn,
int spinIn,
115 double m2In,
bool isFinalIn) {
id = idIn; col = colIn;
116 acol = acolIn; charge = chargeIn; spin = spinIn; m2 = m2In;
117 isFinal = isFinalIn; }
118 void store(
const Particle in) {
id = in.id(); col = in.col();
119 acol = in.acol(); charge = in.charge(); spin = in.pol();
120 m2 = pow2(in.m()); isFinal = in.isFinal(); }
122 void clear() { col = acol = -1;
id = charge = 0; spin = -9; m2 = -1.;
126 int id, col, acol, charge, spin;
143 sai(0.), xa(-1), phi2(-9.), m2RadBef(-1.), m2Rec(-1.), m2RadAft(-1.),
144 m2EmtAft(-1.), m2EmtAft2(-1.), xBef(-1.), xAft(-1.) {}
147 double saiIn,
double xaIn,
double phi2In,
double m2RadBefIn,
148 double m2RecIn,
double m2RadAftIn,
double m2EmtAftIn,
double m2EmtAft2In,
149 double xBefIn,
double xAftIn )
150 : m2Dip(m2DipIn), pT2(pT2In), pT2Old(-1.), z(zIn), phi(phiIn),
151 sai(saiIn), xa(xaIn), phi2(phi2In), m2RadBef(m2RadBefIn), m2Rec(m2RecIn),
152 m2RadAft(m2RadAftIn), m2EmtAft(m2EmtAftIn), m2EmtAft2(m2EmtAft2In),
153 xBef(xBefIn), xAft(xAftIn) {}
155 void store2to3kine(
double m2DipIn,
double pT2In,
double zIn,
double phiIn,
156 double xAftIn = -1.) {
157 m2Dip = m2DipIn; pT2 = pT2In; z = zIn; phi = phiIn; xAft = xAftIn; }
158 void store2to3mass(
double m2RadBefIn,
double m2RecIn,
double m2RadAftIn,
159 double m2EmtAftIn) { m2RadBef = m2RadBefIn; m2Rec = m2RecIn;
160 m2RadAft = m2RadAftIn; m2EmtAft = m2EmtAftIn; }
162 void store2to4kine(
double m2DipIn,
double pT2In,
double zIn,
double phiIn,
163 double saiIn,
double xaIn,
double phi2In,
double xAftIn = -1.) {
165 pT2 = pT2In; z = zIn; phi = phiIn; sai = saiIn; xa = xaIn; phi2 = phi2In;
167 void store2to4mass(
double m2RadBefIn,
double m2RecIn,
double m2RadAftIn,
168 double m2EmtAftIn,
double m2EmtAft2In) {
169 m2RadBef = m2RadBefIn; m2Rec = m2RecIn; m2RadAft = m2RadAftIn;
170 m2EmtAft = m2EmtAftIn; m2EmtAft2 = m2EmtAft2In; }
172 void set_m2Dip (
double in) {m2Dip=(in);}
173 void set_pT2 (
double in) {pT2=(in);}
174 void set_pT2Old (
double in) {pT2Old=(in);}
175 void set_z (
double in) {z=(in);}
176 void set_phi (
double in) {phi=(in);}
177 void set_sai (
double in) {sai=(in);}
178 void set_xa (
double in) {xa=(in);}
179 void set_phi2 (
double in) {phi2=(in);}
180 void set_m2RadBef (
double in) {m2RadBef=(in);}
181 void set_m2Rec (
double in) {m2Rec=(in);}
182 void set_m2RadAft (
double in) {m2RadAft=(in);}
183 void set_m2EmtAft (
double in) {m2EmtAft=(in);}
184 void set_m2EmtAft2 (
double in) {m2EmtAft2=(in);}
185 void set_xBef (
double in) {xBef=(in);}
186 void set_xAft (
double in) {xAft=(in);}
188 void clear() { m2Dip = pT2 = pT2Old = z = xa = m2RadBef = m2Rec = m2RadAft
189 = m2EmtAft = m2EmtAft2 = xBef = xAft = -1.; sai = 0.; phi = phi2 = -9.; }
195 unordered_map<string,double> getKinInfo() {
198 (
"z",z)(
"phi",phi)(
"sai",sai)(
"xa",xa)(
"phi2",phi2)(
"m2RadBef",m2RadBef)
199 (
"m2Rec",m2Rec)(
"m2RadAft",m2RadAft)(
"m2EmtAft",m2EmtAft)
200 (
"m2EmtAft2",m2EmtAft2)(
"xBef",xBef) (
"xAft",xAft);
204 double m2Dip, pT2, pT2Old, z, phi, sai, xa, phi2,
205 m2RadBef, m2Rec, m2RadAft, m2EmtAft, m2EmtAft2;
216 DireSplitInfo() : iRadBef(0), iRecBef(0), iRadAft(0), iRecAft(0), iEmtAft(0),
217 iEmtAft2(0), side(0), type(0), system(0), systemRec(0),
218 splittingSelName(
""), useForBranching(
false), terminateEvolution(
false),
219 iRadBefStore(-1), iRecBefStore(-1), iRadAftStore(-1), iRecAftStore(-1),
220 iEmtAftStore(-1), iEmtAft2Store(-1), sideStore(-1), typeStore(-1),
221 systemStore(-1), systemRecStore(-1), splittingSelNameStore(
""),
222 useForBranchingStore(
false), terminateEvolutionStore(
false) {
225 int iRadAftIn,
int iRecAftIn,
int iEmtAftIn,
226 double m2DipIn = -1.,
double pT2In = -1.,
double zIn = -1.,
227 double phiIn = -9.,
double saiIn = 0.,
double xaIn = -1.,
228 double phi2In = -9.,
double m2RadBefIn = -1.,
double m2RecIn = -1.,
229 double m2RadAftIn = -1.,
double m2EmtAftIn = -1.,
double m2EmtAft2In = -1.,
230 double xBefIn = -1.,
double xAftIn = -1.,
231 int sideIn = 0,
int typeIn = 0,
int systemIn = 0,
int systemRecIn = 0,
232 string splittingSelNameIn =
"",
bool useForBranchingIn =
false,
234 iRadBef(iRadBefIn), iRecBef(iRecBefIn),
235 iRadAft(iRadAftIn), iRecAft(iRecAftIn), iEmtAft(iEmtAftIn),
236 kinSave(m2DipIn, pT2In, zIn, phiIn, saiIn, xaIn, phi2In, m2RadBefIn,
237 m2RecIn, m2RadAftIn, m2EmtAftIn, m2EmtAft2In, xBefIn, xAftIn),
238 side(sideIn), type(typeIn), system(systemIn), systemRec(systemRecIn),
239 splittingSelName(splittingSelNameIn), useForBranching(useForBranchingIn),
240 terminateEvolution(
false), iSiblings(iSiblingsIn)
244 string splittingSelNameIn) : iRadBef(iRadBefIn), iRecBef(iRecBefIn),
245 splittingSelName(splittingSelNameIn),
246 iRadBefStore(-1), iRecBefStore(-1), iRadAftStore(-1), iRecAftStore(-1),
247 iEmtAftStore(-1), iEmtAft2Store(-1), sideStore(-1), typeStore(-1),
248 systemStore(-1), systemRecStore(-1), splittingSelNameStore(
""),
249 useForBranchingStore(
false), terminateEvolutionStore(
false) {
250 iRadAft = iRecAft = iEmtAft = side = type = system = systemRec = 0;
251 useForBranching = terminateEvolution =
false; init(state); }
254 int iEmtAftIn,
string splittingSelNameIn) :
255 iRadAft(iRadAftIn), iRecAft(iRecAftIn),
256 iEmtAft(iEmtAftIn), splittingSelName(splittingSelNameIn),
257 iRadBefStore(-1), iRecBefStore(-1), iRadAftStore(-1), iRecAftStore(-1),
258 iEmtAftStore(-1), iEmtAft2Store(-1), sideStore(-1), typeStore(-1),
259 systemStore(-1), systemRecStore(-1), splittingSelNameStore(
""),
260 useForBranchingStore(
false), terminateEvolutionStore(
false) {
261 splittingSelName =
""; iRadBef = iRecBef = side = type = system
263 useForBranching = terminateEvolution =
false; init(state); }
266 iRadAftStore(-1), iRecAftStore(-1), iEmtAftStore(-1), iEmtAft2Store(-1),
267 sideStore(-1), typeStore(-1), systemStore(-1), systemRecStore(-1),
268 particleSaveStore(), kinSaveStore(), splittingSelNameStore(),
269 extrasStore(), useForBranchingStore(
false), terminateEvolutionStore(
false),
276 iEmtAft2 = s.iEmtAft2;
277 for (
int i=0; i < int(s.particleSave.size()); ++i)
278 particleSave.push_back(s.particleSave[i]);
279 kinSave.store(s.kinSave);
283 systemRec = s.systemRec;
284 splittingSelName = s.splittingSelName;
285 for ( unordered_map<string,double>::const_iterator it = s.extras.begin();
286 it != s.extras.end(); ++it )
287 extras.insert(make_pair(it->first,it->second));
288 useForBranching = s.useForBranching;
289 terminateEvolution = s.terminateEvolution;
290 iSiblings = s.iSiblings;
310 void set2to3kin(
double m2DipIn,
double pT2In,
double zIn,
double phiIn,
311 double m2RadBefIn,
double m2RecIn,
double m2RadAftIn,
double m2EmtAftIn) {
312 kinSave.store2to3kine(m2DipIn, pT2In, zIn, phiIn);
313 kinSave.store2to3mass(m2RadBefIn, m2RecIn, m2RadAftIn, m2EmtAftIn); }
315 void set2to4kin(
double m2DipIn,
double pT2In,
double zIn,
double phiIn,
316 double saiIn,
double xaIn,
double phi2In,
double m2RadBefIn,
317 double m2RecIn,
double m2RadAftIn,
double m2EmtAftIn,
double m2EmtAft2In) {
318 kinSave.store2to4kine(m2DipIn, pT2In, zIn, phiIn, saiIn, xaIn, phi2In);
319 kinSave.store2to4mass(m2RadBefIn, m2RecIn, m2RadAftIn, m2EmtAftIn,
322 void set_m2Dip (
double in) {kinSave.set_m2Dip(in);}
323 void set_pT2 (
double in) {kinSave.set_pT2(in);}
324 void set_pT2Old (
double in) {kinSave.set_pT2Old(in);}
325 void set_z (
double in) {kinSave.set_z(in);}
326 void set_phi (
double in) {kinSave.set_phi(in);}
327 void set_sai (
double in) {kinSave.set_sai(in);}
328 void set_xa (
double in) {kinSave.set_xa(in);}
329 void set_phi2 (
double in) {kinSave.set_phi2(in);}
330 void set_m2RadBef (
double in) {kinSave.set_m2RadBef(in);}
331 void set_m2Rec (
double in) {kinSave.set_m2Rec(in);}
332 void set_m2RadAft (
double in) {kinSave.set_m2RadAft(in);}
333 void set_m2EmtAft (
double in) {kinSave.set_m2EmtAft(in);}
334 void set_m2EmtAft2 (
double in) {kinSave.set_m2EmtAft2(in);}
335 void set_xBef (
double in) {kinSave.set_xBef(in);}
336 void set_xAft (
double in) {kinSave.set_xAft(in);}
338 void storeRadBef(
const Particle& in)
339 { particleSave[0].store(in); }
340 void storeRecBef(
const Particle& in)
341 { particleSave[1].store(in); }
342 void storeRadAft(
const Particle& in)
343 { particleSave[2].store(in); }
344 void storeRecAft(
const Particle& in)
345 { particleSave[3].store(in); }
346 void storeEmtAft(
const Particle& in)
347 { particleSave[4].store(in); }
348 void storeEmtAft2(
const Particle& in)
349 { particleSave[5].store(in); }
351 void setRadBef(
int idIn = 0,
int colIn = -1,
int acolIn = -1,
352 int chargeIn = 0,
int spinIn = -9,
double m2In = -1.0,
353 bool isFinalIn =
false) { setParticle(0, idIn, colIn,
354 acolIn, chargeIn, spinIn, m2In, isFinalIn); }
355 void setRecBef(
int idIn = 0,
int colIn = -1,
int acolIn = -1,
356 int chargeIn = 0,
int spinIn = -9,
double m2In = -1.0,
357 bool isFinalIn =
false) { setParticle(1, idIn, colIn,
358 acolIn, chargeIn, spinIn, m2In, isFinalIn); }
359 void setRadAft(
int idIn = 0,
int colIn = -1,
int acolIn = -1,
360 int chargeIn = 0,
int spinIn = -9,
double m2In = -1.0,
361 bool isFinalIn =
false) { setParticle(2, idIn, colIn,
362 acolIn, chargeIn, spinIn, m2In, isFinalIn); }
363 void setRecAft(
int idIn = 0,
int colIn = -1,
int acolIn = -1,
364 int chargeIn = 0,
int spinIn = -9,
double m2In = -1.0,
365 bool isFinalIn =
false) { setParticle(3, idIn, colIn,
366 acolIn, chargeIn, spinIn, m2In, isFinalIn); }
367 void setEmtAft(
int idIn = 0,
int colIn = -1,
int acolIn = -1,
368 int chargeIn = 0,
int spinIn = -9,
double m2In = -1.0,
369 bool isFinalIn =
false) { setParticle(4, idIn, colIn,
370 acolIn, chargeIn, spinIn, m2In, isFinalIn); }
371 void setEmtAft2(
int idIn = 0,
int colIn = -1,
int acolIn = -1,
372 int chargeIn = 0,
int spinIn = -9,
double m2In = -1.0,
373 bool isFinalIn =
false) { setParticle(5, idIn, colIn,
374 acolIn, chargeIn, spinIn, m2In, isFinalIn); }
375 void clearRadBef() { setParticle(0, 0, -1, -1, 0, -9, -1.0,
false); }
376 void clearRecBef() { setParticle(1, 0, -1, -1, 0, -9, -1.0,
false); }
377 void clearRadAft() { setParticle(2, 0, -1, -1, 0, -9, -1.0,
false); }
378 void clearRecAft() { setParticle(3, 0, -1, -1, 0, -9, -1.0,
false); }
379 void clearEmtAft() { setParticle(4, 0, -1, -1, 0, -9, -1.0,
false); }
380 void clearEmtAft2() { setParticle(5, 0, -1, -1, 0, -9, -1.0,
false); }
381 void setParticle(
int iPos,
int idIn = 0,
int colIn = -1,
int acolIn = -1,
382 int chargeIn = 0,
int spinIn = -9,
double m2In = -1.0,
383 bool isFinalIn =
false) { particleSave[iPos].store(
384 idIn, colIn, acolIn, chargeIn, spinIn, m2In, isFinalIn); }
386 void storeName (
string name) { splittingSelName = name; }
387 void storeType (
int in) { type = in; }
388 void storeSystem (
int in) { system = in; }
389 void storeSystemRec (
int in) { systemRec = in; }
390 void storeSide (
int in) { side = in; }
391 void storeExtras ( unordered_map<string,double> in) { extras = in; }
392 void storeRadRecBefPos (
int rad,
int rec) { iRadBef = rad; iRecBef = rec; }
393 void canUseForBranching (
bool in) { useForBranching = in;}
395 void addExtra(
string key,
double value) {
396 unordered_map<string, double>::iterator it = extras.find(key);
397 if (it == extras.end()) extras.insert(make_pair(key,value));
398 else it->second = value;
401 void storeInfo(
string name,
int typeIn,
int systemIn,
int systemRecIn,
402 int sideIn,
int iPosRadBef,
int iPosRecBef,
403 const Event& state,
int idEmtAft,
404 int idRadAft,
int nEmissions,
double m2Dip,
double pT2,
double pT2Old,
405 double z,
double phi,
double m2Bef,
double m2s,
double m2r,
double m2i,
406 double sa1,
double xa,
double phia1,
double m2j,
double xBef,
double xAft);
408 unordered_map<string,double> getKinInfo() {
return kinSave.getKinInfo();}
410 void storePosAfter(
int iRadAftIn,
int iRecAftIn,
int iEmtAftIn,
418 int iRadBef, iRecBef;
421 int iRadAft, iRecAft, iEmtAft, iEmtAft2;
423 vector<DireSplitParticle> particleSave;
427 int side, type, system, systemRec;
428 string splittingSelName;
429 unordered_map<string,double> extras;
431 bool useForBranching, terminateEvolution;
434 int iRadBefStore, iRecBefStore, iRadAftStore, iRecAftStore, iEmtAftStore,
435 iEmtAft2Store, sideStore, typeStore, systemStore, systemRecStore;
436 vector<DireSplitParticle> particleSaveStore;
438 string splittingSelNameStore;
439 unordered_map<string,double> extrasStore;
440 bool useForBranchingStore, terminateEvolutionStore;
444 void clearSiblings() { iSiblings.clear(); }
452 #endif // end Pythia8_DireSplitInfo_H
Sparse class to hold track kinematics.