Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Container for eXEvents
0030 //
0031 //
0032 ///////////////////////////////////////////////////////////////////////////
0033 
0034 
0035 #ifndef eXEVENT_H
0036 #define eXEVENT_H
0037 
0038 
0039 #include <vector>
0040 
0041 #include "starlightconstants.h"
0042 #include "starlightparticle.h"
0043 
0044 
0045 class eXEvent 
0046 {
0047    public:
0048 
0049       eXEvent();
0050       eXEvent(const eXEvent&) = default;
0051       eXEvent(starlightConstants::event &ev);
0052       ~eXEvent();
0053 
0054       void addParticle(starlightParticle &part) { _particles.push_back(part); }
0055       void addVertex(vector3 &vertex) { _vertices.push_back(vertex); }
0056       void addGamma(lorentzVector gamma,float egamma, float Q2) { _gamma.push_back(gamma); _gammaEnergies.push_back(egamma); _gammaMasses.push_back(Q2); }
0057       void addSourceElectron(lorentzVector &el){ _sources.push_back(el); }
0058       void addScatteredTarget( lorentzVector &target, double t){ _target.push_back(target); _vertext.push_back(t);}
0059 
0060       const std::vector<starlightParticle> * getParticles() const { return &_particles; }
0061       const std::vector<vector3> * getVertices() const { return &_vertices; }
0062       const std::vector<float> * getGammaEnergies() const { return &_gammaEnergies; }
0063       const std::vector<lorentzVector> * getSources() const { return &_sources;}
0064       const std::vector<float> * getGammaMasses() const {return &_gammaMasses; }
0065       const std::vector<lorentzVector> * getGamma() const { return &_gamma; }
0066       const std::vector<lorentzVector> * getTarget() const{ return &_target; }
0067       const std::vector<double> * getVertext() const{ return &_vertext; }
0068       eXEvent & operator=(const eXEvent&);
0069       eXEvent & operator+(const eXEvent&);
0070       
0071       void boost(double rapidity, double e_rapiditya);
0072       void reflect();
0073       
0074    private:
0075       
0076       std::vector<starlightParticle> _particles;
0077       std::vector<vector3> _vertices;
0078       std::vector<lorentzVector> _sources;
0079       std::vector<lorentzVector> _target;
0080       std::vector<double> _vertext;
0081       std::vector<float> _gammaMasses;
0082       std::vector<float> _gammaEnergies;
0083       std::vector<lorentzVector> _gamma;
0084 };
0085 
0086 
0087 #endif  // eXEVENT_H