00001
00002
00003 #ifndef Shower_H
00004 #define Shower_H
00005
00006 #include <iostream>
00007 #include <vector>
00008 #include <cmath>
00009 #include <ctime>
00010 #include "Pythia7/Config/Pythia7.h"
00011
00012 namespace Pythia7 {
00013 namespace Shower {
00014
00015 using namespace std;
00016
00017 class TimeShower;
00018 class SpaceShower;
00019
00020
00021
00022
00028 class Event {
00029
00030 public:
00034 Event(long capacity = 100) {entry.reserve(capacity); maxColIndx = 0;}
00035
00036
00040 long append(Particle entryin) {
00041 entry.push_back(entryin);
00042 if (entryin.col() > maxColIndx) maxColIndx = entryin.col();
00043 if (entryin.anticol() > maxColIndx) maxColIndx = entryin.anticol();
00044 return entry.size() - 1;
00045 }
00046
00047
00051 void remove(long index) {entry.erase(entry.begin() + index);}
00052
00053
00057 Particle& operator[](long i) {return entry[i];}
00061 const Particle & operator[](long i) const {return entry[i];}
00065 bool isDescendent(long, long) const;
00066
00070 long size() const {return entry.size();}
00074 void zero() {entry.resize(0); maxColIndx = 0;}
00078 void colIndx(long indx) {maxColIndx = indx;}
00082 long colIndx() const {return maxColIndx;}
00083
00084
00088 friend ostream& operator<<(ostream&, const Event&) ;
00089
00090
00091 private:
00093 vector<Particle> entry;
00095 long maxColIndx;
00096 };
00097
00098
00099
00100
00107 class Shower {
00108
00109 public:
00113 static long ISR;
00114
00118 static long FSR;
00119
00123 static long FSRONISR;
00124
00128 static TimeShower * theTimeShower;
00129
00133 static SpaceShower * theSpaceShower;
00134
00138 void shower(Event&, BeamParticle&, BeamParticle&, bool = false);
00143 void shower(Event&);
00144
00145
00146 private:
00147
00151 long in1Old, in2Old, in1New, in2New, sizeOld,sizeMid, sizeNew;
00153 bool hadISR;
00155 void doSpaceShower(Event&, BeamParticle&, BeamParticle&);
00157 void doTimeOnSpaceShower(Event&);
00159 void copyFinalState(Event&);
00161 void doTimeShower(Event&);
00164 };
00165
00166
00167
00168 }
00169 }
00170
00171 #endif // Shower_H