]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STARLIGHT/starlight/include/eventchannel.h
nbins added as data member + axes renamed
[u/mrichter/AliRoot.git] / STARLIGHT / starlight / include / eventchannel.h
1 ///////////////////////////////////////////////////////////////////////////
2 //
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 //
20 ///////////////////////////////////////////////////////////////////////////
21 //
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
26 //
27 // Description:
28 //
29 //
30 //
31 ///////////////////////////////////////////////////////////////////////////
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
47 class eventChannel : public readLuminosity
48 {
49
50 public:
51
52         eventChannel(beamBeamSystem&        bbsystem);
53         virtual ~eventChannel();
54
55         unsigned long nmbAttempts() const {return _nmbAttempts;}  ///< returns number of attempted events
56         unsigned long nmbAccepted() const {return _nmbAccepted;}  ///< returns number of accepted events
57
58         virtual starlightConstants::event produceEvent(int &ievent) = 0;
59
60         virtual upcEvent produceEvent() = 0;
61  
62         static void transform(const double betax,
63                               const double betay,
64                               const double betaz,
65                               double&      E,
66                               double&      px,
67                               double&      py,
68                               double&      pz,
69                               int&         iFbadevent); ///< Lorentz-transforms given 4-vector
70
71         beamBeamSystem  _bbs;
72
73         static double pseudoRapidity(const double px,
74                                      const double py,
75                                      const double pz);  ///< calculates pseudorapidity for given 3-momentum
76
77 protected:
78
79         unsigned long _nmbAttempts;  ///< number of attempted events
80         unsigned long _nmbAccepted;  ///< number of accepted events
81
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
88                 
89 };
90
91
92 #endif  // EVENTCHANNEL_H