diff --git a/include/CLUENtuplizer.h b/include/CLUENtuplizer.h index f351d82..278b5c3 100644 --- a/include/CLUENtuplizer.h +++ b/include/CLUENtuplizer.h @@ -97,7 +97,6 @@ class CLUENtuplizer : public Gaudi::Algorithm { mutable DataHandle EE_calo_handle {"EndcapInputHits", Gaudi::DataHandle::Reader, this}; mutable DataHandle ev_handle {"EventHeader", Gaudi::DataHandle::Reader, this}; mutable DataHandle mcp_handle {"MCParticles", Gaudi::DataHandle::Reader, this}; - mutable DataHandle cluster_handle {ClusterCollectionName, Gaudi::DataHandle::Reader, this}; MetaDataHandle cellIDHandle {EB_calo_handle, edm4hep::CellIDEncoding, Gaudi::DataHandle::Reader}; bool singleMCParticle = false; diff --git a/src/CLUENtuplizer.cpp b/src/CLUENtuplizer.cpp index 431ac38..ed643f0 100644 --- a/src/CLUENtuplizer.cpp +++ b/src/CLUENtuplizer.cpp @@ -105,6 +105,10 @@ StatusCode CLUENtuplizer::execute(const EventContext&) const { debug() << "ECAL Calorimeter Hits Size = " << (*EB_calo_coll).size()+(*EE_calo_coll).size() << endmsg; // Read cluster collection + // This should be fixed, for now the const cast is added to be able to create the handle + // as it was done before https://github.com/key4hep/k4Clue/pull/60 + DataHandle cluster_handle { + ClusterCollectionName, Gaudi::DataHandle::Reader, const_cast(this) }; cluster_coll = cluster_handle.get(); // Get collection metadata cellID which is valid for both EB, EE and Clusters