]>
Commit | Line | Data |
---|---|---|
da32329d AM |
1 | /* |
2 | <one line to give the library's name and an idea of what it does.> | |
3 | Copyright (C) 2011 Oystein Djuvsland <oystein.djuvsland@gmail.com> | |
4 | ||
5 | This library is free software; you can redistribute it and/or | |
6 | modify it under the terms of the GNU Lesser General Public | |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
9 | ||
10 | This library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Lesser General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Lesser General Public | |
16 | License along with this library; if not, write to the Free Software | |
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | */ | |
19 | ||
20 | ||
21 | #ifndef STARLIGHTPYTHIA_H | |
22 | #define STARLIGHTPYTHIA_H | |
23 | ||
24 | #include "upcevent.h" | |
25 | #include "inputParameters.h" | |
26 | #include "beambeamsystem.h" | |
27 | #include "eventchannel.h" | |
28 | ||
29 | class spectrum; | |
30 | ||
31 | class starlightPythia : public eventChannel | |
32 | { | |
33 | ||
34 | public: | |
35 | ||
36 | starlightPythia(beamBeamSystem& bbsystem); | |
37 | virtual ~starlightPythia(); | |
38 | ||
39 | int init(std::string pythiaParams, bool fullEventRecord = false); | |
40 | ||
41 | virtual upcEvent produceEvent(); | |
42 | ||
43 | virtual upcEvent produceSingleEvent(int /*zdirection*/, float /*egamma*/){return upcEvent();} | |
44 | ||
45 | virtual upcEvent produceDoubleEvent(){return upcEvent();} | |
46 | ||
47 | virtual starlightConstants::event produceEvent(int& /*ievent*/){ return starlightConstants::event();} | |
48 | ||
49 | void setSingleMode() { | |
50 | _doDoubleEvent = false; | |
51 | } | |
52 | ||
53 | void setDoubleMode() { | |
54 | _doDoubleEvent = true; | |
55 | } | |
56 | ||
57 | void setMinGammaEnergy(double energy) { | |
58 | _minGammaEnergy = energy; | |
59 | } | |
60 | ||
61 | void setMaxGammaEnergy(double energy) { | |
62 | _maxGammaEnergy = energy; | |
63 | } | |
64 | ||
65 | void setFullEventRecord(bool fer = true) { _fullEventRecord = fer; } | |
66 | ||
67 | private: | |
68 | ||
69 | /** Contains the photon spectrum */ | |
70 | spectrum *_spectrum; | |
71 | ||
72 | /** Should we produce a double event? */ | |
73 | bool _doDoubleEvent; | |
74 | ||
75 | /** Min gamma energy */ | |
76 | double _minGammaEnergy; | |
77 | ||
78 | /** Max gamma energy */ | |
79 | double _maxGammaEnergy; | |
80 | ||
81 | /** Full event record or not */ | |
82 | bool _fullEventRecord; | |
83 | ||
84 | /** Prohibited */ | |
85 | starlightPythia(); | |
86 | starlightPythia(const starlightPythia& other); | |
87 | starlightPythia& operator=(const starlightPythia& other); | |
88 | bool operator==(const starlightPythia& other) const; | |
89 | ||
90 | }; | |
91 | ||
92 | #endif // STARLIGHTPYTHIA_H |