Skip to content
Snippets Groups Projects
Commit a89c9c02 authored by Eric Torrence's avatar Eric Torrence
Browse files

First commit of scintillator reconstruction code.

Code doesn't actually do anything, but this compiles and give the basic framework
for adding real algorithims.
parent 6447fc4b
No related branches found
No related tags found
22 merge requests!197Reco Script update for Segment Finder,!194Reco script update,!176Waveform Reco updates,!175Waveform reco update,!173Update production to latest master,!167Catch raw data format errors,!166Waveform raw integral bug,!165Reco scripts,!162Production Reco Scripts,!161Add waveform identifiers, configure digitizer channels,!159Move Waveform code to its own major area,!157Catch error on truncated events,!155Cluster Limit,!138Made NoisyStripFinder package,!134Added raw data reconstruction tests to pipeline,!123Waveform reconstruction bugfix,!118Wavereco bugfix,!114Rename xAOD TLB Aux Data class,!107Xrootd support,!105Wavereco bugfix,!104Wavereco,!103Waveform reconstruction
################################################################################
# Package: ScintRecAlgs
################################################################################
# Declare the package name:
atlas_subdir( ScintRecAlgs )
# Component(s) in the package:
atlas_add_component( ScintRecAlgs
src/*.cxx src/*.h
src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps StoreGateLib ScintRawEvent ScintRecToolsLib) #ScintRecEvent )
#atlas_install_python_modules( python/*.py )
#include "ScintWaveformRecAlg.h"
ScintWaveformRecAlg::ScintWaveformRecAlg(const std::string& name,
ISvcLocator* pSvcLocator)
: AthReentrantAlgorithm(name, pSvcLocator) {
}
StatusCode
ScintWaveformRecAlg::initialize() {
ATH_MSG_INFO(name() << "::initalize()" );
// Initalize tools
ATH_CHECK( m_recoTool.retrieve() );
// Make sure we have something to work with
ATH_CHECK( m_inputWaveformKey.length() != 0);
ATH_MSG_INFO(name() << "Reading from " << m_inputWaveformKey );
ATH_MSG_INFO(name() << "Writing to " << m_outputWaveformKey );
// Set key to read waveform from
m_waveformContainer = m_inputWaveformKey;
ATH_CHECK( m_waveformContainer.initialize() );
return StatusCode::SUCCESS;
}
StatusCode
ScintWaveformRecAlg::finalize() {
ATH_MSG_INFO(name() << "::finalize()");
return StatusCode::SUCCESS;
}
StatusCode
ScintWaveformRecAlg::execute(const EventContext& ctx) const {
ATH_MSG_INFO(name() << "::execute()");
ATH_MSG_DEBUG("Run: " << ctx.eventID().run_number()
<< " Event: " << ctx.eventID().event_number());
SG::ReadHandle<ScintWaveformContainer> waveformHandle(m_waveformContainer, ctx);
ATH_MSG_INFO("Found ReadHandle for Waveforms");
ATH_MSG_INFO(*waveformHandle);
return StatusCode::SUCCESS;
}
#ifndef SCINTRECALGS_SCINTWAVEFORMRECALG_H
#define SCINTRECALGS_SCINTWAVEFORMRECALG_H
// Base class
#include "AthenaBaseComps/AthReentrantAlgorithm.h"
#include "ScintRawEvent/ScintWaveformContainer.h"
#include "ScintRecTools/IWaveformReconstructionTool.h"
#include "StoreGate/ReadHandleKey.h"
// Gaudi
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/ToolHandle.h"
// STL
#include <string>
class ScintWaveformRecAlg : public AthReentrantAlgorithm {
public:
// Constructor
ScintWaveformRecAlg(const std::string& name, ISvcLocator* pSvcLocator);
virtual ~ScintWaveformRecAlg() = default;
/** @name Usual algorithm methods */
//@{
virtual StatusCode initialize() override;
virtual StatusCode execute(const EventContext& ctx) const override;
virtual StatusCode finalize() override;
//@}
private:
/** @name Disallow default instantiation, copy, assignment */
//@{
ScintWaveformRecAlg() = delete;
ScintWaveformRecAlg(const ScintWaveformRecAlg&) = delete;
ScintWaveformRecAlg &operator=(const ScintWaveformRecAlg&) = delete;
//@}
/**
* @name Reconstruction tool
*/
ToolHandle<IWaveformReconstructionTool> m_recoTool
{this, "WaveformReconstructionTool", "WaveformReconstructionTool"};
/**
* @name Input data using SG::ReadHandleKey
*/
//@{
SG::ReadHandleKey<ScintWaveformContainer> m_waveformContainer
{this, "WaveformContainerKey", ""};
//@}
/**
* @name Output data using SG::ReadHandleKey
*/
//@{
//SG::WriteHandleKey<ScintWaveformContainer> m_waveformContainer
// {this, "WaveformContainerKey", ""};
//@}
/** @brief Key for the DetectorStore (jobOptions)
* The input waveform will be read from this key.
*/
StringProperty m_inputWaveformKey
{ this, "inputKey", ""};
/** @brief Key for the DetectorStore (jobOptions)
* The output data will be saved to this key.
*/
StringProperty m_outputWaveformKey
{ this, "outputKey", ""};
};
#endif // SCINTRECALGS_SCINTWAVEFORMRECALG_H
#include "../ScintWaveformRecAlg.h"
DECLARE_COMPONENT( ScintWaveformRecAlg )
################################################################################
# Package: ScintRecTools
################################################################################
# Declare the package name:
atlas_subdir( ScintRecTools )
# External dependencies:
# find_package( Eigen )
# Component(s) in the package:
atlas_add_library( ScintRecToolsLib
ScintRecTools/*.h src/*.cxx src/*.h
PUBLIC_HEADERS ScintRecTools
# INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
LINK_LIBRARIES AthenaBaseComps AthenaKernel GeoPrimitives ScintRawEvent # ScintRecEvent
# PRIVATE_LINK_LIBRARIES GaudiKernel TrackerIdentifier TrackerReadoutGeometry TrackerSpacePoint
)
atlas_add_component( ScintRecTools
src/components/*.cxx
# INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
LINK_LIBRARIES AthenaBaseComps GaudiKernel ScintRecToolsLib )
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file IWaveformReconstructionTool.h
* Header file for the IWaveformReconstructionTool class
* @author Eric Torrence, 2021
*/
#ifndef SCINTRECTOOLS_IWAVEFORMRECONSTRUCTIONTOOL_H
#define SCINTRECTOOLS_IWAVEFORMRECONSTRUCTIONTOOL_H
// Base class
#include "GaudiKernel/IAlgTool.h"
#include "ScintRawEvent/ScintWaveform.h"
// #include "ScintRecEvent/WaveformHitCollection.h"
#include "GaudiKernel/ToolHandle.h"
///Interface for Waveform reco algorithms
class IWaveformReconstructionTool : virtual public IAlgTool
{
public:
// InterfaceID
DeclareInterfaceID(IWaveformReconstructionTool, 1, 0);
virtual ~IWaveformReconstructionTool() = default;
/** Reconstruct a single waveform into a list of hits
* @param[in] @c RDOs the raw data objects
*/
//virtual WaveformHitCollection* reconstruct(const ScintWaveform& wave) const = 0;
};
#endif // SCINTRECTOOLS_IWAVEFORMRECONSTRUCTIONTOOL_H
/*
Copyright (C) 2021 CERN for the benefit of the FASER collaboration
*/
/**
* @file WaveformReconstructionTool.cxx
* Implementation file for the WaveformReconstructionTool.cxx
* @ author E. Torrence, 2021
**/
#include "WaveformReconstructionTool.h"
// Constructor
WaveformReconstructionTool::WaveformReconstructionTool(const std::string& type, const std::string& name, const IInterface* parent) :
base_class(type, name, parent)
{
}
// Initialization
StatusCode
WaveformReconstructionTool::initialize() {
ATH_MSG_INFO( name() << "::initalize()" );
return StatusCode::SUCCESS;
}
// Reconstruction step
/*
WaveformHitCollection*
WaveformReconstructionTool::reconstruct(const ScintWaveform& wave) const {
}
*/
/*
Copyright (C) 2021 CERN for the benefit of the FASER collaboration
*/
/** @file WaveformReconstructionTool.h
* Header file for WaveformReconstructionTool.h
*
*/
#ifndef SCINTRECTOOLS_WAVEFORMRECONSTRUCTIONTOOL_H
#define SCINTRECTOOLS_WAVEFORMRECONSTRUCTIONTOOL_H
//Athena
#include "AthenaBaseComps/AthAlgTool.h"
#include "ScintRecTools/IWaveformReconstructionTool.h"
//Gaudi
#include "GaudiKernel/ToolHandle.h"
//STL
#include <string>
#include <vector>
class WaveformReconstructionTool: public extends<AthAlgTool, IWaveformReconstructionTool> {
public:
/// Normal constructor for an AlgTool; 'properties' are also declared here
WaveformReconstructionTool(const std::string& type, const std::string& name, const IInterface* parent);
/// Retrieve the necessary services in initialize
StatusCode initialize();
/// Reconstruct hits from waveform
//virtual WaveformHitCollection* reconstruct(const ScintWaveform& wave) const;
private:
};
#endif // SCINTRECTOOLS_WAVEFORMRECONSTRUCTIONTOOL_H
#include "../WaveformReconstructionTool.h"
DECLARE_COMPONENT( WaveformReconstructionTool )
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