Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.3 2002/07/04 16:20:09 gcosmo Exp $
# $Id: GNUmakefile,v 1.4 2003/05/28 08:12:48 gcosmo Exp $
# --------------------------------------------------------------
# GNUmakefile for tests module. Gabriele Cosmo, 27/06/98.
# --------------------------------------------------------------
@@ -6,6 +6,7 @@
name := cadex
G4TARGET := $(name)
G4EXLIB := true
G4USE_STEP := 1
ifndef G4INSTALL
G4INSTALL = ../../../..
@@ -15,6 +16,8 @@ include $(G4INSTALL)/config/architecture.gmk
# To avoid incompatibilities with ANSI standard treatment of strings, the
# NIST STEP reader on gcc-2.95.X and later must be compiled in non-ANSI mode.
# NOTE: correct behavior of the STEP reader and interface are guaranteed ONLY
# if using egcs-1.1.2 compiler or old non-ANSI compilers.
#
ifneq (,$(findstring g++,$(G4SYSTEM)))
ansi_options = -Wall -ansi -pedantic
+4 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.3 2002/11/18 13:55:19 gcosmo Exp $
$Id: History,v 1.4 2003/05/28 08:13:35 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,9 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
May 28, 03 G.Cosmo (cadex-V05-01-00)
- Set G4USE_STEP flag in GNUmakefile. Updated README.
November 18, 02 G.Cosmo (cadex-V04-01-01)
- Enhanced corrections for VERTEX_POINT, EDGE_LOOP and POLY_LOOP.
(courtesy of Daniel Szepielak).
+5 -5
View File
@@ -1,4 +1,4 @@
$Id: README,v 1.1 2002/06/20 10:00:54 gcosmo Exp $
$Id: README,v 1.2 2003/05/28 08:13:14 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -14,10 +14,10 @@ the UI command "/mydet/SelectDetector <model-name>", where
<model-name> is the name of the STEP file <model-name>.stp which
describes the detector geometry.
Due to limitations of the NIST STEP reader, a correct behavior can be
assured only for non-ISO/ANSI setup for the supported compilers as
specified in the notes for the SCL-3.2 package. Therefore, the GNUmakefile
in this example has been modified to force non-ISO/ANSI compilation on
Linux platforms.
assured only for non-ISO/ANSI setup of compilers (i.e. egcs-1.1.2 or old
non-ANSI compilers) as specified in the notes for the SCL-3.2 package.
Therefore, the GNUmakefile in this example has been modified to force
non-ISO/ANSI compilation on Linux platforms, to allow the code to build.
AP203 STEP files showing errors in the reading process, can be formatted
using the PERL scripts provided in the "scripts" directory; most patterns
will be corrected. If errors are still observed, please inform us so that
+1 -1
View File
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: cadex.cc,v 1.1 2002/06/20 10:00:54 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#include "CadDetectorConstruction.hh"
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadDetectorConstruction.hh,v 1.1 2002/06/20 10:00:54 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#ifndef CadDetectorConstruction_h
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadDetectorMessenger.hh,v 1.1 2002/06/20 10:00:54 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#ifndef CadDetectorMessenger_h
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadPhysicsList.hh,v 1.1 2002/06/20 10:00:54 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#ifndef CadPhysicsList_h
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadPrimaryGeneratorAction.hh,v 1.1 2002/06/20 10:00:54 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#ifndef CadPrimaryGeneratorAction_h
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadRunAction.hh,v 1.1 2002/06/20 10:00:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#ifndef CadRunAction_h
@@ -22,7 +22,7 @@
//
//
// $Id: CadVisManager.hh,v 1.1 2002/06/20 10:00:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// --------------------------------------------------------------------
#ifndef CadVisManager_h
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadDetectorConstruction.cc,v 1.1 2002/06/20 10:00:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#include "G4AssemblyCreator.hh"
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadDetectorMessenger.cc,v 1.2 2002/12/05 01:07:00 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#include "CadDetectorConstruction.hh"
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadPhysicsList.cc,v 1.1 2002/06/20 10:00:56 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#include "CadPhysicsList.hh"
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadPrimaryGeneratorAction.cc,v 1.1 2002/06/20 10:00:56 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
#include "CadPrimaryGeneratorAction.hh"
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: CadRunAction.cc,v 1.1 2002/06/20 10:00:56 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// ------------------------------------------------------------
// Make this appear first!
@@ -22,7 +22,7 @@
//
//
// $Id: CadVisManager.cc,v 1.2 2002/11/26 08:28:07 duns Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
// --------------------------------------------------------------------
#ifdef G4VIS_USE
+4 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.4 2003/02/19 07:59:32 gcosmo Exp $
$Id: History,v 1.5 2003/06/12 12:24:46 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,9 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
June, 12th, 2003 G.Cosmo - olapex-V05-01-00
- Fixed pedantic warnings on Linux-g++.
February, 19th, 2003 G.Cosmo - olapex-V05-00-00
- Removed redundant inclusion of SystemOfUnits.h.
Now using CLHEP headers.
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GeoNav.hh,v 1.2 2002/06/04 09:23:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4GeoNav.hh,v 1.3 2003/06/16 16:49:16 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -36,7 +36,7 @@
#define G4GeoNav_h
#include "G4String.hh"
#include "g4std/vector"
#include <vector>
#include <regex.h>
#include "G4RotationMatrix.hh"
@@ -66,18 +66,18 @@ public:
// returns a vector of LogicalVolumes which names match the aRegExp
G4int FilterLV(const G4String & aRegExp,
G4std::vector<G4LogicalVolume*> & result,
std::vector<G4LogicalVolume*> & result,
G4bool stopAtFirst=false);
// returns a vector of LogicalVolumes reflecting the hierarchy of theCurLVItem
G4int PathLV(G4std::vector<G4LogicalVolume*> & result);
G4int PathLV(std::vector<G4LogicalVolume*> & result);
// "cd /CMS/Tr.*/.*Barrel"
G4LogicalVolume * ChangeLV(const G4String & aRegExp);
// get next lv as seen from the current one
G4LogicalVolume * NextLV();
// "pwd"
G4int PwdLV(G4std::vector<G4LogicalVolume *>&);
G4int PwdLV(std::vector<G4LogicalVolume *>&);
// "ls"
G4int LsLV(G4std::vector<G4LogicalVolume *>&);
G4int LsLV(std::vector<G4LogicalVolume *>&);
// theSubreeLVItem = theCurLVItem
//void CurLVToSubtree() {theSubtreeLVItem = theCurLVItem;};
//OlapDetConstr * GetDetConstr();
@@ -90,10 +90,10 @@ protected:
void CountSubtreeNodes(LVTree::node_t*,G4int&);
// recursive counting of nodes
G4int Tokenize(const G4String &, G4std::vector<G4String>&);
G4int Tokenize(const G4String &, std::vector<G4String>&);
void FindLV(regex_t *, LVTree::node_t * ,
G4std::vector<G4LogicalVolume*>&, G4bool stopAtFirst=false) ;
std::vector<G4LogicalVolume*>&, G4bool stopAtFirst=false) ;
void populateLVTree(LVTree::node_t*); // recursive population of LV-Tree
@@ -22,7 +22,7 @@
//
//
// $Id: OlapDetConstr.hh,v 1.1 2002/06/04 07:40:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapEventAction.hh,v 1.1 2002/06/04 07:40:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapEventAction.hh,v 1.2 2003/06/16 16:49:17 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -35,7 +35,7 @@
#ifndef OlapEventAction_h
#define OlapEventAction_h
#include "g4std/vector"
#include <vector>
#include "G4UserEventAction.hh"
#include "globals.hh"
#include "G4ThreeVector.hh"
@@ -66,15 +66,15 @@ public:
G4ThreeVector v1, v2;
G4int axis;
// geantino ray travelling parallel to that axis detected the olap
G4std::vector<OlapStepInfo *> stAB;
G4std::vector<OlapStepInfo *> stBA;
std::vector<OlapStepInfo *> stAB;
std::vector<OlapStepInfo *> stBA;
G4String info;
G4int probNot ;
G4LogicalVolume* originalMother;
};
G4std::ostream &
operator<<(G4std::ostream& flux, OlapInfo & oi);
std::ostream &
operator<<(std::ostream& flux, OlapInfo & oi);
// ------------==============-------------==============----------------
@@ -94,8 +94,8 @@ public:
OlapRunAction * theRunAction;
OlapDetConstr * theDet;
G4std::vector<OlapStepInfo*> ABSteps;
G4std::vector<OlapStepInfo*> BASteps;
std::vector<OlapStepInfo*> ABSteps;
std::vector<OlapStepInfo*> BASteps;
G4bool dontDelete;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapGenerator.hh,v 1.1 2002/06/04 07:40:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapGenerator.hh,v 1.2 2003/06/16 16:49:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -35,7 +35,7 @@
#ifndef OlapGenerator_h
#define OlapGenerator_h
#include "g4std/vector"
#include <vector>
#include "globals.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4ThreeVector.hh"
@@ -48,8 +48,8 @@ public:
OlapGrid();
void Reset() { for (G4int i=0;i<3;i++) count[i]=0; axis=0; }
void Next();
G4std::vector<G4int> count; //
G4std::vector<G4int> gsize; // gridsize
std::vector<G4int> count; //
std::vector<G4int> gsize; // gridsize
G4int axis, eventsPerRun;
};
@@ -76,7 +76,7 @@ public:
G4int GetAxis() { return grid.axis; };
OlapGrid grid; // basically a vector of <int>, size==3
G4std::vector<G4double> ext;
std::vector<G4double> ext;
G4ThreeVector posAB, posBA;
G4bool autoinc;
};
@@ -22,7 +22,7 @@
//
//
// $Id: OlapLogManager.hh,v 1.1 2002/06/04 07:40:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapManager.hh,v 1.2 2002/06/04 09:23:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapManager.hh,v 1.3 2003/06/16 16:49:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -35,9 +35,9 @@
#ifndef OlapManager_h
#define OlapManager_h
#include "g4std/vector"
#include "g4std/map"
#include "g4std/set"
#include <vector>
#include <map>
#include <set>
#include "globals.hh"
#include "G4LogicalVolumeStore.hh"
@@ -84,10 +84,10 @@ public:
void Interrupt() { interrupt=true ; }
void registerNotification(OlapNotify*n) { theNotifs.insert(n); }
void notifyNewWorld(G4LogicalVolume*);
void notifyOlaps(const G4std::vector<OlapInfo*> &);
void notifyOlaps(const std::vector<OlapInfo*> &);
void deRegisterNotification(OlapNotify*n) { ; }
// FIXME: handle completly different in next redesign!
G4std::map<G4LogicalVolume *, G4bool> NoOlapMap;
std::map<G4LogicalVolume *, G4bool> NoOlapMap;
private:
@@ -104,11 +104,11 @@ private:
G4bool polyMode;
G4RunManager * theRunManager;
G4LogicalVolumeStore * theLVStore;
G4std::vector<G4LogicalVolume*>::iterator theLVit;
G4std::vector<G4LogicalVolume*> theLVs;
std::vector<G4LogicalVolume*>::iterator theLVit;
std::vector<G4LogicalVolume*> theLVs;
static OlapManager * theInstance;
G4GeoNav * theGeoNav;
G4std::set<OlapNotify*> theNotifs;
std::set<OlapNotify*> theNotifs;
G4bool interrupt;
};
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: OlapManagerMessenger.hh,v 1.1 2002/06/04 07:40:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapNotify.hh,v 1.1 2002/06/04 07:40:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapNotify.hh,v 1.2 2003/06/16 16:49:20 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -39,7 +39,7 @@
#ifndef OlapNotify_h
#define OlapNotify_h
#include "g4std/vector"
#include <vector>
#include "OlapEventAction.hh"
@@ -52,7 +52,7 @@ public:
virtual ~OlapNotify();
virtual void worldChanged(G4LogicalVolume* newWorld) = 0;
virtual void overlaps(const G4std::vector<OlapInfo*> &)=0;
virtual void overlaps(const std::vector<OlapInfo*> &)=0;
};
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: OlapPhysicsList.hh,v 1.1 2002/06/04 07:40:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapRunAction.hh,v 1.1 2002/06/04 07:40:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapRunAction.hh,v 1.2 2003/06/16 16:49:21 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -35,8 +35,8 @@
#ifndef OlapRunAction_h
#define OlapRunAction_h
#include "g4std/vector"
#include "g4std/fstream"
#include <vector>
#include <fstream>
#include "G4UserRunAction.hh"
#include "OlapEventAction.hh"
#include "OlapLogManager.hh"
@@ -53,10 +53,10 @@ public:
void EndOfRunAction(const G4Run* aRun);
void DrawOlaps();
G4std::vector<OlapInfo *> theOlaps;
std::vector<OlapInfo *> theOlaps;
private:
G4std::ofstream FILE;
std::ofstream FILE;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapSteppingAction.hh,v 1.1 2002/06/04 07:40:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapSteppingAction.hh,v 1.2 2003/06/16 16:49:22 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -35,8 +35,8 @@
#ifndef OlapSteppingAction_h
#define OlapSteppingAction_h
#include "g4std/vector"
#include "g4std/iostream"
#include <vector>
#include <iostream>
#include "globals.hh"
#include "G4UserSteppingAction.hh"
@@ -52,8 +52,8 @@ struct OlapStepInfo
};
G4std::ostream& operator << (G4std::ostream &, const OlapStepInfo &);
G4std::ostream& operator << (G4std::ostream &, G4std::vector<OlapStepInfo*> &);
std::ostream& operator << (std::ostream &, const OlapStepInfo &);
std::ostream& operator << (std::ostream &, std::vector<OlapStepInfo*> &);
class OlapSteppingAction : public G4UserSteppingAction
{
@@ -22,7 +22,7 @@
//
//
// $Id: OlapVisManager.hh,v 1.1 2002/06/04 07:40:20 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: RandomDetector.hh,v 1.1 2002/06/04 07:40:20 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: SolidAnalyser.hh,v 1.1 2002/06/04 07:40:20 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: SolidAnalyser.hh,v 1.2 2003/06/16 16:49:23 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -37,8 +37,8 @@
#ifndef SolidAnalyser_h
#define SolidAnalyser_h
#include "g4std/vector"
#include "g4std/algorithm"
#include <vector>
#include <algorithm>
#include "globals.hh"
@@ -63,37 +63,37 @@ public:
// user method to retrieve information
G4int GetParam(const G4VSolid *,
G4std::vector<G4std::pair<G4String,G4double> > & ) const;
std::vector<std::pair<G4String,G4double> > & ) const;
~SolidAnalyser();
protected:
G4int GetParam(const G4Box *,
G4std::vector<G4std::pair<G4String,G4double> > & ) const;
std::vector<std::pair<G4String,G4double> > & ) const;
G4int GetParam(const G4Cons *,
G4std::vector<G4std::pair<G4String,G4double> > & ) const;
std::vector<std::pair<G4String,G4double> > & ) const;
G4int GetParam(const G4Polycone *,
G4std::vector<G4std::pair<G4String,G4double> > & ) const;
std::vector<std::pair<G4String,G4double> > & ) const;
G4int GetParam(const G4Polyhedra *,
G4std::vector<G4std::pair<G4String,G4double> > & ) const;
std::vector<std::pair<G4String,G4double> > & ) const;
G4int GetParam(const G4Trap *,
G4std::vector<G4std::pair<G4String,G4double> > & ) const;
std::vector<std::pair<G4String,G4double> > & ) const;
G4int GetParam(const G4Trd *,
G4std::vector<G4std::pair<G4String,G4double> > & ) const;
std::vector<std::pair<G4String,G4double> > & ) const;
G4int GetParam(const G4Tubs *,
G4std::vector<G4std::pair<G4String,G4double> > & ) const;
std::vector<std::pair<G4String,G4double> > & ) const;
private:
SolidAnalyser();
G4int NotImplemented(const G4VSolid *,
G4std::vector<G4std::pair<G4String,G4double> > & ) const;
std::vector<std::pair<G4String,G4double> > & ) const;
static SolidAnalyser * theInstance;
};
G4std::ostream & operator<<(G4std::ostream& flux,
G4std::vector<G4std::pair<G4String,G4double> >& v);
std::ostream & operator<<(std::ostream& flux,
std::vector<std::pair<G4String,G4double> >& v);
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: tree.hh,v 1.2 2002/06/04 09:23:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: tree.hh,v 1.3 2003/06/16 16:49:24 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -39,9 +39,9 @@
#ifndef OlapTree_h
#define OlapTree_h
#include "g4std/set"
#include "g4std/vector"
#include "g4std/list"
#include <set>
#include <vector>
#include <list>
#include "G4Types.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: olapex.cc,v 1.1 2002/06/04 07:40:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
+13 -13
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GeoNav.cc,v 1.1 2002/06/04 07:40:20 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4GeoNav.cc,v 1.2 2003/06/16 16:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -67,7 +67,7 @@ G4LogicalVolume * G4GeoNav::NextLV()
G4int G4GeoNav::FilterLV(const G4String & aRegexStr,
G4std::vector<G4LogicalVolume*> & result,
std::vector<G4LogicalVolume*> & result,
G4bool stopAtFirst)
{
regex_t aRegex;
@@ -85,7 +85,7 @@ G4int G4GeoNav::FilterLV(const G4String & aRegexStr,
void G4GeoNav::FindLV(regex_t * aRegex, LVTree::node_t * node,
G4std::vector<G4LogicalVolume*>& result,
std::vector<G4LogicalVolume*>& result,
G4bool stopAtFirst)
{
if( !regexec(aRegex, node->data()->GetName().data(), 0,0,0))
@@ -106,7 +106,7 @@ void G4GeoNav::FindLV(regex_t * aRegex, LVTree::node_t * node,
}
G4int G4GeoNav::PathLV(G4std::vector<G4LogicalVolume*> & result)
G4int G4GeoNav::PathLV(std::vector<G4LogicalVolume*> & result)
{
result.push_back(theCurLV->data());
G4int level=1;
@@ -123,7 +123,7 @@ G4int G4GeoNav::PathLV(G4std::vector<G4LogicalVolume*> & result)
G4int G4GeoNav::Tokenize(const G4String & aStr,
G4std::vector<G4String>& tokens)
std::vector<G4String>& tokens)
{
G4String::size_type c = aStr.size();
G4String::size_type idx = 0;
@@ -137,7 +137,7 @@ G4int G4GeoNav::Tokenize(const G4String & aStr,
}
// scan for '/'
G4std::vector<G4int> pos;
std::vector<G4int> pos;
pos.push_back(0); // begin of input
G4String sep("/");
@@ -188,14 +188,14 @@ G4int G4GeoNav::Tokenize(const G4String & aStr,
G4LogicalVolume * G4GeoNav::ChangeLV(const G4String & aRegExp)
{
G4std::vector<G4String> tokens;
std::vector<G4String> tokens;
G4int c = Tokenize(aRegExp,tokens);
LVTree::node_t * anItem = theCurLV;
LVTree::node_t * anItemBefore = theCurLV;
if (c) {
G4std::vector<G4String>::iterator it = tokens.begin();
std::vector<G4String>::iterator it = tokens.begin();
if (*it==G4String("/"))
{ // absolute or relative
anItem = theRootLV;
@@ -270,7 +270,7 @@ G4LogicalVolume * G4GeoNav::ChangeLV(const G4String & aRegExp)
return 0;
}
G4int G4GeoNav::PwdLV(G4std::vector<G4LogicalVolume *>& result)
G4int G4GeoNav::PwdLV(std::vector<G4LogicalVolume *>& result)
{
result.push_back(theCurLV->data());
LVTree::node_t * temp = theCurLV;
@@ -287,14 +287,14 @@ void G4GeoNav::RecursiveFill(LVTree::node_t* node)
{
G4LogicalVolume * lv = node->data();
G4std::set<G4LogicalVolume*> lvset;
std::set<G4LogicalVolume*> lvset;
for ( G4int i=0; i<lv->GetNoDaughters(); ++i)
{
lvset.insert(lv->GetDaughter(i)->GetLogicalVolume());
}
G4std::set<G4LogicalVolume*>::iterator it = lvset.begin();
std::set<G4LogicalVolume*>::iterator it = lvset.begin();
for(;it!=lvset.end();++it)
{
LVTree::node_t * newnode = new LVTree::node_t(node, *it);
@@ -304,7 +304,7 @@ void G4GeoNav::RecursiveFill(LVTree::node_t* node)
}
G4int G4GeoNav::LsLV(G4std::vector<G4LogicalVolume *>& result)
G4int G4GeoNav::LsLV(std::vector<G4LogicalVolume *>& result)
{
G4int c=0;
LVTree::node_t * n = theCurLV->firstChild();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapDetConstr.cc,v 1.1 2002/06/04 07:40:20 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapDetConstr.cc,v 1.2 2003/06/12 12:24:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -602,7 +602,7 @@ void OlapDetConstr::ColorFirstLevel()
// sets NewWorld invisible
void OlapDetConstr::ResetColors(G4LogicalVolume* lv)
void OlapDetConstr::ResetColors(G4LogicalVolume*)
{
/*
G4ColorMap * aColMap = G4ColorMap::GetColorMap();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapEventAction.cc,v 1.1 2002/06/04 07:40:21 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapEventAction.cc,v 1.3 2003/06/16 16:49:26 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -32,8 +32,9 @@
//
// --------------------------------------------------------------
//
#include "g4std/vector"
#include "g4std/strstream"
#include "globals.hh"
#include <vector>
#include <strstream>
#include "G4VVisManager.hh"
#include "G4Trajectory.hh"
@@ -52,8 +53,8 @@
//#define OLAP_DEBUG
//#define OLAP_DEBUG_2
G4std::ostream &
operator<<(G4std::ostream& flux, OlapInfo & oi)
std::ostream &
operator<<(std::ostream& flux, OlapInfo & oi)
{
OlapStepInfo si;
si.thePoint = oi.v1;
@@ -145,11 +146,8 @@ OlapEventAction::~OlapEventAction()
}
void OlapEventAction::BeginOfEventAction(const G4Event* anEvent)
void OlapEventAction::BeginOfEventAction(const G4Event*)
{
// G4cout << ">>>evt=" << anEvent->GetEventID() << " run=" <<
// anEvent->G4endl;
while (!ABSteps.empty())
{
if (! dontDelete )
@@ -274,7 +272,7 @@ void OlapEventAction::EndOfEventAction(const G4Event* anEvent)
oi->probNot = true; // probably not an overlap, just numerics ....
dontDelete = true;
G4std::ostrstream os;
std::ostrstream os;
os << "A,B diff. steps AB:" << ABSteps.size()
<< " BA:" << BASteps.size() << '\0';
@@ -332,7 +330,7 @@ void OlapEventAction::EndOfEventAction(const G4Event* anEvent)
G4bool OlapEventAction::InsertOI(OlapInfo * oi)
{
G4std::vector<OlapInfo*>::iterator it = theRunAction->theOlaps.begin();
std::vector<OlapInfo*>::iterator it = theRunAction->theOlaps.begin();
G4bool flag(false);
while (it != theRunAction->theOlaps.end())
{
@@ -22,7 +22,7 @@
//
//
// $Id: OlapGenerator.cc,v 1.2 2002/06/04 09:23:44 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapLogManager.cc,v 1.1 2002/06/04 07:40:21 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapLogManager.cc,v 1.2 2003/06/16 16:49:27 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -35,7 +35,7 @@
#include "OlapLogManager.hh"
#include "globals.hh"
#include "g4std/fstream"
#include <fstream>
OlapLogManager * OlapLogManager::theInstance = 0;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapManager.cc,v 1.1 2002/06/04 07:40:21 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapManager.cc,v 1.2 2003/06/16 16:49:28 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -34,7 +34,7 @@
//
#include <stdlib.h>
#include "g4std/vector"
#include <vector>
#include "OlapManager.hh"
#include "OlapDetConstr.hh"
@@ -55,7 +55,7 @@ OlapManager::OlapManager() :
theMessenger = new OlapManagerMessenger(this);
theLVStore = G4LogicalVolumeStore::GetInstance();
// for SUN
//G4std::vector<G4LogicalVolume*>::iterator aIt = theLVStore->begin();
//std::vector<G4LogicalVolume*>::iterator aIt = theLVStore->begin();
//G4LogicalVolumeStore::iterator aIt = theLVStore->begin();
theRunManager = G4RunManager::GetRunManager();
@@ -76,7 +76,7 @@ OlapManager::OlapManager() :
// instantiate the logical volume tree & add it to the Gui
theGeoNav = new G4GeoNav(theDet->GetFullWorld()->GetLogicalVolume());
G4std::vector<G4LogicalVolume*>::iterator aIt2;
std::vector<G4LogicalVolume*>::iterator aIt2;
for (aIt2=theLVStore->begin(); aIt2 != theLVStore->end(); aIt2++)
NoOlapMap[*aIt2] = false;
}
@@ -245,7 +245,7 @@ void OlapManager::ListLV(const G4String & aRegexStr)
{
G4cout << "logical volumes matching " << aRegexStr << ":" <<G4endl;
G4std::vector<G4LogicalVolume *> aLVVec;
std::vector<G4LogicalVolume *> aLVVec;
G4int c = theGeoNav->FilterLV(aRegexStr,aLVVec);
for(G4int i=0; i<c; i++)
@@ -257,7 +257,7 @@ void OlapManager::ListLV(const G4String & aRegexStr)
void OlapManager::LsLV()
{
G4std::vector<G4LogicalVolume *> lvs;
std::vector<G4LogicalVolume *> lvs;
G4int c = theGeoNav->LsLV(lvs);
for (G4int i = 0; i<c; i++)
G4cout << " " << (lvs[i])->GetName() << G4endl;
@@ -265,7 +265,7 @@ void OlapManager::LsLV()
void OlapManager::PwdLV()
{
G4std::vector<G4LogicalVolume *> lvs;
std::vector<G4LogicalVolume *> lvs;
theGeoNav->PwdLV(lvs);
G4String temp;
G4cout << "/ = ";
@@ -296,7 +296,7 @@ void OlapManager::ChangeLV(const G4String & aDir)
void OlapManager::GotoLV(const G4String & aRegexStr)
{
G4std::vector<G4LogicalVolume*> lvs;
std::vector<G4LogicalVolume*> lvs;
if (theGeoNav->FilterLV(aRegexStr,lvs,true))
{
G4cout << "new world: " << (lvs[0])->GetName() << G4endl;
@@ -343,15 +343,15 @@ void OlapManager::SetGrid(G4int x, G4int y, G4int z)
void OlapManager::notifyNewWorld(G4LogicalVolume* nw)
{
//G4cout << G4endl << "NewWorld-Notif: " << nw->GetName() << G4endl;
G4std::set<OlapNotify*>::iterator i = theNotifs.begin();
std::set<OlapNotify*>::iterator i = theNotifs.begin();
for(;i!=theNotifs.end();++i)
(*i)->worldChanged(nw);
}
void OlapManager::notifyOlaps(const G4std::vector<OlapInfo*> & ov)
void OlapManager::notifyOlaps(const std::vector<OlapInfo*> & ov)
{
G4std::set<OlapNotify*>::iterator i = theNotifs.begin();
std::set<OlapNotify*>::iterator i = theNotifs.begin();
for(;i!=theNotifs.end();++i)
(*i)->overlaps(ov);
}
@@ -22,7 +22,7 @@
//
//
// $Id: OlapManagerMessenger.cc,v 1.2 2002/12/05 01:07:00 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: OlapNotify.cc,v 1.1 2002/06/04 07:40:22 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: OlapPhysicsList.cc,v 1.1 2002/06/04 07:40:22 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapRunAction.cc,v 1.2 2002/06/04 09:23:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapRunAction.cc,v 1.4 2003/06/16 16:49:29 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -41,7 +41,7 @@
#include "G4Run.hh"
#include "globals.hh"
#include "g4std/fstream"
#include <fstream>
OlapRunAction::OlapRunAction()
{
@@ -53,7 +53,7 @@ OlapRunAction::~OlapRunAction()
}
void OlapRunAction::BeginOfRunAction(const G4Run* aRun)
void OlapRunAction::BeginOfRunAction(const G4Run*)
{
while ( !theOlaps.empty() )
{
@@ -74,7 +74,7 @@ void OlapRunAction::EndOfRunAction(const G4Run* aRun)
OlapManager::GetOlapManager()->notifyOlaps(theOlaps);
G4std::vector<OlapInfo*>::iterator it = theOlaps.begin();
std::vector<OlapInfo*>::iterator it = theOlaps.begin();
G4int i=1;
while (it!=theOlaps.end())
{
@@ -110,7 +110,7 @@ void OlapRunAction::EndOfRunAction(const G4Run* aRun)
fname = logManager->logPath + volume + ".log";
}
FILE.open(fname, G4std::ios::app);
FILE.open(fname, std::ios::app);
FILE << "===== collected overlaps of run [" << aRun->GetRunID() << "] "
<< "(ol=" << theOlaps.size() << ")"<< G4endl;
@@ -133,7 +133,7 @@ void OlapRunAction::EndOfRunAction(const G4Run* aRun)
}
#include "g4std/vector"
#include <vector>
#include "G4Circle.hh"
#include "G4Polyline.hh"
#include "G4VisAttributes.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: OlapSteppingAction.cc,v 1.1 2002/06/04 07:40:23 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: OlapSteppingAction.cc,v 1.2 2003/06/16 16:49:30 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -43,10 +43,10 @@
#include "G4VSolid.hh"
#include "SolidAnalyser.hh"
G4std::ostream&
operator << (G4std::ostream& os, G4std::vector<OlapStepInfo*>& vec)
std::ostream&
operator << (std::ostream& os, std::vector<OlapStepInfo*>& vec)
{
G4std::vector<OlapStepInfo*>::iterator it = vec.begin();
std::vector<OlapStepInfo*>::iterator it = vec.begin();
while (it!=vec.end())
{
G4VPhysicalVolume * pv = (*it)->theHist.GetTopVolume();
@@ -57,8 +57,8 @@ operator << (G4std::ostream& os, G4std::vector<OlapStepInfo*>& vec)
return os;
}
G4std::ostream&
operator << (G4std::ostream& os, const OlapStepInfo& aStepInfo)
std::ostream&
operator << (std::ostream& os, const OlapStepInfo& aStepInfo)
{
//G4cout << "History depth="<<aStepInfo.theHist.GetDepth()<< G4endl;
for (G4int i=0;i<=aStepInfo.theHist.GetDepth();i++)
@@ -66,7 +66,7 @@ operator << (G4std::ostream& os, const OlapStepInfo& aStepInfo)
G4VSolid * solid =
aStepInfo.theHist.GetVolume(i)->GetLogicalVolume()->GetSolid();
SolidAnalyser * solAna = SolidAnalyser::GetSolidAnalyser();
G4std::vector< G4std::pair<G4String,G4double> > param;
std::vector< std::pair<G4String,G4double> > param;
solAna->GetParam(solid,param);
os << "["<<i<<"]: " ;
@@ -115,7 +115,7 @@ operator << (G4std::ostream& os, const OlapStepInfo& aStepInfo)
// solid specification
os << " " << solid->GetEntityType() << ": ";
G4std::vector< G4std::pair<G4String,G4double> >::iterator it =
std::vector< std::pair<G4String,G4double> >::iterator it =
param.begin();
while ( it != param.end() )
{
@@ -22,7 +22,7 @@
//
//
// $Id: OlapVisManager.cc,v 1.1 2002/06/04 07:40:23 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: RandomDetector.cc,v 1.2 2003/02/19 07:59:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: SolidAnalyser.cc,v 1.2 2002/06/04 09:23:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: SolidAnalyser.cc,v 1.3 2003/06/16 16:49:31 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// --------------------------------------------------------------
@@ -34,7 +34,7 @@
//
#include "SolidAnalyser.hh"
#include "g4std/strstream"
#include <strstream>
#include "G4Box.hh"
#include "G4Cons.hh"
@@ -67,7 +67,7 @@ SolidAnalyser * SolidAnalyser::GetSolidAnalyser()
G4int SolidAnalyser::GetParam(const G4VSolid * s,
G4std::vector<G4std::pair<G4String,G4double> > & result ) const
std::vector<std::pair<G4String,G4double> > & result ) const
{
const G4Box * box = dynamic_cast<const G4Box*>(s);
if ( box ) return GetParam(box,result);
@@ -95,146 +95,146 @@ G4int SolidAnalyser::GetParam(const G4VSolid * s,
// default parameters for not implemented solids
G4int SolidAnalyser::NotImplemented(const G4VSolid * s,
G4std::vector<G4std::pair<G4String,G4double> > & result) const
std::vector<std::pair<G4String,G4double> > & result) const
{
G4String temp = s->GetEntityType() + G4String(": not impl.");
result.push_back(G4std::make_pair(temp,-1.0));
result.push_back(std::make_pair(temp,-1.0));
return -1;
}
// G4Box
G4int SolidAnalyser::GetParam(const G4Box * s,
G4std::vector<G4std::pair<G4String,G4double> > & result) const
std::vector<std::pair<G4String,G4double> > & result) const
{
result.push_back(G4std::make_pair(G4String("x/2"), s->GetXHalfLength()));
result.push_back(G4std::make_pair(G4String("y/2"), s->GetYHalfLength()));
result.push_back(G4std::make_pair(G4String("z/2"), s->GetZHalfLength()));
result.push_back(std::make_pair(G4String("x/2"), s->GetXHalfLength()));
result.push_back(std::make_pair(G4String("y/2"), s->GetYHalfLength()));
result.push_back(std::make_pair(G4String("z/2"), s->GetZHalfLength()));
return 3;
}
// G4Cons
G4int SolidAnalyser::GetParam(const G4Cons * s,
G4std::vector<G4std::pair<G4String,G4double> > & result) const
std::vector<std::pair<G4String,G4double> > & result) const
{
result.push_back(G4std::make_pair(G4String("z/2"),
result.push_back(std::make_pair(G4String("z/2"),
s->GetZHalfLength()));
result.push_back(G4std::make_pair(G4String("rInZ-"),
result.push_back(std::make_pair(G4String("rInZ-"),
s->GetInnerRadiusMinusZ()));
result.push_back(G4std::make_pair(G4String("rInZ+"),
result.push_back(std::make_pair(G4String("rInZ+"),
s->GetInnerRadiusPlusZ()));
result.push_back(G4std::make_pair(G4String("rOutZ-"),
result.push_back(std::make_pair(G4String("rOutZ-"),
s->GetOuterRadiusMinusZ()));
result.push_back(G4std::make_pair(G4String("rOutZ+"),
result.push_back(std::make_pair(G4String("rOutZ+"),
s->GetOuterRadiusPlusZ()));
result.push_back(G4std::make_pair(G4String("startPhi"),
result.push_back(std::make_pair(G4String("startPhi"),
s->GetStartPhiAngle()));
result.push_back(G4std::make_pair(G4String("deltaPhi"),
result.push_back(std::make_pair(G4String("deltaPhi"),
s->GetDeltaPhiAngle()));
return 7;
}
// G4Polycone
G4int SolidAnalyser::GetParam(const G4Polycone * s,
G4std::vector<G4std::pair<G4String,G4double> > & result) const
std::vector<std::pair<G4String,G4double> > & result) const
{
result.push_back(G4std::make_pair(G4String("startPhi"), s->GetStartPhi()));
result.push_back(G4std::make_pair(G4String("endPhi"), s->GetEndPhi()));
result.push_back(std::make_pair(G4String("startPhi"), s->GetStartPhi()));
result.push_back(std::make_pair(G4String("endPhi"), s->GetEndPhi()));
G4int nr = s->GetNumRZCorner();
G4String temp("nrRZ");
result.push_back(G4std::make_pair(temp, G4double(nr)));
result.push_back(std::make_pair(temp, G4double(nr)));
for (G4int i=0; i<nr; i++)
{
G4std::ostrstream sstr_r, sstr_z;
std::ostrstream sstr_r, sstr_z;
G4PolyconeSideRZ sideRz = s->GetCorner(i);
sstr_z << "z_" << i << '\0';
sstr_r << "r_" << i << '\0';
G4String z_str(sstr_z.str());
G4String r_str(sstr_r.str());
result.push_back(G4std::make_pair(z_str, sideRz.z));
result.push_back(G4std::make_pair(r_str, sideRz.r));
result.push_back(std::make_pair(z_str, sideRz.z));
result.push_back(std::make_pair(r_str, sideRz.r));
}
return 3 + 2*nr;
}
// G4Polyhedra
G4int SolidAnalyser::GetParam(const G4Polyhedra * s,
G4std::vector<G4std::pair<G4String,G4double> > & result) const
std::vector<std::pair<G4String,G4double> > & result) const
{
result.push_back(G4std::make_pair(G4String("startPhi"), s->GetStartPhi()));
result.push_back(G4std::make_pair(G4String("endPhi"), s->GetEndPhi()));
result.push_back(G4std::make_pair(G4String("nrSide"),
result.push_back(std::make_pair(G4String("startPhi"), s->GetStartPhi()));
result.push_back(std::make_pair(G4String("endPhi"), s->GetEndPhi()));
result.push_back(std::make_pair(G4String("nrSide"),
G4double(s->GetNumSide())));
G4int nr = s->GetNumRZCorner();
result.push_back(G4std::make_pair(G4String("nrRZ"), G4double(nr)));
result.push_back(std::make_pair(G4String("nrRZ"), G4double(nr)));
for (G4int i=0; i<nr; i++)
{
G4std::ostrstream sstr_r, sstr_z;
std::ostrstream sstr_r, sstr_z;
G4PolyhedraSideRZ sideRz = s->GetCorner(i);
sstr_z << "z_" << i << '\0';
sstr_r << "r_" << i << '\0';
G4String z_str(sstr_z.str());
G4String r_str(sstr_r.str());
result.push_back(G4std::make_pair(z_str, sideRz.z));
result.push_back(G4std::make_pair(r_str, sideRz.r));
result.push_back(std::make_pair(z_str, sideRz.z));
result.push_back(std::make_pair(r_str, sideRz.r));
}
return 4 + 2*nr;
}
// G4Trap
G4int SolidAnalyser::GetParam(const G4Trap * s,
G4std::vector<G4std::pair<G4String,G4double> > & result) const
std::vector<std::pair<G4String,G4double> > & result) const
{
result.push_back(G4std::make_pair(G4String("z/2"), s->GetZHalfLength()));
result.push_back(std::make_pair(G4String("z/2"), s->GetZHalfLength()));
result.push_back(G4std::make_pair(G4String("x/2_1"), s->GetXHalfLength1()));
result.push_back(G4std::make_pair(G4String("x/2_2"), s->GetXHalfLength2()));
result.push_back(G4std::make_pair(G4String("y/2_1"), s->GetYHalfLength1()));
result.push_back(G4std::make_pair(G4String("tanAlpha_1"),s->GetTanAlpha1()));
result.push_back(std::make_pair(G4String("x/2_1"), s->GetXHalfLength1()));
result.push_back(std::make_pair(G4String("x/2_2"), s->GetXHalfLength2()));
result.push_back(std::make_pair(G4String("y/2_1"), s->GetYHalfLength1()));
result.push_back(std::make_pair(G4String("tanAlpha_1"),s->GetTanAlpha1()));
result.push_back(G4std::make_pair(G4String("x/2_3"), s->GetXHalfLength3()));
result.push_back(G4std::make_pair(G4String("x/2_4"), s->GetXHalfLength4()));
result.push_back(G4std::make_pair(G4String("y/2_2"), s->GetYHalfLength2()));
result.push_back(G4std::make_pair(G4String("tanAlpha_2"),s->GetTanAlpha2()));
result.push_back(std::make_pair(G4String("x/2_3"), s->GetXHalfLength3()));
result.push_back(std::make_pair(G4String("x/2_4"), s->GetXHalfLength4()));
result.push_back(std::make_pair(G4String("y/2_2"), s->GetYHalfLength2()));
result.push_back(std::make_pair(G4String("tanAlpha_2"),s->GetTanAlpha2()));
return 9;
}
// G4Trd
G4int SolidAnalyser::GetParam(const G4Trd * s,
G4std::vector<G4std::pair<G4String,G4double> > & result) const
std::vector<std::pair<G4String,G4double> > & result) const
{
result.push_back(G4std::make_pair(G4String("z/2"), s->GetZHalfLength()));
result.push_back(std::make_pair(G4String("z/2"), s->GetZHalfLength()));
result.push_back(G4std::make_pair(G4String("x/2_1"), s->GetXHalfLength1()));
result.push_back(G4std::make_pair(G4String("x/2_2"), s->GetXHalfLength2()));
result.push_back(G4std::make_pair(G4String("y/2_1"), s->GetYHalfLength1()));
result.push_back(G4std::make_pair(G4String("y/2_2"), s->GetYHalfLength2()));
result.push_back(std::make_pair(G4String("x/2_1"), s->GetXHalfLength1()));
result.push_back(std::make_pair(G4String("x/2_2"), s->GetXHalfLength2()));
result.push_back(std::make_pair(G4String("y/2_1"), s->GetYHalfLength1()));
result.push_back(std::make_pair(G4String("y/2_2"), s->GetYHalfLength2()));
return 5;
}
// G4Tubs
G4int SolidAnalyser::GetParam(const G4Tubs * s,
G4std::vector<G4std::pair<G4String,G4double> > & result) const
std::vector<std::pair<G4String,G4double> > & result) const
{
result.push_back(G4std::make_pair(G4String("z/2"), s->GetZHalfLength()));
result.push_back(G4std::make_pair(G4String("rIn"), s->GetInnerRadius()));
result.push_back(G4std::make_pair(G4String("rOut"), s->GetOuterRadius()));
result.push_back(G4std::make_pair(G4String("startPhi"),
result.push_back(std::make_pair(G4String("z/2"), s->GetZHalfLength()));
result.push_back(std::make_pair(G4String("rIn"), s->GetInnerRadius()));
result.push_back(std::make_pair(G4String("rOut"), s->GetOuterRadius()));
result.push_back(std::make_pair(G4String("startPhi"),
s->GetStartPhiAngle()));
result.push_back(G4std::make_pair(G4String("deltaPhi"),
result.push_back(std::make_pair(G4String("deltaPhi"),
s->GetDeltaPhiAngle()));
return 5;
}
G4std::ostream & operator<<(G4std::ostream& flux,
G4std::vector<G4std::pair<G4String,G4double> > & v)
std::ostream & operator<<(std::ostream& flux,
std::vector<std::pair<G4String,G4double> > & v)
{
G4std::vector<G4std::pair<G4String,G4double> >::iterator it = v.begin();
std::vector<std::pair<G4String,G4double> >::iterator it = v.begin();
while ( it != v.end() )
{
flux << (*it).first << '=' << (*it).second << "<br/>" << G4endl;