StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
eventchannel.h
1 //
3 // Copyright 2010
4 //
5 // This file is part of starlight.
6 //
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.
11 //
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.
16 //
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/>.
19 //
21 //
22 // File and Version Information:
23 // $Rev:: $: revision of last commit
24 // $Author: jwebb $: author of last commit
25 // $Date: 2012/11/27 22:27:31 $: date of last commit
26 //
27 // Description:
28 //
29 //
30 //
32 
33 
34 #ifndef EVENTCHANNEL_H
35 #define EVENTCHANNEL_H
36 
37 #include <vector>
38 
39 #include "starlightconstants.h"
40 #include "readinluminosity.h"
41 #include "beambeamsystem.h"
42 #include "randomgenerator.h"
43 #include "upcevent.h"
44 
45 
46 
48 {
49 
50 public:
51 
52  eventChannel(const inputParameters& input,
53  beamBeamSystem& bbsystem);
54  virtual ~eventChannel();
55 
56  unsigned long nmbAttempts() const {return _nmbAttempts;}
57  unsigned long nmbAccepted() const {return _nmbAccepted;}
58 
59  virtual starlightConstants::event produceEvent(int &ievent) = 0;
60 
61  virtual upcEvent produceEvent() = 0;
62 
63  static void transform(const double betax,
64  const double betay,
65  const double betaz,
66  double& E,
67  double& px,
68  double& py,
69  double& pz,
70  int& iFbadevent);
71 
72  randomGenerator _randy;
73  beamBeamSystem _bbs;
74 
75  static double pseudoRapidity(const double px,
76  const double py,
77  const double pz);
78 
79 protected:
80 
81  unsigned long _nmbAttempts;
82  unsigned long _nmbAccepted;
83 
85  double _ptCutMin;
86  double _ptCutMax;
88  double _etaCutMin;
89  double _etaCutMax;
90 
91 };
92 
93 
94 #endif // EVENTCHANNEL_H
bool _etaCutEnabled
en/disables cut in eta
Definition: eventchannel.h:87
bool _ptCutEnabled
en/disables cut in pt
Definition: eventchannel.h:84
unsigned long nmbAccepted() const
returns number of accepted events
Definition: eventchannel.h:57
double _ptCutMax
maximum pt, if cut is enabled
Definition: eventchannel.h:86
static double pseudoRapidity(const double px, const double py, const double pz)
calculates pseudorapidity for given 3-momentum
double _etaCutMin
minimum eta, if cut is enabled
Definition: eventchannel.h:88
unsigned long _nmbAccepted
number of accepted events
Definition: eventchannel.h:82
double _etaCutMax
maximum eta, if cut is enabled
Definition: eventchannel.h:89
unsigned long _nmbAttempts
number of attempted events
Definition: eventchannel.h:81
unsigned long nmbAttempts() const
returns number of attempted events
Definition: eventchannel.h:56
static void transform(const double betax, const double betay, const double betaz, double &E, double &px, double &py, double &pz, int &iFbadevent)
Lorentz-transforms given 4-vector.
double _ptCutMin
minimum pt, if cut is enabled
Definition: eventchannel.h:85