remove headers from old location
diff -N CalorimeterHitProcessor.hh --- CalorimeterHitProcessor.hh 24 Jun 2013 22:10:32 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,24 +0,0 @@
-#ifndef lcdd_CalorimeterHitProcessor_hh -#define lcdd_CalorimeterHitProcessor_hh 1 - -// Geant4 -#include "G4Step.hh" - -// LCDD -#include "CellReadout.hh" - -class CalorimeterHitProcessor -{ - -public: - CalorimeterHitProcessor(CellReadout*); - virtual ~CalorimeterHitProcessor(); - -public: - bool processHits(G4Step*); - -private: - CellReadout* m_readout; -}; - -#endif
diff -N Cartesian3DMagneticFieldMap.hh --- Cartesian3DMagneticFieldMap.hh 24 Jun 2013 22:10:33 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,44 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/Cartesian3DMagneticFieldMap.hh,v 1.2 2013/06/24 22:10:33 jeremy Exp $ - -#include "G4MagneticField.hh" - -#include <vector> -using std::vector; - -// -// Original PurgMagTabulatedField3D code developed by: -// S.Larsson and J. Generowicz. -// - -class Cartesian3DMagneticFieldMap: public G4MagneticField -{ -private: - - // Storage space for the table - vector<vector<vector<double> > > _xField; - vector<vector<vector<double> > > _yField; - vector<vector<vector<double> > > _zField; - - // The dimensions of the table - int _nx, _ny, _nz; - - // The physical limits of the defined region - double _minx, _maxx, _miny, _maxy, _minz, _maxz; - - // The physical extent of the defined region - double _dx, _dy, _dz; - - // Offsets if field map is not in global coordinates - double _xOffset; - double _yOffset; - double _zOffset; - - bool _invertX, _invertY, _invertZ; - -public: - - Cartesian3DMagneticFieldMap(const char* filename, double xOffset, double yOffset, double zOffset); - - void GetFieldValue(const double Point[4], double* Bfield) const; -}; -
diff -N CellReadout.hh --- CellReadout.hh 18 Jun 2013 19:56:18 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,64 +0,0 @@
-#ifndef lcdd_CellReadout_hh -#define lcdd_CellReadout_hh 1 - -#include <vector> -#include <map> -#include <string> - -/** - * Pure virtual base class for cell readouts to implement. - */ -class CellReadout -{ - -public: - - /** A 2D position, which will usually be XY in the local coordinate system. */ - typedef std::pair<double, double> Position2D; - - /** A cell ID as a list of int values. */ - typedef std::vector<int> CellId; - - /** A list of a cell's neighbor IDs. */ - typedef std::vector<CellId> Neighbors; - - /** A list of the field names for this readout. */ - typedef std::vector<std::string> FieldNames; - -public: - - /** - * Class constructor. - */ - CellReadout(); - - /** - * Class destructor. - */ - virtual ~CellReadout(); - - /** - * Compute cell ID from local position. - */ - virtual CellId cellId(Position2D) = 0; - - /** - * Compute local position of a cell ID. - */ - virtual Position2D position(CellId) = 0; - - /** - * Create a list of neighbor cells from a cell ID. - */ - virtual Neighbors neighbors(CellId) = 0; - - /** - * Get the list of field names. - */ - const FieldNames& fieldNames(); - -protected: - FieldNames m_fieldNames; -}; - -#endif
diff -N CellReadout2D.hh --- CellReadout2D.hh 24 Jun 2013 22:10:33 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,106 +0,0 @@
-#ifndef lcdd_CellReadout2D_hh -#define lcdd_CellReadout2D_hh 1 - -// LCDD -#include "CellReadout.hh" - -// STL -#include <vector> -#include <map> - -/** - * - */ -class CellReadout2D: public CellReadout -{ - -public: - - /** - * Class destructor. - */ - virtual ~CellReadout2D(); - - /** - * Class constructor. - */ - CellReadout2D(double cellSizeX, double cellSizeY); - - /** - * ---------------------------------------------------------- - * Implementation of CellReadout - * ---------------------------------------------------------- - */ - - /** - * Get the position of the cell. - */ - Position2D position(CellId); - - /** - * Compute cell ID from local position. - */ - CellId cellId(Position2D); - - /** - * Create a list of neighbor cells from a cell ID. - */ - Neighbors neighbors(CellId); - - /** - * ---------------------------------------------------------- - */ - - /** - * Get the X cell size. - */ - double getCellSizeX(); - - /** - * Get the Y cell size. - */ - double getCellSizeY(); - - /** - * Get the X index from a position. - */ - int getXIndex(double x); - - /** - * Get the Y index from a position. - */ - int getYIndex(double y); - - /* - * Get the X position from a cell index. - */ - double getCellPositionX(int ix); - - /** - * Get the Y position from a Y bin value. - */ - double getCellPositionY(int iy); - - /** - * Get a pair of indices representing a cell. - * This method should check that the indices are valid. - */ - CellId createCell(int x, int y); - - /** - * Given an index and cell size, compute the corresponding coordinate. - */ - double getCellCoordinate(int u, double cellSize); - - /** - * Given a coordinate and cell size, compute the corresponding cell index. - */ - int getCellIndex(double x, double cellSize); - -private: - - double m_cellSizeX; - double m_cellSizeY; -}; - -#endif
diff -N CellReadout2DSegmentation.hh --- CellReadout2DSegmentation.hh 24 Jun 2013 22:10:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,40 +0,0 @@
-#ifndef lcdd_CellReadout2DSegmentation_hh -#define lcdd_CellReadout2DSegmentation_hh 1 - -// LCDD -#include "G4Segmentation.hh" -#include "CellReadout2D.hh" - -// Geant4 -#include "G4ThreeVector.hh" - -class G4Step; - -/** - * Adapt a CellReadout2D to the LCDD Segmentation interface. - */ -class CellReadout2DSegmentation: public G4Segmentation -{ - -public: - - CellReadout2DSegmentation(double cellSizeX, double cellSizeY); - - virtual ~CellReadout2DSegmentation(); - - G4ThreeVector getGlobalHitPos(const G4Step*); - - void setBins(const G4Step*); - - void setBinNames(); - - void setup(const G4Step*); - - CellReadout2D::Position2D localToReadoutCoordinates(G4ThreeVector&); - -private: - - CellReadout2D* m_readout; -}; - -#endif
diff -N CellReadout2DSegmentationType.hh --- CellReadout2DSegmentationType.hh 24 Jun 2013 22:10:33 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,62 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/CellReadout2DSegmentationType.hh,v 1.2 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef lcdd_CellReadout2DSegmentationType_hh -#define lcdd_CellReadout2DSegmentationType_hh 1 - -#include "SegmentationType.hh" - -#include <string> - -class CellReadout2DSegmentationType: public SegmentationType -{ - -public: - - CellReadout2DSegmentationType() - { - } - - virtual ~CellReadout2DSegmentationType() - { - } - -public: - - void setCellSizeX(const std::string& cellSizeX) - { - m_cellSizeX = cellSizeX; - } - - void setCellSizeY(const std::string& cellSizeY) - { - m_cellSizeY = cellSizeY; - } - - void setLengthUnit(const std::string& lengthUnit) - { - m_lengthUnit = lengthUnit; - } - - const std::string& getCellSizeX() - { - return m_cellSizeX; - } - - const std::string& getCellSizeY() - { - return m_cellSizeY; - } - - const std::string& getLengthUnit() - { - return m_lengthUnit; - } - -protected: - - std::string m_cellSizeX; - std::string m_cellSizeY; - std::string m_lengthUnit; -}; - -#endif
diff -N Cerenkov.hh --- Cerenkov.hh 24 Jun 2013 22:10:33 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,42 +0,0 @@
-/* ------------------------------------------------------------------------ - |\___/| - ) ( - =\ /= - )===( - / \ CaTS: Calorimeter and Tracker Simulation - | | Author: Hans Wenzel (Fermilab) - / \ - \ / - \__ _/ - ( ( - ) ) - (_( - -------------------------------------------------------------------------*/ -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -#ifndef Cerenkov_h -#define Cerenkov_h 1 - -#include <vector> -#include "G4PhysicsOrderedFreeVector.hh" -#include "G4Material.hh" -#include "G4MaterialPropertyVector.hh" - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... - -class Cerenkov -{ -public: - Cerenkov(); - ~Cerenkov(); - void Initialize(); - G4double GetAverageNumberOfPhotons(const G4double, const G4double, const G4String) const; -private: - std::vector<G4String> CAI; - std::vector<G4PhysicsOrderedFreeVector*> CerenkovAngleIntegrals; - std::vector<G4MaterialPropertyVector*> RefractionIndeces; -}; - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... - -#endif -
diff -N FieldMapTypeProcess.hh --- FieldMapTypeProcess.hh 24 Jun 2013 22:10:33 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,66 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/FieldMapTypeProcess.hh,v 1.4 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_FIELDMAPTYPEPROCESS_HH -#define LCDD_FIELDMAPTYPEPROCESS_HH 1 - -#include "Saxana/ProcessingConfigurator.h" -#include "Saxana/ProcessingContext.h" -#include "Saxana/SAXProcessor.h" -#include "Saxana/StateStack.h" -#include "Saxana/SAXProcessingState.h" -#include "Saxana/SAXStateProcess.h" -#include "Saxana/SAXComponentFactory.h" - -#include "FieldType.hh" -#include "FieldTypeProcess.hh" -#include "FieldMapType.hh" - -#include <iostream> - -/** - * @class FieldMapTypeProcess - * @brief Generic process for field maps. - * @note This class adds generic content using StackPopNotify. - */ -class FieldMapTypeProcess: public FieldTypeProcess -{ -public: - FieldMapTypeProcess(const ProcessingContext* context = 0) : - FieldTypeProcess(context) - { - } - - virtual ~FieldMapTypeProcess() - { - } - - virtual const SAXComponentObject* Build() const - { - return this; - } - - /* NO-OP. Just call up the inheritance chain to FieldTypeProcess. */ - virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - { - // std::cout << "FieldMapTypeProcess::StartElement - " << name << std::endl; - FieldTypeProcess::StartElement(name, attrs); - } - - virtual void EndElement(const std::string&) - { - } - - virtual void Characters(const std::string&) - { - } - - virtual void StackPopNotify(const std::string& name) - { - // std::cout << "FieldMapTypeProcess::StackPopNotify" << std::endl; - SAXObject** so = Context()->GetTopObject(); - FieldMapType* fmap = dynamic_cast<FieldMapType*>(m_obj); - fmap->add_content(name, *so); - } -}; - -#endif
diff -N FieldTypeProcess.hh --- FieldTypeProcess.hh 24 Jun 2013 22:10:33 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,74 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/FieldTypeProcess.hh,v 1.6 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_FIELDTYPEPROCESS_HH -#define LCDD_FIELDTYPEPROCESS_HH 1 - -#include "Saxana/ProcessingConfigurator.h" -#include "Saxana/ProcessingContext.h" -#include "Saxana/SAXProcessor.h" -#include "Saxana/StateStack.h" -#include "Saxana/SAXProcessingState.h" -#include "Saxana/SAXStateProcess.h" -#include "Saxana/SAXComponentFactory.h" - -#include "FieldType.hh" - -#include <iostream> - -/** - * @class FieldTypeProcess - * @brief Generic process for fields. - * @note This class sets name and units for a field. - */ -class FieldTypeProcess: public SAXStateProcess -{ -public: - FieldTypeProcess(const ProcessingContext* context = 0) : - SAXStateProcess(context), m_obj(0) - { - } - - virtual ~FieldTypeProcess() - { - } - - virtual const SAXComponentObject* Build() const - { - return this; - } - - virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - { - //std::cout << "FieldTypeProcess::StartElement: " << name << std::endl; - - FieldType* fld = dynamic_cast<FieldType*>(m_obj); - - if (fld) { - - fld->set_name(attrs.getValue("name")); - fld->set_funit(attrs.getValue("funit")); - fld->set_lunit(attrs.getValue("lunit")); - - //std::cout << "name: " << fld->get_name() << std::endl; - } else { - std::cerr << "Failed cast to FieldType." << std::endl; - } - } - - virtual void EndElement(const std::string&) - { - } - - virtual void Characters(const std::string&) - { - } - - virtual void StackPopNotify(const std::string&) - { - //std::cout << "FieldTypeProcess::StackPopNotify" << std::endl; - } - -protected: - SAXObject* m_obj; -}; - -#endif
diff -N G4BoxDipole.hh --- G4BoxDipole.hh 24 Jun 2013 22:10:33 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,39 +0,0 @@
-#ifndef LCDD_G4BOXDIPOLE_HH -#define LCDD_G4BOXDIPOLE_HH 1 - -#include "G4MagneticField.hh" - -class G4BoxDipole: public G4MagneticField -{ -public: - - G4BoxDipole(double x, double y, double z, double dx, double dy, double dz, double bx, double by, double bz); - - virtual ~G4BoxDipole() - { - ; - } - - void GetFieldValue(const double point[3], double *bfield) const; - -private: - - double _x; - double _y; - double _z; - double _dx; - double _dy; - double _dz; - double _bx; - double _by; - double _bz; - - double _maxx; - double _maxy; - double _maxz; - double _minx; - double _miny; - double _minz; -}; - -#endif
diff -N G4BoxField.hh --- G4BoxField.hh 23 Jun 2011 21:04:10 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,4 +0,0 @@
-class G4BoxField -{ - -};
diff -N GDMLWriter.hh --- GDMLWriter.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/GDMLWriter.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_GDMLWRITER_HH -#define LCDD_GDMLWRITER_HH 1 - -// stl -#include <string> -#include <vector> - -class GDMLWriter -{ -public: - static void writeCurrentGeometry(const std::string& fileName); - static void writeCurrentGeometry(const std::string& fileName, std::vector<std::string> volumes); -}; - -#endif
diff -N GDMLWriterMessenger.hh --- GDMLWriterMessenger.hh 24 Jun 2013 22:10:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,34 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/GDMLWriterMessenger.hh,v 1.3 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef GDMLWriterMessenger_h -#define GDMLWriterMessenger_h 1 - -#include "G4UImessenger.hh" - -class G4UIcommand; - -/** - * @class GDMLWriterMessenger - * @brief Messenger for GDMLWriter - */ -class GDMLWriterMessenger: public G4UImessenger -{ - -public: - GDMLWriterMessenger(); - virtual ~GDMLWriterMessenger(); - -public: - - void SetNewValue(G4UIcommand *, G4String newVals); - -private: - - void defineCommands(); - -private: - - G4UIcommand* m_dumpGDMLCmd; -}; -// class -#endif
diff -N GeneratorType.hh --- GeneratorType.hh 24 Jun 2013 22:10:33 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,71 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/GeneratorType.hh,v 1.6 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_GENERATORTYPE_HH -#define LCDD_GENERATORTYPE_HH 1 - -#include <string> - -/** - @class GeneratorType - @brief GeneratorType from schema. - */ -class GeneratorType -{ -public: - GeneratorType() - { - } - - virtual ~GeneratorType() - { - } - - void set_name(const std::string& n) - { - m_name = n; - } - - void set_version(const std::string& v) - { - m_version = v; - } - - void set_file(const std::string& u) - { - m_file = u; - } - - void set_checksum(const std::string& c) - { - m_checksum = c; - } - - const std::string& get_name() const - { - return m_name; - } - - const std::string& get_version() const - { - return m_version; - } - - const std::string& get_file() const - { - return m_file; - } - - const std::string& get_checksum() const - { - return m_checksum; - } - -private: - - std::string m_name; - std::string m_version; - std::string m_file; - std::string m_checksum; -}; - -#endif
diff -N GeometryManager.hh --- GeometryManager.hh 24 Jun 2013 22:10:33 -0000 1.13 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,75 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/GeometryManager.hh,v 1.13 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_GEOMETRYMANAGER_HH -#define LCDD_GEOMETRYMANAGER_HH 1 - -class G4Run; -class G4LogicalVolume; -class G4VPhysicalVolume; -class G4String; - -/** - * @class GeometryManager - * @brief Singleton manager class with miscellaneous geometry utility functions. - */ -class GeometryManager -{ -public: - virtual ~GeometryManager(); - static GeometryManager* instance(); - -protected: - GeometryManager(); - -public: - - /** - * Retrieve the world's logical volume from Geant4. - */ - G4LogicalVolume* getWorldLogicalVolume() const; - - /** - * Retrieve the world's physical volume from Geant4. - */ - G4VPhysicalVolume* getWorldPhysicalVolume() const; - - /** - * Hook for beginning the run. - */ - void beginRun(const G4Run*); - - /** - * Attach the RegionInformation to the world's region. - */ - void setupWorldRegionInformation(); - -#ifdef HAVE_G4PVPLACEMENT_CHECKOVERLAPS - - /** - * Check overlaps starting with the world volume - * and recursing to daughters. - */ - void checkOverlaps() const; - - /** - * Check for overlaps by calling CheckOverlaps on all daughters - * of a given logical volume, with possible recursion to - * daughters. - */ - void checkOverlaps(G4LogicalVolume*, bool recurse=true) const; - - /** - * Check for overlaps of a named logical volume by looking it - * up in the volume store, with possible recursion to daughters. - */ - void checkOverlaps(const G4String&, bool recurse=true) const; - -#endif - -private: - - static GeometryManager* m_instance; - bool m_worldRegionIsSetup; -}; - -#endif
diff -N GlobalGridXYSegmentationType.hh --- GlobalGridXYSegmentationType.hh 24 Jun 2013 22:10:33 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,67 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/GlobalGridXYSegmentationType.hh,v 1.2 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_GLOBALGRIDXYSEGMENTATIONTYPE_HH -#define LCDD_GLOBALGRIDXYSEGMENTATIONTYPE_HH 1 - -#include "SegmentationType.hh" - -#include <string> - -#include "Saxana/SAXObject.h" - -/** - * @class GlobalGridXYSegmentationType - * @brief GlobalGridXYSegmentation from schema. - */ -class GlobalGridXYSegmentationType: public SegmentationType -{ -public: - - GlobalGridXYSegmentationType() - { - } - - virtual ~GlobalGridXYSegmentationType() - { - } - -public: - - void set_gridSizeX(const std::string& gsx) - { - m_gridSizeX = gsx; - } - - void set_gridSizeY(const std::string& gsy) - { - m_gridSizeY = gsy; - } - - void set_lunit(const std::string& lunit) - { - m_lunit = lunit; - } - - const std::string& get_gridSizeX() - { - return m_gridSizeX; - } - - const std::string& get_gridSizeY() - { - return m_gridSizeY; - } - - const std::string& get_lunit() - { - return m_lunit; - } - -protected: - - std::string m_gridSizeX; - std::string m_gridSizeY; - std::string m_lunit; -}; - -#endif
diff -N HeaderType.hh --- HeaderType.hh 24 Jun 2013 22:10:33 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,41 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/HeaderType.hh,v 1.6 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_HEADERTYPE_HH -#define LCDD_HEADERTYPE_HH 1 - -#include "Schema/ContentGroup.h" - -#include <string> - -/** - @class HeaderType - @brief HeaderType from schema. - */ -class HeaderType -{ -public: - HeaderType() - { - } - - virtual ~HeaderType() - { - } - - void add_content(const std::string& tag, SAXObject* so) - { - ContentGroup::ContentItem ci = { tag, so }; - m_sequence.add_content(ci); - } - - const ContentSequence* get_content() const - { - return &m_sequence; - } - -private: - - ContentSequence m_sequence; -}; - -#endif
diff -N HitComparator.hh --- HitComparator.hh 24 Jun 2013 22:10:33 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,18 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/HitComparator.hh,v 1.4 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_HITCOMPARATOR_HH -#define LCDD_HITCOMPARATOR_HH 1 - -#include "G4CalorimeterHit.hh" - -class HitComparator -{ -public: - virtual ~HitComparator() - { - } - -public: - virtual bool compare(const G4CalorimeterHit&, const G4CalorimeterHit&) = 0; -}; - -#endif
diff -N Id64bit.hh --- Id64bit.hh 24 Jun 2013 22:10:33 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,61 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/Id64bit.hh,v 1.6 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_ID64BIT_HH -#define LCDD_ID64BIT_HH 1 - -/** - @class Id64bit - @brief Packed, 64-bit ID for Lcio output. - */ -class Id64bit -{ - -public: - - typedef int ElementType; - -public: - Id64bit() - { - resetIds(); - } - - virtual ~Id64bit() - { - } - - void resetIds() - { - m_ids[0] = 0; - m_ids[1] = 0; - } - - void setId0(ElementType id0) - { - m_ids[0] = id0; - } - - void setId1(ElementType id1) - { - m_ids[1] = id1; - } - - ElementType getId0() const - { - return m_ids[0]; - } - - ElementType getId1() const - { - return m_ids[1]; - } - - bool operator==(const Id64bit& right) const - { - return (m_ids[0] == right.m_ids[0] && m_ids[1] == right.m_ids[1]); - } - -private: - ElementType m_ids[2]; -}; - -#endif
diff -N IdComparator.hh --- IdComparator.hh 24 Jun 2013 22:10:33 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,32 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/IdComparator.hh,v 1.4 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_IDCOMPARATOR_HH -#define LCDD_IDCOMPARATOR_HH 1 - -#include "HitComparator.hh" - -class IdComparator: public HitComparator -{ - -public: - virtual ~IdComparator() - { - } - -public: - - virtual bool compare(const G4CalorimeterHit& hit1, const G4CalorimeterHit& hit2) - { -// std::cout << "ID --> hit1 " << hit1.getId64bit().getId0() << " " << hit2.getId64bit().getId1() -// << " == hit2 " << hit2.getId64bit().getId0() << " " << hit2.getId64bit().getId1() << std::endl; -// if ( hit1.getId64bit() == hit2.getId64bit() ) { -// std::cout << "EQUAL" << std::endl; -// } -// else { -// std::cout << "NOT EQUAL" << std::endl; -// } - - return (hit1.getId64bit() == hit2.getId64bit()); - } -}; - -#endif
diff -N IdFactory.hh --- IdFactory.hh 24 Jun 2013 22:10:33 -0000 1.12 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,86 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/IdFactory.hh,v 1.12 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_IDFACTORY_HH -#define LCDD_IDFACTORY_HH 1 - -// LCDD -#include "IdVec.hh" -#include "IdSpec.hh" - -// std -#include <iostream> -#include <vector> - -// LCDD -class G4Segmentation; - -// G4 -class G4Step; -class G4VPhysicalVolume; - -// LCDD -class G4SensitiveDetector; - -/** - @class IdFactory - @brief Produce int IDs based on stepping info. - @note Can also convert from an IdVec to Id64bit, packed ID. - */ -class IdFactory -{ -public: - - typedef unsigned int Bits; - - static const Bits MASK_ON; - -public: - - virtual ~IdFactory() - { - } - -private: - - // class should not be instantiated - IdFactory() - { - } - -public: - - /* Create an Id64bit from the input IdVec and its matching specification. */ - static Id64bit createId64bit(const IdVec& idvec, IdSpec* idspec); - - /* - * TJ's suggestion for making a bit mask. - * @param len length of mask - */ - static inline Bits makeBitMask(IdField::SizeType len); - - /** - * Check that the given value does not overflow the given mask. - * - * @return If overflow, then returns the bits outside the mask. Otherwise, returns 0. - */ - static inline Bits checkOverflow(Id64bit::ElementType field_val, Bits mask); - - // create IdVec ordered by this SD's idspec, or empty vec if sd does not have an idspec - static IdVec createOrderedIdVec(G4Step* aStep, const G4SensitiveDetector* sd); - - /* lkp bin value by field name in segmentation */ - static int findFieldIdxInSegmentation(G4Segmentation*, const std::string& field_name); - - /* Check if PV list has PVid with given label. */ - static bool hasPhysVolId(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& field_name); - - // lkp bin value by field name in PV ids - static int findIdInPhysVols(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& field_name); - - // add physvolids from step to an IdVec - static void addPhysVolIds(G4Step* aStep, IdVec& v); - - // list of PVs - static std::vector<G4VPhysicalVolume*> getPhysVolList(G4Step* aStep); -}; - -#endif
diff -N IdField.hh --- IdField.hh 24 Jun 2013 22:10:33 -0000 1.7 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,81 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/IdField.hh,v 1.7 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_IDFIELD_HH -#define LCDD_IDFIELD_HH 1 - -#include <string> - -/** - @class IdField - @brief Field in an IdSpec. - @note Includes start, length, label and signed flag. - */ -class IdField -{ -public: - - typedef unsigned short int SizeType; - -public: - IdField() - { - } - - IdField(const std::string& label, SizeType start, SizeType length, bool is_signed) : - m_label(label), m_start(start), m_length(length), m_isSigned(is_signed) - { - } - - virtual ~IdField() - { - } - - void setLabel(const std::string& l) - { - m_label = l; - } - - void setStart(SizeType st) - { - m_start = st; - } - - void setLength(SizeType st) - { - m_length = st; - } - - void setSigned(bool s) - { - m_isSigned = s; - } - - const std::string& getLabel() - { - return m_label; - } - - SizeType getStart() - { - return m_start; - } - - SizeType getLength() - { - return m_length; - } - - bool getSigned() - { - return m_isSigned; - } - -private: - - std::string m_label; - SizeType m_start; - SizeType m_length; - bool m_isSigned; -}; - -#endif
diff -N IdFieldType.hh --- IdFieldType.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,71 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/IdFieldType.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_IDFIELDTYPE_HH -#define LCDD_IDFIELDTYPE_HH 1 - -#include <string> - -/** - @class IdFieldType - @brief IdFieldType from schema. - */ -class IdFieldType -{ -public: - IdFieldType() - { - } - - virtual ~IdFieldType() - { - } - -public: - - void set_label(const std::string& l) - { - m_label = l; - } - - void set_start(const std::string& s) - { - m_start = s; - } - - void set_length(const std::string& l) - { - m_length = l; - } - - void set_signed(const std::string& s) - { - m_signed = s; - } - - const std::string& get_label() - { - return m_label; - } - - const std::string& get_start() - { - return m_start; - } - - const std::string& get_length() - { - return m_length; - } - - const std::string& get_signed() - { - return m_signed; - } - -private: - std::string m_label; - std::string m_start; - std::string m_length; - std::string m_signed; -}; - -#endif
diff -N IdManager.hh --- IdManager.hh 24 Jun 2013 22:10:33 -0000 1.10 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,94 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/IdManager.hh,v 1.10 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_IDMANAGER_HH -#define LCDD_IDMANAGER_HH 1 - -// LCDD -#include "IdSpec.hh" -#include "IdVec.hh" -#include "PhysVolId.hh" -#include "PhysVolIdMap.hh" - -// G4 -#include "G4VPhysicalVolume.hh" - -// std -#include <map> -#include <string> -#include <iostream> - -class G4LogicalVolume; - -/** - @class IdManager - @brief Singleton manager class for geometric ids. - @note Mainly provides utility functions based on G4VPhysicalVolume ptrs. - */ -class IdManager -{ - -public: - typedef std::map<std::string, IdSpec*> IdSpecs; - -public: - virtual ~IdManager(); - static IdManager* instance(); - -protected: - IdManager(); - -public: - - // *** idspecs *** - void addIdSpec(const std::string& name, IdSpec* spec); - - IdSpec* getIdSpec(const char* name); - IdSpec* getIdSpec(const std::string& name); - - IdSpecs::const_iterator getIdSpecsBegin(); - IdSpecs::const_iterator getIdSpecsEnd(); - - const IdSpecs* getIdSpecStore() - { - return &m_idSpecs; - } - - // *** physvolids *** - void addPhysVolId(G4LogicalVolume* lvMom, int childIdx, PhysVolId childId); - - bool hasPhysVolIds(G4VPhysicalVolume* pv) const - { - return m_physVolIdMap.hasPhysVolIds(pv); - } - - // caller cannot directly alter this map - const PhysVolIdMap& getPhysVolIdMap() const - { - return m_physVolIdMap; - } - - /* - This ref should always exist because map's function - will create an empty vec if one does not exist already. - */ - PhysVolId::PhysVolIds& getPhysVolIds(G4VPhysicalVolume* pv) - { - return m_physVolIdMap.getPhysVolIds(pv); - } - - // print - static void printIds(std::ostream& os, const IdVec& ids); - -private: - - // static singleton instance - static IdManager* m_instance; - - // id specifications by name - IdSpecs m_idSpecs; - - // map of PV ids - PhysVolIdMap m_physVolIdMap; -}; - -#endif
diff -N IdSpec.hh --- IdSpec.hh 24 Jun 2013 22:10:33 -0000 1.11 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,127 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/IdSpec.hh,v 1.11 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_IDSPEC_HH -#define LCDD_IDSPEC_HH 1 - -// LCDD -#include "IdField.hh" - -// std -#include <vector> -#include <string> -#include <iostream> -#include <assert.h> - -/** - * @class IdSpec - * @brief Id specification for a full geometric ID. - * @note Includes a vector of IdFields. - */ -class IdSpec -{ -public: - - typedef unsigned int SizeType; - typedef std::vector<IdField*> IdFields; - -public: - IdSpec() - { - } - - virtual ~IdSpec() - { - deleteIdFields(); - } - - void deleteIdFields() - { - if (m_idFields.size() > 0) { - for (IdFields::iterator iter = m_idFields.begin(); iter != m_idFields.end(); iter++) { - delete *iter; - } - m_idFields.clear(); - } - } - - void setName(const std::string& n) - { - m_name = n; - } - - void setBitLength(SizeType st) - { - m_bitLength = st; - } - - SizeType getBitLength() const - { - return m_bitLength; - } - - const std::string& getName() const - { - return m_name; - } - - SizeType getNumFields() const - { - return m_idFields.size(); - } - - void addIdField(IdField* f) - { - m_idFields.push_back(f); - } - - IdField* getIdField(const std::string& n) const - { - IdField* f = 0; - for (IdFields::const_iterator iter = IdFieldsBegin(); iter != IdFieldsEnd(); iter++) { - if (n == (*iter)->getLabel()) { - f = *iter; - break; - } - } - return f; - } - - IdField* getIdField(SizeType st) const - { - // harsh index check! - assert(st < m_idFields.size()); - - return m_idFields[st]; - } - - const IdFields& getIdFields() const - { - return m_idFields; - } - - IdFields::const_iterator IdFieldsBegin() const - { - return m_idFields.begin(); - } - - IdFields::const_iterator IdFieldsEnd() const - { - return m_idFields.end(); - } - - void clear() - { - m_idFields.clear(); - } - - void printOut(std::ostream& os) const; - - std::string getFieldDescription(); - -private: - std::string m_name; - SizeType m_bitLength; - IdFields m_idFields; -}; - -#endif
diff -N IdVec.hh --- IdVec.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,59 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/IdVec.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_IDVEC_HH -#define LCDD_IDVEC_HH - -// LCDD -#include "Id64bit.hh" - -// std -#include <vector> - -/** - @class IdVec - @brief A vector of ints representing an unpacked geometric identifier. - @note Inspired by ATLAS's ExpandedIdentifier: - - dist/current/DetectorDescription/Identifier/Identifier-00-06-10/Identifier/ExpandedIdentifier.h - */ - -class IdVec -{ - -public: - typedef int ElementType; - typedef std::vector<ElementType> ElementVector; - typedef std::vector<ElementType>::size_type SizeType; - -public: - IdVec(); - ~IdVec(); - - // clear fields - void clear(); - - // vec push_back - void push_back(ElementType et); - - // get / set value by field - ElementType getFieldValue(SizeType idx) const; - void setFieldValue(SizeType idx, ElementType et); - - // get element at idx using [] operator - ElementType operator [](SizeType idx) const; - - // iterators - ElementVector::const_iterator getFieldsBegin() const; - ElementVector::const_iterator getFieldsEnd() const; - - // size - SizeType size() const - { - return m_fields.size(); - } - -private: - - ElementVector m_fields; -}; - -#endif
diff -N LCDDDetectorConstruction.hh --- LCDDDetectorConstruction.hh 24 Jun 2013 22:10:33 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,45 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/LCDDDetectorConstruction.hh,v 1.6 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDDDetectorConstruction_h -#define LCDDDetectorConstruction_h 1 - -#include "G4VUserDetectorConstruction.hh" -#include "G4UImessenger.hh" - -#include <string> - -class LCDDDetectorConstructionMessenger; -class LCDDObjectStoreInspector; - -/** - @class LCDDDetectorConstruction - @brief Implementation of G4VUserDetectorConstruction for LCDD. - @note Minimal functionality; mostly just hands control to other classes. - */ -class LCDDDetectorConstruction: public G4VUserDetectorConstruction -{ - -public: - LCDDDetectorConstruction(); - ~LCDDDetectorConstruction(); - -public: - - virtual G4VPhysicalVolume* Construct(); - - void setWorldVolume(G4VPhysicalVolume *pv); - G4VPhysicalVolume* getWorldVolume(); - -private: - - G4UImessenger* m_messenger; - G4UImessenger* m_writerMessenger; - G4VPhysicalVolume* m_world; - LCDDObjectStoreInspector* m_inspector; - - std::string m_URI; - std::string m_setupName; - std::string m_version; -}; - -#endif
diff -N LCDDFieldManager.hh --- LCDDFieldManager.hh 24 Jun 2013 22:10:33 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,42 +0,0 @@
-#ifndef LCDD_LCDDFIELDMANAGER_HH -#define LCDD_LCDDFIELDMANAGER_HH 1 - -#include "MagneticFieldOverlay.hh" -#include "LCDDProcessor.hh" -#include "G4FieldManager.hh" -#include "G4TransportationManager.hh" - -class LCDDFieldManager -{ - -public: - - virtual ~LCDDFieldManager(); - - static LCDDFieldManager* instance(); - - MagneticFieldOverlay* makeOverlay(std::vector<G4MagneticField*> fields); - - void setup(); - - G4MagneticField* setup(std::vector<G4MagneticField*> fields); - - void initialize(G4MagneticField* field); - - void addGlobalField(G4MagneticField* f); - - void addField(G4MagneticField* f); - -private: - - LCDDFieldManager(); - -private: - - std::vector<G4MagneticField*> m_globalfields; - std::vector<G4MagneticField*> m_allfields; - - static LCDDFieldManager* m_instance; -}; - -#endif
diff -N LCDDHeaderRecord.hh --- LCDDHeaderRecord.hh 24 Jun 2013 22:10:33 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,155 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/LCDDHeaderRecord.hh,v 1.6 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_LCDDHEADERRECORD_HH -#define LCDD_LCDDHEADERRECORD_HH 1 - -/** - @class LCDDHeaderRecord - @brief Header record of detector info. - */ -class LCDDHeaderRecord -{ - -public: - - void setDetectorName(const std::string& dn) - { - m_detectorName = dn; - } - - void setDetectorVersion(const std::string& dv) - { - m_detectorVersion = dv; - } - - void setDetectorUrl(const std::string& u) - { - m_detectorUrl = u; - } - - void setAuthorName(const std::string& an) - { - m_authorName = an; - } - - void setGeneratorName(const std::string& gn) - { - m_generatorName = gn; - } - - void setGeneratorVersion(const std::string& gv) - { - m_generatorVersion = gv; - } - - void setGeneratorChecksum(const std::string& c) - { - m_generatorChecksum = c; - } - - void setGeneratorFile(const std::string& gurl) - { - m_generatorFile = gurl; - } - - void setAuthorEmail(const std::string& ae) - { - m_authorEmail = ae; - } - - void setComment(const std::string& c) - { - m_comment = c; - } - - void setChecksum(const std::string& c) - { - m_generatorChecksum = c; - } - - const std::string& getDetectorName() const - { - return m_detectorName; - } - - const std::string& getDetectorVersion() const - { - return m_detectorVersion; - } - - const std::string& getDetectorUrl() const - { - return m_detectorUrl; - } - - const std::string& getComment() const - { - return m_comment; - } - - const std::string& getAuthorName() const - { - return m_authorName; - } - - const std::string& getAuthorEmail() const - { - return m_authorEmail; - } - - const std::string& getGeneratorName() const - { - return m_generatorName; - } - - const std::string& getGeneratorVersion() const - { - return m_generatorVersion; - } - - const std::string& getGeneratorFile() const - { - return m_generatorFile; - } - - const std::string& getGeneratorChecksum() const - { - return m_generatorChecksum; - } - - void printOut(std::ostream &os) - { - os << std::endl << "***** LCDD Header *****" << std::endl; - - os << "detectorName <" << m_detectorName << ">" << std::endl; - os << "detectorVersion <" << m_detectorVersion << ">" << std::endl; - os << "detectorUrl <" << m_detectorUrl << ">" << std::endl; - os << "authorName <" << m_authorName << ">" << std::endl; - os << "authorEmail <" << m_authorEmail << ">" << std::endl; - os << "generatorName <" << m_generatorName << ">" << std::endl; - os << "generatorVersion <" << m_generatorVersion << ">" << std::endl; - os << "generatorFile <" << m_generatorFile << ">" << std::endl; - os << "generatorChecksum <" << m_generatorChecksum << ">" << std::endl; - os << "comment" << std::endl << m_comment << std::endl << "end comment" << std::endl; - - os << "***********************" << std::endl << std::endl; - } - -private: - - std::string m_detectorName; - std::string m_detectorVersion; - std::string m_detectorUrl; - - std::string m_generatorName; - std::string m_generatorVersion; - std::string m_generatorFile; - std::string m_generatorChecksum; - - std::string m_authorName; - std::string m_authorEmail; - - std::string m_comment; -}; - -#endif
diff -N LCDDMessenger.hh --- LCDDMessenger.hh 24 Jun 2013 22:10:33 -0000 1.8 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,47 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/LCDDMessenger.hh,v 1.8 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_LCDDMESSENGER_HH -#define LCDD_LCDDMESSENGER_HH 1 - -#include "G4UImessenger.hh" - -class G4UIcommand; -class G4UIdirectory; - -class LCDDDetectorConstruction; - -/** - @class LCDDMessenger - @brief G4UImessenger for LCDD commands. - */ -class LCDDMessenger: public G4UImessenger -{ - -public: - LCDDMessenger(); - virtual ~LCDDMessenger(); - -public: - - virtual void SetNewValue(G4UIcommand *cmd, G4String newVals); - virtual G4String GetCurrentValue(G4UIcommand *cmd); - -private: - - void defineCommands(); - -private: - - G4UIdirectory* m_lcddDir; - G4UIcommand* m_setupCmd; - G4UIcommand* m_setURICmd; - G4UIcommand* m_setSetupNameCmd; - G4UIcommand* m_setVersionCmd; - G4UIcommand* m_dumpCmd; -#ifdef HAVE_G4PVPLACEMENT_CHECKOVERLAPS - G4UIcommand* m_checkOverlapsCmd; - G4UIcommand* m_checkOverlapsRecurseCmd; -#endif -}; -// class -#endif
diff -N LCDDObjectStoreInspector.hh --- LCDDObjectStoreInspector.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,56 +0,0 @@
-// $Id: LCDDObjectStoreInspector.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_LCDDOBJECTSTOREINSPECTOR_HH -#define LCDD_LCDDOBJECTSTOREINSPECTOR_HH 1 - -// lcdd -#include "StoreInspector.hh" - -/** - * A class to create the templated object store inspectors for looking - * at Geant4 stores created by LCDD. - */ -class LCDDObjectStoreInspector -{ -public: - - LCDDObjectStoreInspector() - { - m_materialInspector = new G4MaterialStoreInspector("G4Material", G4Material::GetMaterialTable()); - m_solidInspector = new G4SolidStoreInspector("G4VSolid", G4SolidStore::GetInstance()); - m_limitsetInspector = new G4LimitSetInspector("G4LimitSet", LCDDProcessor::instance()->getLimitSetStore()); - m_lvolumeInspector = new G4LogicalVolumeStoreInspector("G4LogicalVolume", G4LogicalVolumeStore::GetInstance()); - m_pvolumeInspector = new G4PhysicalVolumeStoreInspector("G4VPhysicalVolume", G4PhysicalVolumeStore::GetInstance()); - m_idspecInspector = new IdSpecInspector("IdSpec", IdManager::instance()->getIdSpecStore()); - m_sdInspector = new G4SensitiveDetectorInspector("G4SensitiveDetector", LCDDProcessor::instance()->getSensitiveDetectorStore()); - m_regionInspector = new G4RegionStoreInspector("G4Region", G4RegionStore::GetInstance()); - m_fieldInspector = new G4MagneticFieldInspector("G4MagneticField", LCDDProcessor::instance()->getMagneticFieldStore()); - m_visInspector = new G4VisAttributeInspector("G4VisAttributes", LCDDProcessor::instance()->getVisAttributesStore()); - } - - virtual ~LCDDObjectStoreInspector() - { - delete m_materialInspector; - delete m_solidInspector; - delete m_limitsetInspector; - delete m_lvolumeInspector; - delete m_idspecInspector; - delete m_sdInspector; - delete m_regionInspector; - delete m_fieldInspector; - delete m_visInspector; - } - -private: - G4MaterialStoreInspector* m_materialInspector; - G4SolidStoreInspector* m_solidInspector; - G4LimitSetInspector* m_limitsetInspector; - G4LogicalVolumeStoreInspector* m_lvolumeInspector; - G4PhysicalVolumeStoreInspector* m_pvolumeInspector; - IdSpecInspector* m_idspecInspector; - G4SensitiveDetectorInspector* m_sdInspector; - G4RegionStoreInspector* m_regionInspector; - G4MagneticFieldInspector* m_fieldInspector; - G4VisAttributeInspector* m_visInspector; -}; - -#endif
diff -N LCDDParser.hh --- LCDDParser.hh 24 Jun 2013 22:10:33 -0000 1.7 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,84 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/LCDDParser.hh,v 1.7 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDDParser_h -#define LCDDParser_h 1 - -#include "Saxana/SAXProcessor.h" -#include "Saxana/ProcessingConfigurator.h" - -class G4VPhysicalVolume; - -/** - @class LCDDParser - @brief Parser for LCDD format. - */ -class LCDDParser -{ -public: - - virtual ~LCDDParser(); - - static LCDDParser* instance(); - -protected: - - LCDDParser(); - -public: - - // initialize required XML machinery - void initialize(); - void initializeParser(); - - // call in G4 DetectorConstruction - G4VPhysicalVolume* construct(); - - // cleanup - void finalize(); - - // set all parms - void setupParserConfig(const std::string& URI, const std::string& setupName, const std::string& version); - - // set from instance vars - void setupParserConfig(); - - // set parms - void setURI(std::string URI); - void setSetupName(std::string setupName); - void setVersion(std::string version); - - // get parms - const std::string& URI(); - const std::string& setupName(); - const std::string& version(); - - // set world volume ptr - void setWorld(G4VPhysicalVolume *world); - - bool isValidSetup(); - -private: - - void addVolumeExtendedSubscriber(); - -private: - - SAXProcessor m_sxp; - ProcessingConfigurator m_config; - - std::string m_URI; - std::string m_setupName; - std::string m_version; - - bool m_initialized; - bool m_constructed; - bool m_setURI; - - G4VPhysicalVolume* m_world; - - static LCDDParser* m_instance; - -}; -// class - -#endif // header
diff -N LCDDProcessor.hh --- LCDDProcessor.hh 24 Jun 2013 22:10:33 -0000 1.24 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,117 +0,0 @@
-#ifndef LCDD_LCDDPROCESSOR_HH -#define LCDD_LCDDPROCESSOR_HH 1 - -// Geant4 -#include "G4MagneticField.hh" -#include "G4Region.hh" -#include "G4VisAttributes.hh" - -// LCDD -#include "G4SensitiveDetector.hh" -#include "G4LimitSet.hh" -#include "LCDDHeaderRecord.hh" - -#include <string> -#include <map> - -class G4Run; - -/** - @class LCDDProcessor - @brief Register and find LCDD elements, except idspecs which have own manager. - @note This is the LCDD equivalent of the GDMLProcessor class. - */ -class LCDDProcessor -{ - -public: - - LCDDProcessor(); - virtual ~LCDDProcessor(); - - static LCDDProcessor* instance(); - -public: - typedef std::map<std::string, G4SensitiveDetector*> SensitiveDetectors; - typedef std::map<std::string, G4MagneticField*> MagneticFields; - typedef std::map<std::string, G4Region*> Regions; - typedef std::map<std::string, G4VisAttributes*> VisAttributes; - typedef std::map<std::string, G4LimitSet*> LimitSets; - -public: - - // header - const LCDDHeaderRecord* getHeader() const; - void setHeader(LCDDHeaderRecord* h); - - // detector name - std::string getDetectorName() const; - - // Sensitive Detectors - void addSensitiveDetector(std::string& name, G4SensitiveDetector* sd); - - G4SensitiveDetector* getSensitiveDetector(const std::string& name); - G4SensitiveDetector* getSensitiveDetector(const char* name); - - LCDDProcessor::SensitiveDetectors::const_iterator getSensitiveDetectorsBegin(); - LCDDProcessor::SensitiveDetectors::const_iterator getSensitiveDetectorsEnd(); - - // Mag Field - void addMagneticField(std::string& name, G4MagneticField* mag); - G4MagneticField* getMagneticField(const std::string& name); - G4MagneticField* getMagneticField(const char* name); - - LCDDProcessor::MagneticFields::const_iterator getMagneticFieldsBegin(); - LCDDProcessor::MagneticFields::const_iterator getMagneticFieldsEnd(); - - // Passes mag through to LCDDFieldManager. - void addGlobalField(G4MagneticField* mag); - - // Regions - void addRegion(std::string& name, G4Region* reg); - - G4Region* getRegion(const std::string& name); - G4Region* getRegion(const char* name); - - LCDDProcessor::Regions::const_iterator getRegionsBegin(); - LCDDProcessor::Regions::const_iterator getRegionsEnd(); - - // user limit set - void addLimitSet(std::string& name, G4LimitSet* lim); - G4LimitSet* getLimitSet(const std::string& name); - G4LimitSet* getLimitSet(const char* name); - LCDDProcessor::LimitSets::const_iterator getLimitSetsBegin(); - LCDDProcessor::LimitSets::const_iterator getLimitSetsEnd(); - - // Vis Attributes - void addVisAttributes(std::string& name, G4VisAttributes* vis); - - G4VisAttributes* getVisAttributes(const std::string& name); - G4VisAttributes* getVisAttributes(const char* name); - - LCDDProcessor::VisAttributes::const_iterator getVisAttributesBegin(); - LCDDProcessor::VisAttributes::const_iterator getVisAttributesEnd(); - - const LCDDProcessor::VisAttributes* getVisAttributesStore() const; - const LCDDProcessor::SensitiveDetectors* getSensitiveDetectorStore() const; - const LCDDProcessor::MagneticFields* getMagneticFieldStore() const; - const LCDDProcessor::Regions* getRegionStore() const; - const LCDDProcessor::LimitSets* getLimitSetStore() const; - -private: - - // header info for the lcdd file - LCDDHeaderRecord* m_header; - - // vectors of SD, mag, regions, visAttributes - LCDDProcessor::SensitiveDetectors m_sensitiveDetectors; - LCDDProcessor::MagneticFields m_magneticFields; - LCDDProcessor::Regions m_regions; - LCDDProcessor::VisAttributes m_visAttributes; - LCDDProcessor::LimitSets m_limitSets; - - // static singleton instance var - static LCDDProcessor* sInstance; -}; - -#endif
diff -N LimitParamType.hh --- LimitParamType.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,70 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/LimitParamType.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_LIMITPARAMTYPE_HH -#define LCDD_LIMITPARAMTYPE_HH 1 - -#include <string> -#include <vector> - -/** - * @class LimitParamType - * @brief The LimitParamType from the lcdd_limits.lcdd subschema. - */ -class LimitParamType -{ -public: - LimitParamType() - { - } - - virtual ~LimitParamType() - { - } - - void set_particles(const std::string& p) - { - m_particles = p; - } - - const std::string& get_particles() const - { - return m_particles; - } - - void set_name(const std::string& n) - { - m_name = n; - } - - const std::string& get_name() const - { - return m_name; - } - - void set_value(const std::string& v) - { - m_value = v; - } - - const std::string& get_value() const - { - return m_value; - } - - void set_unit(const std::string& u) - { - m_unit = u; - } - - const std::string& get_unit() const - { - return m_unit; - } - -public: - std::string m_particles; - std::string m_value; - std::string m_name; - std::string m_unit; -}; - -#endif
diff -N LimitSetType.hh --- LimitSetType.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,74 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/LimitSetType.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_LIMITSETTYPE_HH -#define LCDD_LIMITSETTYPE_HH 1 - -// GDML -#include "Schema/ContentGroup.h" -#include "Schema/ReferenceType.h" - -// std -#include <string> - -/** - * @class LimitSetType - * @brief The LimitSetType type from lcdd_limits.lcdd subschema. - */ -class LimitSetType -{ - -public: - class limitsetref: public SAXObject, public ReferenceType - { - public: - limitsetref() - { - } - - virtual ~limitsetref() - { - } - - virtual SAXObject::Type type() - { - return SAXObject::element; - } - }; - -public: - - LimitSetType() - { - } - - virtual ~LimitSetType() - { - } - - void set_name(const std::string& n) - { - m_name = n; - } - - const std::string& get_name() const - { - return m_name; - } - - void add_content(const std::string& tag, SAXObject* so) - { - ContentGroup::ContentItem ci = { tag, so }; - m_sequence.add_content(ci); - } - - const ContentSequence* get_content() const - { - return &m_sequence; - } - -private: - - ContentSequence m_sequence; - std::string m_name; -}; - -#endif
diff -N LimitType.hh --- LimitType.hh 24 Jun 2013 22:10:33 -0000 1.7 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,154 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/LimitType.hh,v 1.7 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_LIMITTYPE_HH -#define LCDD_LIMITTYPE_HH - -// GDML -#include "Schema/ReferenceType.h" - -// std -#include <string> - -/** - * @class LimitType - * @brief LimitType from schema. - */ -class LimitType -{ -public: - - /** - * @class LimitType::limitref - * @brief Reference to a limit element. - */ - class limitref: public SAXObject, public ReferenceType - { - public: - limitref() - { - } - - virtual ~limitref() - { - } - - virtual SAXObject::Type type() - { - return SAXObject::element; - } - }; - -public: - LimitType() - { - } - - virtual ~LimitType() - { - } - - const std::string& get_name() const - { - return m_name; - } - - const std::string& get_step_length_max() const - { - return m_step_length_max; - } - - const std::string& get_track_length_max() const - { - return m_track_length_max; - } - - const std::string& get_time_max() const - { - return m_time_max; - } - - const std::string& get_ekin_min() const - { - return m_ekin_min; - } - - const std::string& get_range_min() const - { - return m_range_min; - } - - const std::string& get_eunit() const - { - return m_eunit; - } - - const std::string& get_lunit() const - { - return m_lunit; - } - - const std::string& get_tunit() const - { - return m_tunit; - } - - void set_name(const std::string& s) - { - m_name = s; - } - - void set_step_length_max(const std::string& s) - { - m_step_length_max = s; - } - - void set_track_length_max(const std::string& s) - { - m_track_length_max = s; - } - - void set_time_max(const std::string& s) - { - m_time_max = s; - } - - void set_ekin_min(const std::string& s) - { - m_ekin_min = s; - } - - void set_range_min(const std::string& s) - { - m_range_min = s; - } - - void set_eunit(const std::string& s) - { - m_eunit = s; - } - - void set_lunit(const std::string& s) - { - m_lunit = s; - } - - void set_tunit(const std::string& s) - { - m_tunit = s; - } - -private: - - std::string m_name; - - std::string m_step_length_max; - std::string m_track_length_max; - std::string m_time_max; - std::string m_ekin_min; - std::string m_range_min; - - std::string m_eunit; - std::string m_lunit; - std::string m_tunit; -}; - -#endif
diff -N MagneticFieldOverlay.hh --- MagneticFieldOverlay.hh 24 Jun 2013 22:10:33 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,32 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/MagneticFieldOverlay.hh,v 1.4 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_MAGNETICFIELDOVERLAY_HH -#define LCDD_MAGNETICFIELDOVERLAY_HH 1 - -#include "G4MagneticField.hh" - -#include <vector> - -/** - * @class MagneticFieldOverlay - * @brief Overlay multiple G4MagneticField objects by calling all their GetFieldValue functions. - */ -class MagneticFieldOverlay: public G4MagneticField -{ -public: - - MagneticFieldOverlay(); - virtual ~MagneticFieldOverlay(); - -public: - - /** Add a G4MagneticField to the fields vector. */ - void addMagneticField(G4MagneticField* field); - - /** Call GetFieldValue of each field in fields. */ - void GetFieldValue(const double Point[3], double *Bfield) const; - -private: - std::vector<G4MagneticField*> m_fields; -}; - -#endif
diff -N McpHitContrib.hh --- McpHitContrib.hh 24 Jun 2013 22:10:33 -0000 1.7 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,91 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/McpHitContrib.hh,v 1.7 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_MCPHITCONTRIB_HH -#define LCDD_MCPHITCONTRIB_HH 1 - -// G4 -#include "globals.hh" -#include "G4ThreeVector.hh" - -// std -#include <vector> -#include <iostream> - -// SLIC -class G4CalorimeterHit; - -// G4 -class G4Step; - -/** - * @class McpHitContrib - * @brief Contribution of an MCParticle to a hit. - */ -class McpHitContrib -{ -public: - friend class G4CalorimeterHit; - -public: - - // no parameters - McpHitContrib(); - - // all parameters - McpHitContrib(G4int trackID, G4double edep, G4int PDGID, G4double globalTime); - - // parameters from step - McpHitContrib(const G4Step* aStep); - - virtual ~McpHitContrib(); - - inline G4int getTrackID() const - { - return m_trackID; - } - - inline G4double getEdep() const - { - return m_edep; - } - - inline void incrEdep(G4double incr) - { - m_edep += incr; - } - - inline G4int getPDGID() const - { - return m_PdgId; - } - - inline G4double getGlobalTime() const - { - return m_globalTime; - } - - inline void setMinTime(G4double new_time) - { - if (new_time < m_globalTime) { - m_globalTime = new_time; - } - } - - inline const float* getPosition() const - { - return m_position; - } - - void printOut(std::ostream&); - -private: - - G4int m_trackID; - G4double m_edep; - G4int m_PdgId; - G4double m_globalTime; - float m_position[3]; -}; - -typedef std::vector<McpHitContrib> McpHitContribList; - -#endif
diff -N NistElementsDump.hh --- NistElementsDump.hh 24 Jun 2013 22:10:33 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,26 +0,0 @@
-// $Id: NistElementsDump.hh,v 1.2 2013/06/24 22:10:33 jeremy Exp $ -#ifndef MATERIALPROPERTYDUMP_HH -#define MATERIALPROPERTYDUMP_HH 1 - -#include <iostream> -#include <string> - -class NistElementsDump -{ -private: - static std::string abbrevs[]; - static std::string names[]; - static int nelements; - -private: - NistElementsDump() - { - ; - } - -public: - static void writeXml(const std::string& filename); - static void printXml(std::ostream& out); -}; - -#endif
diff -N OpticalCalorimeterType.hh --- OpticalCalorimeterType.hh 24 Jun 2013 22:10:33 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,28 +0,0 @@
-#ifndef LCDD_OPTICALCALORIMETERTYPE_HH -#define LCDD_OPTICALCALORIMETERTYPE_HH 1 - -#include "Schema/ContentGroup.h" - -#include "CalorimeterType.hh" - -#include <iostream> - -/** - * @class CalorimeterType - * @brief CalorimeterType from schema. - */ -class OpticalCalorimeterType: public CalorimeterType -{ - -public: - - OpticalCalorimeterType() - { - } - - virtual ~OpticalCalorimeterType() - { - } -}; - -#endif
diff -N PhysVolId.hh --- PhysVolId.hh 24 Jun 2013 22:10:33 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,69 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/PhysVolId.hh,v 1.6 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_PHYSVOLID_HH -#define LCDD_PHYSVOLID_HH 1 - -#include <vector> - -/** - @class PhysVolId - @brief Simulator class for physical volume IDs. - */ -class PhysVolId -{ -public: - typedef int ValueType; - typedef std::vector<PhysVolId> PhysVolIds; - -public: - - PhysVolId() - { - } - - PhysVolId(ValueType val, std::string fld) : - m_value(val), m_fieldName(fld) - { - } - - virtual ~PhysVolId() - { - } - - ValueType getValue() const - { - return m_value; - } - - const std::string& getFieldName() const - { - return m_fieldName; - } - - void setFieldName(const std::string& fn) - { - m_fieldName = fn; - } - - void setValue(ValueType vt) - { - m_value = vt; - } - - bool operator==(const PhysVolId& right) - { - return (m_value == right.m_value); - } - - bool operator==(ValueType vt) - { - return (m_value == vt); - } - -private: - - ValueType m_value; - std::string m_fieldName; -}; - -#endif
diff -N PhysVolIdMap.hh --- PhysVolIdMap.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,72 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/PhysVolIdMap.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_PHYSVOLTOIDMAP_HH -#define LCDD_PHYSVOLTOIDMAP_HH 1 - -// LCDD -#include "PhysVolId.hh" - -// G4 -#include "G4VPhysicalVolume.hh" - -// std -#include <vector> -#include <map> - -/** - - @class PhysVolIdMap - - @brief Maps G4 physical volume ptrs to a vector of associated - ints for IDing. - - */ - -typedef std::map<G4VPhysicalVolume*, PhysVolId::PhysVolIds> PhysVolIdMapType; - -class PhysVolIdMap: private PhysVolIdMapType -{ - -public: - - void addPhysVolId(G4VPhysicalVolume* pv, PhysVolId id) - { - if (!hasPhysVolIds(pv)) { - createPhysVolIds(pv); - } - - PhysVolId::PhysVolIds& idvec = getPhysVolIds(pv); - idvec.push_back(id); - } - - void createPhysVolIds(G4VPhysicalVolume* pv) - { - PhysVolId::PhysVolIds pvid; - (*this)[pv] = pvid; - } - - /* - Has vec has been pushed? Does not check whether it is empty, - which caller should check. - */ - bool hasPhysVolIds(G4VPhysicalVolume* pv) const - { - return (this->find(pv) != this->end()); - } - - /* - The returned ref is not const, because caller can add elements. - Function is not const, because might need to create it on the fly. - */ - PhysVolId::PhysVolIds& getPhysVolIds(G4VPhysicalVolume* pv) - { - // create an empty one if not exists - if (!hasPhysVolIds(pv)) { - createPhysVolIds(pv); - } - - // return ptr to vec - return (*this)[pv]; - } -}; - -#endif
diff -N PositionComparator.hh --- PositionComparator.hh 24 Jun 2013 22:10:33 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,32 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/PositionComparator.hh,v 1.4 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_POSITIONCOMPARATOR_HH -#define LCDD_POSITIONCOMPARATOR_HH 1 - -#include "HitComparator.hh" - -class PositionComparator: public HitComparator -{ - -public: - - virtual ~PositionComparator() - { - } - -public: - - virtual bool compare(const G4CalorimeterHit& hit1, const G4CalorimeterHit& hit2) - { -// std::cout << "POS --> hit1 " << hit1.getPos() << " == hit2 " << hit2.getPos() << std::endl; -// if ( hit1.getPos() == hit2.getPos() ) { -// std::cout << "EQUAL" << std::endl; -// } -// else { -// std::cout << "NOT EQUAL" << std::endl; -// } - - return (hit1.getPos() == hit2.getPos()); - } -}; - -#endif
diff -N RZBData.hh --- RZBData.hh 24 Jun 2013 22:10:33 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,58 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/RZBData.hh,v 1.4 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_RZBDATA_HH -#define LCDD_RZBDATA_HH 1 - -/** - * @class RZBData - * @brief Represents a single row of a magnetic field defined by radius, z dimension, radial B-field strength, and z dimension B-field strength. - * @note Double values are multiplied by the field unit from the rz_field_map before they are inserted using this class. - */ -class RZBData -{ -public: - - /* - * @param r Radius - * @param z Z dimension - * @param Br Radial field strength - * @param Bz Z dimension field strength - */ - RZBData(double r, double z, double Br, double Bz) : - _r(r), _z(z), _Br(Br), _Bz(Bz) - { - } - - virtual ~RZBData() - { - } - -public: - - double r() const - { - return _r; - } - - double z() const - { - return _z; - } - - double Br() const - { - return _Br; - } - - double Bz() const - { - return _Bz; - } - -private: - double _r; - double _z; - double _Br; - double _Bz; -}; - -#endif
diff -N ReadoutUtil.hh --- ReadoutUtil.hh 24 Jun 2013 22:10:33 -0000 1.20 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,81 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/ReadoutUtil.hh,v 1.20 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_READOUTUTIL_HH -#define LCDD_READOUTUTIL_HH 1 - -// LCDD -#include "LCDDProcessor.hh" - -// G4 -#include "G4VSolid.hh" -#include "G4VPhysicalVolume.hh" -#include "G4Tubs.hh" -#include "G4StepPoint.hh" -#include "G4NavigationHistory.hh" -#include "G4ThreeVector.hh" - -#include <vector> - -/** - * @class ReadoutUtil - * @brief Static readout helper methods. - * @note The readout utility functions should take - * either G4Step or G4StepPoint as an argument - * for maximum generality. - */ -class ReadoutUtil -{ - -public: - ReadoutUtil() - { - } - - virtual ~ReadoutUtil() - { - } - -public: - - static G4ThreeVector computeThreeVectorMean(const G4ThreeVector& vec1, const G4ThreeVector& vec2); - - static G4ThreeVector computeMidPos(const G4Step* aStep); - - static G4double computeDistance(const G4ThreeVector& vec1, const G4ThreeVector& vec2); - - static G4double computeDistance(const G4Step* aStep); - - static G4VSolid* getSolidFromStepPoint(const G4StepPoint* aStepPoint); - - static G4TouchableHandle getTouchableFromStep(const G4Step* aStep); - - static G4ThreeVector getVolumeGlobalPosition(const G4StepPoint* aStepPoint, const G4ThreeVector& pnt); - - static G4ThreeVector getVolumeGlobalPosition(const G4StepPoint* aStepPoint); - - static const G4Tubs* getTubs(const G4Step* aStep); - static const G4Tubs* getTubs(const G4StepPoint* aStepPoint); - - static double computeTubsMidRadius(const G4Tubs* tubs); - - static double computeTubsMidRadius(const G4Step* aStep); - static double computeTubsMidRadius(const G4StepPoint* aStepPoint); - - static double getTubsThickness(const G4Tubs* tubs); - - static G4ThreeVector transformLocalToGlobal(const G4Step* aStep, const G4ThreeVector& localPos); - static G4ThreeVector transformLocalToGlobal(const G4StepPoint* aPreStepPoint, const G4ThreeVector& localPos); - static G4ThreeVector transformGlobalToLocal(const G4Step* aStep, const G4ThreeVector& globalPos); - static G4ThreeVector transformGlobalToLocal(const G4StepPoint* aPreStepPoint, const G4ThreeVector& globalPos); - - static int getVolumeNumber(G4TouchableHandle theTouchable, int historyDepth = -1); - - static std::vector<G4VPhysicalVolume*> getPhysVolList(G4Step* aStep); - - static bool isGeantino(G4Step* aStep); - -public: - - static const double PI; -}; - -#endif
diff -N ScorerType.hh --- ScorerType.hh 24 Jun 2013 22:10:33 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,39 +0,0 @@
-#ifndef LCDD_SCORERTYPE_HH -#define LCDD_SCORERTYPE_HH 1 - -#include "SensitiveDetectorType.hh" - -/** - * @class ScorerType - * @brief ScorerType from schema. - */ -class ScorerType: public SensitiveDetectorType -{ - -public: - ScorerType() - { - } - - virtual ~ScorerType() - { - } - - /* - void set_kill_tracks(const std::string& k) - { - m_kill_tracks = k; - } - - const std::string& get_kill_tracks() - { - return m_kill_tracks; - } - - private: - std::string m_kill_tracks; - */ - -}; - -#endif
diff -N SegmentationType.hh --- SegmentationType.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,24 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/SegmentationType.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_SEGMENTATIONTYPE_HH -#define LCDD_SEGMENTATIONTYPE_HH 1 - -#include <string> - -/** - @class SegmentationType - @brief SegmentationType from schema. - */ -class SegmentationType -{ -public: - SegmentationType() - { - } - - virtual ~SegmentationType() - { - } -}; - -#endif
diff -N SensitiveDetectorFactory.hh --- SensitiveDetectorFactory.hh 24 Jun 2013 22:10:33 -0000 1.9 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,75 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/SensitiveDetectorFactory.hh,v 1.9 2013/06/24 22:10:33 jeremy Exp $ - -// LCDD -#include "LCDDProcessor.hh" - -#include "SensitiveDetectorType.hh" -#include "G4SensitiveDetector.hh" -#include "G4SegmentationFactory.hh" - -#include "calorimeter.hh" -#include "tracker.hh" -#include "scorer.hh" - -#include "IdManager.hh" -#include "IdSpec.hh" -#include "IdSpecType.hh" - -// GDML -#include "G4Processor/GDMLProcessor.h" -//#include "G4Evaluator/GDMLExpressionEvaluator.h" - -#include "Saxana/SAXObject.h" - -class G4TrackerSD; -class G4ScorerSD; -class G4CalorimeterSD; - -/** - @class SensitiveDetectorFactory - @brief Creates SDs based on XML tag data. - */ -class SensitiveDetectorFactory -{ - -private: - // shouldn't be instantiated - SensitiveDetectorFactory() - { - } - -public: - virtual ~SensitiveDetectorFactory() - { - } - - // all static functions -public: - - static G4SensitiveDetector* createSensitiveDetector(const SAXObject* object); - -private: - - static G4CalorimeterSD* createCalorimeterSD(const SAXObject* object); - - static G4TrackerSD* createTrackerSD(const SAXObject* object); - - static G4ScorerSD* createScorerSD(const SAXObject* object); - - /** - * Lookup the IdSpec of a detector SAX object based on the idspecref. - * @throw G4Exception if the idspecref has a bad reference value. - * @return The IdSpec of this detector, or null if one does not exist. - */ - static IdSpec* findIdSpec(const SensitiveDetectorType* sdt); - - static void setBaseSensitiveDetectorAttributes(G4SensitiveDetector* sd, const SensitiveDetectorType* sdt); - - static double computeEcut(const SensitiveDetectorType* sdt); - - static int convertVerbose(const SensitiveDetectorType* sdt); - - static bool isSegmentationTag(const std::string& s); - - static bool checkHCName(const std::string& s); -};
diff -N SensitiveDetectorMessenger.hh --- SensitiveDetectorMessenger.hh 24 Jun 2013 22:10:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,54 +0,0 @@
-#ifndef LCDD_LCDD_SENSITIVEDETECTORMESSENGER_HH -#define LCDD_LCDD_SENSITIVEDETECTORMESSENGER_HH 1 - -// geant4 -#include "G4UImessenger.hh" - -// lcdd -#include "G4SensitiveDetector.hh" - -class G4UIcommand; -class G4UIcmdWithABool; -class G4UIcmdWithAnInteger; -class G4UIdirectory; -class G4UIcmdWithADoubleAndUnit; - -/** - * SensitiveDetectorMessenger is a G4UImessenger subclass - * that provides a macro command interface for each - * G4VSensitiveDetector registered by LCDD. - */ -class SensitiveDetectorMessenger: public G4UImessenger -{ -public: - SensitiveDetectorMessenger(G4SensitiveDetector* detector); - - virtual ~SensitiveDetectorMessenger(); - -public: - - virtual void SetNewValue(G4UIcommand* cmd, G4String newVals); - - static void makeDetectorsDir(); - - void defineCommands(G4VSensitiveDetector* sd); - -private: - - static G4UIdirectory* m_detectorsDir; - - G4SensitiveDetector* m_detector; - - G4UIdirectory* m_detectorDir; - - G4UIcommand* m_printInfoCmd; - G4UIcommand* m_printHitsCmd; - G4UIcommand* m_printVolumesCmd; - G4UIcommand* m_printTotalEdepCmd; - G4UIcommand* m_printNHitsCmd; - G4UIcmdWithAnInteger* m_verboseCmd; - G4UIcmdWithABool* m_activateCmd; - G4UIcmdWithADoubleAndUnit* m_ecutCmd; -}; - -#endif
diff -N SensitiveDetectorType.hh --- SensitiveDetectorType.hh 24 Jun 2013 22:10:33 -0000 1.11 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,147 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/SensitiveDetectorType.hh,v 1.11 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_SENSITIVEDETECTORTYPE_HH -#define LCDD_SENSITIVEDETECTORTYPE_HH 1 - -// GDML -#include "Schema/ContentGroup.h" -#include "Schema/ReferenceType.h" - -// std -#include <string> - -/** - * @class SensitiveDetectorType - * @brief SensitiveDetectorType from schema. - */ -class SensitiveDetectorType -{ -public: - - /** - * @class SensitiveDetectorType::sdref - * @brief Reference to sd element. - */ - class sdref: public SAXObject, public ReferenceType - { - public: - - sdref() - { - } - - virtual ~sdref() - { - } - - virtual SAXObject::Type type() - { - return SAXObject::element; - } - }; - -public: - SensitiveDetectorType() - { - } - - virtual ~SensitiveDetectorType() - { - } - - void set_name(const std::string& n) - { - m_name = n; - } - - void set_hitsCollectionName(const std::string& hcn) - { - m_hitsCollectionName = hcn; - } - - const std::string& get_hitsCollectionName() const - { - return m_hitsCollectionName; - } - - void set_eunit(const std::string& eu) - { - m_eunit = eu; - } - - void set_ecut(const std::string& ec) - { - m_ecut = ec; - } - - void set_verbose(const std::string& v) - { - m_verbose = v; - } - - void set_type(const std::string& t) - { - m_type = t; - } - - void set_endcap_flag(const std::string& e) - { - m_endcap_flag = e; - } - - const std::string& get_name() const - { - return m_name; - } - - const std::string& get_eunit() const - { - return m_eunit; - } - - const std::string& get_ecut() const - { - return m_ecut; - } - - const std::string& get_verbose() const - { - return m_verbose; - } - - const std::string& get_type() const - { - return m_type; - } - - const std::string& get_endcap_flag() const - { - return m_endcap_flag; - } - - const ContentSequence* get_content() const - { - return &m_sequence; - } - - // add content - void add_content(const std::string& tag, SAXObject* so) - { - ContentGroup::ContentItem ci = { tag, so }; - m_sequence.add_content(ci); - } - -private: - - ContentSequence m_sequence; - - std::string m_name; - std::string m_hitsCollectionName; - std::string m_endcap_flag; - std::string m_eunit; - std::string m_ecut; - std::string m_verbose; - std::string m_type; -}; - -#endif
diff -N SensitiveDetectorTypeProcess.hh --- SensitiveDetectorTypeProcess.hh 24 Jun 2013 22:10:33 -0000 1.13 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,88 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/SensitiveDetectorTypeProcess.hh,v 1.13 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_SENSITIVEDETECTORTYPEPROCESS_HH -#define LCDD_SENSITIVEDETECTORTYPEPROCESS_HH 1 - -// LCDD -#include "SensitiveDetectorType.hh" - -// GDML -#include "Saxana/ProcessingConfigurator.h" -#include "Saxana/ProcessingContext.h" -#include "Saxana/SAXProcessor.h" -#include "Saxana/StateStack.h" -#include "Saxana/SAXProcessingState.h" -#include "Saxana/SAXStateProcess.h" -#include "Saxana/SAXComponentFactory.h" - -// G4 -#include "globals.hh" - -// std -#include <iostream> - -/** - @class SensitiveDetectorTypeProcess - @brief SAX process for elements based on abstract SensitiveDetectorType. - */ -class SensitiveDetectorTypeProcess: public SAXStateProcess -{ -public: - SensitiveDetectorTypeProcess(const ProcessingContext* context = 0) : - SAXStateProcess(context), m_obj(0) - { - } - - virtual ~SensitiveDetectorTypeProcess() - { - } - - virtual const SAXComponentObject* Build() const - { - return this; - } - - virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - { - //std::cout << "SensitiveDetectorTypeProcess::StartElement: " << name << std::endl; - - SensitiveDetectorType* sdt = dynamic_cast<SensitiveDetectorType*>(m_obj); - - if (sdt) { - sdt->set_name(attrs.getValue("name")); - sdt->set_hitsCollectionName(attrs.getValue("hits_collection")); - sdt->set_ecut(attrs.getValue("ecut")); - sdt->set_eunit(attrs.getValue("eunit")); - sdt->set_verbose(attrs.getValue("verbose")); - sdt->set_endcap_flag(attrs.getValue("endcap_flag")); - - // set the type str for factory build - sdt->set_type(name); - } else { - std::cerr << "SensitiveDetectorTypeProcess::StartElement - cast to SensitiveDetectorType failed!" << std::endl; - } - } - - virtual void EndElement(const std::string&) - { - } - - virtual void Characters(const std::string&) - { - } - - virtual void StackPopNotify(const std::string& name) - { - SAXObject** so = Context()->GetTopObject(); - SensitiveDetectorType* sdt = dynamic_cast<SensitiveDetectorType*>(m_obj); - - // just push all content; could be idspecref or segmentation (for cal) - sdt->add_content(name, *so); - } - -protected: - SAXObject* m_obj; - -}; - -#endif
diff -N SolenoidType.hh --- SolenoidType.hh 24 Jun 2013 22:10:33 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,95 +0,0 @@
-#ifndef LCDD_SOLENOIDTYPE_HH -#define LCDD_SOLENOIDTYPE_HH 1 - -#include "FieldType.hh" - -/** - @class SolenoidType - @brief SolenoidType from schema. - */ -class SolenoidType: public FieldType -{ - -public: - - SolenoidType() - { - } - - virtual ~SolenoidType() - { - } - -public: - - void set_innerField(const std::string& s) - { - _innerField = s; - } - - void set_outerField(const std::string& s) - { - _outerField = s; - } - - void set_zmin(const std::string& s) - { - _zmin = s; - } - - void set_zmax(const std::string& s) - { - _zmax = s; - } - - void set_innerRadius(const std::string& s) - { - _innerRadius = s; - } - - void set_outerRadius(const std::string& s) - { - _outerRadius = s; - } - - const std::string& get_innerField() const - { - return _innerField; - } - - const std::string& get_outerField() const - { - return _outerField; - } - - const std::string& get_zmin() const - { - return _zmin; - } - - const std::string& get_zmax() const - { - return _zmax; - } - - const std::string& get_innerRadius() const - { - return _innerRadius; - } - - const std::string& get_outerRadius() const - { - return _outerRadius; - } - -private: - - std::string _innerField; - std::string _outerField; - std::string _zmin; - std::string _zmax; - std::string _innerRadius; - std::string _outerRadius; -}; - -#endif
diff -N StepReadout.hh --- StepReadout.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,120 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/StepReadout.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_LCDD_STEPREADOUT_HH -#define LCDD_LCDD_STEPREADOUT_HH 1 - -// geant4 -#include "G4ThreeVector.hh" -#include "G4TouchableHandle.hh" - -// stl -#include <vector> - -// geant4 -class G4VPhysicalVolume; -class G4VSensitiveDetector; -class G4Step; -class G4StepPoint; -class G4Region; -class G4Material; -class G4LogicalVolume; -class G4VSolid; -class G4Track; - -// lcdd -class TrackInformation; -class G4UserRegionInformation; - -/** - * @class StepReadout - * @brief Utility functions to return information about a G4Step object. - * @note The only cached data member is the step pointer. - */ -class StepReadout -{ -public: - StepReadout(); - virtual ~StepReadout(); - -public: - - // step - void setStep(G4Step* s); - G4Step* step() const; - bool hasStep() const; - - // step points - G4StepPoint* pre() const; - G4StepPoint* post() const; - - // PV from pre and post - G4VPhysicalVolume* prePV() const; - G4VPhysicalVolume* postPV() const; - - // solid from pre and post - G4VSolid* preSolid() const; - G4VSolid* postSolid() const; - - // LV from pre and post - G4LogicalVolume* preLV() const; - G4LogicalVolume* postLV() const; - - // material from pre and post - G4Material* preMaterial() const; - G4Material* postMaterial() const; - - // region from pre and post - G4Region* preRegion() const; - G4Region* postRegion() const; - - // pre and post position of PV - G4ThreeVector volumePosition(G4TouchableHandle theTouchable) const; - G4ThreeVector preVolumePosition() const; - G4ThreeVector postVolumePosition() const; - - // SD from pre and post - G4VSensitiveDetector* preSD() const; - G4VSensitiveDetector* postSD() const; - G4VSensitiveDetector* getSD(G4StepPoint*) const; - - // are pre and post SD the same? - bool hasSameSD() const; - - // edep from step - double edep() const; - - // track - G4Track* track() const; - - // data from track - double globalTime() const; - int trackID() const; - G4ThreeVector momentum() const; - TrackInformation* trackInformation() const; - - // pre, mid and post positions - G4ThreeVector prePosition() const; - G4ThreeVector midPosition() const; - G4ThreeVector postPosition() const; - - // pre, post and mean momentum - G4ThreeVector preMomentum() const; - G4ThreeVector postMomentum() const; - G4ThreeVector meanMomentum() const; - - // pre and post handles - G4TouchableHandle preTouchableHandle() const; - G4TouchableHandle postTouchableHandle() const; - - // current step is a geantino or chargedgeantino? - bool isGeantino(); - -protected: - - // cached step - G4Step* m_step; - - // vector = [0,0,0] - const G4ThreeVector m_origin; -}; - -#endif
diff -N StoreInspector.hh --- StoreInspector.hh 24 Jun 2013 22:10:33 -0000 1.11 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,399 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/StoreInspector.hh,v 1.11 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_STOREINSPECTOR_HH -#define LCDD_STOREINSPECTOR_HH 1 - -// geant4 -#include "G4UIcmdWithAString.hh" -#include "G4UImessenger.hh" -#include "G4UIdirectory.hh" -#include "G4UnitsTable.hh" - -// std -#include <string> -#include <vector> -#include <map> -#include <ostream> -#include <cassert> -#include <cmath> - -using std::endl; - -/** - * StoreInspector is a templated class for printing the contents - * of a vector or map-based object store using a G4UIcommand. - */ -template<class Object, class ObjectContainer> -class StoreInspector: public G4UImessenger -{ -public: - - typedef typename ObjectContainer::iterator iterator; - typedef typename ObjectContainer::const_iterator const_iterator; - -public: - - /** ctor */ - StoreInspector(const std::string& name, const ObjectContainer* container) : - G4UImessenger() - { - assert(container != 0); - _name = name; - _container = container; - defineCommands(); - } - - /* Overloaded find for vector. */ - Object* findByName(const std::string& name, const std::vector<Object*>* objVec) - { - Object* obj = 0; - for (typename std::vector<Object*>::const_iterator it = objVec->begin(); it != objVec->end(); it++) { - if (sameName(*it, name)) { - obj = (*it); - break; - } - } - return obj; - } - - /* Overloaded find for map. */ - Object* findByName(const std::string& name, const std::map<std::string, Object*>* objMap) - { - std::map<std::string, Object*>* objMap_nconst = const_cast<std::map<std::string, Object*>*>(objMap); - return (*objMap_nconst)[name]; - } - - /* Simple name comparison returning true if the strings match. */ - bool sameName(Object* obj, const std::string& name) - { - return (((std::string) obj->GetName()) == name); - } - - /* Find an object by name. */ - Object* find(const std::string& name) - { - return findByName(name, const_cast<const ObjectContainer*>(_container)); - } - - /* Object from iterator for maps. */ - Object* getObject(typename std::map<std::string, Object*>::const_iterator it) - { - return it->second; - } - - /* Object from iterator for vectors. */ - Object* getObject(typename std::vector<Object*>::const_iterator it) - { - return (*it); - } - - /* Name from iterator for maps. */ - const std::string& getObjectName(typename std::map<std::string, Object*>::const_iterator it) - { - return it->first; - } - - /* Name from iterator for vectors. */ - const std::string& getObjectName(typename std::vector<Object*>::const_iterator it) - { - return (*it)->GetName(); - } - - /** - * Print out the objects in the store using the stream. - */ - std::ostream& printStore(std::ostream& os) - { - os << "********* " + _name + " store ********" << endl << endl; - for (const_iterator it = _container->begin(); it != _container->end(); it++) { - printObject(os, getObjectName(it), getObject(it)); - os << "-------------------------------------" << endl; - } - return os; - os << "*************************************" << endl << endl; - } - - /** - * Print a single object's name and data using the stream operator. - */ - std::ostream& printObject(std::ostream& os, const std::string& name, Object* obj) - { - os << _name << " - " << name << endl; - os << (*obj) << endl; - return os; - } - - /* Defines G4UIcommand to be used with this inspector. */ - void defineCommands() - { - _dir = new G4UIdirectory(std::string("/stores/" + _name + "/").c_str()); - _dir->SetGuidance(std::string("Commands for inspecting the " + _name + " store.").c_str()); - - _printCmd = new G4UIcmdWithAString(std::string("/stores/" + _name + "/print").c_str(), this); - _printCmd->SetGuidance(std::string("Print single " + _name + " object or the entire store.").c_str()); - _printCmd->SetParameterName("name", true); - _printCmd->SetDefaultValue(""); - _printCmd->AvailableForStates(G4State_Idle); - } - - /** - * Hook for the G4UIcommand 'print' on this inspector. - */ - virtual void SetNewValue(G4UIcommand*, G4String newVals) - { - std::string name = (std::string) newVals; - if (name != std::string("")) { - Object* obj = find(name); - if (obj != 0) { - printObject(std::cout, name, obj); - } else { - std::cerr << "ERROR: Object named " + name + " was not found in the " + _name + " store!" << endl; - } - } else { - printStore(std::cout); - } - } - -private: - std::string _name; - const ObjectContainer* _container; - G4UIcmdWithAString* _printCmd; - G4UIdirectory* _dir; -}; - -// FIXME: None of these inspectors should be declared globally. Put in G4StoreManager. - -#include "LCDDProcessor.hh" - -/* material */ -#include "G4MaterialTable.hh" - -typedef StoreInspector<G4Material, G4MaterialTable> G4MaterialStoreInspector; - -/* solid */ -#include "G4VSolid.hh" -#include "G4SolidStore.hh" - -typedef StoreInspector<G4VSolid, G4SolidStore> G4SolidStoreInspector; - -/* limit set */ -#include "G4LimitSet.hh" -#include "G4UnitsTable.hh" - -std::ostream& operator<<(std::ostream& os, G4LimitSet& limset) -{ - os << endl; - for (G4LimitSet::LimitSetMap::const_iterator it = limset.getLimitSetMap().begin(); it != limset.getLimitSetMap().end(); it++) { - - const G4LimitSet::LimitNameType& name = it->first; - os << name << endl; - - std::string unit = ""; - if (name == "ekin_min") { - unit = "Energy"; - } else if (name == "range_min") { - unit = "Length"; - } else if (name == "step_length_max") { - unit = "Length"; - } else if (name == "time_max") { - unit = "Time"; - } else if (name == "track_length_max") { - unit = "Length"; - } - - if (unit != "") { - const G4LimitSet::LimitMap& limmap = it->second; - for (G4LimitSet::LimitMap::const_iterator iit = limmap.begin(); iit != limmap.end(); iit++) { - - os << '\t' << iit->first << '\t' << G4BestUnit(iit->second, unit) << endl; - } - } else { - os << "Unknown limit type " << name << endl; - } - } - return os; -} - -typedef StoreInspector<G4LimitSet, LCDDProcessor::LimitSets> G4LimitSetInspector; - -/* lvolume */ -#include "G4LogicalVolume.hh" -#include "G4LogicalVolumeStore.hh" -#include "G4UserLimits.hh" - -/* G4LogicalVolume stream operator */ -std::ostream& operator<<(std::ostream &os, G4LogicalVolume &lv) -{ - os << "solid: " << lv.GetSolid()->GetName() << endl; - os << "material: " << lv.GetMaterial()->GetName() << endl; - -#ifdef HAVE_G4LOGICALVOLUME_GETMASS - os << "mass: " << G4BestUnit(lv.GetMass(), "Mass") << endl; -#endif - - os << "daughters: " << lv.GetNoDaughters() << endl; - - G4UserLimits* lim = lv.GetUserLimits(); - os << "limits: "; - if (0 != lim) { - os << lim->GetType(); - } else { - os << "NONE"; - } - os << endl; - - G4VSensitiveDetector* sd = lv.GetSensitiveDetector(); - os << "SD: "; - if (0 != sd) { - os << sd->GetName(); - } else { - os << "NONE"; - } - os << endl; - - G4Region* reg = lv.GetRegion(); - os << "region: "; - if (0 != reg) { - os << reg->GetName(); - } else { - os << "NONE"; - } - os << endl; - - const G4VisAttributes* vis = lv.GetVisAttributes(); - os << "visattributes: "; - if (0 != vis) { - os << "yes"; - } else { - os << "NONE"; - } - os << endl; - - return os; -} - -typedef StoreInspector<G4LogicalVolume, G4LogicalVolumeStore> G4LogicalVolumeStoreInspector; - -/* pvolume */ -#include "G4VPhysicalVolume.hh" -#include "G4PhysicalVolumeStore.hh" - -std::ostream& operator<<(std::ostream &os, G4VPhysicalVolume &pv) -{ - os << "lvolume: " << pv.GetLogicalVolume()->GetName() << endl; - os << "pos: " << pv.GetTranslation() << endl; - const G4RotationMatrix* rot = pv.GetRotation(); - os << "rot: "; - if (0 != rot) { - rot->print(os); - } else { - os << "NONE" << endl; - } - os << "copyNo: " << pv.GetCopyNo() << endl; - os << "# copies: " << pv.GetMultiplicity() << endl; - return os; -} - -typedef StoreInspector<G4VPhysicalVolume, G4PhysicalVolumeStore> G4PhysicalVolumeStoreInspector; - -/* idspec */ -#include "IdManager.hh" - -std::ostream& operator<<(std::ostream& os, IdSpec& id) -{ - os << "# fields: " << id.getNumFields() << endl; - os << endl; - os << "label\tstart\tlength\tsigned" << endl; - for (IdSpec::IdFields::const_iterator it = id.IdFieldsBegin(); it != id.IdFieldsEnd(); it++) { - IdField* field = *it; - os << field->getLabel() << '\t' << field->getStart() << '\t' << field->getLength() << '\t' << field->getSigned() << endl; - } - return os; -} - -typedef StoreInspector<IdSpec, IdManager::IdSpecs> IdSpecInspector; - -/* SD */ -#include "G4SensitiveDetector.hh" // use LCDD's concrete SD class -std::ostream& operator<<(std::ostream& os, G4SensitiveDetector& sd) -{ - os << "fullPath: " << sd.GetFullPathName() << endl; - os << "HC: " << sd.getHCName() << endl; - os << "HCID: " << sd.getHCID() << endl; - os << "verbose: " << sd.getVerbose() << endl; - os << "ecut: " << sd.getEcut() << endl; - os << "hasIdSpec: " << sd.hasIdSpec() << endl; - os << "isEndcap: " << sd.getEndcapFlag() << endl; - os << "isActive: " << sd.isActive() << endl; - return os; -} - -typedef StoreInspector<G4SensitiveDetector, LCDDProcessor::SensitiveDetectors> G4SensitiveDetectorInspector; - -/* region */ -#include "G4Region.hh" -#include "G4RegionStore.hh" -#include "G4ProductionCuts.hh" -#include "G4VUserRegionInformation.hh" -#include "G4UserRegionInformation.hh" - -/* G4Region stream operator */ -std::ostream& operator<<(std::ostream &os, G4Region ®) -{ - os << "prod cut: " << reg.GetProductionCuts()->GetProductionCut(0) << endl; - G4UserRegionInformation* regInfo = static_cast<G4UserRegionInformation*>(reg.GetUserInformation()); - if (0 != regInfo) { - os << "store secondaries: " << regInfo->getStoreSecondaries() << endl; - os << "energy threshold: " << regInfo->getThreshold() << endl; - } else { - os << "NO G4UserRegionInformation" << endl; - } - return os; -} - -typedef StoreInspector<G4Region, G4RegionStore> G4RegionStoreInspector; - -/* mag field */ -#include "G4MagneticField.hh" - -std::ostream& operator<<(std::ostream& os, G4MagneticField&) -{ - /* Generic fields have no displayable data attributes! */ - return os; -} - -typedef StoreInspector<G4MagneticField, LCDDProcessor::MagneticFields> G4MagneticFieldInspector; - -/* vis attrib */ -#include "G4VisAttributes.hh" - -/* G4VisAttributes stream operator */ -std::ostream& operator<<(std::ostream& os, G4VisAttributes &vis) -{ - const G4Color& color = vis.GetColor(); - os << "RGB: " << color.GetRed() << " " << color.GetGreen() << " " << color.GetBlue() << endl; - os << "Alpha: " << color.GetAlpha() << endl; - os << "visible: " << vis.IsVisible() << endl; - os << "show daughters: " << !vis.IsDaughtersInvisible() << endl; - - os << "forced drawing style: "; - if (vis.IsForceDrawingStyle()) { - G4VisAttributes::ForcedDrawingStyle force = vis.GetForcedDrawingStyle(); - if (force == G4VisAttributes::wireframe) { - os << "wireframe"; - } else if (force == G4VisAttributes::solid) { - os << "solid"; - } - } else { - os << "NONE"; - } - os << endl; - - return os; -} - -typedef StoreInspector<G4VisAttributes, LCDDProcessor::VisAttributes> G4VisAttributeInspector; -G4VisAttributeInspector visInspector("G4VisAttributes", LCDDProcessor::instance()->getVisAttributesStore()); - -/* defines, positions, rotations */ -// FIXME: need accessible maps from GDML??? -#endif
diff -N StringUtil.hh --- StringUtil.hh 24 Jun 2013 22:10:33 -0000 1.11 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,63 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/StringUtil.hh,v 1.11 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_STRINGUTIL_HH -#define LCDD_STRINGUTIL_HH 1 - -#include <string> -#include <sstream> -#include <vector> - -/** - @class StringUtil - @brief String utilities. - @note Used by both LCDD and SLIC. - */ -class StringUtil -{ - -private: - - // should not be instantiated - virtual ~StringUtil() - { - } - -public: - - // a-zA-Z - static const std::string ALPHA_STR; - - // 0-9 - static const std::string NUM_STR; - - // std. whitespace; 0x09-0D and 20 - static const std::string WS_STR; - - // null string - static const std::string NULL_STR; - -public: - static std::string toString(double d); - static std::string toString(float f); - static std::string toString(int i); - static std::string toString(bool b); - - static std::string& toLower(std::string&); - static std::string& toLower(const std::string&); - - static double toDouble(std::string& s); - static double toDouble(const std::string& s); - - static int toInt(std::string& s); - - static bool toBool(std::string& s); - static bool toBool(const std::string& s); - - static void trim(std::string& str); - - static std::string concatStrVec(const std::vector<std::string>& s_vec, const std::string& sep = " "); - - static void split(const std::string& str, const std::string& delimiters, std::vector<std::string>& tokens); -}; - -#endif
diff -N TrackInformation.hh --- TrackInformation.hh 24 Jun 2013 22:10:33 -0000 1.13 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,165 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/TrackInformation.hh,v 1.13 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_TRACKINFORMATION_HH -#define LCDD_TRACKINFORMATION_HH 1 - -#include "G4Track.hh" -#include "G4Step.hh" -#include "G4Allocator.hh" - -/** - @class TrackInformation - @brief Implements G4VUserTrackInformation. - @note In LCDD package, because used by SDs. - */ -class TrackInformation: public G4VUserTrackInformation -{ - -public: - - enum ETrackingStatus - { - eNone, eInTrackingRegion, eInNontrackingRegion - }; - -public: - TrackInformation(); - TrackInformation(const G4Track* aTrack); - TrackInformation(const TrackInformation* aTrackInfo); - virtual ~TrackInformation(); - - void setDefaults(); - - static void setFromTrackInformation(const TrackInformation* srcTrkInfo, TrackInformation* trgtTrkInfo); - - static inline TrackInformation* getTrackInformation(const G4Track* aTrack) - { - return static_cast<TrackInformation*>(aTrack->GetUserInformation()); - } - - static inline TrackInformation* getTrackInformation(const G4Step* aStep) - { - return getTrackInformation(aStep->GetTrack()); - } - - inline void *operator new(size_t); - inline void operator delete(void *aTrackInfo); - inline int operator ==(const TrackInformation& right) const - { - return (this == &right); - } - - TrackInformation& operator =(const TrackInformation& right); - - // from G4 - virtual void Print() const - { - } - - // get str of tracking status from enum - static const std::string& getTrackingStatusString(ETrackingStatus ts); - const std::string& getTrackingStatusString() const - { - return TrackInformation::getTrackingStatusString(getTrackingStatus()); - } - -public: - - inline G4int getOriginalTrackID() const - { - return m_originalTrackID; - } - - inline ETrackingStatus getOriginalTrackingStatus() const - { - return m_originalTrackingStatus; - } - - inline ETrackingStatus getTrackingStatus() const - { - return m_trackingStatus; - } - - inline bool hasTrackerHit() const - { - return m_hasTrackerHit; - } - - inline void setHasTrackerHit(bool hasHit = true) - { - m_hasTrackerHit = hasHit; - } - - inline void setTrackID(G4int id) - { - m_originalTrackID = id; - } - - inline void setTrackingStatus(ETrackingStatus st) - { - m_trackingStatus = st; - } - - inline void setOriginalTrackingStatus(ETrackingStatus st) - { - m_originalTrackingStatus = st; - } - - inline void setVertexIsNotEndpointOfParent(bool val = true) - { - m_vertexIsNotEndpointOfParent = val; - } - - inline bool getVertexIsNotEndpointOfParent() const - { - return m_vertexIsNotEndpointOfParent; - } - - inline void setBackscatter(bool val = true) - { - m_backscatter = val; - } - - inline bool getBackscatter() const - { - return m_backscatter; - } - - inline void setBelowThreshold(bool val = true) - { - m_belowThreshold = val; - } - - inline bool getBelowThreshold() const - { - return m_belowThreshold; - } - -private: - - G4int m_originalTrackID; - - ETrackingStatus m_trackingStatus; - ETrackingStatus m_originalTrackingStatus; - - G4bool m_hasTrackerHit; - - G4bool m_vertexIsNotEndpointOfParent; - G4bool m_backscatter; - G4bool m_belowThreshold; -}; - -extern G4Allocator<TrackInformation> TrackInformationAllocator; - -inline void* TrackInformation::operator new(size_t) -{ - void* aTrackInfo; - aTrackInfo = (void*) TrackInformationAllocator.MallocSingle(); - return aTrackInfo; -} - -inline void TrackInformation::operator delete(void *aTrackInfo) -{ - TrackInformationAllocator.FreeSingle((TrackInformation*) aTrackInfo); -} - -#endif
diff -N TrackerType.hh --- TrackerType.hh 24 Jun 2013 22:10:33 -0000 1.7 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,39 +0,0 @@
-#ifndef LCDD_TRACKERTYPE_HH -#define LCDD_TRACKERTYPE_HH 1 - -#include "SensitiveDetectorType.hh" - -#include <iostream> - -/** - @class TrackerType - @brief TrackerType from schema. - */ -class TrackerType: public SensitiveDetectorType -{ - -public: - - TrackerType() - { - } - - virtual ~TrackerType() - { - } - - void set_combine_hits(const std::string& c) - { - m_combine_hits = c; - } - - const std::string& get_combine_hits() const - { - return m_combine_hits; - } - -private: - std::string m_combine_hits; -}; - -#endif
diff -N UnsegmentedCalorimeterType.hh --- UnsegmentedCalorimeterType.hh 24 Jun 2013 22:10:33 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,31 +0,0 @@
-#ifndef LCDD_UNSEGMENTEDCALORIMETERTYPE_HH -#define LCDD_UNSEGMENTEDCALORIMETERTYPE_HH 1 - -// GDML -#include "Schema/ContentGroup.h" - -// lcdd -#include "CalorimeterType.hh" - -// std -#include <iostream> - -/** - * @class UnsegmentedCalorimeterType - * @brief UnsegmentedCalorimeterType from schema. - */ -class UnsegmentedCalorimeterType: public CalorimeterType -{ - -public: - - UnsegmentedCalorimeterType() - { - } - - virtual ~UnsegmentedCalorimeterType() - { - } -}; - -#endif
diff -N Verbose.hh --- Verbose.hh 24 Jun 2013 22:10:33 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,41 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/Verbose.hh,v 1.5 2013/06/24 22:10:33 jeremy Exp $ -#ifndef LCDD_VERBOSE_HH -#define LCDD_VERBOSE_HH 1 - -/** - * @class Verbose - * @brief Mixin class for setting and retrieving verbosity level. - */ -class Verbose -{ -public: - typedef unsigned int LevelType; - -public: - Verbose(LevelType lt = m_defaultLevel) - { - m_level = lt; - } - - virtual ~Verbose() - { - } - -public: - - virtual inline LevelType verbose() const - { - return m_level; - } - - virtual inline void setVerbose(LevelType lt) - { - m_level = lt; - } - -protected: - LevelType m_level; - static const LevelType m_defaultLevel; -}; - -#endif
diff -N VisType.hh --- VisType.hh 24 Jun 2013 22:10:33 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,124 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/VisType.hh,v 1.6 2013/06/24 22:10:33 jeremy Exp $ - -#ifndef LCDD_VISTYPE_HH -#define LCDD_VISTYPE_HH 1 - -// GDML -#include "Schema/ContentGroup.h" -#include "Schema/ReferenceType.h" - -// std -#include <string> - -/** - * @class VisType - * @brief VisType from schema. - */ -class VisType -{ -public: - /** - * @class VisType::visref - * @brief Reference to a vis element. - */ - class visref: public SAXObject, public ReferenceType - { - public: - visref() - { - } - - virtual ~visref() - { - } - - virtual SAXObject::Type type() - { - return SAXObject::element; - } - }; - -public: - VisType() - { - } - - virtual ~VisType() - { - } - -public: - - void set_name(const std::string& n) - { - m_name = n; - } - - void set_visible(const std::string& v) - { - m_visible = v; - } - - void set_show_daughters(const std::string& d) - { - m_show_daughters = d; - } - - void set_line_style(const std::string& l) - { - m_line_style = l; - } - - void set_drawing_style(const std::string& d) - { - m_drawing_style = d; - } - - const std::string& get_name() const - { - return m_name; - } - - const std::string& get_visible() const - { - return m_visible; - } - - const std::string& get_show_daughters() const - { - return m_show_daughters; - } - - const std::string& get_line_style() const - { - return m_line_style; - } - - const std::string& get_drawing_style() const - { - return m_drawing_style; - } - - const ContentSequence* get_content() const - { - return &m_sequence; - } - - void add_content(const std::string& tag, SAXObject* so) - { - ContentGroup::ContentItem ci = { tag, so }; - m_sequence.add_content(ci); - } - -private: - - ContentSequence m_sequence; - - std::string m_name; - std::string m_visible; - std::string m_show_daughters; - std::string m_line_style; - std::string m_drawing_style; -}; - -#endif
diff -N calorimeterProcess.hh --- calorimeterProcess.hh 24 Jun 2013 22:10:34 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,42 +0,0 @@
-#ifndef LCDD_CALORIMETERPROCESS_HH -#define LCDD_CALORIMETERPROCESS_HH 1 - -// $Header: /cvs/lcd/lcdd/include/Attic/calorimeterProcess.hh,v 1.2 2013/06/24 22:10:34 jeremy Exp $ - -#include "Saxana/ProcessingConfigurator.h" -#include "Saxana/ProcessingContext.h" -#include "Saxana/SAXProcessor.h" -#include "Saxana/StateStack.h" -#include "Saxana/SAXProcessingState.h" -#include "Saxana/SAXStateProcess.h" -#include "Saxana/SAXComponentFactory.h" - -#include "calorimeter.hh" -#include "SensitiveDetectorTypeProcess.hh" - -#include <iostream> - -/** - @class calorimeterProcess - @brief SAX process for calorimeter element. - @note Calls SAX processor for SensitiveDetectorTypeProcess parent class. - */ -class calorimeterProcess: public SensitiveDetectorTypeProcess -{ -public: - calorimeterProcess(const ProcessingContext* context = 0); - - virtual ~calorimeterProcess(); - - virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs); - - virtual void EndElement(const std::string&); - - virtual void Characters(const std::string&); - - virtual void StackPopNotify(const std::string& name); - - virtual const std::string& State() const; -}; - -#endif
diff -N idfieldElem.hh --- idfieldElem.hh 24 Jun 2013 22:10:34 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,30 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/idfieldElem.hh,v 1.5 2013/06/24 22:10:34 jeremy Exp $ -#ifndef LCDD_IDFIELDELEM_HH -#define LCDD_IDFIELDELEM_HH 1 - -#include "Saxana/SAXObject.h" - -#include "IdFieldType.hh" - -/** - @class idfieldElem - @brief idfield element from schema. - */ -class idfieldElem: public SAXObject, public IdFieldType -{ -public: - idfieldElem() - { - } - - virtual ~idfieldElem() - { - } - - virtual SAXObject::Type type() - { - return SAXObject::element; - } -}; - -#endif
diff -N rzb.hh --- rzb.hh 24 Jun 2013 22:10:34 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,30 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/rzb.hh,v 1.4 2013/06/24 22:10:34 jeremy Exp $ -#ifndef LCDD_RZB_HH -#define LCDD_RZB_HH 1 - -#include "RZBType.hh" - -#include "Saxana/SAXObject.h" - -/** - * @class rzb - * @brief The rzB element from lcdd_fields.xsd subschema. - */ -class rzb: public SAXObject, public RZBType -{ -public: - rzb() - { - } - - virtual ~rzb() - { - } - - virtual SAXObject::Type type() - { - return SAXObject::element; - } -}; - -#endif
diff -N sensitive_detector.hh --- sensitive_detector.hh 24 Jun 2013 22:10:34 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,29 +0,0 @@
-#ifndef LCDD_SENSITIVE_DETECTOR_HH -#define LCDD_SENSITIVE_DETECTOR_HH 1 - -#include "Saxana/SAXObject.h" - -#include "SensitiveDetectorType.hh" - -/** - @class sensitive_detector - @brief sensitive_detector element from schema. - */ -class sensitive_detector: public SAXObject, public SensitiveDetectorType -{ -public: - sensitive_detector() - { - } - - virtual ~sensitive_detector() - { - } - - virtual SAXObject::Type type() - { - return SAXObject::element; - } -}; - -#endif
diff -N unsegmented_calorimeter.hh --- unsegmented_calorimeter.hh 24 Jun 2013 22:10:34 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,31 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/unsegmented_calorimeter.hh,v 1.2 2013/06/24 22:10:34 jeremy Exp $ -#ifndef LCDD_UNSEGMENTEDCALORIMETER_HH -#define LCDD_UNSEGMENTEDCALORIMETER_HH - -#include "Saxana/SAXObject.h" - -#include "UnsegmentedCalorimeterType.hh" - -/** - - @class unsegmented_calorimeter - @brief unsegmented_calorimeter element from LCDD schema. - */ -class unsegmented_calorimeter: public SAXObject, public UnsegmentedCalorimeterType -{ -public: - unsegmented_calorimeter() - { - } - - virtual ~unsegmented_calorimeter() - { - } - - virtual SAXObject::Type type() - { - return SAXObject::element; - } -}; - -#endif
diff -N vis.hh --- vis.hh 24 Jun 2013 22:10:34 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,31 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/vis.hh,v 1.4 2013/06/24 22:10:34 jeremy Exp $ -#ifndef LCDD_VIS_HH -#define LCDD_VIS_HH 1 - -// GDML -#include "Saxana/SAXObject.h" - -// LCDD -#include "VisType.hh" -/** - @class vis - @brief vis element from schema. - */ -class vis: public SAXObject, public VisType -{ -public: - vis() - { - } - - virtual ~vis() - { - } - - virtual SAXObject::Type type() - { - return SAXObject::element; - } -}; - -#endif
diff -N volumeExtendedSubscriber.hh --- volumeExtendedSubscriber.hh 24 Jun 2013 22:10:34 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,50 +0,0 @@
-// $Header: /cvs/lcd/lcdd/include/Attic/volumeExtendedSubscriber.hh,v 1.2 2013/06/24 22:10:34 jeremy Exp $ - -// GDML -#include "Saxana/SAXSubscriber.h" -#include "Saxana/SAXComponentFactory.h" - -#include "G4Processor/GDMLProcessor.h" - -#include "Schema/volume.h" -#include "Schema/physvol.h" - -// LCDD -#include "LCDDProcessor.hh" -#include "IdManager.hh" -#include "sensitive_detector.hh" -#include "G4SensitiveDetector.hh" -#include "RegionType.hh" -#include "physvolidElem.hh" -#include "VisType.hh" -#include "limit.hh" -#include "G4LimitSet.hh" -#include "LimitSetType.hh" - -// G4 -#include "G4LogicalVolume.hh" -#include "G4Region.hh" -#include "G4VisAttributes.hh" - -// std -#include <iostream> - -/** - @class volumeExtendedSubscriber - @brief SAX subscriber to handle extra LCDD tags on volume element. - @note This is the major subscriber extension class for the LCDD package. - */ -class volumeExtendedSubscriber: virtual public SAXSubscriber -{ -public: - virtual const SAXComponentObject* Build() const; - -public: - volumeExtendedSubscriber(); - - virtual ~volumeExtendedSubscriber(); - - virtual void Activate(const SAXObject* object); -}; - -//DECLARE_SUBSCRIBER_FACTORY(volumeExtendedSubscriber)
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1