2 removed + 2 modified, total 4 files
projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/LegacyCalorimeterHitProcessor.hh 2014-08-05 22:54:50 UTC (rev 3230)
+++ projects/lcdd/branches/v04-01-00-pre/include/lcdd/detectors/LegacyCalorimeterHitProcessor.hh 2014-08-05 22:57:40 UTC (rev 3231)
@@ -1,51 +0,0 @@
-#ifndef LCDD_DETECTORS_LEGACYCALORIMETERHITPROCESSOR_HH_
-#define LCDD_DETECTORS_LEGACYCALORIMETERHITPROCESSOR_HH_ 1
-
-// LCDD
-#include "lcdd/detectors/CalorimeterHitProcessor.hh"
-#include "lcdd/detectors/CalorimeterSD.hh"
-#include "lcdd/detectors/HitProcessorFactory.hh"
-
-/**
- * @brief
- * Implementation of hit processing behavior for CalorimeterSD objects with Segmentation.
- */
-class BasicCalorimeterHitProcessor: public CalorimeterHitProcessor {
-
-public:
-
- /**
- * Class constructor.
- */
- BasicCalorimeterHitProcessor();
-
- /**
- * Class destructor.
- */
- virtual ~BasicCalorimeterHitProcessor();
-
- /**
- * Process steps to produce hits.
- * @param[in] step A G4Step object.
- */
- bool processHits(G4Step* step);
-};
-
-/**
- * The factory for creating new LegacyCalorimeterHitProcessor objects.
- */
-class LegacyCalorimeterHitProcessorFactory: public HitProcessorFactory {
-
-public:
-
- HitProcessor* createHitProcessor() {
- return new BasicCalorimeterHitProcessor();
- }
-
- const std::string& handlesType() {
- static std::string typeName = "BasicCalorimeterHitProcessor";
- return typeName;
- }
-};
-
-#endif
projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/HitProcessorManager.cc 2014-08-05 22:54:50 UTC (rev 3230)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/HitProcessorManager.cc 2014-08-05 22:57:40 UTC (rev 3231)
@@ -1,7 +1,7 @@
#include "lcdd/detectors/HitProcessorManager.hh"
// LCDD
-#include "lcdd/detectors/LegacyCalorimeterHitProcessor.hh"
+#include "lcdd/detectors/BasicCalorimeterHitProcessor.hh"
#include "lcdd/detectors/BasicTrackerHitProcessor.hh"
#include "lcdd/detectors/ScoringTrackerHitProcessor.hh"
projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/LegacyCalorimeterHitProcessor.cc 2014-08-05 22:54:50 UTC (rev 3230)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/LegacyCalorimeterHitProcessor.cc 2014-08-05 22:57:40 UTC (rev 3231)
@@ -1,70 +0,0 @@
-#include "lcdd/detectors/LegacyCalorimeterHitProcessor.hh"
-
-// LCDD
-#include "lcdd/detectors/CurrentTrackState.hh"
-#include "lcdd/util/TimerUtil.hh"
-
-// Geant4
-#include "G4Geantino.hh"
-#include "G4ChargedGeantino.hh"
-
-BasicCalorimeterHitProcessor::BasicCalorimeterHitProcessor() {
-}
-
-BasicCalorimeterHitProcessor::~BasicCalorimeterHitProcessor() {
-}
-
-bool BasicCalorimeterHitProcessor::processHits(G4Step* step) {
-
- // Get the energy deposition.
- G4double edep = step->GetTotalEnergyDeposit();
-
- // Check for Geantino particle type.
- G4ParticleDefinition* def = step->GetTrack()->GetDefinition();
- bool isGeantino = false;
- if (def == G4Geantino::Definition() || def == G4ChargedGeantino::Definition()) {
- isGeantino = true;
- }
-
- // Cut on energy deposition <= cut but allow Geantinos.
- if (edep <= _calorimeter->getEnergyCut() && isGeantino == false) {
- return false;
- }
-
- // Get the Segmentation from the CalorimeterSD.
- Segmentation* segmentation = _calorimeter->getSegmentation();
-
- // Get the global cell position from the Segmentation.
- G4ThreeVector globalCellPosition = segmentation->getGlobalHitPosition(step);
-
- // Set the segmentation bin values from the step.
- segmentation->setBins(step);
-
- // Create a 64-bit ID from the step information.
- Id64bit id = _calorimeter->makeIdentifier(step);
-
- // Check for an existing hit with this identifier.
- CalorimeterHit* hit = _calorimeter->findHit(id);
-
- // Was there a hit found with this identifier?
- if (hit == NULL) {
-
- // No hit was found, so a new one is created.
- hit = new CalorimeterHit(id, edep, globalCellPosition);
-
- // Add the new hit to the calorimeter.
- _calorimeter->addHit(hit, _collectionIndex);
-
- } else {
-
- // Add energy deposition to an existing hit.
- hit->addEdep(edep);
- }
-
- // Add hit contribution to the hit.
- // FIXME: This should pass a pointer to a new object. It is copied, which is inefficient.
- hit->addHitContribution(HitContribution(CurrentTrackState::getCurrentTrackID(), step));
-
- // Return true, indicating that a hit was added or modified.
- return true;
-}
projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors
--- projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/SensitiveDetectorFactory.cc 2014-08-05 22:54:50 UTC (rev 3230)
+++ projects/lcdd/branches/v04-01-00-pre/src/lcdd/detectors/SensitiveDetectorFactory.cc 2014-08-05 22:57:40 UTC (rev 3231)
@@ -5,7 +5,7 @@
#include "lcdd/util/StringUtil.hh"
#include "lcdd/detectors/PositionComparator.hh"
#include "lcdd/detectors/HitProcessorManager.hh"
-#include "lcdd/detectors/LegacyCalorimeterHitProcessor.hh"
+#include "lcdd/detectors/BasicCalorimeterHitProcessor.hh"
#include "lcdd/detectors/BasicTrackerHitProcessor.hh"
#include "lcdd/detectors/ScoringTrackerHitProcessor.hh"
#include "lcdd/schema/hit_processor.hh"
SVNspam 0.1