ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetRecTools
SiClusterizationTool
SiClusterizationTool
MergedPixelsTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// MergedPixelsAlg.h
7
// SimplePixelClusteringTool plus implementation of merging clusters which
8
// contain a common RDO Identifier
9
// Input from RDOs
11
// (c) ATLAS Detector software
13
14
#ifndef SICLUSTERIZATIONTOOL_MERGEDPIXELSTOOL_H
15
#define SICLUSTERIZATIONTOOL_MERGEDPIXELSTOOL_H
16
17
#include "
SiClusterizationTool/PixelRDOTool.h
"
18
19
#include "Identifier/Identifier.h"
20
// forward declare not possible (typedef)
21
#include "
InDetPrepRawData/PixelClusterCollection.h
"
22
#include "
InDetPrepRawData/PixelGangedClusterAmbiguities.h
"
23
#include "
InDetRawData/InDetRawDataCollection.h
"
24
#include "
InDetRawData/PixelRDORawData.h
"
25
#include "
StoreGate/ReadCondHandleKey.h
"
26
#include "
PixelConditionsData/PixelChargeCalibCondData.h
"
27
#include "
PixelConditionsData/PixelOfflineCalibData.h
"
28
29
#include "GaudiKernel/ServiceHandle.h"
30
31
#include <atomic>
32
#include <vector>
33
#include <array>
34
35
class
PixelID
;
36
37
namespace
InDetDD
{
38
class
SiDetectorElement
;
39
}
40
41
42
namespace
InDet
{
43
44
struct
network
{
45
public
:
46
int
NC
{};
47
std::array<int,8>
CON
{};
48
};
49
50
const
auto
pixel_less
= [] (UnpackedPixelRDO
const
& id1,UnpackedPixelRDO
const
& id2) ->
bool
{
51
if
(id1.COL == id2.COL)
return
id1.ROW < id2.ROW;
52
return
id1.COL < id2.COL;
53
};
54
55
class
MergedPixelsTool
final:
public
extends<AthAlgTool, IPixelClusteringTool> {
56
public
:
57
58
59
// Constructor with parameters:
60
MergedPixelsTool
(
const
std::string&
type
,
61
const
std::string& name,
62
const
IInterface* parent);
63
64
virtual
~MergedPixelsTool
() =
default
;
65
66
// Called by the PixelPrepRawDataFormation algorithm once for every pixel
67
// module (with non-empty RDO collection...).
68
// It clusters together the RDOs with a pixell cell side in common.
69
// [Implementation of the IPixelClusteringTool interface]
70
virtual
PixelClusterCollection*
clusterize
(
71
const
InDetRawDataCollection<PixelRDORawData>
& RDOs,
72
const
PixelID
& pixelID,
73
DataPool<PixelCluster>
* dataItemsPool,
74
const
EventContext& ctx)
const override
;
75
76
// Once the lists of RDOs which makes up the clusters have been found by the
77
// clusterize() method, this method is called for each of these lists.
78
// The method computes the local position of the cluster, and create
79
// a "cluster object" with all the required information (including charge
80
// interpolation variables Omegax and Omegay, and whether the cluster
81
// contains ganged pixels)
82
// This method calls the ClusterMakerTool to compute global position and
83
// position errors.
84
// Input parameters are the list of RDOs identifier of the would-be
85
// cluster, the list of TOT values, the module the cluster belongs to,
86
// the pixel helper tool and the number of RDOS of the cluster.
87
PixelCluster
makeCluster
(
88
const
std::vector<Identifier>& group,
89
const
std::vector<int>& totgroup,
90
const
std::vector<int>& lvl1group,
91
const
InDetDD::SiDetectorElement
* element,
92
const
PixelID
& pixelID,
93
int
& clusterNumber,
94
bool
split
,
95
double
splitProb1,
96
double
splitProb2,
97
const
PixelChargeCalibCondData
* calibData,
98
const
PixelCalib::PixelOfflineCalibData
* offlineCalibData,
99
const
EventContext& ctx)
const
;
100
102
virtual
StatusCode
initialize
()
override
;
103
105
virtual
StatusCode
finalize
()
override
;
106
107
108
private
:
109
MergedPixelsTool
();
110
MergedPixelsTool
(
const
MergedPixelsTool
&);
111
MergedPixelsTool
&
operator=
(
const
MergedPixelsTool
&);
112
113
void
addClusterNumber
(
const
int
&
r
,
114
const
int
& Ncluster,
115
const
std::vector<network>& connections,
116
std::vector<UnpackedPixelRDO>& collectionID)
const
;
117
118
BooleanProperty
m_addCorners
{
this
,
"AddCorners"
,
true
};
119
120
ToolHandle<ClusterMakerTool>
m_clusterMaker
{
this
,
"globalPosAlg"
,
"InDet::ClusterMakerTool"
};
121
ToolHandle<PixelRDOTool>
m_pixelRDOTool
{
this
,
"PixelRDOTool"
,
"InDet::PixelRDOTool"
};
122
123
SG::ReadCondHandleKey<PixelChargeCalibCondData>
m_chargeDataKey
{
this
,
"PixelChargeCalibCondData"
,
"PixelChargeCalibCondData"
,
"Pixel charge calibration data"
};
124
SG::ReadCondHandleKey<PixelCalib::PixelOfflineCalibData>
m_clusterErrorKey
{
this
,
"PixelOfflineCalibData"
,
"PixelOfflineCalibData"
,
"Output key of pixel cluster"
};
125
126
127
IntegerProperty
m_posStrategy
{
this
,
"posStrategy"
, 0};
128
IntegerProperty
m_errorStrategy
{
this
,
"errorStrategy"
, 1};
129
130
mutable
std::atomic_uint
m_processedClusters
{0};
131
mutable
std::atomic_bool
m_printw
{
true
};
132
};
133
134
}
135
136
#endif
// SICLUSTERIZATIONTOOL_MERGEDPIXELSALG_H
InDetRawDataCollection.h
PixelChargeCalibCondData.h
PixelClusterCollection.h
PixelGangedClusterAmbiguities.h
PixelOfflineCalibData.h
PixelRDORawData.h
PixelRDOTool.h
ReadCondHandleKey.h
DataPool
a typed memory pool that saves time spent allocation small object.
Definition
DataPool.h:63
InDetDD::SiDetectorElement
Class to hold geometrical description of a silicon detector element.
Definition
SiDetectorElement.h:109
InDetRawDataCollection
Definition
InDetRawDataCollection.h:31
InDet::MergedPixelsTool::MergedPixelsTool
MergedPixelsTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
MergedPixelsTool.cxx:35
InDet::MergedPixelsTool::m_errorStrategy
IntegerProperty m_errorStrategy
Definition
MergedPixelsTool.h:128
InDet::MergedPixelsTool::finalize
virtual StatusCode finalize() override
Statistics output.
Definition
MergedPixelsTool.cxx:52
InDet::MergedPixelsTool::m_addCorners
BooleanProperty m_addCorners
Definition
MergedPixelsTool.h:118
InDet::MergedPixelsTool::m_processedClusters
std::atomic_uint m_processedClusters
statistics output
Definition
MergedPixelsTool.h:130
InDet::MergedPixelsTool::MergedPixelsTool
MergedPixelsTool()
InDet::MergedPixelsTool::m_pixelRDOTool
ToolHandle< PixelRDOTool > m_pixelRDOTool
Definition
MergedPixelsTool.h:121
InDet::MergedPixelsTool::makeCluster
PixelCluster makeCluster(const std::vector< Identifier > &group, const std::vector< int > &totgroup, const std::vector< int > &lvl1group, const InDetDD::SiDetectorElement *element, const PixelID &pixelID, int &clusterNumber, bool split, double splitProb1, double splitProb2, const PixelChargeCalibCondData *calibData, const PixelCalib::PixelOfflineCalibData *offlineCalibData, const EventContext &ctx) const
Definition
MergedPixelsTool.cxx:74
InDet::MergedPixelsTool::addClusterNumber
void addClusterNumber(const int &r, const int &Ncluster, const std::vector< network > &connections, std::vector< UnpackedPixelRDO > &collectionID) const
Definition
MergedPixelsTool.cxx:458
InDet::MergedPixelsTool::m_clusterErrorKey
SG::ReadCondHandleKey< PixelCalib::PixelOfflineCalibData > m_clusterErrorKey
Definition
MergedPixelsTool.h:124
InDet::MergedPixelsTool::m_posStrategy
IntegerProperty m_posStrategy
Definition
MergedPixelsTool.h:127
InDet::MergedPixelsTool::m_clusterMaker
ToolHandle< ClusterMakerTool > m_clusterMaker
Definition
MergedPixelsTool.h:120
InDet::MergedPixelsTool::initialize
virtual StatusCode initialize() override
Retrieve the necessary services in initialize.
Definition
MergedPixelsTool.cxx:41
InDet::MergedPixelsTool::clusterize
virtual PixelClusterCollection * clusterize(const InDetRawDataCollection< PixelRDORawData > &RDOs, const PixelID &pixelID, DataPool< PixelCluster > *dataItemsPool, const EventContext &ctx) const override
Definition
MergedPixelsTool.cxx:270
InDet::MergedPixelsTool::m_printw
std::atomic_bool m_printw
Definition
MergedPixelsTool.h:131
InDet::MergedPixelsTool::m_chargeDataKey
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_chargeDataKey
Definition
MergedPixelsTool.h:123
InDet::MergedPixelsTool::operator=
MergedPixelsTool & operator=(const MergedPixelsTool &)
InDet::MergedPixelsTool::~MergedPixelsTool
virtual ~MergedPixelsTool()=default
InDet::MergedPixelsTool::MergedPixelsTool
MergedPixelsTool(const MergedPixelsTool &)
InDet::PixelCluster
Definition
InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
InDet::pixel_less
const auto pixel_less
Definition
MergedPixelsTool.h:50
PixelCalib::PixelOfflineCalibData
Definition
PixelOfflineCalibData.h:31
PixelChargeCalibCondData
Definition
PixelChargeCalibCondData.h:24
PixelID
This is an Identifier helper class for the Pixel subdetector.
Definition
PixelID.h:69
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
r
int r
Definition
globals.cxx:22
split
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition
hcg.cxx:179
InDetDD
Message Stream Member.
Definition
FakeTrackBuilder.h:8
InDet
Primary Vertex Finder.
Definition
VP1ErrorUtils.h:36
type
InDet::network
Definition
MergedPixelsTool.h:44
InDet::network::CON
std::array< int, 8 > CON
Definition
MergedPixelsTool.h:47
InDet::network::NC
int NC
Definition
MergedPixelsTool.h:46
Generated on
for ATLAS Offline Software by
1.17.0