Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-10 08:05:40

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file eventgenerator/HepMC/HepMCEx01/src/HEPEvtcom.cc
0027 /// \brief Implementation of the HEPEvtcom class
0028 //
0029 //
0030 // ======================================================================
0031 //      PARAMETER (NMXHEP=4000)
0032 //      COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
0033 //     &        JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
0034 // ======================================================================
0035 ///**********************************************************/
0036 ///*           D E S C R I P T I O N :                      */
0037 ///*--------------------------------------------------------*/
0038 ///* NEVHEP          - event number (or some special meaning*/
0039 ///*                    (see documentation for details)     */
0040 ///* NHEP            - actual number of entries in current  */
0041 ///*                    event.                              */
0042 ///* ISTHEP[IHEP]    - status code for IHEP'th entry - see  */
0043 ///*                    documentation for details           */
0044 ///* IDHEP [IHEP]    - IHEP'th particle identifier according*/
0045 ///*                    to PDG.                             */
0046 ///* JMOHEP[IHEP][0] - pointer to position of 1st mother    */
0047 ///* JMOHEP[IHEP][1] - pointer to position of 2nd mother    */
0048 ///* JDAHEP[IHEP][0] - pointer to position of 1st daughter  */
0049 ///* JDAHEP[IHEP][1] - pointer to position of 2nd daughter  */
0050 ///* PHEP  [IHEP][0] - X momentum [Gev/c]                   */
0051 ///* PHEP  [IHEP][1] - Y momentum [Gev/c]                   */
0052 ///* PHEP  [IHEP][2] - Z momentum [Gev/c]                   */
0053 ///* PHEP  [IHEP][3] - Energy [Gev]                         */
0054 ///* PHEP  [IHEP][4] - Mass[Gev/c^2]                        */
0055 ///* VHEP  [IHEP][0] - X vertex [mm]                        */
0056 ///* VHEP  [IHEP][1] - Y vertex [mm]                        */
0057 ///* VHEP  [IHEP][2] - Z vertex [mm]                        */
0058 ///* VHEP  [IHEP][3] - production time [mm/c]               */
0059 ///*========================================================*/
0060 //
0061 // This interface to HEPEVT common block treats the block as
0062 // an array of bytes --- the precision and number of entries
0063 // is determined "on the fly" by the wrapper and used to decode
0064 // each entry.
0065 //
0066 // HEPEVT_EntriesAllocation is the maximum size of the HEPEVT common block
0067 // that can be interfaced. It is NOT the actual size of the HEPEVT common
0068 // used in each individual application. The actual size can be changed on
0069 // the fly using HepMC::HEPEVT_Wrapper::set_max_number_entries().
0070 // Thus HEPEVT_EntriesAllocation should typically be set
0071 // to the maximum possible number of entries --- 10000 is a good choice
0072 // (and is the number used by ATLAS versions of Pythia).
0073 
0074 #include <ctype.h>
0075 
0076 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0077 
0078 enum
0079 {
0080   HEPEVT_EntriesAllocation = 4000
0081 };
0082 
0083 const unsigned int hepevt_bytes_allocation = sizeof(long int) * (2 + 4 * HEPEVT_EntriesAllocation)
0084                                              + sizeof(double) * (9 * HEPEVT_EntriesAllocation);
0085 
0086 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0087 
0088 extern "C" struct hepevt
0089 {
0090     char data[hepevt_bytes_allocation];
0091 };
0092 
0093 hepevt hepevt_;