18 modified files
lcdd/include/lcdd/bfield
diff -u -r1.4 -r1.5
--- BoxDipole.hh 2 Jul 2013 21:19:43 -0000 1.4
+++ BoxDipole.hh 9 Jul 2013 18:51:54 -0000 1.5
@@ -23,10 +23,7 @@
/**
* Class destructor.
*/
- virtual ~BoxDipole()
- {
- ;
- }
+ virtual ~BoxDipole();
/**
* Implementation of G4MagneticField class's primary method to get B-field at a point.
lcdd/include/lcdd/bfield
diff -u -r1.4 -r1.5
--- Dipole.hh 2 Jul 2013 22:57:42 -0000 1.4
+++ Dipole.hh 9 Jul 2013 18:51:54 -0000 1.5
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/Dipole.hh,v 1.4 2013/07/02 22:57:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/Dipole.hh,v 1.5 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_BFIELD_DIPOLE_HH
#define LCDD_BFIELD_DIPOLE_HH 1
@@ -17,20 +17,15 @@
{
public:
- /**
- * Class constructor.
- * @todo Add fully qualified constructor.
- */
- Dipole()
- {
- }
+ /**
+ * Class constructor.
+ */
+ Dipole();
/**
* Class destructor.
*/
- virtual ~Dipole()
- {
- }
+ virtual ~Dipole();
public:
lcdd/include/lcdd/bfield
diff -u -r1.4 -r1.5
--- RZBData.hh 2 Jul 2013 21:19:43 -0000 1.4
+++ RZBData.hh 9 Jul 2013 18:51:54 -0000 1.5
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/RZBData.hh,v 1.4 2013/07/02 21:19:43 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/bfield/RZBData.hh,v 1.5 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_BFIELD_RZBDATA_HH
#define LCDD_BFIELD_RZBDATA_HH 1
@@ -20,17 +20,12 @@
* @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)
- {
- }
+ RZBData(double r, double z, double Br, double Bz);
/**
* Class destructor.
*/
- virtual ~RZBData()
- {
- }
+ virtual ~RZBData();
public:
@@ -38,37 +33,25 @@
* Get the radial coordinate.
* @return The radial coordinate.
*/
- double r() const
- {
- return _r;
- }
+ double r() const;
/**
* Get the Z coordinate.
* @return The Z coordinate.
*/
- double z() const
- {
- return _z;
- }
+ double z() const;
/**
* Get the BR field component.
* @return The BR field component.
*/
- double Br() const
- {
- return _Br;
- }
+ double Br() const;
/**
* Get BZ field component.
* @return The BZ field component.
*/
- double Bz() const
- {
- return _Bz;
- }
+ double Bz() const;
private:
double _r;
lcdd/include/lcdd/detectors
diff -u -r1.3 -r1.4
--- GlobalGridXYSegmentation.hh 3 Jul 2013 20:03:49 -0000 1.3
+++ GlobalGridXYSegmentation.hh 9 Jul 2013 18:51:54 -0000 1.4
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/GlobalGridXYSegmentation.hh,v 1.3 2013/07/03 20:03:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/GlobalGridXYSegmentation.hh,v 1.4 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_DETECTORS_GLOBALGRIDXYSEGMENTATION_HH
#define LCDD_DETECTORS_GLOBALGRIDXYSEGMENTATION_HH 1
@@ -55,11 +55,7 @@
/**
* Set the bin names for this Segmentation.
*/
- void setBinNames()
- {
- addBinName("x");
- addBinName("y");
- }
+ void setBinNames();
private:
lcdd/include/lcdd/detectors
diff -u -r1.3 -r1.4
--- GridXYZSegmentation.hh 3 Jul 2013 20:03:49 -0000 1.3
+++ GridXYZSegmentation.hh 9 Jul 2013 18:51:54 -0000 1.4
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/GridXYZSegmentation.hh,v 1.3 2013/07/03 20:03:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/GridXYZSegmentation.hh,v 1.4 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_DETECTORS_G4GRIDXYZSEGMENTATION_HH
#define LCDD_DETECTORS_G4GRIDXYZSEGMENTATION_HH 1
@@ -51,19 +51,14 @@
/**
* Set the valid bin names for this Segmentation.
*/
- void setBinNames()
- {
- addBinName("x");
- addBinName("y");
- addBinName("z");
- }
+ void setBinNames();
/**
- * Compute the local hit position from a local step position.
- * @param[in] localStepPos The local step position.
- * @return The local hit position.
- */
- G4ThreeVector getLocalHitPos(const G4ThreeVector& localStepPos);
+ * Compute the local hit position from a local step position.
+ * @param[in] localStepPos The local step position.
+ * @return The local hit position.
+ */
+ G4ThreeVector getLocalHitPos(const G4ThreeVector& localStepPos);
protected:
lcdd/include/lcdd/detectors
diff -u -r1.4 -r1.5
--- HitComparator.hh 2 Jul 2013 22:57:42 -0000 1.4
+++ HitComparator.hh 9 Jul 2013 18:51:54 -0000 1.5
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/HitComparator.hh,v 1.4 2013/07/02 22:57:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/HitComparator.hh,v 1.5 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_DETECTORS_HITCOMPARATOR_HH
#define LCDD_DETECTORS_HITCOMPARATOR_HH 1
@@ -27,7 +27,7 @@
* @param[in] hit1 The first hit to compare.
* @param[in] hit2 The second hit to compare.
*/
- virtual bool compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2) = 0;
+ virtual bool compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2) const = 0;
};
#endif
lcdd/include/lcdd/detectors
diff -u -r1.4 -r1.5
--- PositionComparator.hh 2 Jul 2013 22:57:42 -0000 1.4
+++ PositionComparator.hh 9 Jul 2013 18:51:54 -0000 1.5
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/PositionComparator.hh,v 1.4 2013/07/02 22:57:42 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/PositionComparator.hh,v 1.5 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_DETECTORS_POSITIONCOMPARATOR_HH
#define LCDD_DETECTORS_POSITIONCOMPARATOR_HH 1
@@ -14,12 +14,15 @@
public:
+ /**
+ * Class constructor.
+ */
+ PositionComparator();
+
/**
* Class destructor.
*/
- virtual ~PositionComparator()
- {
- }
+ virtual ~PositionComparator();
public:
@@ -29,18 +32,7 @@
* @param[in] hit2 The second hit.
* @return True if positions are equal; false if not.
*/
- bool compare(const CalorimeterHit& hit1, const CalorimeterHit& 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());
- }
+ bool compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2) const;
};
#endif
lcdd/include/lcdd/detectors
diff -u -r1.3 -r1.4
--- ProjectiveSegmentation.hh 3 Jul 2013 20:03:49 -0000 1.3
+++ ProjectiveSegmentation.hh 9 Jul 2013 18:51:54 -0000 1.4
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/ProjectiveSegmentation.hh,v 1.3 2013/07/03 20:03:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/ProjectiveSegmentation.hh,v 1.4 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_DETECTORS_PROJECTIVESEGMENTATION_HH
#define LCDD_DETECTORS_PROJECTIVESEGMENTATION_HH 1
@@ -48,11 +48,7 @@
/**
* Get the valid bin names for this Segmentation.
*/
- virtual void setBinNames()
- {
- addBinName("theta");
- addBinName("phi");
- }
+ void setBinNames();
protected:
lcdd/include/lcdd/detectors
diff -u -r1.4 -r1.5
--- Segmentation.hh 3 Jul 2013 20:03:49 -0000 1.4
+++ Segmentation.hh 9 Jul 2013 18:51:54 -0000 1.5
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/Segmentation.hh,v 1.4 2013/07/03 20:03:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/Segmentation.hh,v 1.5 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_DETECTORS_SEGMENTATION_HH
#define LCDD_DETECTORS_SEGMENTATION_HH 1
@@ -93,19 +93,7 @@
* Get a string for this Segmentation type.
* @return The Segmentation type as a string.
*/
- const G4String& getTypeString()
- {
- static G4String typestr;
- if (m_type == eProjective) {
- typestr = "Projective";
- } else if (m_type == eNonprojective) {
- typestr = "Nonprojective";
- } else {
- typestr = "Unknown";
- }
-
- return typestr;
- }
+ const G4String& getTypeString();
/**
* Get a bin value from an index.
@@ -113,29 +101,20 @@
* @return The bin value.
* @todo Change this method's name to "getBinValue".
*/
- int getBin(int idx)
- {
- return m_bins.at(idx);
- }
+ int getBin(int idx);
/**
* Get the name of a bin from an index.
* @param[in] idx The bin index.
* @return The name of the bin.
*/
- const std::string& getBinName(int idx)
- {
- return m_binNames.at(idx);
- }
+ const std::string& getBinName(int idx);
/**
* Add a bin name to the end of the list.
* @param[in] The name of the bin.
*/
- void addBinName(const std::string& binName)
- {
- m_binNames.push_back(binName);
- }
+ void addBinName(const std::string& binName);
/**
* Set the bin value.
@@ -161,19 +140,13 @@
* Get a list of bin names.
* @return The list of bin names.
*/
- const std::vector<std::string>& getBinNames()
- {
- return m_binNames;
- }
+ const std::vector<std::string>& getBinNames();
/**
* Print this object's bin values to an output stream.
* @param[in] os The output stream.
*/
- void printOutBins(std::ostream& os)
- {
- printOutBins(os, m_bins);
- }
+ void printOutBins(std::ostream& os);
protected:
@@ -190,10 +163,7 @@
* @param[in] gridDim The dimension of the readout grid.
* @return The value of the bin at that coordinate.
*/
- static int computeBin(double localDim, double gridDim)
- {
- return int(floor(localDim / gridDim));
- }
+ static int computeBin(double localDim, double gridDim);
/**
* Compute the coordinate of a cell center at a given a bin value.
@@ -201,10 +171,7 @@
* @param[in] incr The grid size.
* @return The coordinate of the cell center.
*/
- static double computeDim(const int &bin, const double &incr)
- {
- return (double(bin) + .5) * incr;
- }
+ static double computeDim(const int &bin, const double &incr);
private:
lcdd/include/lcdd/detectors
diff -u -r1.2 -r1.3
--- SegmentationFactory.hh 3 Jul 2013 20:03:49 -0000 1.2
+++ SegmentationFactory.hh 9 Jul 2013 18:51:54 -0000 1.3
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/SegmentationFactory.hh,v 1.2 2013/07/03 20:03:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/SegmentationFactory.hh,v 1.3 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_DETECTORS_SEGMENTATIONFACTORY_HH
#define LCDD_DETECTORS_SEGMENTATIONFACTORY_HH 1
@@ -14,14 +14,13 @@
*/
class SegmentationFactory
{
+
private:
/**
* Class constructor which should not be accessed.
*/
- SegmentationFactory()
- {
- }
+ SegmentationFactory();
public:
lcdd/include/lcdd/id
diff -u -r1.4 -r1.5
--- IdComparator.hh 3 Jul 2013 23:00:46 -0000 1.4
+++ IdComparator.hh 9 Jul 2013 18:51:54 -0000 1.5
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdComparator.hh,v 1.4 2013/07/03 23:00:46 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdComparator.hh,v 1.5 2013/07/09 18:51:54 jeremy Exp $
#ifndef LCDD_IDCOMPARATOR_HH
#define LCDD_IDCOMPARATOR_HH 1
@@ -34,7 +34,7 @@
* @param[id] hit2 The second hit.
* @return True if the hit's IDs are equal; false if not.
*/
- bool compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2)
+ bool compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2) const
{
return (hit1.getId64bit() == hit2.getId64bit());
}
lcdd/src/lcdd/bfield
diff -u -r1.1 -r1.2
--- BoxDipole.cc 1 Jul 2013 21:00:44 -0000 1.1
+++ BoxDipole.cc 9 Jul 2013 18:51:54 -0000 1.2
@@ -1,8 +1,12 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/BoxDipole.cc,v 1.1 2013/07/01 21:00:44 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/BoxDipole.cc,v 1.2 2013/07/09 18:51:54 jeremy Exp $
// LCDD
#include "lcdd/bfield/BoxDipole.hh"
+BoxDipole::~BoxDipole()
+{
+}
+
BoxDipole::BoxDipole(double x, double y, double z, double dx, double dy, double dz, double bx, double by, double bz) :
_x(x), _y(y), _z(z), _dx(dx), _dy(dy), _dz(dz), _bx(bx), _by(by), _bz(bz)
{
lcdd/src/lcdd/bfield
diff -u -r1.2 -r1.3
--- Dipole.cc 2 Jul 2013 21:19:44 -0000 1.2
+++ Dipole.cc 9 Jul 2013 18:51:54 -0000 1.3
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/Dipole.cc,v 1.2 2013/07/02 21:19:44 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/Dipole.cc,v 1.3 2013/07/09 18:51:54 jeremy Exp $
// LCDD
#include "lcdd/bfield/Dipole.hh"
@@ -7,6 +7,14 @@
#include <iostream>
#include <cmath>
+Dipole::Dipole()
+{
+}
+
+Dipole::~Dipole()
+{
+}
+
/**
* Apply polynomial fit of dipole field, with variable number of coefficients
* read from the input XML file.
lcdd/src/lcdd/detectors
diff -u -r1.2 -r1.3
--- GlobalGridXYSegmentation.cc 2 Jul 2013 22:57:43 -0000 1.2
+++ GlobalGridXYSegmentation.cc 9 Jul 2013 18:51:54 -0000 1.3
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/GlobalGridXYSegmentation.cc,v 1.2 2013/07/02 22:57:43 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/GlobalGridXYSegmentation.cc,v 1.3 2013/07/09 18:51:54 jeremy Exp $
// LCDD
#include "lcdd/detectors/GlobalGridXYSegmentation.hh"
@@ -17,6 +17,13 @@
{
}
+void GlobalGridXYSegmentation::setBinNames()
+{
+ addBinName("x");
+ addBinName("y");
+ addBinName("z");
+}
+
G4ThreeVector GlobalGridXYSegmentation::getGlobalHitPos(const G4Step* aStep)
{
// Compute the midpoint of the global step.
lcdd/src/lcdd/detectors
diff -u -r1.2 -r1.3
--- GridXYZSegmentation.cc 2 Jul 2013 22:57:43 -0000 1.2
+++ GridXYZSegmentation.cc 9 Jul 2013 18:51:54 -0000 1.3
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/GridXYZSegmentation.cc,v 1.2 2013/07/02 22:57:43 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/GridXYZSegmentation.cc,v 1.3 2013/07/09 18:51:54 jeremy Exp $
// LCDD
#include "lcdd/detectors/GridXYZSegmentation.hh"
@@ -17,6 +17,13 @@
{
}
+void GridXYZSegmentation::setBinNames()
+{
+ addBinName("x");
+ addBinName("y");
+ addBinName("z");
+}
+
G4ThreeVector GridXYZSegmentation::getGlobalHitPos(const G4Step* aStep)
{
// compute midpoint
lcdd/src/lcdd/detectors
diff -u -r1.3 -r1.4
--- ProjectiveSegmentation.cc 3 Jul 2013 20:03:49 -0000 1.3
+++ ProjectiveSegmentation.cc 9 Jul 2013 18:51:54 -0000 1.4
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/ProjectiveSegmentation.cc,v 1.3 2013/07/03 20:03:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/ProjectiveSegmentation.cc,v 1.4 2013/07/09 18:51:54 jeremy Exp $
// LCDD
#include "lcdd/detectors/ProjectiveSegmentation.hh"
@@ -26,6 +26,12 @@
{
}
+void ProjectiveSegmentation::setBinNames()
+{
+ addBinName("theta");
+ addBinName("phi");
+}
+
G4ThreeVector ProjectiveSegmentation::getGlobalHitPos(const G4Step* aStep)
{
// DEBUG
lcdd/src/lcdd/detectors
diff -u -r1.2 -r1.3
--- Segmentation.cc 2 Jul 2013 22:57:43 -0000 1.2
+++ Segmentation.cc 9 Jul 2013 18:51:54 -0000 1.3
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/Segmentation.cc,v 1.2 2013/07/02 22:57:43 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/Segmentation.cc,v 1.3 2013/07/09 18:51:54 jeremy Exp $
// LCDD
#include "lcdd/detectors/Segmentation.hh"
@@ -78,3 +78,53 @@
return valid;
}
+
+
+const G4String& Segmentation::getTypeString()
+{
+ static G4String typestr;
+ if (m_type == Segmentation::eProjective) {
+ typestr = "Projective";
+ } else if (m_type == Segmentation::eNonprojective) {
+ typestr = "Nonprojective";
+ } else {
+ typestr = "Unknown";
+ }
+ return typestr;
+}
+
+int Segmentation::getBin(int idx)
+{
+ return m_bins.at(idx);
+}
+
+const std::string& Segmentation::getBinName(int idx)
+{
+ return m_binNames.at(idx);
+}
+
+
+void Segmentation::addBinName(const std::string& binName)
+{
+ m_binNames.push_back(binName);
+}
+
+const std::vector<std::string>& Segmentation::getBinNames()
+{
+ return m_binNames;
+}
+
+void Segmentation::printOutBins(std::ostream& os)
+{
+ printOutBins(os, m_bins);
+}
+
+int Segmentation::computeBin(double localDim, double gridDim)
+{
+ return int(floor(localDim / gridDim));
+}
+
+double Segmentation::computeDim(const int &bin, const double &incr)
+{
+ return (double(bin) + .5) * incr;
+}
lcdd/src/lcdd/detectors
diff -u -r1.1 -r1.2
--- SegmentationFactory.cc 1 Jul 2013 21:00:45 -0000 1.1
+++ SegmentationFactory.cc 9 Jul 2013 18:51:54 -0000 1.2
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SegmentationFactory.cc,v 1.1 2013/07/01 21:00:45 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SegmentationFactory.cc,v 1.2 2013/07/09 18:51:54 jeremy Exp $
// LCDD
#include "lcdd/detectors/SegmentationFactory.hh"
@@ -24,6 +24,10 @@
// STL
#include <iostream>
+SegmentationFactory::SegmentationFactory()
+{
+}
+
Segmentation* SegmentationFactory::createSegmentation(SAXObject* obj, const std::string& tag)
{
Segmentation* seg = 0;
CVSspam 0.2.12