32 modified files
projects/lcdd/branches/v04-01-00-pre/include/lcdd/core
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/core/LCDDDetectorConstruction.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/core/LCDDDetectorConstruction.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -1,3 +1,10 @@
+/**
+ * @mainpage Linear Collider Detector Description (LCDD) Documentation
+ *
+ * @par
+ * LCDD is a framework for description of %detector geometries and associated information
+ * at runtime using a XML language and parser.
+ */
#ifndef LCDD_CORE_LCDDDETECTORCONSTRUCTION_HH_
#define LCDD_CORE_LCDDDETECTORCONSTRUCTION_HH_ 1
projects/lcdd/branches/v04-01-00-pre/include/lcdd/core
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/core/LCDDParser.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/core/LCDDParser.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -8,7 +8,6 @@
class G4VPhysicalVolume;
/**
- * @class LCDDParser
* @brief
* The parser for reading LCDD XML files into Geant4.
* @note
projects/lcdd/branches/v04-01-00-pre/include/lcdd/core
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/core/VUserTrackInformation.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/core/VUserTrackInformation.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -4,6 +4,7 @@
#include "G4Track.hh"
/**
+ * @brief
* A pure virtual class for track information in LCDD,
* which allows an external module to define the implementation,
* e.g. SLIC.
projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/BasicCalorimeterHitProcessor.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/BasicCalorimeterHitProcessor.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -32,9 +32,10 @@
};
/**
- * The factory for creating new LegacyCalorimeterHitProcessor objects.
+ * @brief
+ * The factory for creating new BasicCalorimeterHitProcessor objects
*/
-class LegacyCalorimeterHitProcessorFactory: public HitProcessorFactory {
+class BasicCalorimeterHitProcessorFactory: public HitProcessorFactory {
public:
projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/BasicTrackerHitProcessor.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/BasicTrackerHitProcessor.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -31,6 +31,7 @@
};
/**
+ * @brief
* The factory for creating new BasicTrackerHitProcessor objects.
*/
class BasicTrackerHitProcessorFactory: public HitProcessorFactory {
projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/CurrentTrackState.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/CurrentTrackState.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -4,6 +4,10 @@
// Geant4
#include "globals.hh"
+/**
+ * @brief
+ * A global static track ID to be set externally from LCDD
+ */
class CurrentTrackState {
private:
projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/HitProcessorFactory.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/HitProcessorFactory.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -5,6 +5,10 @@
#include "lcdd/detectors/HitProcessor.hh"
#include "lcdd/detectors/SensitiveDetector.hh"
+/**
+ * @brief
+ * A factory class for creating HitProcessor objects from a type string
+ */
class HitProcessorFactory {
public:
projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/HitProcessorManager.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/HitProcessorManager.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -4,6 +4,10 @@
// LCDD
#include "lcdd/detectors/HitProcessorFactory.hh"
+/**
+ * @brief
+ * The global registry of all HitProcessor objects
+ */
class HitProcessorManager {
private:
projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/ScoringTrackerHitProcessor.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/ScoringTrackerHitProcessor.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -6,7 +6,8 @@
#include "lcdd/detectors/HitProcessorFactory.hh"
/**
- * HitProcessor to implement scoring behavior, that only records a hit per track.
+ * @brief
+ * HitProcessor to implement scoring behavior, that only records a hit per track
*/
class ScoringTrackerHitProcessor: public TrackerHitProcessor {
@@ -35,7 +36,8 @@
};
/**
- * The factory for creating new BasicTrackerHitProcessor objects.
+ * @brief
+ * The factory for creating new ScoringTrackerHitProcessor objects
*/
class ScoringTrackerHitProcessorFactory: public HitProcessorFactory {
projects/lcdd/branches/v04-01-00-pre/include/lcdd/schema
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/schema/hit_processor.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/schema/hit_processor.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -7,6 +7,10 @@
// GDML
#include "Saxana/SAXObject.h"
+/**
+ * @brief
+ * The hit_processor element from the schema
+ */
class hit_processor: public SAXObject, public HitProcessorType {
public:
projects/lcdd/branches/v04-01-00-pre/include/lcdd/segmentation
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/segmentation/CellReadout.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/segmentation/CellReadout.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -7,20 +7,26 @@
#include <string>
/**
- * @brief Pure virtual base class for calorimeter cell readouts to implement.
- * @todo Move to DDSegmentation package.
+ * @brief
+ * Pure virtual base class for calorimeter cell readouts to implement.
*/
class CellReadout {
public:
- /** 2D XY position. */
+ /**
+ * @brief
+ * 2D XY position
+ */
struct Position2D {
double x;
double y;
};
- /** Cell ID represented as a pair of int values. */
+ /**
+ * @brief
+ * Cell ID represented as a pair of int values
+ */
struct CellId {
int ix;
int iy;
projects/lcdd/branches/v04-01-00-pre/include/lcdd/util
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/util/TimerUtil.hh 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/util/TimerUtil.hh 2014-08-07 19:08:30 UTC (rev 3237)
@@ -25,6 +25,10 @@
#include <map>
#include <iostream>
+/**
+ * @brief
+ * A collection of static utilities for timing methods
+ */
class TimerUtil {
static std::map<std::string, long> _timerMap;
projects/lcdd/branches/v04-01-00-pre/src/lcdd/core
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/core/LCDDDetectorConstruction.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/core/LCDDDetectorConstruction.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -1,10 +1,3 @@
-/**
- * @mainpage Linear Collider Detector Description (LCDD) Documentation
- *
- * @par
- * LCDD is a framework for description of detector geometries and associated information
- * at runtime using a XML language and parser.
- */
#include "lcdd/core/LCDDDetectorConstruction.hh"
// LCDD
@@ -51,8 +44,6 @@
G4Timer geoTimer;
geoTimer.Start();
- G4cout << "Started geometry construction timer." << G4endl;
-
// get geometry from the global parser instance, which will die on failure
G4VPhysicalVolume* pv = LCDDParser::instance()->construct();
projects/lcdd/branches/v04-01-00-pre/src/lcdd/core
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/core/PhysicsLimitSet.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/core/PhysicsLimitSet.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -97,11 +97,6 @@
return getLimitForParticle(limitName, getParticleType(aTrack));
}
-//void PhysicsLimitSet::setName(const G4String& n)
-//{
-// _name = n;
-//}
-
G4String& PhysicsLimitSet::getName() {
return _name;
}
projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/HitProcessorManager.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/HitProcessorManager.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -22,7 +22,7 @@
}
void HitProcessorManager::registerDefaultFactories() {
- registerFactory(new LegacyCalorimeterHitProcessorFactory());
+ registerFactory(new BasicCalorimeterHitProcessorFactory());
registerFactory(new ScoringTrackerHitProcessorFactory());
registerFactory(new BasicTrackerHitProcessorFactory());
}
projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/ReadoutUtil.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/ReadoutUtil.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -32,11 +32,6 @@
return aStepPoint->GetTouchableHandle()->GetVolume()->GetLogicalVolume()->GetSolid();
}
-//G4TouchableHandle ReadoutUtil::getTouchableFromStep(const G4Step* aStep)
-//{
-// return aStep->GetPreStepPoint()->GetTouchableHandle();
-//}
-
G4ThreeVector ReadoutUtil::getVolumeGlobalPosition(const G4StepPoint* aStepPoint, const G4ThreeVector& pnt) {
return aStepPoint->GetTouchableHandle()->GetHistory()->GetTopTransform().Inverse().TransformPoint(pnt);
}
projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/SensitiveDetector.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/SensitiveDetector.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -25,10 +25,10 @@
const std::string& SensitiveDetector::CALORIMETER = "calorimeter";
const std::string& SensitiveDetector::UNKNOWN = "unknown";
-SensitiveDetector::SensitiveDetector(G4String name, G4String collectionName, EType type) :
+SensitiveDetector::SensitiveDetector(G4String name, G4String collectionName, EType detectorType) :
G4VSensitiveDetector(name),
_idspec(NULL),
- _type(type),
+ _type(detectorType),
_verbose(false),
_endcap(false),
_ecut(0) {
@@ -47,12 +47,12 @@
_hcids.push_back(-1);
}
-SensitiveDetector::SensitiveDetector(G4String sdName, const vector<G4String>& theCollectionNames, EType type) :
- G4VSensitiveDetector(sdName),
+SensitiveDetector::SensitiveDetector(G4String sensitiveDetectorName, const vector<G4String>& theCollectionNames, EType detectorType) :
+ G4VSensitiveDetector(sensitiveDetectorName),
_idspec(0),
- _type(type) {
+ _type(detectorType) {
- _hcids.clear(); // Is this needed???
+ _hcids.clear(); // FIXME: Is this needed???
for (int i = 0; i < (int) theCollectionNames.size(); i++) {
// insert hits collection name into SD's name vector
projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/StepReadout.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/StepReadout.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -133,10 +133,6 @@
return track()->GetMomentum();
}
-//TrackInformation* StepReadout::trackInformation() const {
-// return TrackInformation::getTrackInformation(track());
-//}
-
G4ThreeVector StepReadout::prePosition() const {
return pre()->GetPosition();
}
projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/TrackerSD.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/TrackerSD.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -18,8 +18,6 @@
// Loop over number of hits collections defined by this detector.
for (int i = 0; i < getNumberOfHitsCollections(); i++) {
- //std::cout << "TrackerSD::Initialize - initializing hits collection <" << collectionName[i] << ">" << std::endl;
-
// Overwrite pointer to the dummy collection that was added in the constructor.
_hitsCollections[i] = new TrackerHitsCollection(GetName(), collectionNames[i]);
projects/lcdd/branches/v04-01-00-pre/src/lcdd/hits
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/hits/CalorimeterHit.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/hits/CalorimeterHit.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -111,13 +111,6 @@
return _particleList;
}
-//void CalorimeterHit::setId64bit(Id64bit::ElementType id0, Id64bit::ElementType id1)
-//{
-// _id.setId0(id0);
-// _id.setId1(id1);
-// _id.encode();
-//}
-
const Id64bit& CalorimeterHit::getId64bit() const {
return _id;
}
projects/lcdd/branches/v04-01-00-pre/src/lcdd/hits
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/hits/HitContribution.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/hits/HitContribution.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -26,12 +26,7 @@
_trackID = trackID;
- // Set edep according to type of track.
- //if (track->GetDefinition() == G4OpticalPhoton::OpticalPhotonDefinition()) {
- // _edep = track->GetTotalEnergy();
- //} else {
_edep = aStep->GetTotalEnergyDeposit();
- //}
// PDG ID.
_PdgId = track->GetDefinition()->GetPDGEncoding();
@@ -50,13 +45,6 @@
// Get the track.
const G4Track* track = aStep->GetTrack();
- // Get the track information.
- //TrackInformation* trackInfo = static_cast<TrackInformation*>(track->GetUserInformation());
-
- // Get the track ID.
- //if (trackInfo) {
- // _trackID = trackInfo->getOriginalTrackID();
- //}
_trackID = track->GetTrackID();
// Set edep according to type of track.
projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes/calorimeterProcess.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes/calorimeterProcess.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -14,6 +14,10 @@
// STL
#include <iostream>
+/**
+ * @brief
+ * The SAX process for calorimeter elements
+ */
class calorimeterProcess: public SensitiveDetectorTypeProcess {
public:
projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes/hit_processorProcess.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/processes/hit_processorProcess.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -7,6 +7,9 @@
#include "Saxana/SAXStateProcess.h"
#include "Saxana/SAXObject.h"
+/**
+ * The SAX process for hit_processor elements.
+ */
class hit_processorProcess: public SAXStateProcess {
public:
projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation/ProjectiveCylinderSegmentation.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation/ProjectiveCylinderSegmentation.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -21,13 +21,6 @@
return ReadoutUtil::computeTubsMidRadius(ReadoutUtil::getTubs(aStep));
}
-/*
- double ProjectiveCylinderSegmentation::getRadius(const G4StepPoint* aPreStepPoint)
- {
- return ReadoutUtil::computeTubsMidRadius(ReadoutUtil::getTubs(aPreStepPoint));
- }
- */
-
double ProjectiveCylinderSegmentation::getZ(const G4Step* aStep) {
double rcyl = getRadius(aStep);
@@ -40,21 +33,7 @@
return zcell;
}
-/*
- double ProjectiveCylinderSegmentation::getZ(const G4StepPoint* aPreStepPoint)
- {
- double rcyl = getRadius(aPreStepPoint);
- double ctheta = getThetaDim(aPreStepPoint);
-
- // ctheta in 0 to pi ...
- // ctheta < pi/2 should be negative
-
- double zcell = rcyl / tan(ctheta);
-
- return zcell;
- }
- */
bool ProjectiveCylinderSegmentation::isValidSolid(G4VSolid* s) {
bool valid = Segmentation::isValidSolid(s);
projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation/ProjectiveSegmentation.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation/ProjectiveSegmentation.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -49,51 +49,8 @@
return pos;
}
-/*
- G4ThreeVector ProjectiveSegmentation::getGlobalHitPos(const G4StepPoint* aPreStepPoint)
- {
- // DEBUG
- //G4cout << "G4ProjectiveSegmentation::getGlobalHitPos()" << G4endl;
- //
- // divide entire theta, phi range into bins; bins always positive
- // theta, phi coord of step midpoint
- // compute bin numbers
- // get dim from bins
- // get radius, z components (probably from subclass function)
- double rcyl = getRadius(aPreStepPoint);
- double zcell = getZ(aPreStepPoint);
-
- // get phi component
- double cphi = getPhiDim(aPreStepPoint);
-
- // compute x, y cells
- double xcell = rcyl * cos(cphi);
- double ycell = rcyl * sin(cphi);
-
- G4ThreeVector pos(xcell, ycell, zcell);
-
- //G4ThreeVector midPos = ReadoutUtil::computeMidPos( aStep );
-
- // DEBUG: print all
- //G4cout << "sphi <" << midPos.phi() << ">" << G4endl;
- //G4cout << "cphi <" << cphi << ">" << G4endl;
- //G4cout << "sphi - cphi = " << midPos.phi() - cphi << G4endl;
-
- //G4cout << "stheta <" << midPos.theta() << ">" << G4endl;
- //G4cout << "ctheta <" << getThetaDim( aStep ) << ">" << G4endl;
- //G4cout << "stheta - ctheta = " << midPos.theta() - getThetaDim( aStep ) << G4endl;
-
- //G4cout << "rcyl <" << rcyl << ">" << G4endl;
- //G4cout << "zcell <" << zcell << ">" << G4endl;
- //G4cout << "globalCellPos <" << pos << ">" << G4endl;
- //
-
- return pos;
- }
- */
-
void ProjectiveSegmentation::setBins(const G4Step* aStep) {
G4ThreeVector globalMidPos = ReadoutUtil::computeMidPos(aStep);
@@ -101,16 +58,6 @@
setBin(1, getPhiBin(globalMidPos));
}
-/*
- void ProjectiveSegmentation::setBins(const G4StepPoint* aPreStepPoint)
- {
- G4ThreeVector globalPos = aPreStepPoint->GetPosition();
-
- setBin(0, getThetaBin(globalPos));
- setBin(1, getPhiBin(globalPos));
- }
- */
-
G4int ProjectiveSegmentation::getNtheta() const {
return _ntheta;
}
@@ -154,24 +101,12 @@
return ReadoutUtil::computeMidPos(aStep).mag();
}
-//double ProjectiveSegmentation::getRadius(const G4StepPoint* aPreStepPoint)
-//{
-//G4cout << "G4ProjectiveSegmentation::getRadius()" << G4endl;
-// return aPreStepPoint->GetPosition().mag();
-//}
-
// default impl. returns z of pos
double ProjectiveSegmentation::getZ(const G4Step* aStep) {
//G4cout << "G4ProjectiveSegmentation::getZ()" << G4endl;
return ReadoutUtil::computeMidPos(aStep).z();
}
-//double ProjectiveSegmentation::getZ(const G4StepPoint* aPreStepPoint)
-//{
-//G4cout << "G4ProjectiveSegmentation::getZ()" << G4endl;
-// return aPreStepPoint->GetPosition().z();
-//}
-
double ProjectiveSegmentation::getThetaDim(const int &thetaBin) const {
return Segmentation::computeDim(thetaBin, _divTheta);
}
@@ -187,14 +122,6 @@
return ctheta;
}
-//double ProjectiveSegmentation::getThetaDim(const G4StepPoint* aPreStepPoint)
-//{
-//G4cout << "G4ProjectiveSegmentation::getThetaDim(G4Step*)" << G4endl;
-// G4ThreeVector globalStepPos = aPreStepPoint->GetPosition();
-// double ctheta = getThetaDim(getThetaBin(globalStepPos));
-// return ctheta;
-//}
-
double ProjectiveSegmentation::getPhiDim(const G4Step* aStep) {
//G4cout << "G4ProjectiveSegmentation::getPhiDim(G4Step*)" << G4endl;
@@ -202,12 +129,3 @@
double cphi = getPhiDim(getPhiBin(globalStepPos));
return cphi;
}
-//double ProjectiveSegmentation::getPhiDim(const G4StepPoint* aPreStepPoint)
-//{
-//G4cout << "G4ProjectiveSegmentation::getPhiDim(G4Step*)" << G4endl;
-
-// G4ThreeVector globalStepPos = aPreStepPoint->GetPosition();
-// double cphi = getPhiDim(getPhiBin(globalStepPos));
-// return cphi;
-//}
-
projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation/ProjectiveZPlaneSegmentation.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation/ProjectiveZPlaneSegmentation.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -16,25 +16,8 @@
double rcyl = zcell * tan(ctheta);
return rcyl;
}
-/*
- double ProjectiveZPlaneSegmentation::getRadius(const G4StepPoint* aPreStepPoint)
- {
- double zcell = getZ(aPreStepPoint);
- double ctheta = ProjectiveSegmentation::getThetaDim(aPreStepPoint);
- double rcyl = zcell * tan(ctheta);
- return rcyl;
- }
- */
double ProjectiveZPlaneSegmentation::getZ(const G4Step* aStep) {
G4ThreeVector gpos = ReadoutUtil::getVolumeGlobalPosition(aStep->GetPreStepPoint(), G4ThreeVector());
return gpos.z();
}
-
-/*
- double ProjectiveZPlaneSegmentation::getZ(const G4StepPoint* aPreStepPoint)
- {
- G4ThreeVector gpos = ReadoutUtil::getVolumeGlobalPosition(aPreStepPoint, G4ThreeVector());
- return gpos.z();
- }
- */
projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation/SegmentationFactory.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/segmentation/SegmentationFactory.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -61,8 +61,6 @@
sval += "*" + lunit;
gsz = calc->Eval(sval);
- //std::cout << "grid x, y, z: " << gsx << ", " << gsy << ", " << gsz << std::endl;
-
seg = new GridXYZSegmentation(gsx, gsy, gsz);
} else {
std::cerr << "Failed cast to grid_xyz!" << std::endl;
@@ -92,8 +90,6 @@
// handle projective_zplane
- //std::cout << "add projective_zplane here" << std::endl;
-
projective_zplane* prj = dynamic_cast<projective_zplane*>(obj);
if (prj) {
@@ -104,18 +100,12 @@
sval = prj->get_nphi();
nphi = (int) calc->Eval(sval);
- //std::cout << "ntheta, nphi : "
- // << ntheta << ", "
- // << nphi << std::endl;
-
seg = new ProjectiveZPlaneSegmentation(ntheta, nphi);
} else {
std::cerr << "Failed cast to projective_zplane!" << std::endl;
} // prj no exist
} else if (tag == "cell_readout_2d") {
- //std::cout << "building cell_readout_2d" << std::endl;
-
cell_readout_2d* elem = dynamic_cast<cell_readout_2d*>(obj);
if (0 != elem) {
double cellSizeX, cellSizeY;
@@ -130,8 +120,6 @@
val += "*" + lengthUnit;
cellSizeY = calc->Eval(val);
- //std::cout << "G4SegmentationFactory creating CellReadout2DSegmentation(x,y): " << cellSizeX << " " << cellSizeY << std::endl;
-
seg = new CellReadout2DSegmentation(cellSizeX, cellSizeY);
}
} else {
projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers/limitsetSubscriber.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers/limitsetSubscriber.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -33,14 +33,12 @@
}
virtual void Activate(const SAXObject* object) {
- //std::cout << "limitsetSubscriber::Activate()" << std::endl;
if (object != 0) {
GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator();
const limitset* lsobj = dynamic_cast<const limitset*>(object);
if (lsobj != 0) {
- //std::cout << "got limitset: " << lsobj->get_name() << std::endl;
PhysicsLimitSet* ls = new PhysicsLimitSet(lsobj->get_name());
projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers/solenoidSubscriber.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers/solenoidSubscriber.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -27,14 +27,11 @@
}
virtual void Activate(const SAXObject* object) {
- //std::cout << "solenoidSubscriber" << std::endl;
-
GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator();
if (object != 0) {
const solenoid* obj = dynamic_cast<const solenoid*>(object);
if (obj) {
- //std::cout << "GOT SOLENOID: " << obj->get_name() << std::endl;
double outer_field, inner_field;
double zmin, zmax;
projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers/visSubscriber.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers/visSubscriber.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -29,8 +29,6 @@
}
virtual void Activate(const SAXObject* object) {
- //std::cout << "visSubscriber::Activate()" << std::endl;
-
if (object != 0) {
const vis* vobj = dynamic_cast<const vis*>(object);
@@ -62,7 +60,7 @@
SAXObject* child_obj = seq->content(i).object;
if (child_tag == "color") {
- //std::cout << "handling color" << std::endl;
+
color* c = dynamic_cast<color*>(child_obj);
double r = StringUtil::toDouble(c->get_R());
@@ -70,8 +68,6 @@
double b = StringUtil::toDouble(c->get_B());
double alpha = StringUtil::toDouble(c->get_alpha());
- //std::cout << "r g b alpha: " << r << " " << g << " " << b << " " << alpha << std::endl;
-
g4vis->SetColor(r, g, b, alpha);
// should be only one
projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers/volumeExtendedSubscriber.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/subscribers/volumeExtendedSubscriber.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -41,7 +41,9 @@
// handle sdref tag
if (seq->content(i).tag == "sdref") {
- SensitiveDetectorType::sdref* sd = dynamic_cast<SensitiveDetectorType::sdref*>(seq->content(i).object);
+ SensitiveDetectorType::sdref* sd =
+ dynamic_cast<SensitiveDetectorType::sdref*>(seq->content(
+ i).object);
g4sd = proc->getSensitiveDetector(sd->get_ref());
@@ -49,119 +51,117 @@
if (!g4sd->isValidVolume(lv)) {
//G4Exception("FATAL ERROR: The G4LogicalVolume <" + lv->GetName() + "> is not valid for the SD <" + g4sd->GetName() + ">.");
- G4Exception("", "", FatalException, "LogVol not valid for the SD");
+ G4Exception("", "", FatalException,
+ "LogVol not valid for the SD");
}
lv->SetSensitiveDetector(g4sd);
} else {
- G4cerr << "SD not found: " << sd->get_ref() << "." << G4endl;
- G4Exception( "volumeExtendedSubscriber::Activate()", "", FatalException, "Invalid sdref.");
+ G4cerr << "SD not found: " << sd->get_ref() << "."
+ << G4endl;
+ G4Exception( "volumeExtendedSubscriber::Activate()", "", FatalException, "Invalid sdref.");
}
} else if ( seq->content(i).tag == "regionref" ) {
// handle regionref
- // get regionref object
- RegionType::regionref* regref = dynamic_cast<RegionType::regionref*> ( seq->content(i).object );
+ // get regionref object
+ RegionType::regionref* regref = dynamic_cast<RegionType::regionref*> ( seq->content(i).object );
- // get region from store
- G4Region* reg = dynamic_cast<G4Region*> ( proc->getRegion( regref->get_ref() ) );
+ // get region from store
+ G4Region* reg = dynamic_cast<G4Region*> ( proc->getRegion( regref->get_ref() ) );
- // add LV to region
- if ( reg ) {
- reg->AddRootLogicalVolume( lv );
- } else {
- G4cerr << "Failed to fetch and/or cast to region: " << regref->get_ref() << G4endl;
- G4Exception("volumeExtendedSubscriber::Activate()", "", FatalException, "Invalid regionref.");
- }
- } else if ( seq->content(i).tag == "limitsetref" ) {
- // handle limitsetref
+ // add LV to region
+ if ( reg ) {
+ reg->AddRootLogicalVolume( lv );
+ } else {
+ G4cerr << "Failed to fetch and/or cast to region: " << regref->get_ref() << G4endl;
+ G4Exception("volumeExtendedSubscriber::Activate()", "", FatalException, "Invalid regionref.");
+ }
+ } else if ( seq->content(i).tag == "limitsetref" ) {
+ // handle limitsetref
- LimitSetType::limitsetref* limitsetref = dynamic_cast<LimitSetType::limitsetref*> ( seq->content(i).object );
+ LimitSetType::limitsetref* limitsetref = dynamic_cast<LimitSetType::limitsetref*> ( seq->content(i).object );
- G4UserLimits* ulim = dynamic_cast<PhysicsLimitSet*> ( proc->getLimitSet( limitsetref->get_ref() ) );
+ G4UserLimits* ulim = dynamic_cast<PhysicsLimitSet*> ( proc->getLimitSet( limitsetref->get_ref() ) );
- if ( ulim ) {
- lv->SetUserLimits( ulim );
- std::cout << "Set user limits <" << limitsetref->get_ref() << "> on logical volume <" << lv->GetName() << ">" << std::endl;
- } else {
- std::cerr << "FATAL ERROR: limit element not found - " << limitsetref->get_ref() << std::endl;
- G4Exception("", "", FatalException, "limitsetref not found.");
- }
- } else if ( seq->content(i).tag == "visref" ) {
- // handle visref
+ if ( ulim ) {
+ lv->SetUserLimits( ulim );
+ std::cout << "Set user limits <" << limitsetref->get_ref() << "> on logical volume <" << lv->GetName() << ">" << std::endl;
+ } else {
+ std::cerr << "FATAL ERROR: limit element not found - " << limitsetref->get_ref() << std::endl;
+ G4Exception("", "", FatalException, "limitsetref not found.");
+ }
+ } else if ( seq->content(i).tag == "visref" ) {
+ // handle visref
- //std::cout << "handling visref" << std::endl;
+ //std::cout << "handling visref" << std::endl;
- VisType::visref* visref = dynamic_cast<VisType::visref*> ( seq->content(i).object );
+ VisType::visref* visref = dynamic_cast<VisType::visref*> ( seq->content(i).object );
- G4VisAttributes* vis = dynamic_cast<G4VisAttributes*> ( proc->getVisAttributes( visref->get_ref() ) );
+ G4VisAttributes* vis = dynamic_cast<G4VisAttributes*> ( proc->getVisAttributes( visref->get_ref() ) );
- if ( vis ) {
- //std::cout << "assigning vis: " << visref->get_ref() << std::endl;
- lv->SetVisAttributes( vis );
- } else {
- std::cerr << "FATAL ERROR: vis element not found - " << visref->get_ref() << std::endl;
- G4Exception("", "", FatalException, "vis element not found.");
- }
- }
+ if ( vis ) {
+ //std::cout << "assigning vis: " << visref->get_ref() << std::endl;
+ lv->SetVisAttributes( vis );
+ } else {
+ std::cerr << "FATAL ERROR: vis element not found - " << visref->get_ref() << std::endl;
+ G4Exception("", "", FatalException, "vis element not found.");
+ }
+ }
+ if ( seq->content(i).tag == "physvol" ) {
+ // handle physvols to look for physvolids
- if ( seq->content(i).tag == "physvol" ) {
- // handle physvols to look for physvolids
+ ++nchildren;
- ++nchildren;
+ // get physvol content sequence
+ physvol* pv = dynamic_cast<physvol*>( seq->content(i).object );
+ const ContentSequence* pv_seq = pv->get_content();
+ size_t ccount = pv_seq->size();
- // get physvol content sequence
- physvol* pv = dynamic_cast<physvol*>( seq->content(i).object );
- const ContentSequence* pv_seq = pv->get_content();
- size_t ccount = pv_seq->size();
+ // iterate over physvol content
+ for ( size_t pvidx = 0; pvidx < ccount; pvidx++ ) {
- // iterate over physvol content
- for ( size_t pvidx = 0; pvidx < ccount; pvidx++ ) {
+ // found "choice" tag?
+ if( pv_seq->content(pvidx).tag == "choice" ) {
- // found "choice" tag?
- if( pv_seq->content(pvidx).tag == "choice" ) {
+ const ContentChoice* pv_choice = dynamic_cast<const ContentChoice*>( pv_seq->content(pvidx).object );
- const ContentChoice* pv_choice = dynamic_cast<const ContentChoice*>( pv_seq->content(pvidx).object );
+ // found a physvolid?
+ if ( pv_choice->content().tag == "physvolid" ) {
- // found a physvolid?
- if ( pv_choice->content().tag == "physvolid" ) {
+ // add the physvolid...
- // add the physvolid...
+ physvolidElem* pvid_elem =
+ dynamic_cast<physvolidElem*>( pv_choice->content().object );
- physvolidElem* pvid_elem =
- dynamic_cast<physvolidElem*>( pv_choice->content().object );
+ if ( pvid_elem == 0 ) {
+ G4Exception("", "", FatalException, "Failed cast to physvolidElem.");
+ }
- if ( pvid_elem == 0 ) {
- G4Exception("", "", FatalException, "Failed cast to physvolidElem.");
- }
+ GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator();
- GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator();
+ std::string strID = pvid_elem->get_value();
+ std::string fld = pvid_elem->get_field_name();
- std::string strID = pvid_elem->get_value();
- std::string fld = pvid_elem->get_field_name();
+ int intID = (int)calc->Eval( strID );
- int intID = (int)calc->Eval( strID );
+ PhysVolId pvid(intID, fld);
- PhysVolId pvid(intID, fld);
-
- // assign physvolid to lv's child by the in-order idx
- IdManager::instance()->addPhysVolId(
- lv,// LV mom
- nchildren - 1,// child idx in mom
- pvid );// PhysVolId
- }
-
- }
- }
+ // assign physvolid to lv's child by the in-order idx
+ IdManager::instance()->addPhysVolId(
+ lv,// LV mom
+ nchildren - 1,// child idx in mom
+ pvid );// PhysVolId
}
}
- } else {
- G4Exception("", "", FatalException, "Failed cast to G4LogicalVolume.");
}
- } else {
- G4Exception("", "", FatalException, "Failed cast to volume.");
}
}
+ } else {
+ G4Exception("", "", FatalException, "Failed cast to G4LogicalVolume.");
}
-
-//DECLARE_SUBSCRIBER_FACTORY(volumeExtendedSubscriber)
+ } else {
+ G4Exception("", "", FatalException, "Failed cast to volume.");
+ }
+ }
+}
projects/lcdd/branches/v04-01-00-pre/src/lcdd/util
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/util/Verbose.cc 2014-08-07 19:06:26 UTC (rev 3236)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/util/Verbose.cc 2014-08-07 19:08:30 UTC (rev 3237)
@@ -1,6 +1,3 @@
-// $Header: /nfs/slac/g/lcd/cvs/lcdroot/lcdd/src/lcdd/util/Verbose.cc,v 1.4 2013-11-13 23:02:59 jeremy Exp $
-
-// LCDD
#include "lcdd/util/Verbose.hh"
const Verbose::LevelType Verbose::_defaultLevel = 0;
SVNspam 0.1