|
ATLAS Offline Software
|
Go to the documentation of this file.
19 const std::string&
name,
28 std::vector< std::vector<AFPSiClusterLayerBasicObj> > my_layers;
29 my_layers.resize(layersInStations.size());
33 std::vector<std::vector<AFPSiClusterLayerBasicObj> >
::iterator layersIter = my_layers.begin();
34 for (
const int layersN : layersInStations) {
36 std::vector<AFPSiClusterLayerBasicObj>& layersVec = (*layersIter++);
37 layersVec.resize(layersN);
41 theLayer.setLayerID(layerID++);
67 return StatusCode::SUCCESS;
72 return StatusCode::SUCCESS;
82 return StatusCode::FAILURE;
88 return StatusCode::FAILURE;
94 return StatusCode::FAILURE;
97 if(
saveToXAOD(clustr, my_layers, ctx).isFailure())
100 return StatusCode::FAILURE;
106 return StatusCode::SUCCESS;
111 for (std::vector<AFPSiClusterLayerBasicObj>& station : my_layers)
113 layer.clearHitsAndClusters();
115 return StatusCode::SUCCESS;
124 return StatusCode::SUCCESS;
128 if(!siHitContainer.
isValid()) {
131 return StatusCode::SUCCESS;
135 ATH_MSG_DEBUG(
"AFPSiClusterTool::fillLayersWithHits(), successfully got siHitContainer, there are "<<siHitContainer->
size()<<
" hits");
142 for(
const auto *
const theHit : *siHitContainer)
143 my_layers.at(theHit->stationID()).at(theHit->pixelLayerID()).hits().push_back(theHit);
145 catch (
const std::out_of_range& outOfRange) {
146 ATH_MSG_WARNING(
"Hit with station or pixel ID outside expected range. Aborting pixels clustering.");
148 return StatusCode::FAILURE;
152 return StatusCode::SUCCESS;
157 for (std::vector<AFPSiClusterLayerBasicObj>& station : my_layers)
161 return StatusCode::SUCCESS;
164 StatusCode AFPSiClusterTool::saveToXAOD(std::unique_ptr<xAOD::AFPSiHitsClusterContainer>& clusterContainer, std::vector< std::vector<AFPSiClusterLayerBasicObj> > &my_layers,
const EventContext &ctx)
const
169 return StatusCode::SUCCESS;
176 return StatusCode::SUCCESS;
182 bool dataLA_init{
false}, dataGA_init{
false};
184 for (std::vector<AFPSiClusterLayerBasicObj>& station : my_layers)
186 if(
layer.clusters().empty())
continue;
189 const int layerID =
layer.layerID();
222 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
Class representing basic silicon layer with pixels and their clusters to be used for creating the clu...
Group
Properties of a chain group.
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
int pixelLayerID() const
Index of the silicon layer with the cluster.
Class representing a hit in silicon detector.
Class representing basic silicon pixels cluster, designed to be used for creating the clusters.
::StatusCode StatusCode
StatusCode definition for legacy code.
constexpr uint8_t stationID
Large or Small wedge.
float xLocal() const
Cluster position along X axis in station local coordinate system.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
void addHitLink(const AFPHitLink_t &newHit)
Add a link to a pixel in this cluster.
Class storing information about alignment.
#define ATH_MSG_WARNING(x)
int nHits() const
Number of fired pixels (hits) in cluster.
Declare a monitored scalar variable.
Class representing a cluster of AFP pixel hits.
float yLocal() const
Cluster position along Y axis in station local coordinate system.
size_type size() const noexcept
Returns the number of elements in the collection.
float zLocal() const
Cluster position along Z axis in station local coordinate system.