File: SubProcessGroup.cc

package info (click to toggle)
thepeg 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 9,312 kB
  • ctags: 11,509
  • sloc: cpp: 57,129; sh: 11,315; java: 3,212; lisp: 1,402; makefile: 830; ansic: 58; perl: 3
file content (81 lines) | stat: -rw-r--r-- 2,373 bytes parent folder | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// -*- C++ -*-
//
// SubProcessGroup.cc is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2007 Leif Lonnblad
// Copyright (C) 2009-2010 Simon Platzer
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SubProcessGroup class.
//
#include "SubProcessGroup.h"
#include "ThePEG/EventRecord/Collision.h"
#include "ThePEG/Config/algorithm.h"
#include "ThePEG/EventRecord/ParticleTraits.h"
#include "ThePEG/Utilities/Rebinder.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include <iostream>

using namespace ThePEG;

SubProcessGroup::
SubProcessGroup(const PPair & newIncoming,
 	   tCollPtr newCollision, tcEventBasePtr newHandler)
  : SubProcess(newIncoming,newCollision,newHandler) {}

SubProcessGroup::~SubProcessGroup() {}

SubProPtr SubProcessGroup::clone() const {
  return ptr_new<Ptr<SubProcessGroup>::ptr>(*this);
}

void SubProcessGroup::rebind(const EventTranslationMap & trans) {

  SubProcess::rebind(trans);

  for ( SubProcessVector::iterator sub = dependent().begin();
	sub != dependent().end(); ++sub )
    (*sub = trans.translate(*sub))->rebind(trans);

}

void SubProcessGroup::transform(const LorentzRotation & r) {

  SubProcess::transform(r);

  for ( SubProcessVector::iterator sub = dependent().begin();
	sub != dependent().end(); ++sub )
    (**sub).transform(r);

}

void SubProcessGroup::printMe(ostream& os) const {
  os << "head sub-process of this group with relative weight "
     << groupWeight() << ":\n";
  SubProcess::printMe(os);
  os << "dependent sub-processes in this group:\n";
  for ( SubProcessVector::const_iterator sub = dependent().begin();
	sub != dependent().end(); ++sub ) {
    os << "performed by " << EventConfig::nameHandler((**sub).handler())
       << " with relative weight " << (**sub).groupWeight() << "\n";
    (**sub).printMe(os);
  }
}

void SubProcessGroup::persistentOutput(PersistentOStream & os) const {
  os << theDependent;

}

void SubProcessGroup::persistentInput(PersistentIStream & is, int) {
  is >> theDependent;
}

ClassDescription<SubProcessGroup> SubProcessGroup::initSubProcessGroup;

void SubProcessGroup::Init() {}