1 ///////////////////////////////////////////////////////////////////////////
5 // This file is part of starlight.
7 // starlight is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // starlight is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with starlight. If not, see <http://www.gnu.org/licenses/>.
20 ///////////////////////////////////////////////////////////////////////////
22 // File and Version Information:
23 // $Rev:: 164 $: revision of last commit
24 // $Author:: odjuvsla $: author of last commit
25 // $Date:: 2013-10-06 16:18:08 +0200 #$: date of last commit
31 ///////////////////////////////////////////////////////////////////////////
34 #ifndef EVENTCHANNEL_H
35 #define EVENTCHANNEL_H
39 #include "starlightconstants.h"
40 #include "readinluminosity.h"
41 #include "beambeamsystem.h"
42 #include "randomgenerator.h"
47 class eventChannel : public readLuminosity
52 eventChannel(beamBeamSystem& bbsystem);
53 virtual ~eventChannel();
55 unsigned long nmbAttempts() const {return _nmbAttempts;} ///< returns number of attempted events
56 unsigned long nmbAccepted() const {return _nmbAccepted;} ///< returns number of accepted events
58 virtual starlightConstants::event produceEvent(int &ievent) = 0;
60 virtual upcEvent produceEvent() = 0;
62 static void transform(const double betax,
69 int& iFbadevent); ///< Lorentz-transforms given 4-vector
73 static double pseudoRapidity(const double px,
75 const double pz); ///< calculates pseudorapidity for given 3-momentum
79 unsigned long _nmbAttempts; ///< number of attempted events
80 unsigned long _nmbAccepted; ///< number of accepted events
82 bool _ptCutEnabled; ///< en/disables cut in pt
83 double _ptCutMin; ///< minimum pt, if cut is enabled
84 double _ptCutMax; ///< maximum pt, if cut is enabled
85 bool _etaCutEnabled; ///< en/disables cut in eta
86 double _etaCutMin; ///< minimum eta, if cut is enabled
87 double _etaCutMax; ///< maximum eta, if cut is enabled
92 #endif // EVENTCHANNEL_H