// -*- C++ -*- // // Package: Tracing // Module: trace_particle // // Description: // // Traces a given particle // Does a bunch of definitions if called the first time // // THIS VERSION CALLS NEW TRACING ROUTINES // which trace thru r and z and cones at the same time! // // - interface routine from Fortran program to C++ Tracing // - contains main loop over tracks to do tracing on each // // Implimentation: // Use "extern \"C\"" construct to be callable by Fortran // // Author: Martin Lohner // Created: Jan 31, 1997 // RCS(Id) // // Revision history // // RCS(Log) // system include files #include #include // user include files #include "stdhep.h" #include "cc_fortran_types.hh" #include "functions.hh" #include "report.hh" #include "fortranAccess.hh" #include "UserSettings.hh" #include "traceParticle.hh" #include "fillTraceCommonInfo.hh" #include "dummyKalmanLoop.hh" #include "MCParticle.hh" #include "CompositeMedium.hh" #include "WorldFactory.hh" extern vector g_particleList ; // forward declarations // // constants, enums and typedefs // // // static data member definitions // #include "dummyVectorInstantiator.hh" // global variables int trace_particle_( int& ihep ) { static MCFBool first=true; if( first ) { first=false; cout << "trace_particle: calling trace routine for each track" << "\n"; } // read UserSettings (only once!) UserSettings* userSettings = UserSettings::instance(); // create the World from r and z planes and cones and xy planes // (only once per job!) CompositeMedium* world = WorldFactory::createWorld(); // check if particle is in the list; if not - secondary, put it in if ( ihep >= g_particleList.size() ) { int NPARTS = hepevt_.nhep ; int NPARTS_IN_gLIST = g_particleList.size() ; int ihepCount ; for ( ihepCount=NPARTS_IN_gLIST; ihepCount