Commit in lcdd on MAIN | |||
include/lcdd/detectors/CalorimeterSD.hh | +6 | -6 | 1.9 -> 1.10 |
src/lcdd/detectors/CalorimeterSD.cc | +17 | -34 | 1.9 -> 1.10 |
+23 | -40 |
remove lookup of existing hits by pointer to CalorimeterHit; instead use Id64bit so creating a comparison hit is not required
diff -u -r1.9 -r1.10 --- CalorimeterSD.hh 14 Sep 2013 02:06:34 -0000 1.9 +++ CalorimeterSD.hh 14 Sep 2013 02:17:50 -0000 1.10 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/CalorimeterSD.hh,v 1.9 2013/09/14 02:06:34 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/CalorimeterSD.hh,v 1.10 2013/09/14 02:17:50 jeremy Exp $
#ifndef LCDD_DETECTORS_CALORIMETERSD_HH #define LCDD_DETECTORS_CALORIMETERSD_HH 1
@@ -12,8 +12,7 @@
/** * @brief The implementation of a calorimeter that accumulates energy depositions by event.
- * @todo Remove class alterations made for use by OpticalCalorimeter only e.g. things having to do - * with multiple hit output collections.
+ * @todo Rewrite print functions using new data structures. Old hit vector was removed.
*/ class CalorimeterSD: public SensitiveDetector {
@@ -125,6 +124,7 @@
* Add a hit to one of this Calorimeter's hit collections. * @param[in] hit The hit to add. * @param[in] collectionIndex The index of the hit collection.
+ * @todo Deprecated => remove.
*/ void addHit(CalorimeterHit* hit, int collectionIndex);
@@ -133,7 +133,7 @@
* @param[in] The hit to find. * @return The found hit or 0 if not found. */
- CalorimeterHit* findHit(CalorimeterHit* aHit);
+ //CalorimeterHit* findHit(CalorimeterHit* aHit);
/** * Find a hit in the given hit collection using the current HitComparator.
@@ -141,7 +141,7 @@
* @param[in] The index of the hits collection. * @return The found hit or 0 if not found. */
- CalorimeterHit* findHit(CalorimeterHit* aHit, G4int nHC);
+ //CalorimeterHit* findHit(CalorimeterHit* aHit, G4int nHC);
/** * Find a CalorimeterHit by ID.
@@ -165,7 +165,7 @@
Segmentation* _segmentation; // Pointers to hits collections.
- CalorimeterHitsCollection* _collection; // TODO: Remove and use the _hitsCollections instead?
+ //CalorimeterHitsCollection* _collection; // TODO: Remove and use the _hitsCollections vector only?
std::vector<CalorimeterHitsCollection*> _hitsCollections; // Hit lookup map.
diff -u -r1.9 -r1.10 --- CalorimeterSD.cc 14 Sep 2013 02:06:35 -0000 1.9 +++ CalorimeterSD.cc 14 Sep 2013 02:17:50 -0000 1.10 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterSD.cc,v 1.9 2013/09/14 02:06:35 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterSD.cc,v 1.10 2013/09/14 02:17:50 jeremy Exp $
// LCDD #include "lcdd/detectors/CalorimeterSD.hh"
@@ -23,7 +23,8 @@
_segmentation(sdSeg) { _hitsCollections.clear();
- _hitsCollections.push_back(_collection);
+ //_hitsCollections.push_back(_collection);
+ _hitsCollections.push_back(0);
} CalorimeterSD::CalorimeterSD(
@@ -41,7 +42,8 @@
// I think this is only setting up the hits collections in a "dummy" way for G4. // The actual pointers to the collections are overridden later in Initialize. for (int i = 0; i < (int) hcNames.size(); i++) {
- _hitsCollections.push_back(_collection);
+ //_hitsCollections.push_back(_collection);
+ _hitsCollections.push_back(0);
} }
@@ -96,40 +98,19 @@
return SensitiveDetector::ProcessHits(aStep, 0); }
-CalorimeterHit* CalorimeterSD::findHit(CalorimeterHit* aHit) -{ - /* - CalorimeterHit* fndHit = 0; - for (CalorimeterHitList::const_iterator iter = _hitsVector[0].begin(); iter != _hitsVector[0].end(); iter++) { - if (_hitCompare->compare(**iter, *aHit)) { - fndHit = *iter; - break; - } - } - return fndHit; - */ - return _hitMap.get(aHit->getId64bit()); -} - -CalorimeterHit* CalorimeterSD::findHit(CalorimeterHit* aHit, G4int nHC) -{ - /* - CalorimeterHit* foundHit = 0; - for (CalorimeterHitList::const_iterator it = _hitsVector[nHC].begin(); - it != _hitsVector[nHC].end(); - it++) { - if (_hitCompare->compare(**it, *aHit)) { - foundHit = *it; - break; - } - } - return foundHit; - */ - return _hitMap.get(aHit->getId64bit()); -}
+//CalorimeterHit* CalorimeterSD::findHit(CalorimeterHit* aHit) +//{ +// return _hitMap.get(aHit->getId64bit()); +//} + +//CalorimeterHit* CalorimeterSD::findHit(CalorimeterHit* aHit, G4int nHC) +//{ +// return _hitMap.get(aHit->getId64bit()); +//}
std::ostream& CalorimeterSD::printHits(std::ostream& os) {
+ // FIXME: reimplement
/* for (int i = 0; i < getNumberOfHitsCollections(); i++) { os << getHitsCollection(i)->GetName() << std::endl;
@@ -167,6 +148,7 @@
double CalorimeterSD::getEdep() const {
+ // FIXME: reimplement
/* double edep = 0.0; for (CalorimeterHitList::const_iterator it = _hitsVector[0].begin(); it != _hitsVector[0].end(); it++) {
@@ -179,6 +161,7 @@
double CalorimeterSD::getEdep(G4int nHC) const {
+ // FIXME: reimplement
/* double edep = 0.0; for (CalorimeterHitList::const_iterator it = _hitsVector[nHC].begin(); it != _hitsVector[nHC].end(); it++) {
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