lcdd/include/lcdd/detectors
diff -u -r1.7 -r1.8
--- CalorimeterHitProcessor.hh 10 Jul 2013 18:06:17 -0000 1.7
+++ CalorimeterHitProcessor.hh 10 Jul 2013 22:56:53 -0000 1.8
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/CalorimeterHitProcessor.hh,v 1.7 2013/07/10 18:06:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/CalorimeterHitProcessor.hh,v 1.8 2013/07/10 22:56:53 jeremy Exp $
#ifndef LCDD_DETECTORS_CALORIMETERHITPROCESSOR_HH
#define LCDD_DETECTORS_CALORIMETERHITPROCESSOR_HH 1
@@ -12,6 +12,8 @@
/**
* @brief Used for logical separation of hit processing from the SD classes.
* @note This class is not currently used in the code base.
+ * @todo This class should implement a pure virtual class called HitProcessor.
+ * @todo Change the name to something like DefaultCalorimeterHitProcessor as there will be additional, similar classes.
*/
class CalorimeterHitProcessor
{
lcdd/src/lcdd/detectors
diff -u -r1.2 -r1.3
--- CalorimeterHitProcessor.cc 10 Jul 2013 18:06:19 -0000 1.2
+++ CalorimeterHitProcessor.cc 10 Jul 2013 22:56:53 -0000 1.3
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterHitProcessor.cc,v 1.2 2013/07/10 18:06:19 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterHitProcessor.cc,v 1.3 2013/07/10 22:56:53 jeremy Exp $
// LCDD
#include "lcdd/detectors/CalorimeterHitProcessor.hh"
@@ -20,7 +20,7 @@
bool CalorimeterHitProcessor::processHits(G4Step* step)
{
- // Compute step mid-point.
+ // Compute the step's mid-point in global coordinates.
G4ThreeVector midpoint = (0.5 * (step->GetPreStepPoint()->GetPosition() + step->GetPostStepPoint()->GetPosition()));
// DEBUG
@@ -29,7 +29,7 @@
// Get the touchable handle from the step.
G4TouchableHandle touchable = step->GetPreStepPoint()->GetTouchableHandle();
- // Compute local position using global position and touchable.
+ // Compute the local position of the mid-point using its global position and the touchable handle into the geometry.
G4ThreeVector localPosition = touchable->GetHistory()->GetTopTransform().TransformPoint(midpoint);
// DEBUG
@@ -58,17 +58,17 @@
// DEBUG: print local cell position
//std::cout << "cellPosition = " << cellPosition.first << ", " << cellPosition.second << std::endl;
- // Transform local cell position to global.
+ // Transform the local cell position to global.
G4ThreeVector cellVec(cellPosition.first, cellPosition.second, 0);
- // Compute global position using local point and touchable.
+ // Compute the global position from local point and the touchable handle.
G4ThreeVector globalPos = touchable->GetHistory()->GetTopTransform().Inverse().TransformPoint(cellVec);
// DEBUG: print global position
//std::cout << "globalPosition(x,y,z) = " << globalPos.x() << ", " << globalPos.x() << ", " << globalPos.z() << std::endl;
//std::cout << std::endl;
- // TODO: make and return or store hit data from id, position, energy, & time
+ // TODO: make a hit from id, position, energy, & time
//G4CalorimeterHit* hit = new G4CalorimeterHit();
return true;