Skip to content
Snippets Groups Projects
Commit 0645bced authored by Swagato Banerjee's avatar Swagato Banerjee
Browse files

Merge branch 'cherry-pick-4b8b9814-21.9' into '21.9'

Sweeping !20256 from 21.3 to 21.9.
MM clusterization tool

See merge request atlas/athena!20361
parents aa441a26 2f814117
No related branches found
No related tags found
No related merge requests found
Showing
with 199 additions and 124 deletions
...@@ -23,7 +23,8 @@ atlas_depends_on_subdirs( PUBLIC ...@@ -23,7 +23,8 @@ atlas_depends_on_subdirs( PUBLIC
MuonSpectrometer/MuonDigitContainer MuonSpectrometer/MuonDigitContainer
MuonSpectrometer/MuonIdHelpers MuonSpectrometer/MuonIdHelpers
MuonSpectrometer/MuonRDO MuonSpectrometer/MuonRDO
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData ) MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData
MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization )
# External dependencies: # External dependencies:
find_package( tdaq-common COMPONENTS eformat_write DataWriter ) find_package( tdaq-common COMPONENTS eformat_write DataWriter )
...@@ -33,7 +34,7 @@ atlas_add_component( MuonMM_CnvTools ...@@ -33,7 +34,7 @@ atlas_add_component( MuonMM_CnvTools
src/*.cxx src/*.cxx
src/components/*.cxx src/components/*.cxx
INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamData ByteStreamData_test GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests AtlasDetDescr Identifier ByteStreamCnvSvcBaseLib MuonContainerManager MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonRDO MuonPrepRawData ) LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamData ByteStreamData_test GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests AtlasDetDescr Identifier ByteStreamCnvSvcBaseLib MuonContainerManager MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonRDO MuonPrepRawData MMClusterization )
# Install files from the package: # Install files from the package:
atlas_install_headers( MuonMM_CnvTools ) atlas_install_headers( MuonMM_CnvTools )
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" #include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
#include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h" #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
#include "MMClusterization/IMMClusterBuilderTool.h"
using namespace MuonGM; using namespace MuonGM;
using namespace Trk; using namespace Trk;
using namespace Muon; using namespace Muon;
...@@ -40,7 +42,8 @@ Muon::MmRdoToPrepDataTool::MmRdoToPrepDataTool(const std::string& t, ...@@ -40,7 +42,8 @@ Muon::MmRdoToPrepDataTool::MmRdoToPrepDataTool(const std::string& t,
m_mmIdHelper(0), m_mmIdHelper(0),
m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"), m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"),
m_fullEventDone(false), m_fullEventDone(false),
m_mmPrepDataContainer(0) m_mmPrepDataContainer(0),
m_clusterBuilderTool("Muon::SimpleMMClusterBuilderTool/SimpleMMClusterBuilderTool",this)
{ {
declareInterface<Muon::IMuonRdoToPrepDataTool>(this); declareInterface<Muon::IMuonRdoToPrepDataTool>(this);
...@@ -51,6 +54,7 @@ Muon::MmRdoToPrepDataTool::MmRdoToPrepDataTool(const std::string& t, ...@@ -51,6 +54,7 @@ Muon::MmRdoToPrepDataTool::MmRdoToPrepDataTool(const std::string& t,
"Muon::MMPrepDataContainer to record"); "Muon::MMPrepDataContainer to record");
declareProperty("MergePrds", m_merge = true); declareProperty("MergePrds", m_merge = true);
declareProperty("ClusterBuilderTool",m_clusterBuilderTool);
} }
...@@ -141,7 +145,6 @@ StatusCode Muon::MmRdoToPrepDataTool::processCollection(const MM_RawDataCollecti ...@@ -141,7 +145,6 @@ StatusCode Muon::MmRdoToPrepDataTool::processCollection(const MM_RawDataCollecti
} }
std::vector<MMPrepData> MMprds; std::vector<MMPrepData> MMprds;
std::vector<int> MMflag;
// convert the RDO collection to a PRD collection // convert the RDO collection to a PRD collection
MM_RawDataCollection::const_iterator it = rdoColl->begin(); MM_RawDataCollection::const_iterator it = rdoColl->begin();
for ( ; it != rdoColl->end() ; ++it ) { for ( ; it != rdoColl->end() ; ++it ) {
...@@ -218,114 +221,21 @@ StatusCode Muon::MmRdoToPrepDataTool::processCollection(const MM_RawDataCollecti ...@@ -218,114 +221,21 @@ StatusCode Muon::MmRdoToPrepDataTool::processCollection(const MM_RawDataCollecti
prdColl->push_back(new MMPrepData(prdId,hash,localPos,rdoList,cov,detEl,time,charge)); prdColl->push_back(new MMPrepData(prdId,hash,localPos,rdoList,cov,detEl,time,charge));
} else { } else {
MMprds.push_back(MMPrepData(prdId,hash,localPos,rdoList,cov,detEl,time,charge)); MMprds.push_back(MMPrepData(prdId,hash,localPos,rdoList,cov,detEl,time,charge));
MMflag.push_back(0);
} }
} }
if(merge) { if(merge) {
for (unsigned int i=0; i<MMprds.size(); ++i){ std::vector<MMPrepData*> clusters;
// skip the merged prds
if(MMflag[i]==1) continue; /// reconstruct the clusters
ATH_CHECK(m_clusterBuilderTool->getClusters(MMprds,clusters));
bool merge = false;
unsigned int jmerge = -1; for (unsigned int i = 0 ; i<clusters.size() ; ++i ) {
Identifier id_prd = MMprds[i].identify(); MMPrepData* prdN = clusters.at(i);
int strip = m_mmIdHelper->channel(id_prd); prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
int gasGap = m_mmIdHelper->gasGap(id_prd); prdColl->push_back(prdN);
int layer = m_mmIdHelper->multilayer(id_prd); }
ATH_MSG_VERBOSE(" MMprds " << MMprds.size() <<" index "<< i << " strip " << strip << " gasGap " << gasGap << " layer " << layer << " z " << MMprds[i].globalPosition().z() );
for (unsigned int j=i+1; j<MMprds.size(); ++j){
Identifier id_prdN = MMprds[j].identify();
int stripN = m_mmIdHelper->channel(id_prdN);
int gasGapN = m_mmIdHelper->gasGap(id_prdN);
int layerN = m_mmIdHelper->multilayer(id_prdN);
if( gasGapN==gasGap && layerN==layer ) {
ATH_MSG_VERBOSE(" next MMprds strip same gasGap and layer index " << j << " strip " << stripN << " gasGap " << gasGapN << " layer " << layerN );
if(abs(strip-stripN)<2) {
merge = true;
jmerge = j;
break;
}
}
}
if(!merge) {
ATH_MSG_VERBOSE(" add isolated MMprds strip " << strip << " gasGap " << gasGap << " layer " << layer );
std::vector<Identifier> rdoList;
rdoList.push_back(id_prd);
double covX = MMprds[i].localCovariance()(Trk::locX,Trk::locX);
Amg::MatrixX* covN = new Amg::MatrixX(1,1);
covN->setIdentity();
(*covN)(0,0) = covX;
MMPrepData* prdN = new MMPrepData(id_prd, hash, MMprds[i].localPosition(), rdoList, covN, MMprds[i].detectorElement());
prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
prdColl->push_back(prdN);
} else {
unsigned int nmerge = 0;
std::vector<Identifier> rdoList;
std::vector<unsigned int> mergeIndices;
std::vector<int> mergeStrips;
rdoList.push_back(id_prd);
MMflag[i] = 1;
mergeIndices.push_back(i);
mergeStrips.push_back(strip);
unsigned int nmergeStrips = 1;
unsigned int nmergeStripsMax = 25;
for (unsigned int k=0; k < nmergeStripsMax; ++k) {
for (unsigned int j=jmerge; j<MMprds.size(); ++j){
if(MMflag[j] == 1) continue;
Identifier id_prdN = MMprds[j].identify();
int stripN = m_mmIdHelper->channel(id_prdN);
if( abs(mergeStrips[k]-stripN) <= 1 ) {
int gasGapN = m_mmIdHelper->gasGap(id_prdN);
int layerN = m_mmIdHelper->multilayer(id_prdN);
if( gasGapN==gasGap && layerN==layer ) {
if(mergeStrips[k]==stripN) {
MMflag[j] = 1;
continue;
}
nmerge++;
rdoList.push_back(id_prdN);
MMflag[j] = 1;
mergeIndices.push_back(j);
mergeStrips.push_back(stripN);
nmergeStrips++;
}
}
}
if(k>=nmergeStrips) break;
}
ATH_MSG_VERBOSE(" add merged MMprds nmerge " << nmerge << " strip " << strip << " gasGap " << gasGap << " layer " << layer );
// start off from strip in the middle
int stripSum = 0;
for (unsigned int k =0; k<mergeStrips.size(); ++k) {
stripSum += mergeStrips[k];
}
stripSum = stripSum/mergeStrips.size();
unsigned int j = jmerge;
for (unsigned int k =0; k<mergeStrips.size(); ++k) {
if(mergeStrips[k]==stripSum) j = mergeIndices[k];
ATH_MSG_VERBOSE(" merged strip nr " << k << " strip " << mergeStrips[k] << " index " << mergeIndices[k]);
}
ATH_MSG_VERBOSE(" Look for strip nr " << stripSum << " found at index " << j);
double covX = MMprds[j].localCovariance()(Trk::locX, Trk::locX);
Amg::MatrixX* covN = new Amg::MatrixX(1,1);
covN->setIdentity();
(*covN)(0,0) = 6.*(nmerge + 1.)*covX;
if(nmerge<=1) (*covN)(0,0) = covX;
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());
prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
prdColl->push_back(prdN);
}
} // end loop MMprds[i]
// clear vector and delete elements
MMflag.clear();
MMprds.clear();
} }
......
...@@ -39,6 +39,7 @@ namespace Muon ...@@ -39,6 +39,7 @@ namespace Muon
class IMuonRawDataProviderTool; class IMuonRawDataProviderTool;
class MuonIdHelperTool; class MuonIdHelperTool;
class IMMClusterBuilderTool;
class MmRdoToPrepDataTool : virtual public IMuonRdoToPrepDataTool, virtual public AthAlgTool class MmRdoToPrepDataTool : virtual public IMuonRdoToPrepDataTool, virtual public AthAlgTool
{ {
...@@ -94,6 +95,9 @@ namespace Muon ...@@ -94,6 +95,9 @@ namespace Muon
std::string m_outputCollectionLocation; std::string m_outputCollectionLocation;
bool m_merge; bool m_merge;
ToolHandle<IMMClusterBuilderTool> m_clusterBuilderTool;
}; };
} // end of namespace } // end of namespace
......
...@@ -27,7 +27,7 @@ namespace Muon { ...@@ -27,7 +27,7 @@ namespace Muon {
public: // interface methods public: // interface methods
virtual StatusCode getClusters(std::vector<Muon::MMPrepData>& stripsVect, virtual StatusCode getClusters(std::vector<Muon::MMPrepData>& stripsVect,
std::vector<Muon::MMPrepData>& clustersVect)=0; std::vector<Muon::MMPrepData*>& clustersVect)=0;
}; };
} }
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
*/ */
#include "SimpleMMClusterBuilderTool.h" #include "SimpleMMClusterBuilderTool.h"
#include "MuonPrepRawData/MMPrepData.h" #include "MuonPrepRawData/MMPrepData.h"
#include "MuonReadoutGeometry/MuonDetectorManager.h"
#include "MuonIdHelpers/MmIdHelper.h"
using namespace Muon; using namespace Muon;
...@@ -10,9 +12,11 @@ Muon::SimpleMMClusterBuilderTool::SimpleMMClusterBuilderTool(const std::string& ...@@ -10,9 +12,11 @@ Muon::SimpleMMClusterBuilderTool::SimpleMMClusterBuilderTool(const std::string&
const std::string& n, const std::string& n,
const IInterface* p ) const IInterface* p )
: :
AthAlgTool(t,n,p) AthAlgTool(t,n,p),
m_muonMgr(nullptr),
m_mmIdHelper(nullptr)
{ {
declareInterface<IMMClusterBuilderTool>(this);
} }
...@@ -25,6 +29,22 @@ Muon::SimpleMMClusterBuilderTool::~SimpleMMClusterBuilderTool() ...@@ -25,6 +29,22 @@ Muon::SimpleMMClusterBuilderTool::~SimpleMMClusterBuilderTool()
StatusCode Muon::SimpleMMClusterBuilderTool::initialize() StatusCode Muon::SimpleMMClusterBuilderTool::initialize()
{ {
/// get the detector descriptor manager
StoreGateSvc* detStore=0;
StatusCode sc = serviceLocator()->service("DetectorStore", detStore);
if (sc.isSuccess()) {
sc = detStore->retrieve( m_muonMgr );
if (sc.isFailure()) {
ATH_MSG_FATAL(" Cannot retrieve MuonReadoutGeometry ");
return sc;
}
} else {
ATH_MSG_ERROR("DetectorStore not found ");
return sc;
}
m_mmIdHelper = m_muonMgr->mmIdHelper();
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -35,14 +55,123 @@ StatusCode Muon::SimpleMMClusterBuilderTool::finalize() ...@@ -35,14 +55,123 @@ StatusCode Muon::SimpleMMClusterBuilderTool::finalize()
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPrepData>& stripsVect, StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPrepData>& MMprds,
std::vector<Muon::MMPrepData>& clustersVect) std::vector<Muon::MMPrepData*>& clustersVect)
{ {
ATH_MSG_DEBUG("Size of the input vector: " << stripsVect.size()); ATH_MSG_DEBUG("Size of the input vector: " << MMprds.size());
ATH_MSG_DEBUG("Size of the output vector: " << clustersVect.size()); ATH_MSG_DEBUG("Size of the output vector: " << clustersVect.size());
std::vector<int> MMflag;
IdentifierHash hash;
if ( MMprds.size() > 0 ) {
hash = MMprds.at(0).collectionHash();
}
else {
ATH_MSG_DEBUG("Empty PRD collection: no clusterization" );
return StatusCode::SUCCESS;
}
for (unsigned int i=0; i<MMprds.size(); ++i){
MMflag.push_back(0);
}
for (unsigned int i=0; i<MMprds.size(); ++i){
// skip the merged prds
if(MMflag[i]==1) continue;
unsigned int jmerge = -1;
Identifier id_prd = MMprds[i].identify();
int strip = m_mmIdHelper->channel(id_prd);
int gasGap = m_mmIdHelper->gasGap(id_prd);
int layer = m_mmIdHelper->multilayer(id_prd);
ATH_MSG_VERBOSE(" MMprds " << MMprds.size() <<" index "<< i << " strip " << strip << " gasGap " << gasGap << " layer " << layer << " z " << MMprds[i].globalPosition().z() );
for (unsigned int j=i+1; j<MMprds.size(); ++j){
Identifier id_prdN = MMprds[j].identify();
int stripN = m_mmIdHelper->channel(id_prdN);
int gasGapN = m_mmIdHelper->gasGap(id_prdN);
int layerN = m_mmIdHelper->multilayer(id_prdN);
if( gasGapN==gasGap && layerN==layer ) {
ATH_MSG_VERBOSE(" next MMprds strip same gasGap and layer index " << j << " strip " << stripN << " gasGap " << gasGapN << " layer " << layerN );
if(abs(strip-stripN)<2) {
jmerge = j;
break;
}
}
}
unsigned int nmerge = 0;
std::vector<Identifier> rdoList;
std::vector<unsigned int> mergeIndices;
std::vector<int> mergeStrips;
rdoList.push_back(id_prd);
MMflag[i] = 1;
mergeIndices.push_back(i);
mergeStrips.push_back(strip);
unsigned int nmergeStrips = 1;
unsigned int nmergeStripsMax = 25;
for (unsigned int k=0; k < nmergeStripsMax; ++k) {
for (unsigned int j=jmerge; j<MMprds.size(); ++j){
if(MMflag[j] == 1) continue;
Identifier id_prdN = MMprds[j].identify();
int stripN = m_mmIdHelper->channel(id_prdN);
if( abs(mergeStrips[k]-stripN) <= 1 ) {
int gasGapN = m_mmIdHelper->gasGap(id_prdN);
int layerN = m_mmIdHelper->multilayer(id_prdN);
if( gasGapN==gasGap && layerN==layer ) {
if(mergeStrips[k]==stripN) {
MMflag[j] = 1;
continue;
}
nmerge++;
rdoList.push_back(id_prdN);
MMflag[j] = 1;
mergeIndices.push_back(j);
mergeStrips.push_back(stripN);
nmergeStrips++;
}
}
}
if(k>=nmergeStrips) break;
}
ATH_MSG_VERBOSE(" add merged MMprds nmerge " << nmerge << " strip " << strip << " gasGap " << gasGap << " layer " << layer );
// start off from strip in the middle
int stripSum = 0;
for (unsigned int k =0; k<mergeStrips.size(); ++k) {
stripSum += mergeStrips[k];
}
stripSum = stripSum/mergeStrips.size();
unsigned int j = jmerge;
for (unsigned int k =0; k<mergeStrips.size(); ++k) {
if(mergeStrips[k]==stripSum) j = mergeIndices[k];
ATH_MSG_VERBOSE(" merged strip nr " << k << " strip " << mergeStrips[k] << " index " << mergeIndices[k]);
}
ATH_MSG_VERBOSE(" Look for strip nr " << stripSum << " found at index " << j);
double covX = MMprds[j].localCovariance()(Trk::locX, Trk::locX);
///
/// memory allocated dynamically for the PrepRawData is managed by Event Store
///
Amg::MatrixX* covN = new Amg::MatrixX(1,1);
covN->setIdentity();
(*covN)(0,0) = 6.*(nmerge + 1.)*covX;
if(nmerge<=1) (*covN)(0,0) = covX;
ATH_MSG_VERBOSE(" make merged prepData at strip " << m_mmIdHelper->channel(MMprds[j].identify()) << " nmerge " << nmerge << " sqrt covX " << sqrt((*covN)(0,0)));
///
/// memory allocated dynamically for the PrepRawData is managed by Event Store
///
MMPrepData* prdN = new MMPrepData(MMprds[j].identify(), hash, MMprds[j].localPosition(), rdoList, covN, MMprds[j].detectorElement());
clustersVect.push_back(prdN);
} // end loop MMprds[i]
//clear vector and delete elements
MMflag.clear();
MMprds.clear();
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -8,20 +8,25 @@ ...@@ -8,20 +8,25 @@
#include "MMClusterization/IMMClusterBuilderTool.h" #include "MMClusterization/IMMClusterBuilderTool.h"
#include "MuonPrepRawData/MMPrepData.h" #include "MuonPrepRawData/MMPrepData.h"
#include "AthenaBaseComps/AthAlgTool.h" #include "AthenaBaseComps/AthAlgTool.h"
class MmIdHelper;
namespace MuonGM
{
class MuonDetectorManager;
}
// //
// Simple clusterization tool for MicroMegas // Simple clusterization tool for MicroMegas
// //
namespace Muon namespace Muon
{ {
class IMMClusterBuilderTool;
class SimpleMMClusterBuilderTool : virtual public IMMClusterBuilderTool, public AthAlgTool { class SimpleMMClusterBuilderTool : virtual public IMMClusterBuilderTool, public AthAlgTool {
public: public:
/** Default constructor */ /** Default constructor */
SimpleMMClusterBuilderTool(const std::string&, const std::string&, const IInterface*); SimpleMMClusterBuilderTool(const std::string&, const std::string&, const IInterface*);
/** Default destructor */ /** Default destructor */
virtual ~SimpleMMClusterBuilderTool(); virtual ~SimpleMMClusterBuilderTool();
...@@ -32,12 +37,14 @@ namespace Muon ...@@ -32,12 +37,14 @@ namespace Muon
virtual StatusCode finalize(); virtual StatusCode finalize();
StatusCode getClusters(std::vector<Muon::MMPrepData>& stripsVect, StatusCode getClusters(std::vector<Muon::MMPrepData>& stripsVect,
std::vector<Muon::MMPrepData>& clustersVect); std::vector<Muon::MMPrepData*>& clustersVect);
private: private:
/// Muon Detector Descriptor
const MuonGM::MuonDetectorManager* m_muonMgr;
const MmIdHelper* m_mmIdHelper;
}; };
......
...@@ -26,7 +26,7 @@ namespace Muon { ...@@ -26,7 +26,7 @@ namespace Muon {
public: // interface methods public: // interface methods
virtual StatusCode getClusters(std::vector<Muon::sTgcPrepData>& stripsVect, virtual StatusCode getClusters(std::vector<Muon::sTgcPrepData>& stripsVect,
std::vector<Muon::sTgcPrepData>& clustersVect)=0; std::vector<Muon::sTgcPrepData*>& clustersVect)=0;
}; };
} }
......
...@@ -36,7 +36,7 @@ StatusCode Muon::SimpleSTgcClusterBuilderTool::finalize() ...@@ -36,7 +36,7 @@ StatusCode Muon::SimpleSTgcClusterBuilderTool::finalize()
} }
StatusCode Muon::SimpleSTgcClusterBuilderTool::getClusters(std::vector<Muon::sTgcPrepData>& stripsVect, StatusCode Muon::SimpleSTgcClusterBuilderTool::getClusters(std::vector<Muon::sTgcPrepData>& stripsVect,
std::vector<Muon::sTgcPrepData>& clustersVect) std::vector<Muon::sTgcPrepData*>& clustersVect)
{ {
......
...@@ -31,7 +31,7 @@ namespace Muon ...@@ -31,7 +31,7 @@ namespace Muon
virtual StatusCode finalize(); virtual StatusCode finalize();
StatusCode getClusters(std::vector<Muon::sTgcPrepData>& stripsVect, StatusCode getClusters(std::vector<Muon::sTgcPrepData>& stripsVect,
std::vector<Muon::sTgcPrepData>& clustersVect); std::vector<Muon::sTgcPrepData*>& clustersVect);
private: private:
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
__doc__ = """Configuration of tools for MicroMegas reconstruction"""
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s", __name__)
from AthenaCommon import CfgMgr
def SimpleMMClusterBuilderTool(name="SimpleMMClusterBuilderTool",extraFlags=None,**kwargs):
return CfgMgr.Muon__SimpleMMClusterBuilderTool(name,**kwargs)
...@@ -106,6 +106,12 @@ def CscRdoToCscPrepData(name="CscRdoToCscPrepData", **kwargs): ...@@ -106,6 +106,12 @@ def CscRdoToCscPrepData(name="CscRdoToCscPrepData", **kwargs):
from MuonRdoToPrepData.MuonRdoToPrepDataConf import CscRdoToCscPrepData as Muon__CscRdoToCscPrepData from MuonRdoToPrepData.MuonRdoToPrepDataConf import CscRdoToCscPrepData as Muon__CscRdoToCscPrepData
return Muon__CscRdoToCscPrepData(name, **kwargs) 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 ### algorithms for other technologies can use C++ defaults
......
...@@ -222,6 +222,10 @@ addTool("MuonRecExample.CscTools.CscSegmentUtilTool","CscSegmentUtilTool") ...@@ -222,6 +222,10 @@ addTool("MuonRecExample.CscTools.CscSegmentUtilTool","CscSegmentUtilTool")
addAlgorithm("MuonRecExample.CscTools.CscThresholdClusterBuilder","CscThresholdClusterBuilder") addAlgorithm("MuonRecExample.CscTools.CscThresholdClusterBuilder","CscThresholdClusterBuilder")
################################################################################
# Tools from MuonRecExample.MMTools (MicroMegas reconstruction tools )
################################################################################
addTool("MuonRecExample.MMTools.SimpleMMClusterBuilderTool","SimpleMMClusterBuilderTool")
################################################################################ ################################################################################
......
...@@ -30,6 +30,8 @@ if muonRecFlags.doRPCs() and DetFlags.makeRIO.RPC_on() and (DetFlags.haveRDO.RPC ...@@ -30,6 +30,8 @@ if muonRecFlags.doRPCs() and DetFlags.makeRIO.RPC_on() and (DetFlags.haveRDO.RPC
if muonRecFlags.doTGCs() and DetFlags.makeRIO.TGC_on() and (DetFlags.haveRDO.TGC_on() or DetFlags.digitize.TGC_on()): if muonRecFlags.doTGCs() and DetFlags.makeRIO.TGC_on() and (DetFlags.haveRDO.TGC_on() or DetFlags.digitize.TGC_on()):
topSequence += getAlgorithm("TgcRdoToTgcPrepData", tryDefaultConfigurable=True) topSequence += getAlgorithm("TgcRdoToTgcPrepData", tryDefaultConfigurable=True)
from MuonRecExample.MMTools import SimpleMMClusterBuilderTool
if not muonRecFlags.doFastDigitization(): if not muonRecFlags.doFastDigitization():
if muonRecFlags.dosTGCs() and DetFlags.makeRIO.sTGC_on() and (DetFlags.haveRDO.sTGC_on() or DetFlags.digitize.sTGC_on()): if muonRecFlags.dosTGCs() and DetFlags.makeRIO.sTGC_on() and (DetFlags.haveRDO.sTGC_on() or DetFlags.digitize.sTGC_on()):
topSequence += getAlgorithm("StgcRdoToStgcPrepData", tryDefaultConfigurable=True) topSequence += getAlgorithm("StgcRdoToStgcPrepData", tryDefaultConfigurable=True)
......
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