Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:20:03

0001 
0002 /***********************************************************************
0003 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors       *
0004 *                                                                      *
0005 * This file is part of EvtGen.                                         *
0006 *                                                                      *
0007 * EvtGen 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 * EvtGen 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 EvtGen.  If not, see <https://www.gnu.org/licenses/>.     *
0019 ***********************************************************************/
0020 
0021 #ifndef EVTSTDHEP_HH
0022 #define EVTSTDHEP_HH
0023 
0024 #include "EvtGenBase/EvtVector4R.hh"
0025 
0026 #include <iosfwd>
0027 
0028 const int EVTSTDHEPLENGTH = 1000;
0029 
0030 class EvtStdHep {
0031   public:
0032     EvtStdHep() {}
0033     ~EvtStdHep() {}
0034 
0035     void init();
0036 
0037     int getFirstMother( int i ) { return _prntfirst[i]; }
0038     int getLastMother( int i ) { return _prntlast[i]; }
0039     int getFirstDaughter( int i ) { return _daugfirst[i]; }
0040     int getLastDaughter( int i ) { return _dauglast[i]; }
0041 
0042     int getStdHepID( int i ) { return _id[i]; }
0043     int getIStat( int i ) { return _istat[i]; }
0044 
0045     EvtVector4R getP4( int i ) { return _p4[i]; }
0046     EvtVector4R getX4( int i ) { return _x[i]; }
0047 
0048     void translate( EvtVector4R d );
0049 
0050     int getNPart();
0051     void createParticle( EvtVector4R p4, EvtVector4R x, int prntfirst,
0052                          int prntlast, int id );
0053 
0054     friend std::ostream& operator<<( std::ostream& s, const EvtStdHep& stdhep );
0055 
0056   private:
0057     int _npart;
0058     EvtVector4R _p4[EVTSTDHEPLENGTH];
0059     EvtVector4R _x[EVTSTDHEPLENGTH];
0060     int _prntfirst[EVTSTDHEPLENGTH];
0061     int _prntlast[EVTSTDHEPLENGTH];
0062     int _daugfirst[EVTSTDHEPLENGTH];
0063     int _dauglast[EVTSTDHEPLENGTH];
0064     int _id[EVTSTDHEPLENGTH];
0065     int _istat[EVTSTDHEPLENGTH];
0066 };
0067 
0068 #endif