File: SubProcessGroup.h

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 (165 lines) | stat: -rw-r--r-- 4,075 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// -*- C++ -*-
//
// SubProcessGroup.h 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.
//
#ifndef ThePEG_SubProcessGroup_H
#define ThePEG_SubProcessGroup_H
// This is the declaration of the SubProcessGroup class.

#include "ThePEG/EventRecord/SubProcess.h"

namespace ThePEG {

/**
 * A SubProcessGroup object represents a group of SubProcess
 * objects in dependence of a head SubProcess object.
 *
 * @see StdXCombGroup
 * @see MEGroup
 */
class SubProcessGroup: public SubProcess {

public:

  /**
   * Standard constructor.
   * @param newIncoming the two incoming partons.
   * @param newCollision the Collision to which this SubProcessGroup belongs.
   * @param newHandler the MEBase object which generated this SubProcessGroup.
   */
  SubProcessGroup(const PPair & newIncoming,
		  tCollPtr newCollision = tCollPtr(),
		  tcEventBasePtr newHandler = tcEventBasePtr());

  /**
   * Destructor.
   */
  virtual ~SubProcessGroup();

  /**
   * Return a clone of this sub process group.
   */
  virtual SubProPtr clone() const;

protected:

  /**
   * Rebind to cloned objects. When a SubProcessGroup is cloned, a shallow
   * copy is done first, then all <code>Particle</code>s etc, are
   * cloned, and finally this method is used to see to that the
   * pointers in the cloned SubProcessGroup points to the cloned
   * <code>Particle</code>s etc.
   */
  virtual void rebind(const EventTranslationMap & trans);

public:

  /**
   * Perform a LorentzTransformation of all particles in the sub
   * process.
   */
  virtual void transform(const LorentzRotation &);

  /**
   * Return the dependent SubProcess objects
   */
  const SubProcessVector& dependent() const { return theDependent; }

  /**
   * Access the dependent SubProcess objects
   */
  SubProcessVector& dependent() { return theDependent; }

  /**
   * Add a dependent SubProcess
   */
  void add(tSubProPtr sub) { dependent().push_back(sub); }

public:

  /**
   * Standard function for writing to a persistent stream.
   */
  void persistentOutput(PersistentOStream &) const;

  /**
   * Standard function for reading from a persistent stream.
   */
  void persistentInput(PersistentIStream &, int);

  /**
   * Standard Init function. @see Base::Init().
   */
  static void Init();

private:

  /**
   * The dependent subprocesses
   */
  SubProcessVector theDependent;

public:

  /**
   * Put to ostream
   */
  virtual void printMe(ostream&) const;

private:

  /**
   * Describe concrete class with persistent data.
   */
  static ClassDescription<SubProcessGroup> initSubProcessGroup;

  /**
   * Private default constructor must only be used by the
   * PersistentIStream class via the ClassTraits<SubProcessGroup> class .
   */
  SubProcessGroup() : SubProcess() {}

  /**
   * The ClassTraits<SubProcessGroup> class must be a friend to be able to
   * use the private default constructor.
   */
  friend struct ClassTraits<SubProcessGroup>;

  /**
   * Assignment is forbidden.
   */
  SubProcessGroup & operator=(const SubProcessGroup &);

};


/** @cond TRAITSPECIALIZATIONS */

/** This template specialization informs ThePEG about the
 *  base class of Collision. */
template <>
struct BaseClassTrait<SubProcessGroup,1>: public ClassTraitsType {
  /** Typedef of the first base class of SubProcessGroup. */
  typedef EventRecordBase NthBase;
};

/** This template specialization informs ThePEG about the name of
 *  the SubProcessGroup class and how to create it. */
template <>
struct ClassTraits<SubProcessGroup>: public ClassTraitsBase<SubProcessGroup> {
  /** Return a platform-independent class name */
  static string className() { return "ThePEG::SubProcessGroup"; }
  /** Create a SubProcessGroup object. */
  static TPtr create() { return TPtr::Create(SubProcessGroup()); }
};

/** @endcond */

}

#endif /* ThePEG_SubProcessGroup_H */