Skip to content
Snippets Groups Projects
Commit 8d635472 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'master-clustering' into 'master'

Adapting fast pixel clustering version to allow 8-cell connectivity (ATLIDTRKCP-240)

See merge request atlas/athena!36138
parents 716cfe08 a8a5082b
No related branches found
No related tags found
No related merge requests found
......@@ -125,14 +125,7 @@ if InDetFlags.doPRDFormation():
#
from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool
InDetMergedPixelsTool = InDet__MergedPixelsTool(name = "InDetMergedPixelsTool",
globalPosAlg = InDetClusterMakerTool,
MinimalSplitSize = 0,
MaximalSplitSize = 49,
MinimalSplitProbability = 0,
DoIBLSplitting = True)
# assign the tools if there are any
if not InDetFlags.doTIDE_Ambi() and clusterSplitProbTool is not None : InDetMergedPixelsTool.SplitProbTool = clusterSplitProbTool
if not InDetFlags.doTIDE_Ambi() and clusterSplitterTool is not None : InDetMergedPixelsTool.ClusterSplitter = clusterSplitterTool
globalPosAlg = InDetClusterMakerTool)
# Enable duplcated RDO check for data15 because duplication mechanism was used.
from RecExConfig.RecFlags import rec
if len(rec.projectName())>=6 and rec.projectName()[:6]=="data15":
......
......@@ -80,11 +80,7 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ):
globalPosAlg = InDetTrigClusterMakerTool,
PixelConditionsSummaryTool = InDetTrigPixelConditionsSummaryTool,
#UseSpecialPixelMap = False #simpler setup for EFID
UseSpecialPixelMap = True,
MinimalSplitSize = 0,
MaximalSplitSize = 49,
MinimalSplitProbability = 0,
)
UseSpecialPixelMap = True)
# Enable duplcated RDO check for data15 because duplication mechanism was used.
from RecExConfig.RecFlags import rec
if len(rec.projectName())>=6 and rec.projectName()[:6]=="data15":
......
......@@ -483,14 +483,7 @@ if doPixel:
clusterSplitterTool = NnPixelClusterSplitter
from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool
InDetMergedPixelsTool = InDet__MergedPixelsTool(name = "InDetMergedPixelsTool",
globalPosAlg = InDetClusterMakerTool,
MinimalSplitSize = 0,
MaximalSplitSize = 49,
MinimalSplitProbability = 0,
DoIBLSplitting = True,
SplitClusterAmbiguityMap= "SplitClusterAmbiguityMap")
if not InDetFlags.doTIDE_Ambi() and clusterSplitProbTool is not None : InDetMergedPixelsTool.SplitProbTool = clusterSplitProbTool
if not InDetFlags.doTIDE_Ambi() and clusterSplitterTool is not None : InDetMergedPixelsTool.ClusterSplitter = clusterSplitterTool
globalPosAlg = InDetClusterMakerTool)
# Enable duplcated RDO check for data15 because duplication mechanism was used.
from RecExConfig.RecFlags import rec
if len(rec.projectName())>=6 and rec.projectName()[:6]=="data15":
......
......@@ -59,12 +59,12 @@ namespace InDet {
class network {
public:
network():
NC(0), CON({0,0,0,0}) {};
NC(0), CON({0,0,0,0,0,0,0,0}) {};
~network() {};
int NC;
std::array<int,4> CON;
std::array<int,8> CON;
};
const auto pixel_less = [] (rowcolID const& id1,rowcolID const& id2) -> bool {
......@@ -72,12 +72,7 @@ namespace InDet {
return id1.ROW < id2.ROW;
return id1.COL < id2.COL;
};
class PixelCluster;
class IPixelClusterSplitter;
class IPixelClusterSplitProbTool;
class MergedPixelsTool : public PixelClusteringToolBase
{
public:
......@@ -95,7 +90,6 @@ namespace InDet {
// It clusters together the RDOs with a pixell cell side in common.
virtual PixelClusterCollection *clusterize(const InDetRawDataCollection<PixelRDORawData>& RDOs,
const PixelID& pixelID) const;
// void init(int posstrategy, int errorstrategy);
// Once the lists of RDOs which makes up the clusters have been found by the
// clusterize() method, this method is called for each of these lists.
......@@ -126,11 +120,6 @@ namespace InDet {
private:
typedef std::vector<Identifier> RDO_Vector;
typedef std::vector<RDO_Vector*> RDO_GroupVector;
typedef std::vector<int> TOT_Vector;
typedef std::vector<TOT_Vector*> TOT_GroupVector;
MergedPixelsTool();
MergedPixelsTool(const MergedPixelsTool&);
MergedPixelsTool &operator=(const MergedPixelsTool&);
......@@ -144,25 +133,6 @@ namespace InDet {
const InDetDD::SiDetectorElement* element,
Identifier & gangedID) const;
// Checks if two RDO lists (would be clusters) whould be merged,
// which do happen if there is a pair of pixel cells belonging to the
// two different groups which have a side in common
void checkForMerge(const Identifier& id,
RDO_GroupVector::iterator baseGroup,
RDO_GroupVector::iterator lastGroup,
TOT_GroupVector::iterator totGroup,
TOT_GroupVector::iterator lvl1Group,
const InDetDD::SiDetectorElement* element,
const PixelID& pixelID) const;
// Checks if RDOs would be merged. This is based on a 4 cell connected component finding.
PixelClusterCollection* clusterizeFast(const InDetRawDataCollection<PixelRDORawData> &collection,
const PixelID& pixelID) const;
void addClusterNumber(const int& r,
const int& Ncluster,
const std::vector<network>& connections,
......@@ -175,27 +145,16 @@ namespace InDet {
ServiceHandle<IBLParameterSvc> m_IBLParameterSvc;
/// for cluster splitting
BooleanProperty m_emulateSplitter{this, "EmulateSplitting", false, "don't split - only emulate the split"};
UnsignedIntegerProperty m_minSplitSize{this, "MinimalSplitSize", 1, "minimum split size, regulates also the cluster splitting"};
UnsignedIntegerProperty m_maxSplitSize{this, "MaximalSplitSize", 1000, "minimum split size, regulates also the cluster splitting"};
DoubleProperty m_minSplitProbability{this, "MinimalSplitProbability", 0., "minimal split probability"};
ToolHandle<InDet::IPixelClusterSplitProbTool> m_splitProbTool{this, "SplitProbTool", "", "ToolHandle for the split probability tool"};
ToolHandle<InDet::IPixelClusterSplitter> m_clusterSplitter{this, "ClusterSplitter", "", "ToolHandle for the split probability tool"};
BooleanProperty m_doIBLSplitting{this, "DoIBLSplitting", false};
BooleanProperty m_doFastClustering{this, "DoFastClustering", false};
BooleanProperty m_addCorners{this, "AddCorners", true};
BooleanProperty m_checkDuplicatedRDO{this, "CheckDuplicatedRDO", false, "Check duplicated RDOs using isDuplicated method"};
SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_pixelDetEleCollKey{this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};
bool m_IBLAbsent{true};
mutable std::atomic_uint m_processedClusters{0}; //!< statistics output
mutable std::atomic_uint m_modifiedOrigClusters{0}; //!< statistics output
mutable std::atomic_uint m_splitOrigClusters{0}; //!< statistics output
mutable std::atomic_uint m_splitProdClusters{0}; //!< statistics output
mutable std::atomic_uint m_largeClusters{0}; //!< statistics output
mutable std::atomic_bool m_printw{true};
mutable std::atomic_uint m_processedClusters{0}; //!< statistics output
mutable std::atomic_bool m_printw{true};
};
}
......
......@@ -170,12 +170,7 @@ def makeInDetAlgs( whichSignature='', separateTrackParticleCreator='', rois = 'E
from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool
InDetMergedPixelsTool = InDet__MergedPixelsTool(name = "InDetMergedPixelsTool_" + signature,
globalPosAlg = InDetClusterMakerTool,
MinimalSplitSize = 0,
MaximalSplitSize = 49,
MinimalSplitProbability = 0,
DoIBLSplitting = True,
)
globalPosAlg = InDetClusterMakerTool)
# Enable duplcated RDO check for data15 because duplication mechanism was used.
from RecExConfig.RecFlags import rec
if len(rec.projectName())>=6 and rec.projectName()[:6]=="data15":
......
......@@ -304,12 +304,7 @@ def TrigInDetConfig( flags, roisKey="EMRoIs", signatureName='' ):
InDet__MergedPixelsTool=CompFactory.InDet.MergedPixelsTool
InDetMergedPixelsTool = InDet__MergedPixelsTool(name = "InDetMergedPixelsTool"+ signature,
globalPosAlg = InDetClusterMakerTool,
MinimalSplitSize = 0,
MaximalSplitSize = 49,
MinimalSplitProbability = 0,
DoIBLSplitting = True,
)
globalPosAlg = InDetClusterMakerTool)
# Enable duplcated RDO check for data15 because duplication mechanism was used.
if len(flags.Input.ProjectName)>=6 and flags.Input.ProjectName[:6]=="data15":
InDetMergedPixelsTool.CheckDuplicatedRDO = 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