Print

Print


Commit in lcdd/include/lcdd on MAIN
bfield/Cartesian3DMagneticFieldMap.hh+46added 1.1
      /G4BoxDipole.hh+39added 1.1
      /G4BoxField.hh+4added 1.1
      /G4Dipole.hh+54added 1.1
      /G4RZFieldMap.hh+54added 1.1
      /G4Solenoid.hh+96added 1.1
      /LCDDFieldManager.hh+47added 1.1
      /MagneticFieldOverlay.hh+31added 1.1
      /RZBData.hh+58added 1.1
core/G4StoreManager.hh+33added 1.1
    /GeometryManager.hh+75added 1.1
    /LCDDDetectorConstruction.hh+45added 1.1
    /LCDDMessenger.hh+47added 1.1
    /LCDDObjectStoreInspector.hh+57added 1.1
    /LCDDParser.hh+84added 1.1
    /LCDDProcessor.hh+117added 1.1
detectors/CalorimeterHitProcessor.hh+24added 1.1
         /CellReadout.hh+64added 1.1
         /CellReadout2D.hh+106added 1.1
         /CellReadout2DSegmentation.hh+40added 1.1
         /Cerenkov.hh+42added 1.1
         /G4CalorimeterSD.hh+67added 1.1
         /G4GlobalGridXYSegmentation.hh+58added 1.1
         /G4GridXYZSegmentation.hh+63added 1.1
         /G4NonprojectiveCylinderSegmentation.hh+47added 1.1
         /G4OpticalCalorimeterSD.hh+36added 1.1
         /G4ProjectiveCylinderSegmentation.hh+31added 1.1
         /G4ProjectiveSegmentation.hh+72added 1.1
         /G4ProjectiveZPlaneSegmentation.hh+31added 1.1
         /G4ScorerSD.hh+22added 1.1
         /G4Segmentation.hh+144added 1.1
         /G4SegmentationFactory.hh+29added 1.1
         /G4SensitiveDetector.hh+303added 1.1
         /G4TrackerCombineSD.hh+48added 1.1
         /G4TrackerSD.hh+41added 1.1
         /G4UnsegmentedCalorimeterSD.hh+24added 1.1
         /HitComparator.hh+18added 1.1
         /PositionComparator.hh+32added 1.1
         /ReadoutUtil.hh+82added 1.1
         /SensitiveDetectorFactory.hh+74added 1.1
         /SensitiveDetectorMessenger.hh+53added 1.1
         /StepReadout.hh+120added 1.1
geant4/G4LimitSet.hh+86added 1.1
      /G4UserRegionInformation.hh+87added 1.1
      /LCDDHeaderRecord.hh+155added 1.1
      /PhysVolId.hh+69added 1.1
      /PhysVolIdMap.hh+72added 1.1
hits/G4CalorimeterHit.hh+143added 1.1
    /G4TrackerHit.hh+136added 1.1
    /McpHitContrib.hh+91added 1.1
    /TrackInformation.hh+165added 1.1
id/Id64bit.hh+61added 1.1
  /IdComparator.hh+23added 1.1
  /IdFactory.hh+86added 1.1
  /IdField.hh+81added 1.1
  /IdManager.hh+93added 1.1
  /IdSpec.hh+127added 1.1
  /IdVec.hh+59added 1.1
schema/AuthorType.hh+49added 1.1
      /BoxDipoleType.hh+128added 1.1
      /CalorimeterType.hh+59added 1.1
      /CellReadout2DSegmentationType.hh+62added 1.1
      /ColorType.hh+70added 1.1
      /CommentType.hh+39added 1.1
      /DetectorType.hh+61added 1.1
      /DipoleCoeffType.hh+38added 1.1
      /DipoleType.hh+81added 1.1
      /FieldMap3DType.hh+42added 1.1
      /FieldMapType.hh+47added 1.1
      /FieldMapTypeProcess.hh+66added 1.1
      /FieldType.hh+87added 1.1
      /FieldTypeProcess.hh+74added 1.1
      /GeneratorType.hh+71added 1.1
      /GlobalFieldType.hh+37added 1.1
      /GlobalGridXYSegmentationType.hh+67added 1.1
      /HeaderType.hh+41added 1.1
      /IdFieldType.hh+71added 1.1
      /IdSpecType.hh+90added 1.1
      /LimitParamType.hh+70added 1.1
      /LimitSetType.hh+74added 1.1
      /LimitType.hh+154added 1.1
      /NonprojectiveCylinderSegmentationType.hh+65added 1.1
      /NonprojectiveSegmentationType.hh+76added 1.1
      /OpticalCalorimeterType.hh+28added 1.1
      /PhysVolIdType.hh+49added 1.1
      /ProjectiveCylinderSegmentationType.hh+53added 1.1
      /ProjectiveZPlaneSegmentationType.hh+53added 1.1
      /RZBType.hh+70added 1.1
      /RZFieldMapType.hh+71added 1.1
      /RegionType.hh+149added 1.1
      /ScorerType.hh+39added 1.1
      /SegmentationType.hh+24added 1.1
      /SensitiveDetectorType.hh+147added 1.1
      /SensitiveDetectorTypeProcess.hh+88added 1.1
      /SolenoidType.hh+95added 1.1
      /TrackerType.hh+39added 1.1
      /UnsegmentedCalorimeterType.hh+31added 1.1
      /VisType.hh+124added 1.1
      /author.hh+31added 1.1
      /box_dipole.hh+34added 1.1
      /calorimeter.hh+30added 1.1
      /calorimeterProcess.hh+43added 1.1
      /cell_readout_2d.hh+31added 1.1
      /color.hh+32added 1.1
      /comment.hh+31added 1.1
      /detector.hh+31added 1.1
      /dipole.hh+30added 1.1
      /dipole_coeff.hh+28added 1.1
      /field.hh+30added 1.1
      /field_map_3d.hh+30added 1.1
      /generator.hh+31added 1.1
      /global_field.hh+31added 1.1
      /global_grid_xy.hh+35added 1.1
      /grid_xyz.hh+32added 1.1
      /header.hh+31added 1.1
      /idfieldElem.hh+30added 1.1
      /idspecElem.hh+31added 1.1
      /limit.hh+30added 1.1
      /limitset.hh+31added 1.1
      /nonprojective_cylinder.hh+32added 1.1
      /optical_calorimeter.hh+31added 1.1
      /physvolidElem.hh+31added 1.1
      /projective_cylinder.hh+32added 1.1
      /projective_zplane.hh+32added 1.1
      /region.hh+29added 1.1
      /rz_field_map.hh+28added 1.1
      /rzb.hh+30added 1.1
      /scorer.hh+30added 1.1
      /sensitive_detector.hh+29added 1.1
      /solenoid.hh+31added 1.1
      /tracker.hh+31added 1.1
      /unsegmented_calorimeter.hh+31added 1.1
      /vis.hh+31added 1.1
subscribers/volumeExtendedSubscriber.hh+48added 1.1
util/ElementNames.icc+203added 1.1
    /GDMLWriter.hh+16added 1.1
    /GDMLWriterMessenger.hh+34added 1.1
    /NistElementsDump.hh+26added 1.1
    /StoreInspector.hh+371added 1.1
    /StringUtil.hh+63added 1.1
    /Verbose.hh+41added 1.1
+8764
141 added files
move headers to subdirectories so they are somewhat organized and not all in one directory

lcdd/include/lcdd/bfield
Cartesian3DMagneticFieldMap.hh added at 1.1
diff -N Cartesian3DMagneticFieldMap.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Cartesian3DMagneticFieldMap.hh	26 Jun 2013 01:32:44 -0000	1.1
@@ -0,0 +1,46 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/Cartesian3DMagneticFieldMap.hh,v 1.1 2013/06/26 01:32:44 jeremy Exp $
+
+// Geant4
+#include "G4MagneticField.hh"
+
+// STL
+#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;
+};
+

lcdd/include/lcdd/bfield
G4BoxDipole.hh added at 1.1
diff -N G4BoxDipole.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4BoxDipole.hh	26 Jun 2013 01:32:44 -0000	1.1
@@ -0,0 +1,39 @@
+#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

lcdd/include/lcdd/bfield
G4BoxField.hh added at 1.1
diff -N G4BoxField.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4BoxField.hh	26 Jun 2013 01:32:44 -0000	1.1
@@ -0,0 +1,4 @@
+class G4BoxField
+{
+
+};

lcdd/include/lcdd/bfield
G4Dipole.hh added at 1.1
diff -N G4Dipole.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4Dipole.hh	26 Jun 2013 01:32:44 -0000	1.1
@@ -0,0 +1,54 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/G4Dipole.hh,v 1.1 2013/06/26 01:32:44 jeremy Exp $
+
+#ifndef LCDD_G4DIPOLE_HH
+#define LCDD_G4DIPOLE_HH 1
+
+#include "G4MagneticField.hh"
+
+#include <vector>
+
+/**
+ * @class G4Dipole
+ * @brief The Geant4 binding for the dipole element.
+ */
+class G4Dipole: public G4MagneticField
+{
+public:
+    G4Dipole()
+    {
+    }
+    virtual ~G4Dipole()
+    {
+    }
+
+public:
+    void GetFieldValue(const double Point[3], double *Bfield) const;
+
+    void setZMax(double zmax);
+    double getZMax();
+
+    void setRMax(double rmax);
+    double getRMax();
+
+    void setZMin(double zmin);
+    double getZMin();
+
+    void addCoeff(double coeff);
+    const std::vector<double>& getCoeffs();
+
+    void setFieldUnit(double unit);
+    double getFieldUnit();
+
+    void setLengthUnit(double unit);
+    double getLengthUnit();
+
+private:
+    double m_zmin;
+    double m_zmax;
+    double m_rmax;
+    double m_lunit;
+    double m_funit;
+    std::vector<double> m_coeffs;
+};
+
+#endif

lcdd/include/lcdd/bfield
G4RZFieldMap.hh added at 1.1
diff -N G4RZFieldMap.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4RZFieldMap.hh	26 Jun 2013 01:32:44 -0000	1.1
@@ -0,0 +1,54 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/G4RZFieldMap.hh,v 1.1 2013/06/26 01:32:44 jeremy Exp $
+
+#ifndef LCDD_G4RZFIELDMAP_HH
+#define LCDD_G4RZFIELDMAP_HH 1
+
+#include "G4MagneticField.hh"
+
+// LCDD
+#include "RZBData.hh"
+
+#include <iostream>
+#include <vector>
+
+/**
+ * @class G4RZFieldMap
+ * @brief Magnetic field defined by rows of r, z, Br and Bz values.
+ */
+class G4RZFieldMap: public G4MagneticField
+{
+
+public:
+
+    G4RZFieldMap(int numBinsR, int numBinsZ, double gridSizeR, double gridSizeZ, std::vector<RZBData> fieldData);
+
+    virtual ~G4RZFieldMap();
+
+public:
+    void GetFieldValue(const double Point[3], double *Bfield) const;
+
+private:
+    void initializeArrays();
+    void fillArrays(std::vector<RZBData> fieldData);
+    void deleteArrays();
+
+private:
+
+    void computeNumBins();
+
+private:
+
+    int m_numBinsR;
+    int m_numBinsZ;
+
+    double m_gridSizeR;
+    double m_gridSizeZ;
+
+    double m_maxR;
+    double m_maxZ;
+
+    double** m_BrArray;
+    double** m_BzArray;
+};
+
+#endif

lcdd/include/lcdd/bfield
G4Solenoid.hh added at 1.1
diff -N G4Solenoid.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4Solenoid.hh	26 Jun 2013 01:32:44 -0000	1.1
@@ -0,0 +1,96 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/G4Solenoid.hh,v 1.1 2013/06/26 01:32:44 jeremy Exp $
+
+#ifndef LCDD_G4SOLENOID_HH
+#define LCDD_G4SOLENOID_HH 1
+
+#include "G4MagneticField.hh"
+
+#include <iostream>
+
+/**
+ @class G4Solenoid
+ @brief Simulation class for a simple magnetic solenoid.
+ */
+class G4Solenoid: public G4MagneticField
+{
+
+public:
+    G4Solenoid();
+    virtual ~G4Solenoid();
+
+public:
+
+    void GetFieldValue(const double Point[3], double *Bfield) const;
+
+    void setInnerField(double d)
+    {
+        _innerField = d;
+    }
+
+    void setOuterField(double d)
+    {
+        _outerField = d;
+    }
+
+    void setInnerR(double d)
+    {
+        _innerR = d;
+    }
+
+    void setOuterR(double d)
+    {
+        _outerR = d;
+    }
+
+    void setInnerZ(double d)
+    {
+        _innerZ = d;
+    }
+
+    void setOuterZ(double d)
+    {
+        _outerZ = d;
+    }
+
+    double getInnerField() const
+    {
+        return _innerField;
+    }
+
+    double getOuterField() const
+    {
+        return _outerField;
+    }
+
+    double getInnerR() const
+    {
+        return _innerR;
+    }
+
+    double getOuterR() const
+    {
+        return _outerR;
+    }
+
+    double getInnerZ() const
+    {
+        return _innerZ;
+    }
+
+    double getOuterZ() const
+    {
+        return _outerZ;
+    }
+
+    void printOut(std::ostream &os);
+
+private:
+    double _innerField;
+    double _outerField;
+    double _innerR;
+    double _outerR;
+    double _innerZ;
+    double _outerZ;
+};
+
+#endif

lcdd/include/lcdd/bfield
LCDDFieldManager.hh added at 1.1
diff -N LCDDFieldManager.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LCDDFieldManager.hh	26 Jun 2013 01:32:44 -0000	1.1
@@ -0,0 +1,47 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/LCDDFieldManager.hh,v 1.1 2013/06/26 01:32:44 jeremy Exp $
+#ifndef LCDD_LCDDFIELDMANAGER_HH
+#define LCDD_LCDDFIELDMANAGER_HH 1
+
+// LCDD
+#include "lcdd/bfield/MagneticFieldOverlay.hh"
+
+// Geant4
+#include "G4FieldManager.hh"
+#include "G4TransportationManager.hh"
+
+class LCDDProcessor;
+
+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

lcdd/include/lcdd/bfield
MagneticFieldOverlay.hh added at 1.1
diff -N MagneticFieldOverlay.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ MagneticFieldOverlay.hh	26 Jun 2013 01:32:44 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/MagneticFieldOverlay.hh,v 1.1 2013/06/26 01:32:44 jeremy Exp $
+#ifndef LCDD_MAGNETICFIELDOVERLAY_HH
+#define LCDD_MAGNETICFIELDOVERLAY_HH 1
+
+#include "G4MagneticField.hh"
+
+#include <vector>
+
+/**
+ * @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

lcdd/include/lcdd/bfield
RZBData.hh added at 1.1
diff -N RZBData.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ RZBData.hh	26 Jun 2013 01:32:44 -0000	1.1
@@ -0,0 +1,58 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/RZBData.hh,v 1.1 2013/06/26 01:32:44 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

lcdd/include/lcdd/core
G4StoreManager.hh added at 1.1
diff -N G4StoreManager.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4StoreManager.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,33 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/core/G4StoreManager.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+
+#ifndef LCDD_G4STOREMANAGER_HH
+#define LCDD_G4STOREMANAGER_HH 1
+
+// FIXME: This class actually needs to do something besides just creating "/stores/" cmd dir.
+
+/**
+ @class G4StoreManager G4StoreManager.hh
+ @brief Singleton manager class for retrieval of
+ G4 solids, LV, PV and regions from stores.
+ @note  Can also dumps/clear G4 stores.
+ */
+class G4StoreManager
+{
+
+protected:
+    G4StoreManager();
+
+public:
+
+    virtual ~G4StoreManager();
+
+public:
+
+    // get singleton instance
+    static G4StoreManager* instance();
+
+private:
+    static G4StoreManager *_instance;
+};
+
+#endif

lcdd/include/lcdd/core
GeometryManager.hh added at 1.1
diff -N GeometryManager.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ GeometryManager.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,75 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/core/GeometryManager.hh,v 1.1 2013/06/26 01:32:45 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

lcdd/include/lcdd/core
LCDDDetectorConstruction.hh added at 1.1
diff -N LCDDDetectorConstruction.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LCDDDetectorConstruction.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,45 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/core/LCDDDetectorConstruction.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef lcdd_LCDDDetectorConstruction_hh
+#define lcdd_LCDDDetectorConstruction_hh 1
+
+// Geant4
+#include "G4VUserDetectorConstruction.hh"
+#include "G4UImessenger.hh"
+
+// STL
+#include <string>
+
+class LCDDDetectorConstructionMessenger;
+class LCDDObjectStoreInspector;
+
+/**
+ * @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

lcdd/include/lcdd/core
LCDDMessenger.hh added at 1.1
diff -N LCDDMessenger.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LCDDMessenger.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,47 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/core/LCDDMessenger.hh,v 1.1 2013/06/26 01:32:45 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

lcdd/include/lcdd/core
LCDDObjectStoreInspector.hh added at 1.1
diff -N LCDDObjectStoreInspector.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LCDDObjectStoreInspector.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,57 @@
+// $Id: LCDDObjectStoreInspector.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_LCDDOBJECTSTOREINSPECTOR_HH
+#define LCDD_LCDDOBJECTSTOREINSPECTOR_HH 1
+
+// LCDD
+#include "lcdd/util/StoreInspector.hh"
+#include "lcdd/id/IdManager.hh"
+#include "lcdd/core/LCDDProcessor.hh"
+
+/**
+ * @brief Creates 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

lcdd/include/lcdd/core
LCDDParser.hh added at 1.1
diff -N LCDDParser.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LCDDParser.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,84 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/core/LCDDParser.hh,v 1.1 2013/06/26 01:32:45 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

lcdd/include/lcdd/core
LCDDProcessor.hh added at 1.1
diff -N LCDDProcessor.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LCDDProcessor.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,117 @@
+#ifndef LCDD_LCDDPROCESSOR_HH
+#define LCDD_LCDDPROCESSOR_HH 1
+
+// Geant4
+#include "G4MagneticField.hh"
+#include "G4Region.hh"
+#include "G4VisAttributes.hh"
+
+// LCDD
+#include "lcdd/detectors/G4SensitiveDetector.hh"
+#include "lcdd/geant4/G4LimitSet.hh"
+#include "lcdd/geant4/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

lcdd/include/lcdd/detectors
CalorimeterHitProcessor.hh added at 1.1
diff -N CalorimeterHitProcessor.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CalorimeterHitProcessor.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,24 @@
+#ifndef lcdd_CalorimeterHitProcessor_hh
+#define lcdd_CalorimeterHitProcessor_hh 1
+
+// Geant4
+#include "G4Step.hh"
+
+// LCDD
+#include "lcdd/detectors/CellReadout.hh"
+
+class CalorimeterHitProcessor
+{
+
+public:
+    CalorimeterHitProcessor(CellReadout*);
+    virtual ~CalorimeterHitProcessor();
+
+public:
+    bool processHits(G4Step*);
+
+private:
+    CellReadout* m_readout;
+};
+
+#endif

lcdd/include/lcdd/detectors
CellReadout.hh added at 1.1
diff -N CellReadout.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CellReadout.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,64 @@
+#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

lcdd/include/lcdd/detectors
CellReadout2D.hh added at 1.1
diff -N CellReadout2D.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CellReadout2D.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,106 @@
+#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

lcdd/include/lcdd/detectors
CellReadout2DSegmentation.hh added at 1.1
diff -N CellReadout2DSegmentation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CellReadout2DSegmentation.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,40 @@
+#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

lcdd/include/lcdd/detectors
Cerenkov.hh added at 1.1
diff -N Cerenkov.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Cerenkov.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,42 @@
+/* ------------------------------------------------------------------------
+ |\___/|       
+ )     (    
+ =\     /=
+ )===(
+ /     \         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
+

lcdd/include/lcdd/detectors
G4CalorimeterSD.hh added at 1.1
diff -N G4CalorimeterSD.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4CalorimeterSD.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,67 @@
+// $Id: G4CalorimeterSD.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_G4CALORIMETERSD_HH
+#define LCDD_G4CALORIMETERSD_HH 1
+
+// Geant4
+#include "lcdd/detectors/G4SensitiveDetector.hh"
+#include "lcdd/detectors/HitComparator.hh"
+#include "lcdd/hits/G4CalorimeterHit.hh"
+#include "lcdd/detectors/G4Segmentation.hh"
+
+// class G4Segmentation
+
+/**
+ @class G4CalorimeterSD
+ @brief Simulator implementation of calorimeter-type SD.
+ */
+class G4CalorimeterSD: public G4SensitiveDetector
+{
+
+public:
+
+    typedef std::vector<G4CalorimeterHit*> G4CalorimeterHitList;
+
+public:
+    G4CalorimeterSD(G4String sdName, G4String hcName, G4Segmentation* sdSeg, HitComparator* compare = 0);
+
+    G4CalorimeterSD(G4String sdName, const std::vector<G4String>& hcNames, G4Segmentation* sdSeg, HitComparator* compare = 0);
+
+    virtual ~G4CalorimeterSD();
+
+public:
+
+    virtual bool isValidVolume(G4LogicalVolume* lv);
+
+    virtual void Initialize(G4HCofThisEvent *);
+    virtual void EndOfEvent(G4HCofThisEvent *);
+
+    G4Segmentation* getSegmentation() const;
+
+    G4CalorimeterHit* findHit(G4CalorimeterHit* aHit) const;
+    G4CalorimeterHit* findHit(G4CalorimeterHit* aHit, G4int nHC) const;
+
+    std::ostream& printHits(std::ostream& os);
+
+    void clearHits();
+
+    virtual std::ostream& printBasicInfo(std::ostream& os);
+
+    virtual double getEdep() const;
+    virtual double getEdep(G4int nHC) const;
+
+    G4CalorimeterHitList getCalorimeterHitList();
+    G4CalorimeterHitList getCalorimeterHitList(G4int nHC);
+
+protected:
+    virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
+
+protected:
+    G4Segmentation* m_segmentation;
+    G4CalorimeterHitsCollection* m_collection;
+    std::vector<G4CalorimeterHitsCollection*> m_hitsCollections;
+    G4CalorimeterHitList m_hits;
+    std::vector<G4CalorimeterHitList> hits_vector;
+    HitComparator* m_hitCompare;
+};
+
+#endif

lcdd/include/lcdd/detectors
G4GlobalGridXYSegmentation.hh added at 1.1
diff -N G4GlobalGridXYSegmentation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4GlobalGridXYSegmentation.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,58 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/G4GlobalGridXYSegmentation.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_G4GLOBALGRIDXYSEGMENTATION_HH
+#define LCDD_G4GLOBALGRIDXYSEGMENTATION_HH 1
+
+#include "G4Segmentation.hh"
+
+#include "globals.hh"
+
+/**
+ * @class G4GridXYSegmentation
+ * @brief Uniform 3D grid segmentation class.
+ * @note  Version of grid segmentation with binning on global coordinates, not local.
+ */
+class G4GlobalGridXYSegmentation: public G4Segmentation
+{
+
+public:
+
+    G4GlobalGridXYSegmentation(double gridSizeX, double gridSizeY);
+
+    virtual ~G4GlobalGridXYSegmentation();
+
+public:
+
+    // from par class
+    virtual G4ThreeVector getGlobalHitPos(const G4Step* aStep);
+
+    // hit position from step position
+    G4ThreeVector getLocalHitPos(const G4ThreeVector& localStepPos);
+
+    virtual void setBins(const G4Step* aStep);
+
+    virtual void setBinNames()
+    {
+        addBinName("x");
+        addBinName("y");
+    }
+
+protected:
+
+    // compute signed int bin values with base at local origin
+    int computeBinX(const G4ThreeVector& localStepPos);
+    int computeBinY(const G4ThreeVector& localStepPos);
+    int computeBinZ(const G4ThreeVector& localStepPos);
+
+    // individual position dim from bin 
+    double computeDimX(int bin);
+    double computeDimY(int bin);
+    double computeDimZ(int bin);
+
+private:
+
+    double m_gridSizeX;
+    double m_gridSizeY;
+    double m_gridSizeZ;
+};
+
+#endif

lcdd/include/lcdd/detectors
G4GridXYZSegmentation.hh added at 1.1
diff -N G4GridXYZSegmentation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4GridXYZSegmentation.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,63 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/G4GridXYZSegmentation.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_G4GRIDXYZSEGMENTATION_HH
+#define LCDD_G4GRIDXYZSEGMENTATION_HH 1
+
+#include "G4Segmentation.hh"
+
+#include "globals.hh"
+
+/**
+ * @class G4GridXYZSegmentation
+ * @brief Uniform 3D grid segmentation class.
+ * @note  This class performs calculations to divide a box-like 
+ *        volume into a uniform, 3D grid with square cells.
+ */
+class G4GridXYZSegmentation: public G4Segmentation
+{
+
+public:
+
+    G4GridXYZSegmentation(double gridSizeX, double gridSizeY, double gridSizeZ);
+
+    virtual ~G4GridXYZSegmentation();
+
+public:
+
+    // from par class
+    virtual G4ThreeVector getGlobalHitPos(const G4Step* aStep);
+
+    virtual void setBins(const G4Step* aStep);
+
+    // DEPRECATED
+    virtual G4ThreeVector getGlobalHitPosPreStep(const G4StepPoint* aPreStepPoint);
+
+    // DEPRECATED
+    virtual G4ThreeVector getLocalHitPos(const G4ThreeVector& localStepPos);
+
+    virtual void setBinNames()
+    {
+        addBinName("x");
+        addBinName("y");
+        addBinName("z");
+    }
+
+protected:
+
+    // compute signed int bin values with base at local origin
+    int computeBinX(const G4ThreeVector& localStepPos);
+    int computeBinY(const G4ThreeVector& localStepPos);
+    int computeBinZ(const G4ThreeVector& localStepPos);
+
+    // individual position dim from bin 
+    double computeDimX(int bin);
+    double computeDimY(int bin);
+    double computeDimZ(int bin);
+
+private:
+
+    double m_gridSizeX;
+    double m_gridSizeY;
+    double m_gridSizeZ;
+};
+
+#endif

lcdd/include/lcdd/detectors
G4NonprojectiveCylinderSegmentation.hh added at 1.1
diff -N G4NonprojectiveCylinderSegmentation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4NonprojectiveCylinderSegmentation.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,47 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/G4NonprojectiveCylinderSegmentation.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_G4NONPROJECTIVECYLINDERSEGMENTATION
+#define LCDD_G4NONPROJECTIVECYLINDERSEGMENTATION 1
+
+#include "G4Segmentation.hh"
+
+/**
+ @class G4NonprojectiveCylinderSegmentation
+ @brief Segmentation using a nonprojective cylinder.
+ */
+class G4NonprojectiveCylinderSegmentation: public G4Segmentation
+{
+public:
+    G4NonprojectiveCylinderSegmentation(double gridSizePhi, double gridSizeZ);
+    virtual ~G4NonprojectiveCylinderSegmentation();
+
+public:
+
+    virtual G4ThreeVector getGlobalHitPos(const G4Step* aStep);
+    virtual G4ThreeVector getGlobalHitPos(const G4StepPoint* aPreStepPoint);
+    virtual void setBins(const G4Step* aStep);
+    virtual void setBins(const G4StepPoint* aPreStepPoint);
+    virtual void setBinNames()
+    {
+        addBinName("phi");
+        addBinName("z");
+    }
+
+    G4ThreeVector getLocalHitPos(const G4Step* aStep);
+    G4ThreeVector getLocalHitPos(const G4StepPoint* aPreStepPoint);
+    virtual bool isValidSolid(G4VSolid*);
+
+private:
+
+    double computeDeltaPhi(const G4Step* aStep);
+    double computeDeltaPhi(const G4StepPoint* aPreStepPoint);
+    int computeBinPhi(const G4Step* aStep);
+    int computeBinPhi(const G4StepPoint* aPreStepPoint);
+    int computeBinZ(const G4ThreeVector& localStepPos);
+
+private:
+
+    double m_gridSizePhi;
+    double m_gridSizeZ;
+};
+
+#endif

lcdd/include/lcdd/detectors
G4OpticalCalorimeterSD.hh added at 1.1
diff -N G4OpticalCalorimeterSD.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4OpticalCalorimeterSD.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,36 @@
+#ifndef LCDD_G4OPTICALCALORIMETERSD_HH
+#define LCDD_G4OPTICALCALORIMETERSD_HH
+
+// slic
+#include "G4CalorimeterSD.hh"
+
+// stl
+#include <vector>
+class Cerenkov;
+
+/**
+ @class G4OpticalCalorimeterSD
+ @brief Simulator implementation of a calorimeter SD that is sensitive to optical photons.
+ */
+class G4OpticalCalorimeterSD: public G4CalorimeterSD
+{
+private:
+    Cerenkov* CerenGenerator;
+public:
+    //enum for the two Hit Collections (cerenkov and edep):
+    enum HCType
+    {
+        eEdep = 0, eCerenkov = 1
+    };
+
+    G4OpticalCalorimeterSD(G4String sdName, G4String hcName, G4Segmentation* sdSeg, HitComparator* compare = 0);
+
+    G4OpticalCalorimeterSD(G4String sdName, const std::vector<G4String>& hcNames, G4Segmentation* sdSeg, HitComparator* compare = 0);
+
+    virtual ~G4OpticalCalorimeterSD();
+
+protected:
+    virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
+};
+
+#endif

lcdd/include/lcdd/detectors
G4ProjectiveCylinderSegmentation.hh added at 1.1
diff -N G4ProjectiveCylinderSegmentation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4ProjectiveCylinderSegmentation.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/G4ProjectiveCylinderSegmentation.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_G4PROJECTIVECYLINDERSEGMENTATION_HH
+#define LCDD_G4PROJECTIVECYLINDERSEGMENTATION_HH 1
+
+#include "G4ProjectiveSegmentation.hh"
+
+#include "globals.hh"
+
+/**
+ @class G4ProjectiveCylinderSegmentation
+ @brief Simulation class for projective cylinder segmentation.
+ */
+class G4ProjectiveCylinderSegmentation: public G4ProjectiveSegmentation
+{
+
+public:
+    G4ProjectiveCylinderSegmentation(G4int ntheta, G4int nphi);
+
+    virtual ~G4ProjectiveCylinderSegmentation();
+
+    virtual bool isValidSolid(G4VSolid* s);
+
+protected:
+
+    virtual double getRadius(const G4Step* aStep);
+    virtual double getZ(const G4Step* aStep);
+    virtual double getRadius(const G4StepPoint* aPreStepPoint);
+    virtual double getZ(const G4StepPoint* aPreStepPoint);
+};
+
+#endif

lcdd/include/lcdd/detectors
G4ProjectiveSegmentation.hh added at 1.1
diff -N G4ProjectiveSegmentation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4ProjectiveSegmentation.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,72 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/G4ProjectiveSegmentation.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_G4PROJECTIVESEGMENTATION_HH
+#define LCDD_G4PROJECTIVESEGMENTATION_HH 1
+
+#include "G4Segmentation.hh"
+
+#include "globals.hh"
+
+/**
+ @class G4ProjectiveSegmentation
+ @brief Generic projective segmentation class.
+ */
+class G4ProjectiveSegmentation: public G4Segmentation
+{
+
+public:
+    G4ProjectiveSegmentation(int ntheta, int nphi);
+
+    virtual ~G4ProjectiveSegmentation();
+
+public:
+
+    // virtuals from G4Segmentation; should not be overridden
+    // in subclasses
+    G4ThreeVector getGlobalHitPos(const G4Step* aStep);
+    G4ThreeVector getGlobalHitPos(const G4StepPoint* aPreStepPoint);
+    void setBins(const G4Step* aStep);
+    void setBins(const G4StepPoint* aPreStepPoint);
+    virtual void setBinNames()
+    {
+        addBinName("theta");
+        addBinName("phi");
+    }
+
+protected:
+
+    int getNtheta() const;
+    int getNphi() const;
+
+    // bins from 3vect pos
+    int getThetaBin(const G4ThreeVector& globalStepPos);
+    int getPhiBin(const G4ThreeVector& globalStepPos);
+
+    // dim from bin
+    double getThetaDim(const int &thetaBin) const;
+    double getPhiDim(const int &phiBin) const;
+
+    // dim from step
+    double getThetaDim(const G4Step* aStep);
+    // dim from prestep
+    double getThetaDim(const G4StepPoint* aPreStepPoint);
+
+    double getPhiDim(const G4Step* aStep);
+    // dim from prestep point:
+    double getPhiDim(const G4StepPoint* aPreStepPoint);
+
+    // These should be overridden in subclasses 
+    // for a specific shape or orientation.
+    virtual double getRadius(const G4Step* aStep);
+    virtual double getZ(const G4Step* aStep);
+    virtual double getRadius(const G4StepPoint* aPreStepPoint);
+    virtual double getZ(const G4StepPoint* aPreStepPoint);
+private:
+
+    void computeDivisions();
+
+private:
+    int m_ntheta, m_nphi;
+    double m_divTheta, m_divPhi;
+};
+
+#endif

lcdd/include/lcdd/detectors
G4ProjectiveZPlaneSegmentation.hh added at 1.1
diff -N G4ProjectiveZPlaneSegmentation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4ProjectiveZPlaneSegmentation.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/G4ProjectiveZPlaneSegmentation.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_G4PROJECTIVEZPLANESEGMENTATION_HH
+#define LCDD_G4PROJECTIVEZPLANESEGMENTATION_HH 1
+
+#include "G4ProjectiveSegmentation.hh"
+
+#include "globals.hh"
+
+/**
+ @class G4ProjectiveZPlaneSegmentation
+ @brief Projective segmentation using Z.
+ @note  This class uses Z from current volume
+ rather than the cylindrical radius.          
+ */
+class G4ProjectiveZPlaneSegmentation: public G4ProjectiveSegmentation
+{
+
+public:
+    G4ProjectiveZPlaneSegmentation(int ntheta, int nphi);
+
+    virtual ~G4ProjectiveZPlaneSegmentation();
+
+protected:
+
+    virtual double getRadius(const G4Step* aStep);
+    virtual double getZ(const G4Step* aStep);
+    virtual double getRadius(const G4StepPoint* aPreStepPoint);
+    virtual double getZ(const G4StepPoint* aPreStepPoint);
+};
+
+#endif

lcdd/include/lcdd/detectors
G4ScorerSD.hh added at 1.1
diff -N G4ScorerSD.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4ScorerSD.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,22 @@
+#ifndef LCDD_G4SCORERSD_HH
+#define LCDD_G4SCORERSD_HH 1
+
+#include "G4TrackerSD.hh"
+
+/**
+ * @class G4ScorerSD
+ * @brief Scoring plane sensitive detector.
+ */
+class G4ScorerSD: public G4TrackerSD
+{
+public:
+    G4ScorerSD(G4String sdName, G4String hcName);
+
+protected:
+    virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
+
+protected:
+    int m_currentTrackID;
+};
+
+#endif

lcdd/include/lcdd/detectors
G4Segmentation.hh added at 1.1
diff -N G4Segmentation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4Segmentation.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,144 @@
+#ifndef LCDD_G4SEGMENTATION_HH
+#define LCDD_G4SEGMENTATION_HH 1
+
+// G4
+#include "G4ThreeVector.hh"
+#include "G4Step.hh"
+
+// std
+#include <iostream>
+#include <vector>
+
+/**
+ * @class G4Segmentation
+ * @brief Segmentation base class.
+ * @todo Add method setVolume(G4LogicalVolume*) for setting up segmentation with current step volume.
+ */
+class G4Segmentation
+{
+public:
+    enum EType
+    {
+        eProjective = 1, eNonprojective
+    };
+    typedef std::vector<std::string> BinNames;
+
+public:
+    G4Segmentation(EType segType, int nbins = 2);
+    virtual ~G4Segmentation();
+
+public:
+
+    /**
+     * Compute the global hit position from a step.
+     */
+    virtual G4ThreeVector getGlobalHitPos(const G4Step* aStep);
+
+    /**
+     * Set the identifier bin values from a step.
+     */
+    virtual void setBins(const G4Step*) = 0;
+
+    /**
+     * Add valid bin names to this segmentation.
+     */
+    virtual void setBinNames() = 0;
+
+    /**
+     * Compute the bin given a coordinate in one dimension.
+     */
+    static int computeBin(double localDim, double gridDim)
+    {
+        return int(floor(localDim / gridDim));
+
+    }
+
+    /**
+     * Compute the coordinate in one dimension given a bin value.
+     */
+    static double computeDim(const int &bin, const double &incr)
+    {
+        return (double(bin) + .5) * incr;
+    }
+
+    // DEPRECATED
+    // Used by G4OpticalCalorimeter only.
+    virtual G4ThreeVector getGlobalHitPosPreStep(const G4StepPoint* aPreStepPoint);
+
+    // DEPRECATED
+    // Used by G4OpticalCalorimeter only.
+    G4ThreeVector getLocalHitPos(const G4ThreeVector& localStepPos);
+
+    void resetBins();
+
+    EType getType();
+
+    inline const G4String& getTypeString()
+    {
+        static G4String typestr;
+        if (m_type == eProjective) {
+            typestr = "Projective";
+        } else if (m_type == eNonprojective) {
+            typestr = "Nonprojective";
+        } else {
+            typestr = "Unknown";
+        }
+
+        return typestr;
+    }
+
+    inline int getBin(int idx)
+    {
+        return m_bins.at(idx);
+    }
+
+    inline const std::string& getBinName(int idx)
+    {
+        return m_binNames.at(idx);
+    }
+
+    inline void addBinName(const std::string& binName)
+    {
+        m_binNames.push_back(binName);
+    }
+
+    void setBin(int binIdx, int binVal);
+
+    int getNumberOfBins();
+
+    const std::vector<int>& getBins();
+
+    const std::vector<std::string>& getBinNames()
+    {
+        return m_binNames;
+    }
+
+    // Print the bins.
+    void printOutBins(std::ostream& os)
+    {
+        printOutBins(os, m_bins);
+    }
+
+    static void printOutBins(std::ostream& os, const std::vector<int>& bins);
+
+    /*
+     * Check whether the solid is valid for this segmentation.
+     */
+    virtual bool isValidSolid(G4VSolid*);
+
+private:
+
+    // bin values
+    std::vector<int> m_bins;
+
+    // bin names
+    BinNames m_binNames;
+
+    // number of numbers
+    int m_numBins;
+
+    // type of segmentation
+    EType m_type;
+};
+
+#endif

lcdd/include/lcdd/detectors
G4SegmentationFactory.hh added at 1.1
diff -N G4SegmentationFactory.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4SegmentationFactory.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,29 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/G4SegmentationFactory.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_G4SEGMENTATIONFACTORY_HH
+#define LCDD_G4SEGMENTATIONFACTORY_HH 1
+
+class G4Segmentation;
+class SAXObject;
+
+// std
+#include <string>
+
+/**
+ @class G4SegmentationFactory
+ @brief Returns a concrete segmentation object depending on input tag.
+ @note  Includes a single, static method.
+ */
+class G4SegmentationFactory
+{
+private:
+
+    // should not be instantiated
+    G4SegmentationFactory()
+    {
+    }
+
+public:
+    static G4Segmentation* createSegmentation(SAXObject* obj, const std::string& tag);
+};
+
+#endif

lcdd/include/lcdd/detectors
G4SensitiveDetector.hh added at 1.1
diff -N G4SensitiveDetector.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4SensitiveDetector.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,303 @@
+#ifndef LCDD_G4SENSITIVEDETECTOR_HH
+#define LCDD_G4SENSITIVEDETECTOR_HH 1
+
+// Geant4
+#include "G4VSensitiveDetector.hh"
+#include "G4UnitsTable.hh"
+
+// LCDD
+#include "lcdd/detectors/StepReadout.hh"
+#include "lcdd/id/IdSpec.hh"
+#include "lcdd/id/Id64bit.hh"
+
+class G4UImessenger;
+class G4VHitsCollection;
+
+/**
+ * @brief Basic implementation of G4VSensitiveDetector.
+ * @note  Primary attributes include verbosity, energy cut,
+ *        IdSpec,and hits collections.
+ */
+class G4SensitiveDetector: public G4VSensitiveDetector, protected StepReadout
+{
+public:
+
+    /**
+     * EType indicates the basic type of detector, e.g. tracker or calorimeter.
+     */
+    enum EType
+    {
+        eNone = 0, eTracker = 1, eCalorimeter = 2
+    };
+
+    static const std::string& trackerStr;
+    static const std::string& calorimeterStr;
+    static const std::string& noneStr;
+
+public:
+
+    G4SensitiveDetector(G4String sdName, G4String hcName, EType sdType);
+
+    G4SensitiveDetector(G4String sdName, const std::vector<G4String>& hcNames, EType sdType);
+
+    virtual ~G4SensitiveDetector();
+
+public:
+
+    /**
+     * Geant4 initialization function called at beginning of event.
+     */
+    virtual void Initialize(G4HCofThisEvent *);
+
+    /**
+     * Geant4 EndOfEvent hook.
+     */
+    virtual void EndOfEvent(G4HCofThisEvent *);
+
+protected:
+
+    /**
+     * Geant4 function to make hits from the step.
+     */
+    virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
+
+public:
+
+    /**
+     * Return the type of this detector encoded as an int.
+     */
+    inline G4SensitiveDetector::EType getType() const
+    {
+        return m_type;
+    }
+
+    /**
+     * Return the type of this detector encoded as a string.
+     */
+    inline const std::string& getTypeString() const;
+
+    /**
+     * Return the hits collection ID associated with this detector.
+     */
+    inline G4int getHCID() const
+    {
+        return m_hcids[0];
+    }
+
+    inline G4int getHCID(G4int nHC) const
+    {
+        if (nHC > getNumberOfHitsCollections() + 1 || nHC < 0) {
+            G4cerr << "The index " << nHC << " is not valid for SD " << this->GetName() << "." << G4endl;
+            G4Exception("", "", FatalException, "Invalid index.");
+        }
+        return m_hcids[nHC];
+    }
+
+    /**
+     * Check whether the G4LogicalVolume can be readout by this detector. 
+     * Base function just returns if the volume was assigned to this detector.
+     */
+    inline virtual bool isValidVolume(G4LogicalVolume* lv)
+    {
+        return lv != 0;
+    }
+
+    /**
+     * Return the hits collection name associated with this detector.
+     */
+    inline const std::string& getHCName() const
+    {
+        return collectionName[0];
+    }
+
+    inline const std::string& getHCName(G4int nHC) const
+    {
+        return collectionName[nHC];
+    }
+
+    /**
+     * Set the verbosity level of this detector.
+     */
+    inline void setVerbose(unsigned int v)
+    {
+        m_verbose = v;
+    }
+
+    /**
+     * Get the verbosity level of this detector.
+     */
+    inline unsigned int getVerbose() const
+    {
+        return m_verbose;
+    }
+
+    /**
+     * Return the hit energy cut of this detector.
+     */
+    inline G4double getEcut()
+    {
+        return m_ecut;
+    }
+
+    /**
+     * Set the hit energy cut of this detector.
+     */
+    inline void setEcut(G4double ecut)
+    {
+        m_ecut = ecut;
+    }
+
+    /**
+     * Set the identifier specification for this detector.
+     */
+    inline void setIdSpec(IdSpec* idspec)
+    {
+        m_idspec = idspec;
+    }
+
+    /**
+     * Return the identifier specification for this detector.
+     */
+    inline IdSpec* getIdSpec() const
+    {
+        return m_idspec;
+    }
+
+    /**
+     * Returns whether or not this detector has an associated identifier specification.
+     */
+    inline bool hasIdSpec() const
+    {
+        return m_idspec != 0;
+    }
+
+    /**
+     * Create a 64-bit identifier based on the current step information.
+     */
+    Id64bit makeId() const;
+
+    /**
+     * Set the endcap flag.
+     */
+    inline void setEndcapFlag( bool ec = true )
+    {
+        m_endcap = ec;
+    }
+
+    /**
+     * Return the endcap flag.
+     */
+    inline bool getEndcapFlag()
+    {
+        return m_endcap;
+    }
+
+    /**
+     * Print basic information about this detector to the output stream.
+     */
+    virtual std::ostream& printBasicInfo(std::ostream& os);
+
+    /**
+     * Print the number of hits to the output stream.
+     */
+    virtual std::ostream& printNumberOfHits(std::ostream& os);
+
+    /**
+     * Print the number of hits to the output stream.
+     */
+    virtual std::ostream& printEdep(std::ostream& os);
+
+    /**
+     * Print the names of volumes associated to this detector.
+     */
+    virtual std::ostream& printVolumes(std::ostream& os);
+
+    /**
+     * Print the list of hits.  Subclasses must implement this.
+     */
+    virtual std::ostream& printHits(std::ostream& os) {return os;}
+
+    /**
+     * Get single (first) HC associated with this detector.
+     */
+    G4VHitsCollection* getHitsCollection() const;
+
+    /**
+     * Retrieve the hits collection associated with this detector,
+     * using the hits collection ID (HCID).
+     */
+    G4VHitsCollection* getHitsCollection(G4int) const;
+
+    /**
+     * Get the number of hits collections in this SD.
+     */
+    inline int getNumberOfHitsCollections() const {return m_hcids.size();}
+
+    /**
+     * Return the total energy deposition from the hits of this detector.
+     * Requires access to concrete hit types, so this function must be
+     * implemented by subclasses.
+     */
+    virtual double getEdep() const {return 0.0;}
+
+    /**
+     * Return a list of G4LogicalVolume objects that have been assigned
+     * this sensitive detector.
+     */
+    std::vector<G4LogicalVolume*> getLogicalVolumes() const;
+
+    /**
+     * Subclasses need to implement this method.
+     */
+    virtual void clearHits() {;}
+
+protected:
+
+    /**
+     * Set the Hits Collection ID for a single collection.
+     */
+    inline void setHCID(G4int hcid)
+    {
+        m_hcids[0] = hcid;
+    }
+
+    /**
+     * Set the Hits Collection ID for a given collection.
+     */
+    inline void setHCID(G4int hcid, G4int nHC)
+    {
+        if ( nHC > getNumberOfHitsCollections() + 1 || nHC < 0)
+        {
+            G4cerr << this->GetName() << "setHCID Nr of HC"<< nHC << "not valid"<< G4endl;
+            G4Exception("", "", FatalException, "Bad HC index.");
+        }
+        m_hcids[nHC] = hcid;
+    }
+
+protected:
+
+    // vector containing Hit Collection ID's
+                    std::vector<G4int> m_hcids;
+
+                    // verbosity
+                    unsigned int m_verbose;
+
+                    // endcap flag for LCIO's CHBIT_BARREL bit
+                    bool m_endcap;
+
+                    // energy cut
+                    double m_ecut;
+
+                    // identifier field description
+                    IdSpec* m_idspec;
+
+                private:
+
+                    // type = calorimeter or tracker
+                    EType m_type;
+
+                    // The Geant4 command messenger associated with this detector.
+                    G4UImessenger* m_messenger;
+                };
+
+#endif

lcdd/include/lcdd/detectors
G4TrackerCombineSD.hh added at 1.1
diff -N G4TrackerCombineSD.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4TrackerCombineSD.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,48 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/G4TrackerCombineSD.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_G4TRACKERCOMBINESD_HH
+#define LCDD_G4TRACKERCOMBINESD_HH 1
+
+#include "G4TrackerSD.hh"
+
+/**
+ * @class G4TrackerCombineSD
+ * @brief Tracker subclass to combine multiple hits in the same tracker layer
+ *        into a single hit having the mean momentum and position.
+ * @note  The logic in this class is based on a refactoring of Mokka's TRKSD00.
+ */
+class G4TrackerCombineSD: public G4TrackerSD
+{
+public:
+    G4TrackerCombineSD(G4String sdName, G4String hcName);
+
+    virtual ~G4TrackerCombineSD();
+
+public:
+    virtual void EndOfEvent(G4HCofThisEvent *);
+
+protected:
+    virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
+
+private:
+
+    void startHit(G4StepPoint* aStepPoint);
+    void updateHit();
+    bool insertHit();
+    void clear();
+
+private:
+
+    bool m_combineHits;
+    int m_currentTrackID;
+    G4VPhysicalVolume* m_currentPV;
+    G4ThreeVector m_entryPoint;
+    G4ThreeVector m_exitPoint;
+    G4ThreeVector m_entryMomentum;
+    G4ThreeVector m_exitMomentum;
+    G4double m_edepTotal;
+    G4double m_minTime;
+    bool m_startedHit;
+    G4Track* m_currentTrack;
+};
+
+#endif

lcdd/include/lcdd/detectors
G4TrackerSD.hh added at 1.1
diff -N G4TrackerSD.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4TrackerSD.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,41 @@
+#ifndef LCDD_G4TRACKERSD_HH
+#define LCDD_G4TRACKERSD_HH 1
+
+// LCDD
+#include "lcdd/detectors/G4SensitiveDetector.hh"
+#include "lcdd/hits/G4TrackerHit.hh"
+
+/**
+ * @brief Geant4 binding for a tracker-type SD.
+ */
+class G4TrackerSD: public G4SensitiveDetector
+{
+public:
+
+    typedef std::vector<G4TrackerHit*> G4TrackerHitList;
+
+public:
+    G4TrackerSD(G4String sdName, G4String hcName);
+
+    virtual ~G4TrackerSD();
+
+public:
+    virtual void Initialize(G4HCofThisEvent *);
+    virtual void EndOfEvent(G4HCofThisEvent *);
+    std::ostream& printHits(std::ostream& os);
+
+    double getEdep() const;
+
+    void clearHits();
+
+    G4TrackerHitList getTrackerHitList();
+
+protected:
+    virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
+
+protected:
+    G4TrackerHitsCollection* m_HC;
+    G4TrackerHitList m_hits;
+};
+
+#endif

lcdd/include/lcdd/detectors
G4UnsegmentedCalorimeterSD.hh added at 1.1
diff -N G4UnsegmentedCalorimeterSD.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4UnsegmentedCalorimeterSD.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,24 @@
+// $Id: G4UnsegmentedCalorimeterSD.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+
+#ifndef G4UNSEGMENTEDCALORIMETERSD_HH_
+#define G4UNSEGMENTEDCALORIMETERSD_HH_
+
+#include "G4CalorimeterSD.hh"
+
+/**
+ * @class UnsegmentedCalorimeterSD
+ * @brief A sensitive detector that writes out a CalorimeterHit for
+ *        each step.  It does not have any segmentation.
+ */
+class G4UnsegmentedCalorimeterSD: public G4CalorimeterSD
+{
+public:
+
+    G4UnsegmentedCalorimeterSD(G4String sdName, G4String hcName, G4Segmentation* seg);
+
+protected:
+
+    virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
+};
+
+#endif /* G4UNSEGMENTEDCALORIMETERSD_HH_ */

lcdd/include/lcdd/detectors
HitComparator.hh added at 1.1
diff -N HitComparator.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ HitComparator.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,18 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/HitComparator.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_HITCOMPARATOR_HH
+#define LCDD_HITCOMPARATOR_HH 1
+
+#include "lcdd/hits/G4CalorimeterHit.hh"
+
+class HitComparator
+{
+public:
+    virtual ~HitComparator()
+    {
+    }
+
+public:
+    virtual bool compare(const G4CalorimeterHit&, const G4CalorimeterHit&) = 0;
+};
+
+#endif

lcdd/include/lcdd/detectors
PositionComparator.hh added at 1.1
diff -N PositionComparator.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ PositionComparator.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,32 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/PositionComparator.hh,v 1.1 2013/06/26 01:32:45 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

lcdd/include/lcdd/detectors
ReadoutUtil.hh added at 1.1
diff -N ReadoutUtil.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ReadoutUtil.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,82 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/ReadoutUtil.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+#ifndef LCDD_READOUTUTIL_HH
+#define LCDD_READOUTUTIL_HH 1
+
+// LCDD
+#include "lcdd/core/LCDDProcessor.hh"
+
+// Geant4
+#include "G4VSolid.hh"
+#include "G4VPhysicalVolume.hh"
+#include "G4Tubs.hh"
+#include "G4StepPoint.hh"
+#include "G4NavigationHistory.hh"
+#include "G4ThreeVector.hh"
+
+// STL
+#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

lcdd/include/lcdd/detectors
SensitiveDetectorFactory.hh added at 1.1
diff -N SensitiveDetectorFactory.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SensitiveDetectorFactory.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,74 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/SensitiveDetectorFactory.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+
+// LCDD
+#include "lcdd/core/LCDDProcessor.hh"
+
+#include "lcdd/schema/SensitiveDetectorType.hh"
+#include "lcdd/schema/calorimeter.hh"
+#include "lcdd/schema/tracker.hh"
+#include "lcdd/schema/scorer.hh"
+#include "lcdd/schema/IdSpecType.hh"
+#include "lcdd/detectors/G4SensitiveDetector.hh"
+#include "lcdd/detectors/G4SegmentationFactory.hh"
+
+#include "lcdd/id/IdManager.hh"
+#include "lcdd/id/IdSpec.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);
+};

lcdd/include/lcdd/detectors
SensitiveDetectorMessenger.hh added at 1.1
diff -N SensitiveDetectorMessenger.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SensitiveDetectorMessenger.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,53 @@
+#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;
+
+/**
+ * @brief G4UImessenger subclass that automatically provides a macro command interface
+ *        to the sensitive detectors registered with 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

lcdd/include/lcdd/detectors
StepReadout.hh added at 1.1
diff -N StepReadout.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ StepReadout.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,120 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/StepReadout.hh,v 1.1 2013/06/26 01:32:45 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

lcdd/include/lcdd/geant4
G4LimitSet.hh added at 1.1
diff -N G4LimitSet.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4LimitSet.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,86 @@
+#ifndef LCDD_G4LIMITSET_HH
+#define LCDD_G4LIMITSET_HH 1
+
+#include "G4UserLimits.hh"
+#include "globals.hh"
+
+#include <map>
+#include <string>
+
+/**
+ * @class G4LimitSet
+ * @brief Looks up physics limits by particle type from the G4Track.
+ */
+
+class G4LimitSet: public G4UserLimits
+{
+public:
+    typedef G4String ParticleType;
+    typedef G4String LimitNameType;
+    typedef G4double LimitValueType;
+    typedef std::map<ParticleType, LimitValueType> LimitMap;
+    typedef std::map<LimitNameType, LimitMap> LimitSetMap;
+    typedef const G4String& LimitNameKeyType;
+
+    static const ParticleType ANY_PARTICLE;
+
+    static const LimitValueType LIMIT_NOT_SET;
+
+    static const LimitNameKeyType STEP_LENGTH_MAX_KEY;
+    static const LimitNameKeyType TRACK_LENGTH_MAX_KEY;
+    static const LimitNameKeyType TIME_MAX_KEY;
+    static const LimitNameKeyType EKIN_MIN_KEY;
+    static const LimitNameKeyType RANGE_MIN_KEY;
+
+    static const LimitValueType STEP_LENGTH_MAX_DEFAULT;
+    static const LimitValueType TRACK_LENGTH_MAX_DEFAULT;
+    static const LimitValueType TIME_MAX_DEFAULT;
+    static const LimitValueType EKIN_MIN_DEFAULT;
+    static const LimitValueType RANGE_MIN_DEFAULT;
+
+public:
+    G4LimitSet(const G4String& name);
+    virtual ~G4LimitSet();
+
+public:
+
+    const LimitSetMap& getLimitSetMap() const
+    {
+        return m_limitsMap;
+    }
+
+    virtual G4double GetMaxAllowedStep(const G4Track&);
+    virtual G4double GetUserMaxTrackLength(const G4Track&);
+    virtual G4double GetUserMaxTime(const G4Track&);
+    virtual G4double GetUserMinEkine(const G4Track&);
+    virtual G4double GetUserMinRange(const G4Track&);
+
+    /* Set limits by particle type. */
+    void setLimitForParticle(LimitNameType limitName, ParticleType particleType, LimitValueType limitValue);
+
+    void setName(const G4String& n);
+    G4String& getName();
+
+private:
+
+    /**
+     * Get the limit value for a particular particle type.
+     * @param  limitName    The name of the limit type (1 of 5 valid types).
+     * @param  particleType Type, e.g. name, of the Geant4 particle.
+     * @return Value of the limit or LIMIT_NOT_SET if no key exists and ANY_PARTICLE is also not set.
+     */
+    LimitValueType getLimitForParticle(LimitNameType limitName, ParticleType particleType = ANY_PARTICLE);
+
+    LimitValueType getLimitForParticle(LimitNameType limitName, const G4Track&);
+
+    const ParticleType getParticleType(const G4Track&);
+
+protected:
+
+    /* Map of ( limitName -> particleName -> limitValue ). */
+    LimitSetMap m_limitsMap;
+
+    G4String m_name;
+};
+
+#endif

lcdd/include/lcdd/geant4
G4UserRegionInformation.hh added at 1.1
diff -N G4UserRegionInformation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4UserRegionInformation.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,87 @@
+//$Header: /cvs/lcd/lcdd/include/lcdd/geant4/G4UserRegionInformation.hh,v 1.1 2013/06/26 01:32:45 jeremy Exp $
+
+#ifndef LCDD_G4USERREGIONINFORMATION_HH
+#define LCDD_G4USERREGIONINFORMATION_HH 1
+
+#include "G4VUserRegionInformation.hh"
+#include "G4Track.hh"
+#include "G4StepPoint.hh"
+#include "globals.hh"
+
+#include <string>
+
+/**
+ @class G4UserRegionInformation
+ @brief Implementation of G4VUserRegionInformation.
+ */
+class G4UserRegionInformation: public G4VUserRegionInformation
+{
+
+public:
+
+    G4UserRegionInformation() :
+            _storeSecondaries(false), _killTracks(false)
+    {
+    }
+
+    virtual ~G4UserRegionInformation()
+    {
+    }
+
+public:
+
+    void setStoreSecondaries(bool b)
+    {
+        _storeSecondaries = b;
+    }
+
+    bool getStoreSecondaries() const
+    {
+        return _storeSecondaries;
+    }
+
+    void setKillTracks(bool killTracks)
+    {
+        _killTracks = killTracks;
+    }
+
+    bool getKillTracks() const
+    {
+        return _killTracks;
+    }
+
+    void setThreshold(G4double t)
+    {
+        _threshold = t;
+    }
+
+    G4double getThreshold() const
+    {
+        return _threshold;
+    }
+
+    // region info from track
+    static inline G4UserRegionInformation* getRegionInformation(const G4Track* aTrack)
+    {
+        return static_cast<G4UserRegionInformation*>(aTrack->GetLogicalVolumeAtVertex()->GetRegion()->GetUserInformation());
+    }
+
+    // region info from step point
+    static G4UserRegionInformation* getRegionInformation(const G4StepPoint* aStepPoint)
+    {
+        return static_cast<G4UserRegionInformation*>(aStepPoint->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetUserInformation());
+    }
+
+    void Print() const
+    {
+    }
+
+private:
+
+    bool _storeSecondaries;
+    bool _killTracks;
+
+    G4double _threshold;
+};
+
+#endif

lcdd/include/lcdd/geant4
LCDDHeaderRecord.hh added at 1.1
diff -N LCDDHeaderRecord.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LCDDHeaderRecord.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,155 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/LCDDHeaderRecord.hh,v 1.1 2013/06/26 01:32:45 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

lcdd/include/lcdd/geant4
PhysVolId.hh added at 1.1
diff -N PhysVolId.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ PhysVolId.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,69 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolId.hh,v 1.1 2013/06/26 01:32:45 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

lcdd/include/lcdd/geant4
PhysVolIdMap.hh added at 1.1
diff -N PhysVolIdMap.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ PhysVolIdMap.hh	26 Jun 2013 01:32:45 -0000	1.1
@@ -0,0 +1,72 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolIdMap.hh,v 1.1 2013/06/26 01:32:45 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

lcdd/include/lcdd/hits
G4CalorimeterHit.hh added at 1.1
diff -N G4CalorimeterHit.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4CalorimeterHit.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,143 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/hits/G4CalorimeterHit.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_G4CALORIMETERHIT_HH
+#define LCDD_G4CALORIMETERHIT_HH 1
+
+// LCDD
+#include "lcdd/id/Id64bit.hh"
+#include "lcdd/hits/McpHitContrib.hh"
+
+// Geant4
+#include "G4VHit.hh"
+#include "G4THitsCollection.hh"
+#include "G4Allocator.hh"
+#include "G4ThreeVector.hh"
+#include "G4UnitsTable.hh"
+
+// STL
+#include <iostream>
+
+/**
+ * @class G4CalorimeterHit
+ * @brief Implementation of G4VHit for calorimeter-type hits.
+ */
+class G4CalorimeterHit: public G4VHit
+{
+
+public:
+
+    G4CalorimeterHit();
+    G4CalorimeterHit(const G4CalorimeterHit &right);
+    G4CalorimeterHit(G4double edep, G4ThreeVector globalCellPos);
+    virtual ~G4CalorimeterHit();
+
+    const G4CalorimeterHit& operator=(const G4CalorimeterHit &right);
+    bool operator==(const G4CalorimeterHit &right);
+    inline void *operator new(size_t);
+    inline void operator delete(void *aHit);
+
+#ifdef G4VIS_USE
+    void Draw();
+#endif
+
+    void printMcpHitContribs(std::ostream&);
+    void printMcpHitContribsHeader(std::ostream&);
+
+    void Print();
+
+public:
+
+    friend std::ostream& operator<<(std::ostream &os, const G4CalorimeterHit& hit);
+
+    void setPos(const G4ThreeVector& posXYZ)
+    {
+        m_pos = posXYZ;
+    }
+
+    void setEdep(const G4double ed)
+    {
+        m_edep = ed;
+    }
+
+    void incrEdep(const G4double edincr)
+    {
+        m_edep += edincr;
+    }
+
+    G4ThreeVector getPos() const
+    {
+        return m_pos;
+    }
+
+    G4double getEdep() const
+    {
+        return m_edep;
+    }
+
+    void addMcpHitContrib(McpHitContrib contrib)
+    {
+        m_particleList.push_back(contrib);
+    }
+
+    const McpHitContribList& getMcpHitContribList() const
+    {
+        return m_particleList;
+    }
+
+    // set value of 64 bit id
+    void setId64bit(Id64bit::ElementType id0, Id64bit::ElementType id1)
+    {
+        m_id64.setId0(id0);
+        m_id64.setId1(id1);
+    }
+
+    // get 64 bit id
+    const Id64bit& getId64bit() const
+    {
+        return m_id64;
+    }
+
+    void setEndcapFlag(bool ec = true)
+    {
+        m_endcap = ec;
+    }
+
+    bool getEndcapFlag()
+    {
+        return m_endcap;
+    }
+
+private:
+
+    // 64-bit id.
+    Id64bit m_id64;
+
+    // Energy deposition.
+    G4double m_edep;
+
+    // Position.
+    G4ThreeVector m_pos;
+
+    // Endcap flag.
+    bool m_endcap;
+
+    // List of contributions by MCParticle.
+    McpHitContribList m_particleList;
+};
+
+typedef G4THitsCollection<G4CalorimeterHit> (G4CalorimeterHitsCollection);
+
+extern G4Allocator<G4CalorimeterHit> G4CalorimeterHitAllocator;
+
+inline void* G4CalorimeterHit::operator new(size_t)
+{
+    void* aHit;
+    aHit = (void *) G4CalorimeterHitAllocator.MallocSingle();
+    return aHit;
+}
+
+inline void G4CalorimeterHit::operator delete(void *aHit)
+{
+    G4CalorimeterHitAllocator.FreeSingle((G4CalorimeterHit*) aHit);
+}
+
+#endif

lcdd/include/lcdd/hits
G4TrackerHit.hh added at 1.1
diff -N G4TrackerHit.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ G4TrackerHit.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,136 @@
+#ifndef LCDD_G4TRACKERHIT_HH
+#define LCDD_G4TRACKERHIT_HH 1
+
+// LCDD
+#include "lcdd/id/Id64bit.hh"
+
+// Geant4
+#include "G4VHit.hh"
+#include "G4THitsCollection.hh"
+#include "G4Allocator.hh"
+#include "G4ThreeVector.hh"
+#include "G4UnitsTable.hh"
+
+/**
+ @class G4TrackerHit
+ @brief Simulation class for a tracker-type hit.
+ */
+class G4TrackerHit: public G4VHit
+{
+public:
+    G4TrackerHit();
+
+    virtual ~G4TrackerHit();
+
+    inline void *operator new(size_t);
+    inline void operator delete(void *aHit);
+
+#ifdef G4VIS_USE
+    void Draw();
+#endif
+
+    void Print();
+
+public:
+
+    friend std::ostream& operator<<(std::ostream &os, const G4TrackerHit& hit);
+
+    void setTdep(const G4double tdep)
+    {
+        m_tdep = tdep;
+    }
+    void setEdep(const G4double edep)
+    {
+        m_edep = edep;
+    }
+    void setPos(const G4ThreeVector& posXYZ)
+    {
+        m_pos = posXYZ;
+    }
+    void setMomentum(const G4ThreeVector& mom)
+    {
+        m_mom = mom;
+    }
+    void setTrackID(const G4int trkID)
+    {
+        m_trkID = trkID;
+    }
+    void setPDG(const G4int pdg)
+    {
+        m_PDG = pdg;
+    }
+    void setLength(const G4double l)
+    {
+        m_length = l;
+    }
+
+    G4double getTdep() const
+    {
+        return m_tdep;
+    }
+    G4double getEdep() const
+    {
+        return m_edep;
+    }
+    G4ThreeVector getPos() const
+    {
+        return m_pos;
+    }
+    G4ThreeVector getMomentum() const
+    {
+        return m_mom;
+    }
+    G4int getTrackID() const
+    {
+        return m_trkID;
+    }
+    G4int getPDG() const
+    {
+        return m_PDG;
+    }
+    G4double getLength() const
+    {
+        return m_length;
+    }
+
+    void setId(Id64bit::ElementType id1)
+    {
+        m_id64.setId1(id1);
+    }
+
+    int getId()
+    {
+        return m_id64.getId1();
+    }
+
+public:
+
+    G4double m_edep;
+    G4double m_tdep;
+    G4ThreeVector m_pos;
+    G4ThreeVector m_mom;
+    G4int m_trkID;
+    G4int m_PDG;
+    G4double m_length;
+
+    // TODO: make this a 32-bit, as only first 32-bits are used
+    Id64bit m_id64;
+};
+
+typedef G4THitsCollection<G4TrackerHit> (G4TrackerHitsCollection);
+
+extern G4Allocator<G4TrackerHit> G4TrackerHitAllocator;
+
+inline void* G4TrackerHit::operator new(size_t)
+{
+    void* aHit;
+    aHit = (void *) G4TrackerHitAllocator.MallocSingle();
+    return aHit;
+}
+
+inline void G4TrackerHit::operator delete(void *aHit)
+{
+    G4TrackerHitAllocator.FreeSingle((G4TrackerHit*) aHit);
+}
+
+#endif

lcdd/include/lcdd/hits
McpHitContrib.hh added at 1.1
diff -N McpHitContrib.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ McpHitContrib.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,91 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/hits/McpHitContrib.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/hits
TrackInformation.hh added at 1.1
diff -N TrackInformation.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ TrackInformation.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,165 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/hits/TrackInformation.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/id
Id64bit.hh added at 1.1
diff -N Id64bit.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Id64bit.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,61 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/Id64bit.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/id
IdComparator.hh added at 1.1
diff -N IdComparator.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ IdComparator.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,23 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdComparator.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_IDCOMPARATOR_HH
+#define LCDD_IDCOMPARATOR_HH 1
+
+#include "lcdd/detectors/HitComparator.hh"
+
+class IdComparator: public HitComparator
+{
+
+public:
+    virtual ~IdComparator()
+    {
+    }
+
+public:
+
+    virtual bool compare(const G4CalorimeterHit& hit1, const G4CalorimeterHit& hit2)
+    {
+        return (hit1.getId64bit() == hit2.getId64bit());
+    }
+};
+
+#endif

lcdd/include/lcdd/id
IdFactory.hh added at 1.1
diff -N IdFactory.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ IdFactory.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,86 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdFactory.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/id
IdField.hh added at 1.1
diff -N IdField.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ IdField.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,81 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdField.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/id
IdManager.hh added at 1.1
diff -N IdManager.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ IdManager.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,93 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdManager.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_IDMANAGER_HH
+#define LCDD_IDMANAGER_HH 1
+
+// LCDD
+#include "lcdd/id/IdSpec.hh"
+#include "lcdd/id/IdVec.hh"
+#include "lcdd/geant4/PhysVolId.hh"
+#include "lcdd/geant4/PhysVolIdMap.hh"
+
+// Geant4
+#include "G4VPhysicalVolume.hh"
+
+// std
+#include <map>
+#include <string>
+#include <iostream>
+
+class G4LogicalVolume;
+
+/**
+ * @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

lcdd/include/lcdd/id
IdSpec.hh added at 1.1
diff -N IdSpec.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ IdSpec.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,127 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdSpec.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/id
IdVec.hh added at 1.1
diff -N IdVec.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ IdVec.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,59 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdVec.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
AuthorType.hh added at 1.1
diff -N AuthorType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ AuthorType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,49 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/AuthorType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_AUTHORTYPE_HH
+#define LCDD_AUTHORTYPE_HH 1
+
+#include <string>
+
+/**
+ @class AuthorType
+ @brief AuthorType from schema.
+ */
+class AuthorType
+{
+public:
+    AuthorType()
+    {
+    }
+
+    virtual ~AuthorType()
+    {
+    }
+
+    void set_name(const std::string& n)
+    {
+        m_name = n;
+    }
+
+    void set_email(const std::string& o)
+    {
+        m_email = o;
+    }
+
+    const std::string& get_name() const
+    {
+        return m_name;
+    }
+
+    const std::string& get_email() const
+    {
+        return m_email;
+    }
+
+private:
+
+    std::string m_name;
+    std::string m_email;
+};
+
+#endif

lcdd/include/lcdd/schema
BoxDipoleType.hh added at 1.1
diff -N BoxDipoleType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ BoxDipoleType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,128 @@
+#ifndef LCDD_BOXDIPOLETYPE_HH
+#define LCDD_BOXDIPOLETYPE_HH 1
+
+#include "FieldType.hh"
+
+/**
+ * @class BoxDipoleType
+ * @brief This is a representation of the BoxDipoleType from the LCDD schema.
+ */
+class BoxDipoleType: public FieldType
+{
+
+public:
+
+    BoxDipoleType()
+    {
+    }
+
+    virtual ~BoxDipoleType()
+    {
+    }
+
+public:
+
+    void set_x(const std::string& s)
+    {
+        _x = s;
+    }
+
+    void set_y(const std::string& s)
+    {
+        _y = s;
+    }
+
+    void set_z(const std::string& s)
+    {
+        _z = s;
+    }
+
+    void set_dx(const std::string& s)
+    {
+        _dx = s;
+    }
+
+    void set_dy(const std::string& s)
+    {
+        _dy = s;
+    }
+
+    void set_dz(const std::string& s)
+    {
+        _dz = s;
+    }
+
+    void set_bx(const std::string& s)
+    {
+        _bx = s;
+    }
+
+    void set_by(const std::string& s)
+    {
+        _by = s;
+    }
+
+    void set_bz(const std::string& s)
+    {
+        _bz = s;
+    }
+
+    const std::string& get_x() const
+    {
+        return _x;
+    }
+
+    const std::string& get_y() const
+    {
+        return _y;
+    }
+
+    const std::string& get_z() const
+    {
+        return _z;
+    }
+
+    const std::string& get_dx() const
+    {
+        return _dx;
+    }
+
+    const std::string& get_dy() const
+    {
+        return _dy;
+    }
+
+    const std::string& get_dz() const
+    {
+        return _dz;
+    }
+
+    const std::string& get_bx() const
+    {
+        return _bx;
+    }
+
+    const std::string& get_by() const
+    {
+        return _by;
+    }
+
+    const std::string& get_bz() const
+    {
+        return _bz;
+    }
+
+private:
+
+    std::string _x;
+    std::string _y;
+    std::string _z;
+    std::string _dx;
+    std::string _dy;
+    std::string _dz;
+    std::string _bx;
+    std::string _by;
+    std::string _bz;
+};
+
+#endif

lcdd/include/lcdd/schema
CalorimeterType.hh added at 1.1
diff -N CalorimeterType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CalorimeterType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,59 @@
+#ifndef LCDD_CALORIMETERTYPE_HH
+#define LCDD_CALORIMETERTYPE_HH 1
+
+#include "Schema/ContentGroup.h"
+
+#include "SensitiveDetectorType.hh"
+
+#include <iostream>
+
+/**
+ * @class CalorimeterType
+ * @brief CalorimeterType from schema.
+ */
+class CalorimeterType: public SensitiveDetectorType
+{
+
+public:
+
+    CalorimeterType()
+    {
+    }
+
+    virtual ~CalorimeterType()
+    {
+    }
+
+public:
+
+    const ContentSequence* get_content() const
+    {
+        return &m_sequence;
+    }
+
+    // add a segmentation
+    void add_content(const std::string& tag, SAXObject* so)
+    {
+        ContentGroup::ContentItem ci = { tag, so };
+        m_sequence.add_content(ci);
+    }
+
+    void set_compare(const std::string& compare)
+    {
+        m_compare = compare;
+    }
+
+    const std::string& get_compare() const
+    {
+        return m_compare;
+    }
+
+private:
+
+    ContentSequence m_sequence;
+
+    std::string m_compare;
+
+};
+
+#endif

lcdd/include/lcdd/schema
CellReadout2DSegmentationType.hh added at 1.1
diff -N CellReadout2DSegmentationType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CellReadout2DSegmentationType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,62 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/CellReadout2DSegmentationType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
ColorType.hh added at 1.1
diff -N ColorType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ColorType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,70 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/ColorType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_COLORTYPE_HH
+#define LCDD_COLORTYPE_HH 1
+
+#include <string>
+
+/**
+ @class ColorType
+ @brief ColorType from schema.
+ */
+class ColorType
+{
+public:
+    ColorType()
+    {
+    }
+
+    virtual ~ColorType()
+    {
+    }
+
+    void set_R(const std::string& r)
+    {
+        m_R = r;
+    }
+
+    void set_G(const std::string& g)
+    {
+        m_G = g;
+    }
+
+    void set_B(const std::string& b)
+    {
+        m_B = b;
+    }
+
+    void set_alpha(const std::string& a)
+    {
+        m_alpha = a;
+    }
+
+    const std::string& get_R()
+    {
+        return m_R;
+    }
+
+    const std::string& get_G()
+    {
+        return m_G;
+    }
+
+    const std::string& get_B()
+    {
+        return m_B;
+    }
+
+    const std::string& get_alpha()
+    {
+        return m_alpha;
+    }
+
+private:
+    std::string m_R;
+    std::string m_G;
+    std::string m_B;
+    std::string m_alpha;
+};
+
+#endif

lcdd/include/lcdd/schema
CommentType.hh added at 1.1
diff -N CommentType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ CommentType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,39 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/CommentType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_COMMENTTYPE_HH
+#define LCDD_COMMENTTYPE_HH 1
+
+#include <string>
+
+/**
+ @class CommentType
+ @brief CommentType from schema.
+ */
+class CommentType
+{
+public:
+    CommentType()
+    {
+    }
+
+    virtual ~CommentType()
+    {
+    }
+
+    void set_comment(const std::string& c)
+    {
+        m_comment = c;
+    }
+
+    const std::string& get_comment() const
+    {
+        return m_comment;
+    }
+
+private:
+
+    std::string m_comment;
+
+};
+
+#endif

lcdd/include/lcdd/schema
DetectorType.hh added at 1.1
diff -N DetectorType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ DetectorType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,61 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/DetectorType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_DETECTORTYPE_HH 
+#define LCDD_DETECTORTYPE_HH 1
+
+#include <string>
+
+/**
+ @class DetectorType
+ @brief DetectorType from schema.
+ */
+class DetectorType
+{
+public:
+    DetectorType()
+    {
+    }
+
+    virtual ~DetectorType()
+    {
+    }
+
+public:
+
+    void set_name(const std::string& n)
+    {
+        m_name = n;
+    }
+
+    void set_version(const std::string& v)
+    {
+        m_version = v;
+    }
+
+    void set_url(const std::string& u)
+    {
+        m_url = u;
+    }
+
+    const std::string& get_name() const
+    {
+        return m_name;
+    }
+
+    const std::string& get_version() const
+    {
+        return m_version;
+    }
+
+    const std::string& get_url() const
+    {
+        return m_url;
+    }
+
+private:
+    std::string m_name;
+    std::string m_version;
+    std::string m_url;
+};
+
+#endif

lcdd/include/lcdd/schema
DipoleCoeffType.hh added at 1.1
diff -N DipoleCoeffType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ DipoleCoeffType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,38 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/DipoleCoeffType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_DIPOLECOEFFTYPE_HH
+#define LCDD_DIPOLECOEFFTYPE_HH
+
+#include <string>
+
+/**
+ * @class DipoleCoeffType
+ * @brief The DipoleCoeffType from the lcdd_fields.xsd schema.
+ */
+class DipoleCoeffType
+{
+public:
+    DipoleCoeffType()
+    {
+    }
+
+    virtual ~DipoleCoeffType()
+    {
+    }
+
+public:
+
+    void set_value(const std::string& s)
+    {
+        m_value = s;
+    }
+
+    const std::string& get_value()
+    {
+        return m_value;
+    }
+
+private:
+    std::string m_value;
+};
+
+#endif

lcdd/include/lcdd/schema
DipoleType.hh added at 1.1
diff -N DipoleType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ DipoleType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,81 @@
+#ifndef LCDD_DIPOLETYPE_HH
+#define LCDD_DIPOLETYPE_HH 1
+
+// parent class
+#include "FieldType.hh"
+
+// gdml
+#include "Schema/ContentGroup.h"
+
+// std
+#include <string>
+
+/**
+ * @class DipoleType
+ * @brief DipoleType from lcdd_fields.xsd schema.
+ */
+class DipoleType: public FieldType
+{
+public:
+
+    DipoleType()
+    {
+    }
+
+    virtual ~DipoleType()
+    {
+    }
+
+public:
+
+    void set_zmax(const std::string& s)
+    {
+        m_zmax = s;
+    }
+
+    void set_zmin(const std::string& s)
+    {
+        m_zmin = s;
+    }
+
+    void set_rmax(const std::string& s)
+    {
+        m_rmax = s;
+    }
+
+    const std::string& get_zmin() const
+    {
+        return m_zmin;
+    }
+
+    const std::string& get_zmax() const
+    {
+        return m_zmax;
+    }
+
+    const std::string& get_rmax() const
+    {
+        return m_rmax;
+    }
+
+    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:
+
+    std::string m_zmax;
+    std::string m_zmin;
+    std::string m_rmax;
+
+    ContentSequence m_sequence;
+};
+
+#endif

lcdd/include/lcdd/schema
FieldMap3DType.hh added at 1.1
diff -N FieldMap3DType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ FieldMap3DType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,42 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/FieldMap3DType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_FIELDMAP3DTYPE_HH
+#define LCDD_FIELDMAP3DTYPE_HH 1
+
+#include "FieldMapType.hh"
+
+#include <string>
+
+/**
+ * @class
+ * @brief
+ */
+class FieldMap3DType: public FieldMapType
+{
+
+public:
+
+    FieldMap3DType()
+    {
+    }
+
+    virtual ~FieldMap3DType()
+    {
+    }
+
+    void set_filename(const std::string& filename)
+    {
+        _filename = filename;
+    }
+
+    const std::string& get_filename() const
+    {
+        return _filename;
+    }
+
+private:
+
+    std::string _filename;
+
+};
+
+#endif

lcdd/include/lcdd/schema
FieldMapType.hh added at 1.1
diff -N FieldMapType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ FieldMapType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,47 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/FieldMapType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_FIELDMAPTYPE_HH
+#define LCDD_FIELDMAPTYPE_HH 1
+
+#include "FieldType.hh"
+
+// GDML
+#include "Schema/ContentGroup.h"
+#include "Schema/ReferenceType.h"
+
+/**
+ * @class FieldMapType
+ * @brief The "abstract" FieldMapType from lcdd_fields.xsd subschema.
+ * @note The only behavior implemented by this class is adding generic content.
+ */
+class FieldMapType: public FieldType
+{
+public:
+
+    FieldMapType()
+    {
+    }
+
+    virtual ~FieldMapType()
+    {
+    }
+
+public:
+
+    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);
+    }
+
+public:
+
+    ContentSequence m_sequence;
+
+};
+
+#endif

lcdd/include/lcdd/schema
FieldMapTypeProcess.hh added at 1.1
diff -N FieldMapTypeProcess.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ FieldMapTypeProcess.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,66 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/FieldMapTypeProcess.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
FieldType.hh added at 1.1
diff -N FieldType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ FieldType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,87 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/FieldType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_FIELDTYPE_HH
+#define LCDD_FIELDTYPE_HH 1
+
+// GDML
+#include "Schema/ReferenceType.h"
+#include "Saxana/SAXObject.h"
+
+// STL
+#include <string>
+
+/**
+ * @brief FieldType from schema.
+ */
+class FieldType
+{
+public:
+
+    /**
+     * @class FieldType::fieldref
+     * @brief Reference to a field element.
+     */
+    class fieldref: public SAXObject, public ReferenceType
+    {
+    public:
+        fieldref()
+        {
+        }
+
+        virtual ~fieldref()
+        {
+        }
+
+        virtual SAXObject::Type type()
+        {
+            return SAXObject::element;
+        }
+    };
+
+public:
+
+    FieldType()
+    {
+    }
+
+    virtual ~FieldType()
+    {
+    }
+
+    void set_name(const std::string& n)
+    {
+        _name = n;
+    }
+
+    const std::string& get_name() const
+    {
+        return _name;
+    }
+
+    void set_funit(const std::string& s)
+    {
+        _funit = s;
+    }
+
+    void set_lunit(const std::string& s)
+    {
+        _lunit = s;
+    }
+
+    const std::string& get_funit() const
+    {
+        return _funit;
+    }
+
+    const std::string& get_lunit() const
+    {
+        return _lunit;
+    }
+
+private:
+
+    std::string _name;
+    std::string _funit;
+    std::string _lunit;
+};
+
+#endif

lcdd/include/lcdd/schema
FieldTypeProcess.hh added at 1.1
diff -N FieldTypeProcess.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ FieldTypeProcess.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,74 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/FieldTypeProcess.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
GeneratorType.hh added at 1.1
diff -N GeneratorType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ GeneratorType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,71 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/GeneratorType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
GlobalFieldType.hh added at 1.1
diff -N GlobalFieldType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ GlobalFieldType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,37 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/GlobalFieldType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_GLOBALFIELDTYPE_HH
+#define LCDD_GLOBALFIELDTYPE_HH 1
+
+#include "Schema/ContentGroup.h"
+/**
+ * @class GlobalFieldType
+ * @brief GlobalFieldType from schema.
+ */
+class GlobalFieldType
+{
+public:
+    GlobalFieldType()
+    {
+    }
+
+    virtual ~GlobalFieldType()
+    {
+    }
+
+    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;
+};
+
+#endif

lcdd/include/lcdd/schema
GlobalGridXYSegmentationType.hh added at 1.1
diff -N GlobalGridXYSegmentationType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ GlobalGridXYSegmentationType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,67 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/GlobalGridXYSegmentationType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
HeaderType.hh added at 1.1
diff -N HeaderType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ HeaderType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,41 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/HeaderType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
IdFieldType.hh added at 1.1
diff -N IdFieldType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ IdFieldType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,71 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/IdFieldType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
IdSpecType.hh added at 1.1
diff -N IdSpecType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ IdSpecType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,90 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/IdSpecType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_IDSPECTYPE_HH
+#define LCDD_IDSPECTYPE_HH
+
+// GDML
+#include "Processes/ReferenceTypeProcess.h"
+#include "Schema/ContentGroup.h"
+
+#include <string>
+
+/**
+ @class IdSpecType
+ @brief IdSpecType from schema.
+ */
+class IdSpecType
+{
+public:
+
+    /**
+     * @class IdSpecType::idspecref
+     * @brief Reference to an idspec element.
+     *
+     */
+    class idspecref: public SAXObject, public ReferenceType
+    {
+    public:
+        idspecref()
+        {
+        }
+
+        virtual ~idspecref()
+        {
+        }
+
+        virtual SAXObject::Type type()
+        {
+            return SAXObject::element;
+        }
+    };
+
+public:
+    IdSpecType()
+    {
+    }
+
+    virtual ~IdSpecType()
+    {
+    }
+
+    void set_name(const std::string& n)
+    {
+        m_name = n;
+    }
+
+    void set_length(const std::string& l)
+    {
+        m_length = l;
+    }
+
+    const std::string& get_name() const
+    {
+        return m_name;
+    }
+
+    const std::string& get_length() const
+    {
+        return m_length;
+    }
+
+    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:
+
+    std::string m_name;
+    std::string m_length;
+
+    ContentSequence m_sequence;
+};
+
+#endif

lcdd/include/lcdd/schema
LimitParamType.hh added at 1.1
diff -N LimitParamType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LimitParamType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,70 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/LimitParamType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
LimitSetType.hh added at 1.1
diff -N LimitSetType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LimitSetType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,74 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/LimitSetType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
LimitType.hh added at 1.1
diff -N LimitType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LimitType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,154 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/LimitType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
NonprojectiveCylinderSegmentationType.hh added at 1.1
diff -N NonprojectiveCylinderSegmentationType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ NonprojectiveCylinderSegmentationType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,65 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/NonprojectiveCylinderSegmentationType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_NONPROJECTIVECYLINDERSEGMENTATIONTYPE_HH
+#define LCDD_NONPROJECTIVECYLINDERSEGMENTATIONTYPE_HH 1
+
+#include "SegmentationType.hh"
+
+#include <string>
+
+/**
+ @class NonprojectiveCylinderSegmentationType
+ @brief NonprojectiveCylinderSegmentationType from schema.
+ */
+class NonprojectiveCylinderSegmentationType: public SegmentationType
+{
+public:
+
+    NonprojectiveCylinderSegmentationType()
+    {
+    }
+
+    virtual ~NonprojectiveCylinderSegmentationType()
+    {
+    }
+
+public:
+
+    void set_gridSizeZ(const std::string& gsz)
+    {
+        m_gridSizeZ = gsz;
+    }
+
+    void set_gridSizePhi(const std::string& gsp)
+    {
+        m_gridSizePhi = gsp;
+    }
+
+    void set_lunit(const std::string& lunit)
+    {
+        m_lunit = lunit;
+    }
+
+    const std::string& get_gridSizeZ()
+    {
+        return m_gridSizeZ;
+    }
+
+    const std::string& get_gridSizePhi()
+    {
+        return m_gridSizePhi;
+    }
+
+    const std::string& get_lunit()
+    {
+        return m_lunit;
+    }
+
+protected:
+
+    std::string m_gridSizeZ;
+    std::string m_gridSizePhi;
+    std::string m_lunit;
+};
+
+#endif

lcdd/include/lcdd/schema
NonprojectiveSegmentationType.hh added at 1.1
diff -N NonprojectiveSegmentationType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ NonprojectiveSegmentationType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,76 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/NonprojectiveSegmentationType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_NONPROJECTIVESEGMENTATIONTYPE_HH
+#define LCDD_NONPROJECTIVESEGMENTATIONTYPE_HH 1
+
+#include "SegmentationType.hh"
+
+#include <string>
+
+/**
+ @class NonprojectiveSegmentationType
+ @brief NonprojectiveSegmentationType from schema.
+ */
+class NonprojectiveSegmentationType: public SegmentationType
+{
+public:
+
+    NonprojectiveSegmentationType()
+    {
+    }
+
+    virtual ~NonprojectiveSegmentationType()
+    {
+    }
+
+public:
+
+    void set_gridSizeX(const std::string& gsx)
+    {
+        m_gridSizeX = gsx;
+    }
+
+    void set_gridSizeY(const std::string& gsy)
+    {
+        m_gridSizeY = gsy;
+    }
+
+    void set_gridSizeZ(const std::string& gsz)
+    {
+        m_gridSizeZ = gsz;
+    }
+
+    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_gridSizeZ()
+    {
+        return m_gridSizeZ;
+    }
+
+    const std::string& get_lunit()
+    {
+        return m_lunit;
+    }
+
+protected:
+
+    std::string m_gridSizeX;
+    std::string m_gridSizeY;
+    std::string m_gridSizeZ;
+    std::string m_lunit;
+};
+
+#endif

lcdd/include/lcdd/schema
OpticalCalorimeterType.hh added at 1.1
diff -N OpticalCalorimeterType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ OpticalCalorimeterType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,28 @@
+#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

lcdd/include/lcdd/schema
PhysVolIdType.hh added at 1.1
diff -N PhysVolIdType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ PhysVolIdType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,49 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/PhysVolIdType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_PHYSVOLIDTYPE_HH
+#define LCDD_PHYSVOLIDTYPE_HH
+
+#include <string>
+
+/**
+ @class PhysVolIdType
+ @brief PhysVolIdType from schema.
+ */
+class PhysVolIdType
+{
+public:
+    PhysVolIdType()
+    {
+    }
+
+    virtual ~PhysVolIdType()
+    {
+    }
+
+    void set_value(const std::string& v)
+    {
+        m_value = v;
+    }
+
+    void set_field_name(const std::string& f)
+    {
+        m_field_name = f;
+    }
+
+    const std::string& get_value()
+    {
+        return m_value;
+    }
+
+    const std::string& get_field_name()
+    {
+        return m_field_name;
+    }
+
+private:
+
+    std::string m_value;
+    std::string m_field_name;
+};
+
+#endif

lcdd/include/lcdd/schema
ProjectiveCylinderSegmentationType.hh added at 1.1
diff -N ProjectiveCylinderSegmentationType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ProjectiveCylinderSegmentationType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,53 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/ProjectiveCylinderSegmentationType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_PROJECTIVECYLINDERSEGMENTATIONTYPE_HH
+#define LCDD_PROJECTIVECYLINDERSEGMENTATIONTYPE_HH 1
+
+#include "SegmentationType.hh"
+
+#include <string>
+
+/**
+ @class ProjectiveCylinderSegmentationType
+ @brief ProjectiveCylinderSegmentationType from schema.
+ */
+class ProjectiveCylinderSegmentationType: public SegmentationType
+{
+public:
+
+    ProjectiveCylinderSegmentationType()
+    {
+    }
+
+    virtual ~ProjectiveCylinderSegmentationType()
+    {
+    }
+
+public:
+
+    void set_ntheta(const std::string& ntheta)
+    {
+        m_ntheta = ntheta;
+    }
+
+    void set_nphi(const std::string& nphi)
+    {
+        m_nphi = nphi;
+    }
+
+    const std::string& get_ntheta() const
+    {
+        return m_ntheta;
+    }
+
+    const std::string& get_nphi() const
+    {
+        return m_nphi;
+    }
+
+protected:
+
+    std::string m_ntheta, m_nphi;
+};
+
+#endif

lcdd/include/lcdd/schema
ProjectiveZPlaneSegmentationType.hh added at 1.1
diff -N ProjectiveZPlaneSegmentationType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ProjectiveZPlaneSegmentationType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,53 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/ProjectiveZPlaneSegmentationType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_PROJECTIVEZPLANESEGMENTATIONTYPE_HH
+#define LCDD_PROJECTIVEZPLANESEGMENTATIONTYPE_HH 1
+
+#include "SegmentationType.hh"
+
+#include <string>
+
+/**
+ @class ProjectiveZPlaneSegmentationType
+ @brief ProjectiveZPlaneSegmentationType from schema.
+ */
+class ProjectiveZPlaneSegmentationType: public SegmentationType
+{
+public:
+
+    ProjectiveZPlaneSegmentationType()
+    {
+    }
+
+    virtual ~ProjectiveZPlaneSegmentationType()
+    {
+    }
+
+public:
+
+    void set_ntheta(const std::string& ntheta)
+    {
+        m_ntheta = ntheta;
+    }
+
+    void set_nphi(const std::string& nphi)
+    {
+        m_nphi = nphi;
+    }
+
+    const std::string& get_ntheta() const
+    {
+        return m_ntheta;
+    }
+
+    const std::string& get_nphi() const
+    {
+        return m_nphi;
+    }
+
+protected:
+
+    std::string m_ntheta, m_nphi;
+};
+
+#endif

lcdd/include/lcdd/schema
RZBType.hh added at 1.1
diff -N RZBType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ RZBType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,70 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/RZBType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_RZBTYPE_HH
+#define LCDD_RZBTYPE_HH 1
+
+#include <string>
+
+/**
+ * @class RZBType
+ * @brief The RZBType from lcdd_fields.xsd subschema.
+ */
+class RZBType
+{
+
+public:
+    RZBType()
+    {
+    }
+
+    virtual ~RZBType()
+    {
+    }
+
+    void set_r(const std::string& r)
+    {
+        m_r = r;
+    }
+
+    void set_z(const std::string& z)
+    {
+        m_z = z;
+    }
+
+    void set_Br(const std::string& Br)
+    {
+        m_Br = Br;
+    }
+
+    void set_Bz(const std::string& Bz)
+    {
+        m_Bz = Bz;
+    }
+
+    const std::string& get_r() const
+    {
+        return m_r;
+    }
+
+    const std::string& get_z() const
+    {
+        return m_z;
+    }
+
+    const std::string& get_Br() const
+    {
+        return m_Br;
+    }
+
+    const std::string& get_Bz() const
+    {
+        return m_Bz;
+    }
+
+public:
+    std::string m_r;
+    std::string m_z;
+    std::string m_Br;
+    std::string m_Bz;
+};
+
+#endif

lcdd/include/lcdd/schema
RZFieldMapType.hh added at 1.1
diff -N RZFieldMapType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ RZFieldMapType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,71 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/RZFieldMapType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_RZFIELDMAPTYPE_HH
+#define LCDD_RZFIELDMAPTYPE_HH 1
+
+#include "FieldMapType.hh"
+
+/**
+ * @class RZFieldMapType
+ * @brief The RZFieldMapType from the lcdd_fields.lcdd subschema.
+ */
+class RZFieldMapType: public FieldMapType
+{
+
+public:
+
+    RZFieldMapType()
+    {
+    }
+
+    virtual ~RZFieldMapType()
+    {
+    }
+
+    void set_num_bins_r(const std::string& num_bins_r)
+    {
+        m_num_bins_r = num_bins_r;
+    }
+
+    const std::string& get_num_bins_r() const
+    {
+        return m_num_bins_r;
+    }
+
+    void set_grid_size_r(const std::string& grid_size_r)
+    {
+        m_grid_size_r = grid_size_r;
+    }
+
+    const std::string& get_grid_size_r() const
+    {
+        return m_grid_size_r;
+    }
+
+    void set_num_bins_z(const std::string& num_bins_z)
+    {
+        m_num_bins_z = num_bins_z;
+    }
+
+    const std::string& get_num_bins_z() const
+    {
+        return m_num_bins_z;
+    }
+
+    void set_grid_size_z(const std::string& grid_size_z)
+    {
+        m_grid_size_z = grid_size_z;
+    }
+
+    const std::string& get_grid_size_z() const
+    {
+        return m_grid_size_z;
+    }
+
+private:
+    std::string m_num_bins_r;
+    std::string m_grid_size_r;
+    std::string m_num_bins_z;
+    std::string m_grid_size_z;
+};
+
+#endif

lcdd/include/lcdd/schema
RegionType.hh added at 1.1
diff -N RegionType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ RegionType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,149 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/RegionType.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_REGIONTYPE_HH
+#define LCDD_REGIONTYPE_HH 1
+
+// GDML
+#include "Saxana/SAXObject.h"
+#include "Schema/ReferenceType.h"
+#include "Schema/ContentGroup.h"
+#include "Schema/ReferenceType.h"
+
+/**
+ @class RegionType
+ @brief RegionType from schema.
+ */
+class RegionType
+{
+
+public:
+
+    /**
+     * @class RegionType::regionref
+     * @brief Reference to a region element.
+     */
+    class regionref: public SAXObject, public ReferenceType
+    {
+
+    public:
+        regionref()
+        {
+        }
+
+        virtual ~regionref()
+        {
+        }
+
+        virtual SAXObject::Type type()
+        {
+            return SAXObject::element;
+        }
+    };
+
+public:
+    RegionType()
+    {
+    }
+
+    virtual ~RegionType()
+    {
+    }
+
+    void set_name(const std::string& s)
+    {
+        m_name = s;
+    }
+
+    void set_storeSecondaries(const std::string& s)
+    {
+        m_storeSecondaries = s;
+    }
+
+    void set_killTracks(const std::string& killTracks)
+    {
+        m_killTracks = killTracks;
+    }
+
+    void set_cut(const std::string& s)
+    {
+        m_cut = s;
+    }
+
+    void set_lunit(const std::string& s)
+    {
+        m_lunit = s;
+    }
+
+    void set_threshold(const std::string& s)
+    {
+        m_threshold = s;
+    }
+
+    void set_eunit(const std::string& s)
+    {
+        m_eunit = s;
+    }
+
+    const std::string& get_name() const
+    {
+        return m_name;
+    }
+
+    const std::string& get_storeSecondaries() const
+    {
+        return m_storeSecondaries;
+    }
+
+    const std::string& get_killTracks() const
+    {
+        return m_killTracks;
+    }
+
+    const std::string& get_cut() const
+    {
+        return m_cut;
+    }
+
+    const std::string& get_lunit() const
+    {
+        return m_lunit;
+    }
+
+    const std::string& get_threshold() const
+    {
+        return m_threshold;
+    }
+
+    const std::string& get_eunit() const
+    {
+        return m_eunit;
+    }
+
+    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;
+
+    std::string m_storeSecondaries;
+    std::string m_killTracks;
+
+    std::string m_cut;
+    std::string m_lunit;
+
+    std::string m_threshold;
+    std::string m_eunit;
+};
+
+#endif

lcdd/include/lcdd/schema
ScorerType.hh added at 1.1
diff -N ScorerType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ScorerType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,39 @@
+#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

lcdd/include/lcdd/schema
SegmentationType.hh added at 1.1
diff -N SegmentationType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SegmentationType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,24 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/SegmentationType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
SensitiveDetectorType.hh added at 1.1
diff -N SensitiveDetectorType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SensitiveDetectorType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,147 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/SensitiveDetectorType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
SensitiveDetectorTypeProcess.hh added at 1.1
diff -N SensitiveDetectorTypeProcess.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SensitiveDetectorTypeProcess.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,88 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/SensitiveDetectorTypeProcess.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
SolenoidType.hh added at 1.1
diff -N SolenoidType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SolenoidType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,95 @@
+#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

lcdd/include/lcdd/schema
TrackerType.hh added at 1.1
diff -N TrackerType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ TrackerType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,39 @@
+#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

lcdd/include/lcdd/schema
UnsegmentedCalorimeterType.hh added at 1.1
diff -N UnsegmentedCalorimeterType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ UnsegmentedCalorimeterType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,31 @@
+#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

lcdd/include/lcdd/schema
VisType.hh added at 1.1
diff -N VisType.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ VisType.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,124 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/VisType.hh,v 1.1 2013/06/26 01:32:46 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

lcdd/include/lcdd/schema
author.hh added at 1.1
diff -N author.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ author.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/author.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_AUTHOR_HH
+#define LCDD_AUTHOR_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "AuthorType.hh"
+
+/**
+ @class author
+ @brief author element from schema.
+ */
+class author: public SAXObject, public AuthorType
+{
+public:
+    author()
+    {
+    }
+
+    virtual ~author()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
box_dipole.hh added at 1.1
diff -N box_dipole.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ box_dipole.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,34 @@
+// $Id: box_dipole.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_BOX_DIPOLE_HH
+#define LCDD_BOX_DIPOLE_HH 1
+
+// LCDD
+#include "BoxDipoleType.hh"
+
+// GDML
+#include "Saxana/SAXObject.h"
+
+/**
+ * @class box_dipole
+ * @brief A representation of the box_dipole class from the LCDD schema.
+ */
+class box_dipole: public SAXObject, public BoxDipoleType
+{
+
+public:
+
+    box_dipole()
+    {
+    }
+
+    virtual ~box_dipole()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
calorimeter.hh added at 1.1
diff -N calorimeter.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ calorimeter.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,30 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/calorimeter.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_CALORIMETER_HH
+#define LCDD_CALORIMETER_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "CalorimeterType.hh"
+
+/**
+ @class calorimeter
+ @brief calorimeter element from schema.
+ */
+class calorimeter: public SAXObject, public CalorimeterType
+{
+public:
+    calorimeter()
+    {
+    }
+
+    virtual ~calorimeter()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
calorimeterProcess.hh added at 1.1
diff -N calorimeterProcess.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ calorimeterProcess.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,43 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/calorimeterProcess.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_CALORIMETERPROCESS_HH
+#define LCDD_CALORIMETERPROCESS_HH 1
+
+// 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"
+
+// LCDD
+#include "lcdd/schema/calorimeter.hh"
+#include "lcdd/schema/SensitiveDetectorTypeProcess.hh"
+
+// STL
+#include <iostream>
+
+/**
+ * @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

lcdd/include/lcdd/schema
cell_readout_2d.hh added at 1.1
diff -N cell_readout_2d.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ cell_readout_2d.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/cell_readout_2d.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef lcdd_cell_readout_2d_hh
+#define lcdd_cell_readout_2d_hh 1
+
+// LCDD
+#include "CellReadout2DSegmentationType.hh"
+
+// GDML
+#include "Saxana/SAXObject.h"
+
+class cell_readout_2d: public SAXObject, public CellReadout2DSegmentationType
+{
+
+public:
+
+    cell_readout_2d()
+    {
+    }
+
+    virtual ~cell_readout_2d()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
color.hh added at 1.1
diff -N color.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ color.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,32 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/color.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_COLOR_HH
+#define LCDD_COLOR_HH 1
+
+// GDML
+#include "Saxana/SAXObject.h"
+
+// LCDD
+#include "ColorType.hh"
+
+/**
+ @class color
+ @brief color element from schema.
+ */
+class color: public SAXObject, public ColorType
+{
+public:
+    color()
+    {
+    }
+
+    virtual ~color()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
comment.hh added at 1.1
diff -N comment.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ comment.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/comment.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_COMMENT_HH
+#define LCDD_COMMENT_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "CommentType.hh"
+
+/**
+ @class comment
+ @brief comment element from schema.
+ */
+class comment: public SAXObject, public CommentType
+{
+public:
+    comment()
+    {
+    }
+
+    virtual ~comment()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
detector.hh added at 1.1
diff -N detector.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ detector.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,31 @@
+// $Detector$
+
+#ifndef LCDD_DETECTOR_HH
+#define LCDD_DETECTOR_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "DetectorType.hh"
+
+/**
+ @class detector
+ @brief detector element from schema (in header).
+ */
+class detector: public SAXObject, public DetectorType
+{
+public:
+    detector()
+    {
+    }
+
+    virtual ~detector()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
dipole.hh added at 1.1
diff -N dipole.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dipole.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,30 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/dipole.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_DIPOLE_HH
+#define LCDD_DIPOLE_HH
+
+#include "Saxana/SAXObject.h"
+
+#include "DipoleType.hh"
+
+/**
+ * @class dipole
+ * @class The dipole element from the lcdd_fields.xsd schema.
+ */
+class dipole: public SAXObject, public DipoleType
+{
+public:
+    dipole()
+    {
+    }
+
+    virtual ~dipole()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
dipole_coeff.hh added at 1.1
diff -N dipole_coeff.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dipole_coeff.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,28 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/dipole_coeff.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_DIPOLE_COEFF_HH
+#define LCDD_DIPOLE_COEFF_HH 1
+
+#include "DipoleCoeffType.hh"
+
+/**
+ * @class dipole_coeff
+ * @brief The dipole_coeff element from the lcdd_fields.xsd schema.
+ */
+class dipole_coeff: public SAXObject, public DipoleCoeffType
+{
+public:
+    dipole_coeff()
+    {
+    }
+
+    virtual ~dipole_coeff()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
field.hh added at 1.1
diff -N field.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ field.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,30 @@
+#ifndef LCDD_FIELD_HH
+#define LCDD_FIELD_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "FieldType.hh"
+
+/**
+ @class field
+ @brief field element from schema.
+ */
+class field: public SAXObject, public FieldType
+{
+public:
+
+    field()
+    {
+    }
+
+    virtual ~field()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
field_map_3d.hh added at 1.1
diff -N field_map_3d.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ field_map_3d.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,30 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/field_map_3d.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_FIELD_MAP_3D_HH
+#define LCDD_FIELD_MAP_3D_HH 1
+
+#include "FieldMap3DType.hh"
+
+/**
+ * @class 
+ * @brief 
+ */
+class field_map_3d: public SAXObject, public FieldMap3DType
+{
+
+public:
+
+    field_map_3d()
+    {
+    }
+
+    virtual ~field_map_3d()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
generator.hh added at 1.1
diff -N generator.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ generator.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/generator.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_GENERATOR_HH
+#define LCDD_GENERATOR_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "GeneratorType.hh"
+
+/**
+ @class generator
+ @brief generator element from schema.
+ */
+class generator: public SAXObject, public GeneratorType
+{
+public:
+    generator()
+    {
+    }
+
+    virtual ~generator()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
global_field.hh added at 1.1
diff -N global_field.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ global_field.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/global_field.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_GLOBAL_FIELD_HH
+#define LCDD_GLOBAL_FIELD_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "GlobalFieldType.hh"
+
+/**
+ @class global_field
+ @brief global_field element from schema.
+ */
+class global_field: public SAXObject, public GlobalFieldType
+{
+public:
+    global_field()
+    {
+    }
+
+    virtual ~global_field()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
global_grid_xy.hh added at 1.1
diff -N global_grid_xy.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ global_grid_xy.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,35 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/global_grid_xy.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+#ifndef LCDD_GLOBAL_GRID_XY_HH
+#define LCDD_GLOBAL_GRID_XY_HH 1
+
+#include "GlobalGridXYSegmentationType.hh"
+
+#include <string>
+
+#include "Saxana/SAXObject.h"
+
+/**
+ @class GlobalGridXYSegmentationType
+ @brief GlobalGridXYSegmentation from schema.
+ */
+class global_grid_xy: public SAXObject, public GlobalGridXYSegmentationType
+{
+public:
+
+    global_grid_xy()
+    {
+    }
+
+    virtual ~global_grid_xy()
+    {
+    }
+
+public:
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
grid_xyz.hh added at 1.1
diff -N grid_xyz.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ grid_xyz.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,32 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/grid_xyz.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_GRID_XYZ_HH
+#define LCDD_GRID_XYZ_HH 1
+
+#include "NonprojectiveSegmentationType.hh"
+
+#include "Saxana/SAXObject.h"
+
+/**
+ @class grid_xyz
+ @brief grid_xyz element from schema.
+ */
+class grid_xyz: public SAXObject, public NonprojectiveSegmentationType
+{
+
+public:
+    grid_xyz()
+    {
+    }
+
+    virtual ~grid_xyz()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
header.hh added at 1.1
diff -N header.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ header.hh	26 Jun 2013 01:32:46 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/header.hh,v 1.1 2013/06/26 01:32:46 jeremy Exp $
+
+#ifndef LCDD_HEADER_HH
+#define LCDD_HEADER_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "HeaderType.hh"
+
+/**
+ @class header
+ @brief header element from schema.
+ */
+class header: public SAXObject, public HeaderType
+{
+public:
+    header()
+    {
+    }
+
+    virtual ~header()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
idfieldElem.hh added at 1.1
diff -N idfieldElem.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ idfieldElem.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,30 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/idfieldElem.hh,v 1.1 2013/06/26 01:32:47 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

lcdd/include/lcdd/schema
idspecElem.hh added at 1.1
diff -N idspecElem.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ idspecElem.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/idspecElem.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+#ifndef LCDD_IDSPECELEM_HH
+#define LCDD_IDSPECELEM_HH
+
+#include "Saxana/SAXObject.h"
+
+#include "IdSpecType.hh"
+
+/**
+ @class idspecElem
+ @brief idspec element class.
+ */
+class idspecElem: public SAXObject, public IdSpecType
+{
+
+public:
+    idspecElem()
+    {
+    }
+
+    virtual ~idspecElem()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
limit.hh added at 1.1
diff -N limit.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ limit.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,30 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/limit.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+#ifndef LCDD_LIMIT_HH
+#define LCDD_LIMIT_HH 1
+
+#include "LimitParamType.hh"
+
+#include "Saxana/SAXObject.h"
+
+/**
+ * @class limit
+ * @brief Element limit from the lcdd_limits.lcdd subschema.
+ */
+class limit: public SAXObject, public LimitParamType
+{
+public:
+    limit()
+    {
+    }
+
+    virtual ~limit()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
limitset.hh added at 1.1
diff -N limitset.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ limitset.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/limitset.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+#ifndef LCDD_LIMITSET_HH
+#define LCDD_LIMITSET_HH 1
+
+#include "LimitSetType.hh"
+
+#include "Saxana/SAXObject.h"
+
+/**
+ * @class limitset
+ * @brief Element limitset from the lcdd_limits.lcdd subschema.
+ */
+class limitset: public SAXObject, public LimitSetType
+{
+public:
+
+    limitset()
+    {
+    }
+
+    virtual ~limitset()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
nonprojective_cylinder.hh added at 1.1
diff -N nonprojective_cylinder.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ nonprojective_cylinder.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,32 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/nonprojective_cylinder.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+
+#ifndef LCDD_NONPROJECTIVE_CYLINDER_HH
+#define LCDD_NONPROJECTIVE_CYLINDER_HH 1
+
+#include "NonprojectiveCylinderSegmentationType.hh"
+
+#include "Saxana/SAXObject.h"
+
+/**
+ @class nonprojective_cylinder
+ @brief nonprojective_cylinder element from schema.
+ */
+class nonprojective_cylinder: public SAXObject, public NonprojectiveCylinderSegmentationType
+{
+
+public:
+    nonprojective_cylinder()
+    {
+    }
+
+    virtual ~nonprojective_cylinder()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
optical_calorimeter.hh added at 1.1
diff -N optical_calorimeter.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ optical_calorimeter.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/optical_calorimeter.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+#ifndef LCDD_OPTICAL_CALORIMETER_HH
+#define LCDD_OPTICAL_CALORIMETER_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "OpticalCalorimeterType.hh"
+
+/**
+
+ @class optical_calorimeter
+ @brief optical_calorimeter element from schema.
+ */
+class optical_calorimeter: public SAXObject, public OpticalCalorimeterType
+{
+public:
+    optical_calorimeter()
+    {
+    }
+
+    virtual ~optical_calorimeter()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
physvolidElem.hh added at 1.1
diff -N physvolidElem.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ physvolidElem.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/physvolidElem.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+#ifndef physvolid_hh
+#define physvolid_hh 1
+
+#include "Saxana/SAXObject.h"
+
+#include "PhysVolIdType.hh"
+
+/**
+ @class physvolidElem
+ @brief physvolid element from schema.
+ */
+class physvolidElem: public SAXObject, public PhysVolIdType
+{
+
+public:
+    physvolidElem()
+    {
+    }
+
+    virtual ~physvolidElem()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
projective_cylinder.hh added at 1.1
diff -N projective_cylinder.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ projective_cylinder.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,32 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/projective_cylinder.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+
+#ifndef LCDD_PROJECTIVE_CYLINDER_HH
+#define LCDD_PROJECTIVE_CYLINDER_HH 1
+
+#include "ProjectiveCylinderSegmentationType.hh"
+
+#include "Saxana/SAXObject.h"
+
+/**
+ @class projective_cylinder
+ @brief projective_cylinder element from schema.
+ */
+class projective_cylinder: public SAXObject, public ProjectiveCylinderSegmentationType
+{
+
+public:
+    projective_cylinder()
+    {
+    }
+
+    virtual ~projective_cylinder()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
projective_zplane.hh added at 1.1
diff -N projective_zplane.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ projective_zplane.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,32 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/projective_zplane.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+
+#ifndef LCDD_PROJECTIVE_ZPLANE_HH
+#define LCDD_PROJECTIVE_ZPLANE_HH 1
+
+#include "ProjectiveZPlaneSegmentationType.hh"
+
+#include "Saxana/SAXObject.h"
+
+/**
+ @class projective_zplane
+ @brief projective_zplane element from schema.
+ */
+class projective_zplane: public SAXObject, public ProjectiveZPlaneSegmentationType
+{
+
+public:
+    projective_zplane()
+    {
+    }
+
+    virtual ~projective_zplane()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
region.hh added at 1.1
diff -N region.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ region.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,29 @@
+#ifndef LCDD_REGION_HH
+#define LCDD_REGION_HH 1
+
+#include "Saxana/SAXObject.h"
+
+#include "RegionType.hh"
+
+/**
+ @class region
+ @brief region element from schema.
+ */
+class region: public SAXObject, public RegionType
+{
+public:
+    region()
+    {
+    }
+
+    virtual ~region()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
rz_field_map.hh added at 1.1
diff -N rz_field_map.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ rz_field_map.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,28 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/rz_field_map.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+#ifndef LCDD_RZ_FIELD_MAP_HH
+#define LCDD_RZ_FIELD_MAP_HH 1
+
+#include "RZFieldMapType.hh"
+
+/**
+ * @class rz_field_map
+ * @brief The rz_field_map element from lcdd_fields.xsd subschema.
+ */
+class rz_field_map: public SAXObject, public RZFieldMapType
+{
+public:
+    rz_field_map()
+    {
+    }
+
+    virtual ~rz_field_map()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
rzb.hh added at 1.1
diff -N rzb.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ rzb.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,30 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/rzb.hh,v 1.1 2013/06/26 01:32:47 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

lcdd/include/lcdd/schema
scorer.hh added at 1.1
diff -N scorer.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ scorer.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,30 @@
+#ifndef LCDD_SCORER_HH
+#define LCDD_SCORER_HH
+
+#include "ScorerType.hh"
+
+#include "Saxana/SAXObject.h"
+#include "SensitiveDetectorType.hh"
+
+/**
+ * @class scorer
+ * @brief scorer element from schema.
+ */
+class scorer: public SAXObject, public ScorerType
+{
+public:
+    scorer()
+    {
+    }
+
+    virtual ~scorer()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
sensitive_detector.hh added at 1.1
diff -N sensitive_detector.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sensitive_detector.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,29 @@
+#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

lcdd/include/lcdd/schema
solenoid.hh added at 1.1
diff -N solenoid.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ solenoid.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,31 @@
+// $Id: solenoid.hh,v 1.1 2013/06/26 01:32:47 jeremy Exp $
+
+#ifndef LCDD_SOLENOID_HH
+#define LCDD_SOLENOID_HH
+
+#include "SolenoidType.hh"
+
+#include "Saxana/SAXObject.h"
+/**
+ @class solenoid
+ @brief solenoid element from schema.
+ */
+
+class solenoid: public SAXObject, public SolenoidType
+{
+public:
+    solenoid()
+    {
+    }
+
+    virtual ~solenoid()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
tracker.hh added at 1.1
diff -N tracker.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tracker.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,31 @@
+#ifndef LCDD_TRACKER_HH
+#define LCDD_TRACKER_HH 1
+
+#include "TrackerType.hh"
+
+#include "Saxana/SAXObject.h"
+#include "SensitiveDetectorType.hh"
+
+/**
+ * @class tracker
+ * @brief tracker element from schema.
+ */
+class tracker: public SAXObject, public TrackerType
+{
+public:
+    tracker()
+    {
+    }
+
+    virtual ~tracker()
+    {
+    }
+
+    virtual SAXObject::Type type()
+    {
+        //std::cout << "tracker::type()" << std::endl;
+        return SAXObject::element;
+    }
+};
+
+#endif

lcdd/include/lcdd/schema
unsegmented_calorimeter.hh added at 1.1
diff -N unsegmented_calorimeter.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ unsegmented_calorimeter.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/unsegmented_calorimeter.hh,v 1.1 2013/06/26 01:32:47 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

lcdd/include/lcdd/schema
vis.hh added at 1.1
diff -N vis.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ vis.hh	26 Jun 2013 01:32:47 -0000	1.1
@@ -0,0 +1,31 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/schema/vis.hh,v 1.1 2013/06/26 01:32:47 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

lcdd/include/lcdd/subscribers
volumeExtendedSubscriber.hh added at 1.1
diff -N volumeExtendedSubscriber.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ volumeExtendedSubscriber.hh	26 Jun 2013 01:32:48 -0000	1.1
@@ -0,0 +1,48 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/subscribers/volumeExtendedSubscriber.hh,v 1.1 2013/06/26 01:32:48 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 "lcdd/core/LCDDProcessor.hh"
+#include "lcdd/id/IdManager.hh"
+#include "lcdd/detectors/G4SensitiveDetector.hh"
+#include "lcdd/geant4/G4LimitSet.hh"
+#include "lcdd/schema/sensitive_detector.hh"
+#include "lcdd/schema/RegionType.hh"
+#include "lcdd/schema/physvolidElem.hh"
+#include "lcdd/schema/VisType.hh"
+#include "lcdd/schema/limit.hh"
+#include "lcdd/schema/LimitSetType.hh"
+
+// Geant4
+#include "G4LogicalVolume.hh"
+#include "G4Region.hh"
+#include "G4VisAttributes.hh"
+
+// STL
+#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)

lcdd/include/lcdd/util
ElementNames.icc added at 1.1
diff -N ElementNames.icc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ElementNames.icc	26 Jun 2013 01:32:48 -0000	1.1
@@ -0,0 +1,203 @@
+int NistElementsDump::nelements = 98;
+
+string NistElementsDump::abbrevs[] = {
+    "Ac",
+    "Ag",
+    "Al",
+    "Am",
+    "Ar",
+    "As",
+    "At",
+    "Au",
+    "B",
+    "Ba",
+    "Be",
+    "Bi",
+    "Bk",
+    "Br",
+    "C",
+    "Ca",
+    "Cd",
+    "Ce",
+    "Cf",
+    "Cl",
+    "Cm",
+    "Co",
+    "Cr",
+    "Cs",
+    "Cu",
+    "Dy",
+    "Er",
+    "Eu",
+    "F",
+    "Fe",
+    "Fr",
+    "Ga",
+    "Gd",
+    "Ge",
+    "H",
+    "He",
+    "Hf",
+    "Hg",
+    "Ho",
+    "I",
+    "In",
+    "Ir",
+    "K",
+    "Kr",
+    "La",
+    "Li",
+    "Lu",
+    "Mg",
+    "Mn",
+    "Mo",
+    "N",
+    "Na",
+    "Nb",
+    "Nd",
+    "Ne",
+    "Ni",
+    "Np",
+    "O",
+    "Os",
+    "P",
+    "Pa",
+    "Pb",
+    "Pd",
+    "Pm",
+    "Po",
+    "Pr",
+    "Pt",
+    "Pu",
+    "Ra",
+    "Rb",
+    "Re",
+    "Rh",
+    "Rn",
+    "Ru",
+    "S",
+    "Sb",
+    "Sc",
+    "Se",
+    "Si",
+    "Sm",
+    "Sn",
+    "Sr",
+    "Ta",
+    "Tb",
+    "Tc",
+    "Te",
+    "Th",
+    "Ti",
+    "Tl",
+    "Tm",
+    "U",
+    "V",
+    "W",
+    "Xe",
+    "Y",
+    "Yb",
+    "Zn",
+    "Zr"
+};
+
+string NistElementsDump::names[] = {
+    "Actinium",
+    "Silver",
+    "Aluminum",
+    "Americium",
+    "Argon",
+    "Arsenic",
+    "Astatine",
+    "Gold",
+    "Boron",
+    "Barium",
+    "Beryllium",
+    "Bismuth",
+    "Berkelium",
+    "Bromine",
+    "Carbon",
+    "Calcium",
+    "Cadmium",
+    "Cerium",
+    "Californium",
+    "Chlorine",
+    "Curium",
+    "Cobalt",
+    "Chromium",
+    "Cesium",
+    "Copper",
+    "Dysprosium",
+    "Erbium",
+    "Europium",
+    "Fluorine",
+    "Iron",
+    "Francium",
+    "Gallium",
+    "Gadolinium",
+    "Germanium",
+    "Hydrogen",
+    "Helium",
+    "Hafnium",
+    "Mercury",
+    "Holmium",
+    "Iodine",
+    "Indium",
+    "Iridium",
+    "Potassium",
+    "Krypton",
+    "Lanthanum",
+    "Lithium",
+    "Lutetium",
+    "Magnesium",
+    "Manganese",
+    "Molybdenum",
+    "Nitrogen",
+    "Sodium",
+    "Niobium",
+    "Neodymium",
+    "Neon",
+    "Nickel",
+    "Neptunium",
+    "Oxygen",
+    "Osmium",
+    "Phosphorus",
+    "Protactinium",
+    "Lead",
+    "Palladium",
+    "Promethium",
+    "Polonium",
+    "Praseodymium",
+    "Platinum",
+    "Plutonium",
+    "Radium",
+    "Rubidium",
+    "Rhenium",
+    "Rhodium",
+    "Radon",
+    "Ruthenium",
+    "Sulfur",
+    "Antimony",
+    "Scandium",
+    "Selenium",
+    "Silicon",
+    "Samarium",
+    "Tin",
+    "Strontium",
+    "Tantalum",
+    "Terbium",
+    "Technetium",
+    "Tellurium",
+    "Thorium",
+    "Titanium",
+    "Thallium",
+    "Thulium",
+    "Uranium",
+    "Vanadium",
+    "Tungsten",
+    "Xenon",
+    "Yttrium",
+    "Ytterbium",
+    "Zinc",
+    "Zirconium"
+};

lcdd/include/lcdd/util
GDMLWriter.hh added at 1.1
diff -N GDMLWriter.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ GDMLWriter.hh	26 Jun 2013 01:32:48 -0000	1.1
@@ -0,0 +1,16 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/util/GDMLWriter.hh,v 1.1 2013/06/26 01:32:48 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

lcdd/include/lcdd/util
GDMLWriterMessenger.hh added at 1.1
diff -N GDMLWriterMessenger.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ GDMLWriterMessenger.hh	26 Jun 2013 01:32:48 -0000	1.1
@@ -0,0 +1,34 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/util/GDMLWriterMessenger.hh,v 1.1 2013/06/26 01:32:48 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

lcdd/include/lcdd/util
NistElementsDump.hh added at 1.1
diff -N NistElementsDump.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ NistElementsDump.hh	26 Jun 2013 01:32:48 -0000	1.1
@@ -0,0 +1,26 @@
+// $Id: NistElementsDump.hh,v 1.1 2013/06/26 01:32:48 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

lcdd/include/lcdd/util
StoreInspector.hh added at 1.1
diff -N StoreInspector.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ StoreInspector.hh	26 Jun 2013 01:32:48 -0000	1.1
@@ -0,0 +1,371 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/util/StoreInspector.hh,v 1.1 2013/06/26 01:32:48 jeremy Exp $
+#ifndef LCDD_STOREINSPECTOR_HH
+#define LCDD_STOREINSPECTOR_HH 1
+
+// LCDD
+#include "lcdd/core/LCDDProcessor.hh"
+#include "lcdd/id/IdManager.hh"
+#include "lcdd/detectors/G4SensitiveDetector.hh"
+#include "lcdd/geant4/G4LimitSet.hh"
+#include "lcdd/geant4/G4UserRegionInformation.hh"
+
+// Geant4
+#include "G4UIcmdWithAString.hh"
+#include "G4UImessenger.hh"
+#include "G4UIdirectory.hh"
+#include "G4UnitsTable.hh"
+#include "G4MaterialTable.hh"
+#include "G4VSolid.hh"
+#include "G4SolidStore.hh"
+#include "G4LogicalVolume.hh"
+#include "G4LogicalVolumeStore.hh"
+#include "G4UserLimits.hh"
+#include "G4UnitsTable.hh"
+#include "G4VPhysicalVolume.hh"
+#include "G4PhysicalVolumeStore.hh"
+#include "G4Region.hh"
+#include "G4RegionStore.hh"
+#include "G4ProductionCuts.hh"
+#include "G4VUserRegionInformation.hh"
+#include "G4VisAttributes.hh"
+#include "G4MagneticField.hh"
+
+// STL
+#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;
+};
+
+/**
+ * Declarations of specific types of object store inspectors.
+ */
+typedef StoreInspector<G4Material, G4MaterialTable> G4MaterialStoreInspector;
+typedef StoreInspector<G4VSolid, G4SolidStore> G4SolidStoreInspector;
+typedef StoreInspector<G4LimitSet, LCDDProcessor::LimitSets> G4LimitSetInspector;
+typedef StoreInspector<G4LogicalVolume, G4LogicalVolumeStore> G4LogicalVolumeStoreInspector;
+typedef StoreInspector<G4VPhysicalVolume, G4PhysicalVolumeStore> G4PhysicalVolumeStoreInspector;
+typedef StoreInspector<IdSpec, IdManager::IdSpecs> IdSpecInspector;
+typedef StoreInspector<G4VisAttributes, LCDDProcessor::VisAttributes> G4VisAttributeInspector;
+G4VisAttributeInspector visInspector("G4VisAttributes", LCDDProcessor::instance()->getVisAttributesStore());
+typedef StoreInspector<G4Region, G4RegionStore> G4RegionStoreInspector;
+typedef StoreInspector<G4SensitiveDetector, LCDDProcessor::SensitiveDetectors> G4SensitiveDetectorInspector;
+typedef StoreInspector<G4MagneticField, LCDDProcessor::MagneticFields> G4MagneticFieldInspector;
+
+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;
+}
+
+/* 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;
+}
+
+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;
+}
+
+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;
+}
+
+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;
+}
+
+/* G4Region stream operator */
+std::ostream& operator<<(std::ostream &os, G4Region &reg)
+{
+    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;
+}
+
+std::ostream& operator<<(std::ostream& os, G4MagneticField&)
+{
+    /* Generic B-fields have no displayable data attributes! */
+    return os;
+}
+
+/* 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;
+}
+
+#endif

lcdd/include/lcdd/util
StringUtil.hh added at 1.1
diff -N StringUtil.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ StringUtil.hh	26 Jun 2013 01:32:48 -0000	1.1
@@ -0,0 +1,63 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/util/StringUtil.hh,v 1.1 2013/06/26 01:32:48 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

lcdd/include/lcdd/util
Verbose.hh added at 1.1
diff -N Verbose.hh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Verbose.hh	26 Jun 2013 01:32:48 -0000	1.1
@@ -0,0 +1,41 @@
+// $Header: /cvs/lcd/lcdd/include/lcdd/util/Verbose.hh,v 1.1 2013/06/26 01:32:48 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
CVSspam 0.2.12


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