Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-18 07:06:21

0001 ///////////////////////////////////////////////////////////////////////////
0002 //
0003 //    Copyright 2017
0004 //
0005 //    This file is part of estarlight.
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:: 263                         $: revision of last commit
0024 // $Author:: mlomnitz                  $: author of last commit
0025 // $Date:: 02/28/2017 #$: date of last commit
0026 //
0027 // Description:
0028 //
0029 // Main interfqce for eSTARlight code inherited from STARlight
0030 //
0031 //
0032 ///////////////////////////////////////////////////////////////////////////
0033 
0034 
0035 #ifndef eSTARLIGHT_H
0036 #define eSTARLIGHT_H
0037 
0038 
0039 #include <string>
0040 
0041 #include "eventchannel.h"
0042 
0043 
0044 class inputParameters;
0045 class beam;
0046 class beamBeamSystem;
0047 
0048 
0049 class e_starlight {
0050 
0051 public:
0052       
0053     e_starlight();
0054     ~e_starlight();
0055       
0056     bool init();
0057 
0058     eXEvent produceEvent();
0059       
0060         std::string   baseFileName  () const { return _baseFileName;          }
0061     unsigned long nmbAttempts   () const { return _eventChannel->nmbAttempts(); }
0062     unsigned long nmbAccepted   () const { return _eventChannel->nmbAccepted(); } 
0063     double getTotalCrossSection () const { return _eventChannel->getTotalChannelCrossSection(); } 
0064     void setInputParameters(inputParameters* inputParams) { _inputParameters = inputParams; }   
0065 
0066 private:
0067       
0068     bool luminosityTableIsValid() const;
0069 
0070     bool createEventChannel();
0071       
0072     beamBeamSystem*    _beamSystem;
0073     eventChannel*      _eventChannel;
0074     unsigned int       _nmbEventsPerFile;
0075     std::string        _baseFileName;
0076     std::string        _lumLookUpTableFileName;
0077     bool               _isInitialised;
0078     inputParameters*   _inputParameters;
0079 };
0080 
0081 
0082 #endif  // e_STARLIGHT_H