Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:21:50

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 /*
0027  * =============================================================================
0028  *
0029  *       Filename:  CexmcTrackPointsStore.hh
0030  *
0031  *    Description:  store const references of track points of interest
0032  *
0033  *        Version:  1.0
0034  *        Created:  25.11.2009 13:41:43
0035  *       Revision:  none
0036  *       Compiler:  gcc
0037  *
0038  *         Author:  Alexey Radkov (), 
0039  *        Company:  PNPI
0040  *
0041  * =============================================================================
0042  */
0043 
0044 #ifndef CEXMC_TRACK_POINTS_STORE_HH
0045 #define CEXMC_TRACK_POINTS_STORE_HH
0046 
0047 #include <G4Allocator.hh>
0048 #include "CexmcTrackPointInfo.hh"
0049 
0050 
0051 struct  CexmcTrackPointsStore
0052 {
0053     CexmcTrackPointsStore( const  CexmcTrackPointInfo &  monitorTP_,
0054     const  CexmcTrackPointInfo &  targetTPBeamParticle_,
0055     const  CexmcTrackPointInfo &  targetTPOutputParticle_,
0056     const  CexmcTrackPointInfo &  targetTPNucleusParticle_,
0057     const  CexmcTrackPointInfo &  targetTPOutputParticleDecayProductParticle1_,
0058     const  CexmcTrackPointInfo &  targetTPOutputParticleDecayProductParticle2_,
0059     const  CexmcTrackPointInfo &  vetoCounterTPLeft_,
0060     const  CexmcTrackPointInfo &  vetoCounterTPRight_,
0061     const  CexmcTrackPointInfo &  calorimeterTPLeft_,
0062     const  CexmcTrackPointInfo &  calorimeterTPRight_ ) :
0063         monitorTP( monitorTP_ ), targetTPBeamParticle( targetTPBeamParticle_ ),
0064         targetTPOutputParticle( targetTPOutputParticle_ ),
0065         targetTPNucleusParticle( targetTPNucleusParticle_ ),
0066         targetTPOutputParticleDecayProductParticle1(
0067                                 targetTPOutputParticleDecayProductParticle1_ ),
0068         targetTPOutputParticleDecayProductParticle2(
0069                                 targetTPOutputParticleDecayProductParticle2_ ),
0070         vetoCounterTPLeft( vetoCounterTPLeft_ ),
0071         vetoCounterTPRight( vetoCounterTPRight_ ),
0072         calorimeterTPLeft( calorimeterTPLeft_ ),
0073         calorimeterTPRight( calorimeterTPRight_ )
0074     {}
0075 
0076     void *  operator new( size_t  size );
0077 
0078     void    operator delete( void *  obj );
0079 
0080     const CexmcTrackPointInfo &  monitorTP;
0081     
0082     const CexmcTrackPointInfo &  targetTPBeamParticle;
0083     
0084     const CexmcTrackPointInfo &  targetTPOutputParticle;
0085     
0086     const CexmcTrackPointInfo &  targetTPNucleusParticle;
0087     
0088     const CexmcTrackPointInfo &  targetTPOutputParticleDecayProductParticle1;
0089     
0090     const CexmcTrackPointInfo &  targetTPOutputParticleDecayProductParticle2;
0091 
0092     const CexmcTrackPointInfo &  vetoCounterTPLeft;
0093 
0094     const CexmcTrackPointInfo &  vetoCounterTPRight;
0095 
0096     const CexmcTrackPointInfo &  calorimeterTPLeft;
0097 
0098     const CexmcTrackPointInfo &  calorimeterTPRight;
0099 };
0100 
0101 
0102 extern G4Allocator< CexmcTrackPointsStore >  trackPointsStoreAllocator;
0103 
0104 
0105 inline void *  CexmcTrackPointsStore::operator new( size_t )
0106 {
0107     return trackPointsStoreAllocator.MallocSingle();
0108 }
0109 
0110 
0111 inline void  CexmcTrackPointsStore::operator delete( void *  obj )
0112 {
0113     trackPointsStoreAllocator.FreeSingle(
0114                         reinterpret_cast< CexmcTrackPointsStore * >( obj ) );
0115 }
0116 
0117 
0118 #endif
0119