Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:37

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:: 263                         $: revision of last commit
0024 // $Author:: butter                   $: author of last commit
0025 // $Date:: 2016-06-04 23:03:58 +0100 #$: date of last commit
0026 //
0027 // Description:
0028 //
0029 //
0030 //
0031 ///////////////////////////////////////////////////////////////////////////
0032 
0033 
0034 #ifndef E_STARLIGHTSTANDALONE_H
0035 #define E_STARLIGHTSTANDALONE_H
0036 
0037 
0038 #include <string>
0039 
0040 
0041 class e_starlight;
0042 class inputParameters;
0043 
0044 
0045 class e_starlightStandalone {
0046 
0047 public:
0048 
0049     e_starlightStandalone();
0050     ~e_starlightStandalone();
0051 
0052     bool init();  ///< reads configuration file and initializes startlight
0053     bool run ();  ///< creates output file and runs starlight
0054 
0055         const std::string& baseFileName     () const { return _baseFileName;        }
0056     const std::string& configFileName   () const { return _configFileName;      }  ///< returns path to config file
0057     const std::string& eventDataFileName() const { return _eventDataFileName;   }  ///< returns path to output file
0058 
0059         void setBaseFileName     (const std::string& baseFileName     ) { _baseFileName      = baseFileName;    }  ///< sets path to base file
0060     void setConfigFileName   (const std::string& configFileName   ) { _configFileName    = configFileName;    }  ///< sets path to config file
0061     void setEventDataFileName(const std::string& eventDataFileName) { _eventDataFileName = eventDataFileName; }  ///< sets path to output file
0062     
0063     void boostEvent(eXEvent &e); ///< Boost event from beam CMS to lab system
0064     void reflectEvent(eXEvent &e); ///< flip z to -z for all output particles
0065 
0066 private:
0067 
0068         std::string      _baseFileName;       ///< path to base filename
0069     std::string      _configFileName;     ///< path to configuration file
0070     std::string      _eventDataFileName;  ///< path to output file
0071 
0072     e_starlight*       _starlight;         ///< pointer to starlight instance
0073         inputParameters* _inputParameters;   ///< pointer to parameter instance
0074     unsigned int     _nmbEventsTot;      ///< total number of events to generate (taken from configuration file)
0075     unsigned int     _nmbEventsPerFile;  ///< maximum number of events written to a single file (not yet implemented)
0076 
0077 };
0078 
0079 
0080 #endif  // E_STARLIGHTSTANDALONE_H