Skip to content
Snippets Groups Projects
Commit 59243ab0 authored by Stefano Rosati's avatar Stefano Rosati
Browse files

Updating clusterization and configuration

	modified:   MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx
	modified:   MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/MMClusterization/IMMClusterBuilderTool.h
	modified:   MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
	modified:   MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
	modified:   MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MMTools.py
	modified:   MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonPrdProviderToolsConfig.py
	modified:   MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py
parent fafbf153
No related merge requests found
......@@ -43,7 +43,7 @@ Muon::MmRdoToPrepDataTool::MmRdoToPrepDataTool(const std::string& t,
m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"),
m_fullEventDone(false),
m_mmPrepDataContainer(0),
m_clusterBuilderTool("SimpleMMClusterBuilderTool/SimpleMMClusterBuilderTool",this)
m_clusterBuilderTool("Muon::SimpleMMClusterBuilderTool/SimpleMMClusterBuilderTool",this)
{
declareInterface<Muon::IMuonRdoToPrepDataTool>(this);
......@@ -225,11 +225,13 @@ StatusCode Muon::MmRdoToPrepDataTool::processCollection(const MM_RawDataCollecti
}
if(merge) {
std::vector<MMPrepData> clusters;
std::vector<MMPrepData*> clusters;
/// reconstruct the clusters
ATH_CHECK(m_clusterBuilderTool->getClusters(MMprds,clusters));
m_clusterBuilderTool->getClusters(MMprds,clusters);
for (unsigned int i = 0 ; i<clusters.size() ; ++i ) {
MMPrepData* prdN = &(clusters.at(i));
MMPrepData* prdN = clusters.at(i);
prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
prdColl->push_back(prdN);
}
......
......@@ -27,7 +27,7 @@ namespace Muon {
public: // interface methods
virtual StatusCode getClusters(std::vector<Muon::MMPrepData>& stripsVect,
std::vector<Muon::MMPrepData>& clustersVect)=0;
std::vector<Muon::MMPrepData*>& clustersVect)=0;
};
}
......
......@@ -59,7 +59,7 @@ StatusCode Muon::SimpleMMClusterBuilderTool::finalize()
}
StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPrepData>& MMprds,
std::vector<Muon::MMPrepData>& clustersVect)
std::vector<Muon::MMPrepData*>& clustersVect)
{
......@@ -165,7 +165,7 @@ StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPre
ATH_MSG_VERBOSE(" make merged prepData at strip " << m_mmIdHelper->channel(MMprds[j].identify()) << " nmerge " << nmerge << " sqrt covX " << sqrt((*covN)(0,0)));
MMPrepData* prdN = new MMPrepData(MMprds[j].identify(), hash, MMprds[j].localPosition(), rdoList, covN, MMprds[j].detectorElement());
clustersVect.push_back(*prdN);
clustersVect.push_back(prdN);
} // end loop MMprds[i]
//clear vector and delete elements
MMflag.clear();
......
......@@ -37,7 +37,7 @@ namespace Muon
virtual StatusCode finalize();
StatusCode getClusters(std::vector<Muon::MMPrepData>& stripsVect,
std::vector<Muon::MMPrepData>& clustersVect);
std::vector<Muon::MMPrepData*>& clustersVect);
private:
......
......@@ -5,27 +5,8 @@ __doc__ = """Configuration of tools for MicroMegas reconstruction"""
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s", __name__)
import copy
from AthenaCommon.AppMgr import ServiceMgr,ToolSvc
from AthenaCommon.GlobalFlags import globalflags
from AthenaCommon.BeamFlags import jobproperties
from AthenaCommon import CfgMgr
from RecExConfig.RecFlags import rec
from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,getService,getServiceClone
from AthenaCommon.ConfiguredFactory import getProperty
from MuonRecUtils import logMuon,ConfiguredBase,ExtraFlags
from AthenaCommon.CfgGetter import addTool, addToolClone, addService, addAlgorithm, \
addTypesToExcludeIfDefaultValue, addNamesToExcludeIfDefaultValue, addFullNamesToExcludeIfDefaultValue, \
addPropertiesToExcludeIfDefault, \
addTypesToSkipIfNotAvailable, addNamesToSkipIfNotAvailable, addFullNamesToSkipIfNotAvailable, \
addTypesOnlyToSkip
def SimpleMMClusterBuilderTool(name="SimpleMMClusterBuilderTool",extraFlags=None,**kwargs):
return CfgMgr.SimpleMMClusterBuilderTool(name,**kwargs)
return CfgMgr.Muon__SimpleMMClusterBuilderTool(name,**kwargs)
......@@ -106,6 +106,12 @@ def CscRdoToCscPrepData(name="CscRdoToCscPrepData", **kwargs):
from MuonRdoToPrepData.MuonRdoToPrepDataConf import CscRdoToCscPrepData as Muon__CscRdoToCscPrepData
return Muon__CscRdoToCscPrepData(name, **kwargs)
#############################################################################
def MM_PrepDataProviderTool(name="MM_PrepDataProviderTool", **kwargs):
kwargs.setdefault("ClusterBuilderTool","SimpleMMClusterBuilderTool")
return Muon__MmRdoToPrepDataTool(name,**kwargs)
### algorithms for other technologies can use C++ defaults
......
......@@ -225,7 +225,8 @@ addAlgorithm("MuonRecExample.CscTools.CscThresholdClusterBuilder","CscThresholdC
################################################################################
# Tools from MuonRecExample.MMTools (MicroMegas reconstruction tools )
################################################################################
addTool("MuonRecExample.MMTools.Muon::SimpleMMClusterBuilderTool","SimpleMMClusterBuilderTool")
addTool("MuonRecExample.MMTools.SimpleMMClusterBuilderTool","SimpleMMClusterBuilderTool")
##addTool("Muon::SimpleMMClusterBuilderTool","SimpleMMClusterBuilderTool")
################################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment