slicPandora/src
diff -u -r1.9 -r1.10
--- SimCalorimeterHitProcessor.cpp 14 Apr 2010 22:33:46 -0000 1.9
+++ SimCalorimeterHitProcessor.cpp 5 May 2010 22:15:56 -0000 1.10
@@ -65,8 +65,6 @@
const std::string& collectionName = xsubdet.m_collection;
IDDecoder* decoder = xsubdet.m_decoder;
- //std::cout << "looking up collection: " << collectionName << std::endl;
-
LCCollection* simCalHits = event->getCollection(collectionName);
LCCollection* calHits = new LCCollectionVec(EVENT::LCIO::CALORIMETERHIT);
@@ -86,6 +84,8 @@
// Create a new, empty CalorimeterHit.
CalorimeterHitImpl* calHit = new CalorimeterHitImpl;
+ //std::cout << "nmcp = " << simCalHit->getNMCParticles() << std::endl;
+
// Get the 32-bit chunks of the id.
int cellId0 = simCalHit->getCellID0();
int cellId1 = simCalHit->getCellID1();
@@ -122,6 +122,9 @@
calHits->addElement(calHit);
}
+ // Set the ReadoutName parameter for LCSim to find the correct IDDecoder.
+ calHits->parameters().setValue("ReadoutName", collectionName);
+
// Add the CalorimeterHits to the event with the collection name the same as the calorimeter type, e.g. EM_BARREL.
event->addCollection(calHits, (*iter));
}