Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions CaloDigi/Realistic/src/RealisticCaloDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ void RealisticCaloDigi::processEvent( LCEvent * evt ) {
try{
LCCollection * col = evt->getCollection( colName.c_str() ) ;
string initString = col->getParameters().getStringVal(LCIO::CellIDEncoding);
newcol->parameters().setValue(LCIO::CellIDEncoding,initString);

CHT::CaloType cht_type = caloTypeFromString(colName);
CHT::CaloID cht_id = caloIDFromString(colName);
CHT::Layout cht_lay = layoutFromString(colName);
Expand All @@ -279,9 +281,6 @@ void RealisticCaloDigi::processEvent( LCEvent * evt ) {
int numElements = col->getNumberOfElements();
streamlog_out ( DEBUG1 ) << colName << " number of elements = " << numElements << endl;

if ( numElements==0 ) continue;


// loop over input hits
for (int j=0; j < numElements; ++j) {
SimCalorimeterHit * simhit = dynamic_cast<SimCalorimeterHit*>( col->getElementAt( j ) ) ;
Expand Down Expand Up @@ -316,13 +315,12 @@ void RealisticCaloDigi::processEvent( LCEvent * evt ) {
} // theshold
} // input hits

// add collection to event
newcol->parameters().setValue(LCIO::CellIDEncoding,initString);

} catch(DataNotAvailableException &e){
streamlog_out(DEBUG1) << "could not find input collection " << colName << std::endl;
}

// add collection to event
evt->addCollection(newcol,_outputCollections[i].c_str());

// add relation collection to event
Expand Down
7 changes: 4 additions & 3 deletions CaloDigi/Realistic/src/RealisticCaloReco.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ void RealisticCaloReco::processEvent( LCEvent * evt ) {


int numElements = col->getNumberOfElements();
newcol->parameters().setValue(LCIO::CellIDEncoding,initString);

streamlog_out ( DEBUG ) << colName << " number of elements = " << numElements << endl;

for (int j(0); j < numElements; ++j) {
Expand Down Expand Up @@ -181,14 +183,13 @@ void RealisticCaloReco::processEvent( LCEvent * evt ) {

}

// add collection to event
newcol->parameters().setValue(LCIO::CellIDEncoding,initString);


}
catch(DataNotAvailableException &e){
streamlog_out(DEBUG) << "could not find input ECAL collection " << colName << std::endl;
}

// add collection to event
evt->addCollection(newcol,_outputHitCollections[i].c_str());
evt->addCollection(relcol, _outputRelCollections[i].c_str());
}
Expand Down