32 return StatusCode::SUCCESS;
37 return StatusCode::SUCCESS;
42 vector<TrigSiSpacePointBase> spVec;
51 for (
const auto pixSPointColl : *pixelSP)
53 if (pixSPointColl ==
nullptr)
56 const Identifier pixid = (pixSPointColl)->identify();
57 int layerId = pixelHelper->layer_disk(pixid);
59 if(pixelHelper->is_barrel(pixid)){
60 const double dr = 0.01;
61 const double dz = 0.13;
63 for (
const auto pSP : *pixSPointColl)
66 spVec.push_back(
TrigSiSpacePointBase(layerId, pSP->globalPosition().perp(), pSP->globalPosition().phi(), pSP->globalPosition().z(),
79 auto zVertexContainer = std::make_unique<xAOD::TrigCompositeContainer>();
80 auto zVertexContainerAux = std::make_unique<xAOD::TrigCompositeAuxContainer>();
81 zVertexContainer->setStore(zVertexContainerAux.get());
87 ATH_MSG_DEBUG(
"Successfully retrieved size of number of vertices: " << vertices->
size());
89 for (
auto vertex: *vertices ) {
94 zVertexContainer->push_back(outputVertex);
95 outputVertex->
setDetail<
int>(
"zfinder_tool", toolIndex );
96 outputVertex->
setDetail<
float>(
"zfinder_vtx_z", vertex->z() );
97 outputVertex->
setDetail<
float>(
"zfinder_vtx_weight", vertex->cov()[5] );
107 if ( zVertexContainer->empty() ) {
109 zVertexContainer->push_back(emptyVertex);
110 emptyVertex->
setDetail<
int>(
"zfinder_tool", -1 );
111 emptyVertex->
setDetail<
float>(
"zfinder_vtx_z", -1000.0 );
112 emptyVertex->
setDetail<
float>(
"zfinder_vtx_weight", -1.0 );
116 ATH_CHECK(vertexHandle.
record(std::move(zVertexContainer), std::move(zVertexContainerAux)));
117 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Athena::TPCnvVers::Current TrigRoiDescriptor
An algorithm that can be simultaneously executed in multiple threads.
size_type size() const noexcept
Returns the number of elements in the collection.
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
virtual ~TrigZFinderAlg() override
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &context) const override
ToolHandle< GenericMonitoringTool > m_monTool
SG::ReadHandleKey< PixelID > m_pixelHelperKey
ToolHandleArray< TrigZFinder > m_zFinderTools
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_vertexKey
SG::ReadHandleKey< SpacePointContainer > m_pixelSpKey
virtual StatusCode finalize() override
TrigZFinderAlg(const std::string &name, ISvcLocator *pSvcLocator)
bool setDetail(const std::string &name, const TYPE &value)
Set an TYPE detail on the object.
TrigComposite_v1 TrigComposite
Declare the latest version of the class.