Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-01 07:07:24

0001 ///////////////////////////////////////////////////////////////////////////
0002 //
0003 //    Copyright 2010
0004 //
0005 //    This file is part of starlight.
0006 //
0007 //    starlight is free software: you can redistribute it and/or modify
0008 //    it under the terms of the GNU General Public License as published by
0009 //    the Free Software Foundation, either version 3 of the License, or
0010 //    (at your option) any later version.
0011 //
0012 //    starlight is distributed in the hope that it will be useful,
0013 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
0014 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0015 //    GNU General Public License for more details.
0016 //
0017 //    You should have received a copy of the GNU General Public License
0018 //    along with starlight. If not, see <http://www.gnu.org/licenses/>.
0019 //
0020 ///////////////////////////////////////////////////////////////////////////
0021 //
0022 // File and Version Information:
0023 // $Rev:: 255                         $: revision of last commit
0024 // $Author:: jnystrand                $: author of last commit
0025 // $Date:: 2016-04-06 14:01:46 +0100 #$: date of last commit
0026 //
0027 // Description:
0028 //
0029 //
0030 //
0031 ///////////////////////////////////////////////////////////////////////////
0032 
0033 
0034 #ifndef EVENTCHANNEL_H
0035 #define EVENTCHANNEL_H
0036 
0037 #include <vector>
0038 
0039 #include "starlightconstants.h"
0040 #include "readinluminosity.h"
0041 #include "beambeamsystem.h"
0042 #include "randomgenerator.h"
0043 #include "eXevent.h"
0044 #include "inputParameters.h"
0045 
0046 
0047 class eventChannel : public readLuminosity
0048 {
0049 
0050 public:
0051 
0052     eventChannel(const inputParameters& input, beamBeamSystem&        bbsystem);
0053     virtual ~eventChannel();
0054 
0055     unsigned long nmbAttempts() const {return _nmbAttempts;}  ///< returns number of attempted events
0056     unsigned long nmbAccepted() const {return _nmbAccepted;}  ///< returns number of accepted events
0057 
0058     virtual eXEvent e_produceEvent() = 0;
0059  
0060     static void transform(const double betax,
0061                           const double betay,
0062                           const double betaz,
0063                           double&      E,
0064                           double&      px,
0065                           double&      py,
0066                           double&      pz,
0067                           int&         iFbadevent); ///< Lorentz-transforms given 4-vector
0068 
0069     beamBeamSystem  _bbs;
0070     randomGenerator _randy;
0071     static double pseudoRapidity(const double px,
0072                                  const double py,
0073                                  const double pz);  ///< calculates pseudorapidity for given 3-momentum
0074 
0075     double getTotalChannelCrossSection () const {return _totalChannelCrossSection;}
0076     void   setTotalChannelCrossSection (double sigma) {_totalChannelCrossSection = sigma;}
0077 
0078 protected:
0079 
0080     unsigned long _nmbAttempts;  ///< number of attempted events
0081     unsigned long _nmbAccepted;  ///< number of accepted events
0082 
0083     bool   _ptCutEnabled;   ///< en/disables cut in pt
0084     double _ptCutMin;       ///< minimum pt, if cut is enabled
0085     double _ptCutMax;       ///< maximum pt, if cut is enabled
0086     bool   _etaCutEnabled;  ///< en/disables cut in eta
0087     double _etaCutMin;      ///< minimum eta, if cut is enabled
0088     double _etaCutMax;      ///< maximum eta, if cut is enabled
0089 
0090     double _totalChannelCrossSection; 
0091         
0092 };
0093 
0094 
0095 #endif  // EVENTCHANNEL_H