diff --git a/Scintillator/ScintRecAlgs/CMakeLists.txt b/Scintillator/ScintRecAlgs/CMakeLists.txt index 1cc6650e6e5c8dc724fe7cd929c781c3eb4192aa..c7d40ae004bbb386628464aee045de4f1f0856ed 100644 --- a/Scintillator/ScintRecAlgs/CMakeLists.txt +++ b/Scintillator/ScintRecAlgs/CMakeLists.txt @@ -9,7 +9,7 @@ atlas_subdir( ScintRecAlgs ) atlas_add_component( ScintRecAlgs src/*.cxx src/*.h src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps StoreGateLib ScintRawEvent ScintRecEvent xAODFaserWaveform ScintRecToolsLib ) + LINK_LIBRARIES AthenaBaseComps StoreGateLib ScintRawEvent xAODFaserWaveform ScintRecToolsLib ) #atlas_install_python_modules( python/*.py ) diff --git a/Scintillator/ScintRecAlgs/src/ScintClockRecAlg.h b/Scintillator/ScintRecAlgs/src/ScintClockRecAlg.h index 8fb3555514a9711216fd35bef59859bfc42d97d5..3fde8295da9b5ca4cdecf68bceae205df2a7ef8a 100644 --- a/Scintillator/ScintRecAlgs/src/ScintClockRecAlg.h +++ b/Scintillator/ScintRecAlgs/src/ScintClockRecAlg.h @@ -64,7 +64,7 @@ class ScintClockRecAlg : public AthReentrantAlgorithm { */ //@{ SG::WriteHandleKey<xAOD::WaveformClock> m_waveformClockKey - {this, "WaveformClockKey", "LHCClockData"}; + {this, "WaveformClockKey", "WaveformClock"}; //@} }; diff --git a/Scintillator/ScintRecAlgs/src/ScintWaveformRecAlg.cxx b/Scintillator/ScintRecAlgs/src/ScintWaveformRecAlg.cxx index 39e20990d9226701ef8e1fe801752ede5ac6daae..b592dc7d17606b8a1909ce42c0d6ecd5d04c2999 100644 --- a/Scintillator/ScintRecAlgs/src/ScintWaveformRecAlg.cxx +++ b/Scintillator/ScintRecAlgs/src/ScintWaveformRecAlg.cxx @@ -48,8 +48,10 @@ ScintWaveformRecAlg::execute(const EventContext& ctx) const { } // Find the output waveform container - SG::WriteHandle<WaveformHitContainer> hitContainerHandle(m_waveformHitContainerKey, ctx); - ATH_CHECK( hitContainerHandle.record( std::make_unique<WaveformHitContainer>() ) ); + SG::WriteHandle<xAOD::WaveformHitContainer> hitContainerHandle(m_waveformHitContainerKey, ctx); + ATH_CHECK( hitContainerHandle.record( std::make_unique<xAOD::WaveformHitContainer>(), + std::make_unique<xAOD::WaveformHitAuxContainer>() ) ); + ATH_MSG_DEBUG("WaveformsHitContainer '" << hitContainerHandle.name() << "' initialized"); // Reconstruct each waveform @@ -57,34 +59,13 @@ ScintWaveformRecAlg::execute(const EventContext& ctx) const { ATH_MSG_DEBUG("Reconstruct waveform for channel " << wave->channel()); - WaveformHitCollection* collection = new WaveformHitCollection(); - - // Make some sanity checks before going further - if (wave->adc_counts().size() == 0) { - ATH_MSG_WARNING( "Found waveform for channel " << wave->channel() - << " with size " << wave->adc_counts().size() << "!"); - // Create dummy hit here, or just skip? - continue; - } - - if (wave->adc_counts().size() != wave->n_samples()) { - ATH_MSG_WARNING( "Found waveform for channel " << wave->channel() - << " with size " << wave->adc_counts().size() - << " not equal to number of samples " << wave->n_samples()); - continue; - } - - // Reconstruct the hits - CHECK( m_recoTool->reconstruct(*wave, collection) ); - - // Store collection in container - hitContainerHandle->push_back(collection); - - // For now, this is transient - // delete collection; + // Reconstruct the hits, may be more than one, so pass container + CHECK( m_recoTool->reconstruct(*wave, hitContainerHandle.ptr()) ); + + } - ATH_MSG_DEBUG("WaveformsHitContainer '" << hitContainerHandle.name() << "' filled with "<< hitContainerHandle->size() <<" collections"); + ATH_MSG_DEBUG("WaveformsHitContainer '" << hitContainerHandle.name() << "' filled with "<< hitContainerHandle->size() <<" items"); return StatusCode::SUCCESS; } diff --git a/Scintillator/ScintRecAlgs/src/ScintWaveformRecAlg.h b/Scintillator/ScintRecAlgs/src/ScintWaveformRecAlg.h index 2794add30db1dc4eceae340b3da185b529dd9dbf..9c95b084dd7dd74329ba8fb3d7f00d2d29d0afda 100644 --- a/Scintillator/ScintRecAlgs/src/ScintWaveformRecAlg.h +++ b/Scintillator/ScintRecAlgs/src/ScintWaveformRecAlg.h @@ -4,13 +4,18 @@ // Base class #include "AthenaBaseComps/AthReentrantAlgorithm.h" +// Data classes #include "ScintRawEvent/ScintWaveformContainer.h" -#include "ScintRecEvent/WaveformHitCollection.h" -#include "ScintRecEvent/WaveformHitContainer.h" +#include "xAODFaserWaveform/WaveformHit.h" +#include "xAODFaserWaveform/WaveformHitContainer.h" +#include "xAODFaserWaveform/WaveformHitAuxContainer.h" +// Tool classes #include "ScintRecTools/IWaveformReconstructionTool.h" +// Handles #include "StoreGate/ReadHandleKey.h" +#include "StoreGate/WriteHandleKey.h" // Gaudi #include "GaudiKernel/ServiceHandle.h" @@ -60,7 +65,7 @@ class ScintWaveformRecAlg : public AthReentrantAlgorithm { * @name Output data using SG::WriteHandleKey */ //@{ - SG::WriteHandleKey<WaveformHitContainer> m_waveformHitContainerKey + SG::WriteHandleKey<xAOD::WaveformHitContainer> m_waveformHitContainerKey {this, "WaveformHitContainerKey", ""}; //@} diff --git a/Scintillator/ScintRecEvent/CMakeLists.txt b/Scintillator/ScintRecEvent/CMakeLists.txt deleted file mode 100644 index cddd115ed5d2018e0c5f30081854a8f17c1a6bd3..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -################################################################################ -# Package: ScintRecEvent -################################################################################ - -# Declare the package name: -atlas_subdir( ScintRecEvent ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - -# Component(s) in the package: -atlas_add_library( ScintRecEvent - src/*.cxx src/*.h - PUBLIC_HEADERS ScintRecEvent - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ScintRawEvent) - -atlas_add_dictionary( ScintRecEventDict - ScintRecEvent/ScintRecEventDict.h - ScintRecEvent/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthAllocators CxxUtils StoreGateLib ScintIdentifier ScintRecEvent ) - diff --git a/Scintillator/ScintRecEvent/ScintRecEvent/ScintRecEventDict.h b/Scintillator/ScintRecEvent/ScintRecEvent/ScintRecEventDict.h deleted file mode 100644 index 9756e42b5d38f36f37ab20ba77b29449c63273f6..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/ScintRecEvent/ScintRecEventDict.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - Copyright (C) 2020 CERN for the benefit of the FASER collaboration -*/ - -#ifndef SCINTRECEVENT_SCINTRECEVENTDICT_H -#define SCINTRECEVENT_SCINTRECEVENTDICT_H - -#include "ScintRecEvent/WaveformHitCollection.h" - -#endif diff --git a/Scintillator/ScintRecEvent/ScintRecEvent/WaveformClock.h b/Scintillator/ScintRecEvent/ScintRecEvent/WaveformClock.h deleted file mode 100644 index 6a670b6d0ebb30368bbdb6a12a616acc5051aee9..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/ScintRecEvent/WaveformClock.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright (C) 2021 CERN for the benefit of the FASER collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// WaveformClock.h -// Header file for class WaveformClock -/////////////////////////////////////////////////////////////////// -// Class to handle reconstructed peaks in waveform data -/////////////////////////////////////////////////////////////////// -// Version 1.0 2/21/2021 Eric Torrence -/////////////////////////////////////////////////////////////////// -#ifndef SCINTRECEVENT_WAVEFORMCLOCK_H -#define SCINTRECEVENT_WAVEFORMCLOCK_H - -#include <iostream> - -#include "AthenaKernel/CLASS_DEF.h" -#include "GaudiKernel/DataObject.h" - -/** - * @class WaveformClock - * Class containing reconstructed informtaion for the digitizer clock - */ - -class WaveformClock : public DataObject { - - public: - - /** Default constructor */ - WaveformClock(); - - /** Destructor */ - virtual ~WaveformClock() = default; - - // move assignment defaulted - WaveformClock & operator= (WaveformClock &&) = default; - //assignment defaulted - WaveformClock & operator= (const WaveformClock &) = default; - //copy c'tor defaulted - WaveformClock(const WaveformClock &) = default; - - /** Clones */ - virtual WaveformClock* clone() const ; - - // Access functions - inline double offset() const {return m_offset;} - inline double frequency() const {return m_frequency;} - inline double amplitude() const {return m_amplitude;} - inline double phase() const {return m_phase;} - - inline double trigger_time() const {return m_trigger_time;} - - // Set functions - void setParams(double avg, double freq, double amp, double phase); - void setTriggerTime(double time) {m_trigger_time = 2*time;} - - // Time functions - - // Time (in ns) of preceeding clock edge - double previousClock(double time) const; - - // Time (in ns) of given time from preceeding clock - double timeFromClock(double time) const {return time-previousClock(time);} - - private: - - // Data members - // Average of waveform (frequency=0 magnitude) from FFT - double m_offset; - // Primary frequency - double m_frequency; - // Amplitude of primary frequency - double m_amplitude; - // Phase of primary frequency - double m_phase; - // From raw waveform (but in ns) - double m_trigger_time; -}; - -std::ostream -&operator<<(std::ostream &out, const WaveformClock &wfm); - -/////////////////////////////////////////////////////////////////// -// Inline methods: -/////////////////////////////////////////////////////////////////// - -inline WaveformClock* -WaveformClock::clone() const { - return new WaveformClock(*this); -} - -CLASS_DEF( WaveformClock, 174305800, 1 ) - -#endif // SCINTRECEVENT_WAVEFORMCLOCK_H diff --git a/Scintillator/ScintRecEvent/ScintRecEvent/WaveformHit.h b/Scintillator/ScintRecEvent/ScintRecEvent/WaveformHit.h deleted file mode 100644 index 26301a9339d8f41eaeda93d03a62d0842be6f803..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/ScintRecEvent/WaveformHit.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - Copyright (C) 2021 CERN for the benefit of the FASER collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// WaveformHit.h -// Header file for class WaveformHit -/////////////////////////////////////////////////////////////////// -// Class to handle reconstructed peaks in waveform data -/////////////////////////////////////////////////////////////////// -// Version 1.0 2/21/2021 Eric Torrence -/////////////////////////////////////////////////////////////////// -#ifndef SCINTRECEVENT_WAVEFORMHIT_H -#define SCINTRECEVENT_WAVEFORMHIT_H - -#include <iostream> - -#include "AthenaKernel/CLASS_DEF.h" - -/** - * @class WaveformHit - * Class containing reconstructed informtaion for one waveform hit - */ - -class WaveformHit { - - public: - - /** Default constructor */ - WaveformHit(); - - /** Destructor */ - virtual ~WaveformHit() = default; - - // move assignment defaulted - WaveformHit & operator= (WaveformHit &&) = default; - //assignment defaulted - WaveformHit & operator= (const WaveformHit &) = default; - //copy c'tor defaulted - WaveformHit(const WaveformHit &) = default; - - /** Clones */ - virtual WaveformHit* clone() const ; - - // Access functions - inline int channel() const { return m_channel; } - - // Best results (from fit) - inline float localtime() const { return m_localtime; } - inline float amplitude() const { return m_amplitude; } - inline float width() const { return m_width; } - inline float integral() const { return m_integral; } - - // Raw values from waveform data - inline float raw_amplitude() const { return m_raw_amplitude; } - inline float raw_integral() const { return m_raw_integral; } - - // Bsaeline information - inline float baseline_mean() const { return m_baseline_mean; } - inline float baseline_rms() const { return m_baseline_rms; } - - // Status informtaion - inline bool getStatus(unsigned int bit) const { return (m_status & (1 << bit)); } - - // Set functions - void setChannel(unsigned int channel) {m_channel = channel;} - void setRawData(const std::vector<float>& time, - const std::vector<float>& wave); - - void setBaseline(float mean, float rms) {m_baseline_mean = mean; m_baseline_rms = rms;} - - void setRawResults(float peak, float mean, float width, float integral); - void setFitResults(float peak, float mean, float width, float integral); - void setCBResults(float alpha, float nval); - - void setLocaltime(float time) { m_localtime = time; } - void setStatus(unsigned int bit) {m_status |= (1 << bit);} - - private: - - // Data members - unsigned int m_channel; - unsigned int m_status; - - // Raw values from waveform - float m_raw_amplitude; - float m_raw_mean; - float m_raw_width; - float m_raw_integral; - - // Best values from fit - float m_localtime; - float m_amplitude; - float m_mean; - float m_width; - float m_integral; - float m_alpha; - float m_nval; - - // Baseline information - float m_baseline_mean; - float m_baseline_rms; - - // Raw fit data - std::vector<float> m_timevec; - std::vector<float> m_wavevec; - - // Fit informtaion -}; - -std::ostream -&operator<<(std::ostream &out, const WaveformHit &wfm); - -/////////////////////////////////////////////////////////////////// -// Inline methods: -/////////////////////////////////////////////////////////////////// - -inline WaveformHit* -WaveformHit::clone() const { - return new WaveformHit(*this); -} - -CLASS_DEF( WaveformHit, 140632415, 1 ) - -#endif // SCINTRECEVENT_WAVEFORMHIT_H diff --git a/Scintillator/ScintRecEvent/ScintRecEvent/WaveformHitCollection.h b/Scintillator/ScintRecEvent/ScintRecEvent/WaveformHitCollection.h deleted file mode 100644 index d947a90052c616b13ebb09136f9a519d26cf0b84..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/ScintRecEvent/WaveformHitCollection.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2021 CERN for the benefit of the FASER collaboration -*/ - -#ifndef SCINTRECEVENT_WAVEFORMHITCOLLECTION_H -#define SCINTRECEVENT_WAVEFORMHITCOLLECTION_H - -#include "ScintRecEvent/WaveformHit.h" -#include "AthContainers/DataVector.h" -#include "AthenaKernel/CLASS_DEF.h" - -// Make this a class in case we need to add some functions -class WaveformHitCollection : public DataVector<WaveformHit> { - public: - unsigned int channel; - float baseline_mean; - float baseline_rms; - void print() const; -}; - -std::ostream -&operator<<(std::ostream &out, const WaveformHitCollection &collection); - -CLASS_DEF(WaveformHitCollection, 1228273893, 1 ) -SG_BASE(WaveformHitCollection, DataVector<WaveformHit>); - -#endif // SCINTRECEVENT_WAVEFORMHITCOLLECTION_H diff --git a/Scintillator/ScintRecEvent/ScintRecEvent/WaveformHitContainer.h b/Scintillator/ScintRecEvent/ScintRecEvent/WaveformHitContainer.h deleted file mode 100644 index e53eb3e1b6dd99d5e0236c71f6f87e424cafb90f..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/ScintRecEvent/WaveformHitContainer.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (C) 2021 CERN for the benefit of the FASER collaboration -*/ - -#ifndef SCINTRECEVENT_WAVEFORMHITCONTAINER_H -#define SCINTRECEVENT_WAVEFORMHITCONTAINER_H - -#include "ScintRecEvent/WaveformHitCollection.h" -#include "AthContainers/DataVector.h" -#include "AthenaKernel/CLASS_DEF.h" - -// -// Container will WaveformHitCollections from each detector element -typedef DataVector<WaveformHitCollection> WaveformHitContainer; -CLASS_DEF(WaveformHitContainer , 1330197509, 1 ) - -#endif // SCINTRECEVENT_WAVEFORMHITCONTAINER_H diff --git a/Scintillator/ScintRecEvent/ScintRecEvent/selection.xml b/Scintillator/ScintRecEvent/ScintRecEvent/selection.xml deleted file mode 100644 index 45b5f9c688678ad234ecb425c6f463e9ee88a4cf..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/ScintRecEvent/selection.xml +++ /dev/null @@ -1,11 +0,0 @@ -<lcgdict> - <class name="WaveformHitContainer"/> - <class name="DataVector<WaveformHitCollection>", id="860e5caa-2d26-4b6a-9c40-b4c196974faa" /> - <class name="std::vector<WaveformHitCollection*>" /> - <class name="std::vector<const WaveformHitCollection*>" /> - - <class name="WaveformHitCollection" /> - <class name="WaveformHit" /> - - <class name="WaveformClock", id="4ca1c909-45ee-4e68-a4f8-8a02b66b7fa6"/> -</lcgdict> diff --git a/Scintillator/ScintRecEvent/src/WaveformClock.cxx b/Scintillator/ScintRecEvent/src/WaveformClock.cxx deleted file mode 100644 index 8ec31fbe0130c6b8ee4b15a806a5863cba952ef0..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/src/WaveformClock.cxx +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2021 CERN for the benefit of the FASER collaboration -*/ - -#include "ScintRecEvent/WaveformClock.h" - -#include <cmath> - -// Default constructor -WaveformClock::WaveformClock() { -} - -void -WaveformClock::setParams(double offset, double freq, double amp, double phase) { - m_offset = offset; - m_frequency = freq; - m_amplitude = amp; - m_phase = phase; -} - -double -WaveformClock::previousClock(double time) const { - - double freq = m_frequency / 1000; // Frequency in GHz - // 0.25 accounts for difference in phsae between cos (at top of cycle) and rising edge - double dphase = m_phase / (2 * M_PI) + 0.25; - int n_cycle = freq*time + dphase; - double dtime = time - (n_cycle - dphase)/freq; - return dtime; -} - -std::ostream -&operator<<( std::ostream& out, const WaveformClock &c ) { - out << "WaveformClock - Freq: " << c.frequency() << " Amp: " - << c.amplitude() << " Phase: " << c.phase() << " DC offset: " << c.offset(); - return out; -} - - - - - diff --git a/Scintillator/ScintRecEvent/src/WaveformHit.cxx b/Scintillator/ScintRecEvent/src/WaveformHit.cxx deleted file mode 100644 index a0670f225e4fd83c4a6911dafe1b4d668deb4da3..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/src/WaveformHit.cxx +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2021 CERN for the benefit of the FASER collaboration -*/ - -#include "ScintRecEvent/WaveformHit.h" - -// Default constructor -WaveformHit::WaveformHit() { - m_timevec.clear(); - m_wavevec.clear(); -} - -void -WaveformHit::setRawData(const std::vector<float>& time, - const std::vector<float>& wave) { - m_timevec = time; - m_wavevec = wave; -} - -void -WaveformHit::setRawResults(float peak, float mean, float width, float integral) { - m_raw_amplitude = peak; - m_raw_mean = mean; - m_raw_width = width; - m_raw_integral = integral; -} - -void -WaveformHit::setFitResults(float peak, float mean, float width, float integral) { - m_amplitude = peak; - m_mean = mean; - m_width = width; - m_integral = integral; -} - -void -WaveformHit::setCBResults(float alpha, float nval) { - m_alpha = alpha; - m_nval = nval; -} - -std::ostream -&operator<<( std::ostream& out, const WaveformHit &hit ) { - out << "WaveformHit - Time: " << hit.localtime() << ", Amplitude: " << hit.amplitude() << std::endl; - return out; -} - - - - - diff --git a/Scintillator/ScintRecEvent/src/WaveformHitCollection.cxx b/Scintillator/ScintRecEvent/src/WaveformHitCollection.cxx deleted file mode 100644 index 8714f17f47995088662a74949e2708372162237c..0000000000000000000000000000000000000000 --- a/Scintillator/ScintRecEvent/src/WaveformHitCollection.cxx +++ /dev/null @@ -1,14 +0,0 @@ -#include "ScintRecEvent/WaveformHitCollection.h" - -void -WaveformHitCollection::print() const { - std::cout << "WaveformHit collection with size=" << this->size() << std::endl; - for(auto wfm: *this) std::cout << *wfm; -} - -std::ostream -&operator<<(std::ostream &out, const WaveformHitCollection& cont) { - out << "WaveformHit collection with size=" << cont.size() << std::endl; - for(auto wfm: cont) out << *wfm; - return out; -} diff --git a/Scintillator/ScintRecTools/CMakeLists.txt b/Scintillator/ScintRecTools/CMakeLists.txt index 285298d61bfdf5ade63179faba730bab840b14d5..174249e4539c04804ccfcaacafd2332e2168353c 100644 --- a/Scintillator/ScintRecTools/CMakeLists.txt +++ b/Scintillator/ScintRecTools/CMakeLists.txt @@ -13,7 +13,7 @@ atlas_add_library( ScintRecToolsLib ScintRecTools/*.h src/*.cxx src/*.h PUBLIC_HEADERS ScintRecTools PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthenaBaseComps AthenaKernel GeoPrimitives ScintRawEvent ScintRecEvent xAODFaserWaveform + LINK_LIBRARIES AthenaBaseComps AthenaKernel GeoPrimitives ScintRawEvent xAODFaserWaveform PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ) diff --git a/Scintillator/ScintRecTools/ScintRecTools/IWaveformReconstructionTool.h b/Scintillator/ScintRecTools/ScintRecTools/IWaveformReconstructionTool.h index 871d600c6de9e5804be112b4476ac6b62ed456e6..bd81b6d0490dc90a5ab0494e6a8cc0d9a674d59b 100644 --- a/Scintillator/ScintRecTools/ScintRecTools/IWaveformReconstructionTool.h +++ b/Scintillator/ScintRecTools/ScintRecTools/IWaveformReconstructionTool.h @@ -16,8 +16,9 @@ #include "GaudiKernel/IAlgTool.h" #include "GaudiKernel/ToolHandle.h" +#include "xAODFaserWaveform/WaveformHitContainer.h" + class ScintWaveform; -class WaveformHitCollection; ///Interface for Waveform reco algorithms class IWaveformReconstructionTool : virtual public IAlgTool @@ -31,7 +32,7 @@ class IWaveformReconstructionTool : virtual public IAlgTool // Reconstruct all peaks in a raw waveform virtual StatusCode reconstruct(const ScintWaveform& wave, - WaveformHitCollection* collection) const = 0; + xAOD::WaveformHitContainer* container) const = 0; }; diff --git a/Scintillator/ScintRecTools/src/ClockReconstructionTool.cxx b/Scintillator/ScintRecTools/src/ClockReconstructionTool.cxx index 4c065eff5e21993315c65b4cc31202274fe7f3d7..92442bed407a6b62d653d803d42ce7c18a7b6ccf 100644 --- a/Scintillator/ScintRecTools/src/ClockReconstructionTool.cxx +++ b/Scintillator/ScintRecTools/src/ClockReconstructionTool.cxx @@ -93,7 +93,7 @@ ClockReconstructionTool::reconstruct(const ScintWaveform& raw_wave, } // Store results - clockdata->set_offset(magnitude[0]); + clockdata->set_dc_offset(magnitude[0]); clockdata->set_frequency(imax * freqmult); clockdata->set_amplitude(magnitude[imax]); clockdata->set_phase(atan2(im_full[imax], re_full[imax])); diff --git a/Scintillator/ScintRecTools/src/WaveformReconstructionTool.cxx b/Scintillator/ScintRecTools/src/WaveformReconstructionTool.cxx index 3a80dfe71488fe273c23e18117a60cdc465f9bee..d8bdcb2136aa4532fa5dfc38973d4d850c38e169 100644 --- a/Scintillator/ScintRecTools/src/WaveformReconstructionTool.cxx +++ b/Scintillator/ScintRecTools/src/WaveformReconstructionTool.cxx @@ -10,6 +10,8 @@ #include "WaveformReconstructionTool.h" +#include "xAODFaserWaveform/WaveformHit.h" + #include "TH1F.h" #include "TF1.h" #include "TFitResult.h" @@ -41,17 +43,45 @@ WaveformReconstructionTool::initialize() { // Reconstruction step StatusCode WaveformReconstructionTool::reconstruct(const ScintWaveform& raw_wave, - WaveformHitCollection* collection) const { + xAOD::WaveformHitContainer* container) const { ATH_MSG_DEBUG(" reconstruct called "); - // Check the collection - if (!collection) { + // Check the container + if (!container) { ATH_MSG_ERROR("WaveformHitCollection passed to reconstruct() is null!"); return StatusCode::FAILURE; } + + // + // We always want to create at least one hit, so create it here + xAOD::WaveformHit* hit = new xAOD::WaveformHit(); + container->push_back(hit); + hit->set_channel(raw_wave.channel()); + + // + // Make some sanity checks on the waveform data + if (raw_wave.adc_counts().size() == 0) { + ATH_MSG_WARNING( "Found waveform for channel " << raw_wave.channel() + << " with size " << raw_wave.adc_counts().size() << "!"); + + // Set flag here!!!! + // hit->set_status_bit(INVALID_WAVEFORM); + return StatusCode::SUCCESS; + } + + if (raw_wave.adc_counts().size() != raw_wave.n_samples()) { + ATH_MSG_WARNING( "Found waveform for channel " << raw_wave.channel() + << " with size " << raw_wave.adc_counts().size() + << " not equal to number of samples " << raw_wave.n_samples()); + + // Set flag here!!!! + // hit->set_status_bit(INVALID_WAVEFORM); + return StatusCode::SUCCESS; + } + // Set channel - collection->channel = raw_wave.channel(); + hit->set_channel(raw_wave.channel()); // // Find baseline @@ -65,16 +95,17 @@ WaveformReconstructionTool::reconstruct(const ScintWaveform& raw_wave, if (!(baseline.valid)) { ATH_MSG_WARNING("Failed to reconstruct baseline!"); - // Store some default values - collection->baseline_mean = 0.; - collection->baseline_rms = -1.; + hit->set_baseline_mean(0.); + hit->set_baseline_rms(-1.); + // Set flag here!!! + // hit->set_status_bit(BASELINE_FAILED); return StatusCode::SUCCESS; } // Save baseline to hit collection object - collection->baseline_mean = baseline.mean; - collection->baseline_rms = baseline.rms; + hit->set_baseline_mean(baseline.mean); + hit->set_baseline_rms(baseline.rms); // // Create baseline-subtracted data array for both time and signal @@ -89,6 +120,8 @@ WaveformReconstructionTool::reconstruct(const ScintWaveform& raw_wave, for (auto& element : wave) element = baseline.mean - element; + bool first = true; + // Now we iteratively find peaks and fit while(true) { @@ -102,35 +135,53 @@ WaveformReconstructionTool::reconstruct(const ScintWaveform& raw_wave, // If we do find a significant peak, fill the window if (! findPeak(baseline, time, wave, wtime, wwave) ) break; + // + // Create new hit to fill + if (!first) { + hit = new xAOD::WaveformHit(); + container->push_back(hit); + } + first = false; + // // Save windowed waveform to Hit object - WaveformHit* hit = new WaveformHit(); - hit->setChannel(raw_wave.channel()); - hit->setRawData(wtime, wwave); - hit->setBaseline(baseline.mean, baseline.rms); + hit->set_channel(raw_wave.channel()); + hit->set_baseline_mean(baseline.mean); + hit->set_baseline_rms(baseline.rms); + hit->set_time_vector(wtime); + hit->set_wave_vector(wave); // // Find some raw values WaveformFitResult raw = findRawHitValues(wtime, wwave); - hit->setRawResults(raw.peak, raw.mean, raw.sigma, raw.integral); - hit->setLocaltime(raw.time); + hit->set_peak(raw.peak); + hit->set_mean(raw.mean); + hit->set_width(raw.sigma); + hit->set_integral(raw.integral); + hit->set_localtime(raw.mean); + hit->set_raw_peak(raw.peak); + hit->set_raw_integral(raw.integral); // // Perform Gaussian fit to waveform WaveformFitResult gfit = fitGaussian(raw, wtime, wwave); if (! gfit.valid) { ATH_MSG_WARNING( " Gaussian waveform fit failed! "); - // hit->setStatus(GAUSS_FIT_FAILED); + // hit->set_status_bit(GAUSS_FIT_FAILED); } - // Fit results (or raw if it failed - hit->setFitResults(gfit.peak, gfit.mean, gfit.sigma, gfit.integral); - hit->setLocaltime(gfit.time); + + // Fit results (or raw if it failed) + hit->set_peak(gfit.peak); + hit->set_mean(gfit.mean); + hit->set_width(gfit.sigma); + hit->set_integral(gfit.integral); + hit->set_localtime(gfit.time); // // Check for overflow if (m_removeOverflow && findOverflow(baseline, wtime, wwave)) { ATH_MSG_INFO("Found waveform overflow"); - // hit->setStatus(OVERFLOW); + //hit->set_status_bit(OVERFLOW); } // @@ -139,21 +190,24 @@ WaveformReconstructionTool::reconstruct(const ScintWaveform& raw_wave, if (! cbfit.valid) { ATH_MSG_WARNING("CrystalBall fit failed!"); // Still have gaussian parameters as an estimate - // hit->setStatus(CB_FIT_FAILED); + // hit->set_status_bit(CBFIT_FAILED); } else { - hit->setFitResults(cbfit.peak, cbfit.mean, cbfit.sigma, cbfit.integral); - hit->setCBResults(cbfit.alpha, cbfit.nval); - hit->setLocaltime(cbfit.time); + hit->set_peak(cbfit.peak); + hit->set_mean(cbfit.mean); + hit->set_width(cbfit.sigma); + hit->set_integral(cbfit.integral); + hit->set_localtime(cbfit.time); + + hit->set_alpha(cbfit.alpha); + hit->set_nval(cbfit.nval); } - collection->push_back(hit); - if (! m_findMultipleHits) break; } // End of loop over waveform data - ATH_MSG_DEBUG( "WaveformReconstructionTool created collection for channel " - << collection->channel << " with size= " << collection->size()); + ATH_MSG_DEBUG( "WaveformReconstructionTool finished for channel " + << raw_wave.channel() << " container size= " << container->size()); return StatusCode::SUCCESS; } diff --git a/Scintillator/ScintRecTools/src/WaveformReconstructionTool.h b/Scintillator/ScintRecTools/src/WaveformReconstructionTool.h index 9cb52692453684b35417d6ad7031177e8fa887e9..71db72582d43d918fc6053b9aba409b9cc158929 100644 --- a/Scintillator/ScintRecTools/src/WaveformReconstructionTool.h +++ b/Scintillator/ScintRecTools/src/WaveformReconstructionTool.h @@ -14,7 +14,6 @@ #include "ScintRecTools/IWaveformReconstructionTool.h" #include "ScintRawEvent/ScintWaveform.h" -#include "ScintRecEvent/WaveformHitCollection.h" #include "WaveformBaselineData.h" #include "WaveformFitResult.h" @@ -39,7 +38,7 @@ class WaveformReconstructionTool: public extends<AthAlgTool, IWaveformReconstruc /// Reconstruct hits from waveform virtual StatusCode reconstruct(const ScintWaveform& wave, - WaveformHitCollection* collection) const; + xAOD::WaveformHitContainer* container) const; private: diff --git a/xAOD/xAODFaserWaveform/Root/WaveformClockAuxInfo_v1.cxx b/xAOD/xAODFaserWaveform/Root/WaveformClockAuxInfo_v1.cxx index c6be98a7b194d452a6d91bf825d359d276a888cb..61d5dc8e8d736c44ceba480964551bed85ccf981 100644 --- a/xAOD/xAODFaserWaveform/Root/WaveformClockAuxInfo_v1.cxx +++ b/xAOD/xAODFaserWaveform/Root/WaveformClockAuxInfo_v1.cxx @@ -9,10 +9,10 @@ namespace xAOD { WaveformClockAuxInfo_v1::WaveformClockAuxInfo_v1() : AuxInfoBase(), - frequency(0), phase(0), offset(0), amplitude(0) { + frequency(0), phase(0), dc_offset(0), amplitude(0) { AUX_VARIABLE( frequency ); AUX_VARIABLE( phase ); - AUX_VARIABLE( offset ); + AUX_VARIABLE( dc_offset ); AUX_VARIABLE( amplitude ); } } // namespace xAOD diff --git a/xAOD/xAODFaserWaveform/Root/WaveformClock_v1.cxx b/xAOD/xAODFaserWaveform/Root/WaveformClock_v1.cxx index b875b468fb2a648f88c754d19fd0c7d47df6927c..4d4e7c3d0f320bfd82d23d7138a032852fda37df 100644 --- a/xAOD/xAODFaserWaveform/Root/WaveformClock_v1.cxx +++ b/xAOD/xAODFaserWaveform/Root/WaveformClock_v1.cxx @@ -17,7 +17,7 @@ namespace xAOD { AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformClock_v1, double, phase, set_phase ) - AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformClock_v1, double, offset, set_offset ) + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformClock_v1, double, dc_offset, set_dc_offset ) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformClock_v1, double, amplitude, set_amplitude ) @@ -29,7 +29,7 @@ namespace xAOD { s << "xAODWaveformClock: frequency=" << clk.frequency() << " phase=" << clk.phase() << " amplitude=" << clk.amplitude() - << " offset=" << clk.offset() + << " offset=" << clk.dc_offset() << std::endl; return s; diff --git a/xAOD/xAODFaserWaveform/Root/WaveformHitAuxContainer_v1.cxx b/xAOD/xAODFaserWaveform/Root/WaveformHitAuxContainer_v1.cxx index 300fa4d84c253970b86ad6c36b96eabeff89a104..76aed56247567f13e39fbcbf7471950dc93b3c23 100644 --- a/xAOD/xAODFaserWaveform/Root/WaveformHitAuxContainer_v1.cxx +++ b/xAOD/xAODFaserWaveform/Root/WaveformHitAuxContainer_v1.cxx @@ -10,9 +10,25 @@ namespace xAOD { WaveformHitAuxContainer_v1::WaveformHitAuxContainer_v1() : AuxContainerBase() { + AUX_VARIABLE(channel); + AUX_VARIABLE(localtime); + AUX_VARIABLE(peak); + AUX_VARIABLE(width); + AUX_VARIABLE(integral); + AUX_VARIABLE(bcid_time); + AUX_VARIABLE(raw_peak); + AUX_VARIABLE(raw_integral); + AUX_VARIABLE(baseline_mean); AUX_VARIABLE(baseline_rms); + AUX_VARIABLE(status); + AUX_VARIABLE(mean); + AUX_VARIABLE(alpha); + AUX_VARIABLE(nval); + AUX_VARIABLE(time_vector); + AUX_VARIABLE(wave_vector); + } } // namespace xAOD diff --git a/xAOD/xAODFaserWaveform/Root/WaveformHit_v1.cxx b/xAOD/xAODFaserWaveform/Root/WaveformHit_v1.cxx index 080946b0ef70f0de09e5c13a49aef32ebc2e36d3..1b6b2ba92f8eda5f38827e88b9eb10e48189d3bd 100644 --- a/xAOD/xAODFaserWaveform/Root/WaveformHit_v1.cxx +++ b/xAOD/xAODFaserWaveform/Root/WaveformHit_v1.cxx @@ -13,17 +13,47 @@ namespace xAOD { WaveformHit_v1::WaveformHit_v1() : SG::AuxElement() { } + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, unsigned int, channel, set_channel ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, localtime, set_localtime ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, peak, set_peak ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, width, set_width ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, integral, set_integral ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, bcid_time, set_bcid_time ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, raw_peak, set_raw_peak ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, raw_integral, set_raw_integral ) + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, baseline_mean, set_baseline_mean ) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, baseline_rms, set_baseline_rms ) + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, unsigned int, status, set_status ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, mean, set_mean ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, alpha, set_alpha ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, float, nval, set_nval ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, std::vector<float>, time_vector, set_time_vector ) + + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( WaveformHit_v1, std::vector<float>, wave_vector, set_wave_vector ) + + } // namespace xAOD namespace xAOD { std::ostream& operator<<(std::ostream& s, const xAOD::WaveformHit_v1& hit) { - s << "xAODWaveformHit: baseline=" << hit.baseline_mean() - << " rms=" << hit.baseline_rms() + s << "xAODWaveformHit: channel=" << hit.channel() + << " local time=" << hit.localtime() + << " peak=" << hit.peak() << std::endl; return s; diff --git a/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformClockAuxInfo_v1.h b/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformClockAuxInfo_v1.h index 74a98b62e7d3889a52c08f4b916d8970cc754867..24741e2476ab952f316a8ceeaf7611361bdd291d 100644 --- a/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformClockAuxInfo_v1.h +++ b/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformClockAuxInfo_v1.h @@ -30,7 +30,7 @@ namespace xAOD { ///@ { double frequency; double phase; - double offset; + double dc_offset; double amplitude; ///@} diff --git a/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformClock_v1.h b/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformClock_v1.h index 3fffe41c1feafe17cddb5195b3e4a727a355a4f9..8e2f94ae5f24413210fc62b86efee57120cbb2ea 100644 --- a/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformClock_v1.h +++ b/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformClock_v1.h @@ -36,8 +36,8 @@ namespace xAOD { void set_phase(double value); /// DC Clock offset - double offset() const; - void set_offset(double value); + double dc_offset() const; + void set_dc_offset(double value); /// Amplitude of primary freq. component double amplitude() const; diff --git a/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformHitAuxContainer_v1.h b/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformHitAuxContainer_v1.h index d4a28ac5f9e0babeb2d806778a43c2590a2d0dcb..0ea61b39a567a61882a390aa35277363771e970f 100644 --- a/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformHitAuxContainer_v1.h +++ b/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformHitAuxContainer_v1.h @@ -28,8 +28,28 @@ namespace xAOD { private: /// @name Basic variables ///@ { + std::vector<unsigned int> channel; + std::vector<float> localtime; + std::vector<float> peak; + std::vector<float> width; + std::vector<float> integral; + std::vector<float> bcid_time; + + std::vector<float> raw_peak; + std::vector<float> raw_integral; + std::vector<float> baseline_mean; std::vector<float> baseline_rms; + + std::vector<unsigned int> status; + + std::vector<float> mean; + std::vector<float> alpha; + std::vector<float> nval; + + std::vector<std::vector<float>> time_vector; + std::vector<std::vector<float>> wave_vector; + ///@} }; // class WaveformHitAuxContainer_v1 diff --git a/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformHit_v1.h b/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformHit_v1.h index 355b5685b37a07f71d4cac24454cc34a7db7c28f..71f692c65309935d790a5fda948a1805b5e6ca83 100644 --- a/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformHit_v1.h +++ b/xAOD/xAODFaserWaveform/xAODFaserWaveform/versions/WaveformHit_v1.h @@ -12,6 +12,8 @@ extern "C" { # include "stdint.h" } +#include <vector> + // Core EDM include(s): #include "AthContainers/AuxElement.h" @@ -27,6 +29,34 @@ namespace xAOD { /// @name Access WaveformHit elements /// @{ + /// Waveform channel + unsigned int channel() const; + void set_channel(unsigned int value); + + /// Best results + float localtime() const; + void set_localtime(float value); + + float peak() const; + void set_peak(float value); + + float width() const; + void set_width(float value); + + float integral() const; + void set_integral(float value); + + /// Time from previous clock edge + float bcid_time() const; + void set_bcid_time(float value); + + /// Raw values from waveform + float raw_peak() const; + void set_raw_peak(float value); + + float raw_integral() const; + void set_raw_integral(float value); + /// Bsaeline mean float baseline_mean() const; void set_baseline_mean(float value); @@ -35,8 +65,33 @@ namespace xAOD { float baseline_rms() const; void set_baseline_rms(float value); + /// Status word + unsigned int status() const; + void set_status(unsigned int value); + + /// Other fit results + float mean() const; + void set_mean(float value); + + /// Crystal Ball fit parameters + float alpha() const; + void set_alpha(float value); + + float nval() const; + void set_nval(float value); + + /// Raw time and waveform data + std::vector<float> time_vector() const; + void set_time_vector(std::vector<float> value); + + std::vector<float> wave_vector() const; + void set_wave_vector(std::vector<float> value); + + /// @} + }; // class WaveformHit_v1 + std::ostream& operator<<(std::ostream& s, const xAOD::WaveformHit_v1& hit); } // Declare the inheritance of the type: diff --git a/xAOD/xAODFaserWaveformAthenaPool/CMakeLists.txt b/xAOD/xAODFaserWaveformAthenaPool/CMakeLists.txt index 3df3443af54cbf329ed56730645f27a44458d760..99f9ee00fdbfd45e353401e1c6480e1ec0a0d370 100644 --- a/xAOD/xAODFaserWaveformAthenaPool/CMakeLists.txt +++ b/xAOD/xAODFaserWaveformAthenaPool/CMakeLists.txt @@ -6,8 +6,8 @@ atlas_subdir( xAODFaserWaveformAthenaPool ) # Component(s) in the package: atlas_add_poolcnv_library( xAODFaserWaveformAthenaPoolPoolCnv src/*.h src/*.cxx - FILES xAODFaserWaveform/WaveformClock.h xAODFaserWaveform/WaveformClockAuxInfo.h - TYPES_WITH_NAMESPACE xAOD::WaveformClock xAOD::WaveformClockAuxInfo + FILES xAODFaserWaveform/WaveformClock.h xAODFaserWaveform/WaveformClockAuxInfo.h xAODFaserWaveform/WaveformHitContainer.h xAODFaserWaveform/WaveformHitAuxContainer.h + TYPES_WITH_NAMESPACE xAOD::WaveformClock xAOD::WaveformClockAuxInfo xAOD::WaveformHitContainer xAOD::WaveformHitAuxContainer CNV_PFX xAOD LINK_LIBRARIES AthenaPoolCnvSvcLib AthenaPoolUtilities xAODFaserWaveform ) diff --git a/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformClockAuxInfoCnv.cxx b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformClockAuxInfoCnv.cxx index 2ae9467033ddabd5b6c0e0fab94a5fb20c9c99de..b5024b1ae3058eccec0eaa0f4ab4e349cecf465f 100644 --- a/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformClockAuxInfoCnv.cxx +++ b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformClockAuxInfoCnv.cxx @@ -3,3 +3,4 @@ */ // Dummy source file so that cmake will know this is a custom converter. +// xAODWaveformClockAuxInfoCnv.cxx diff --git a/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformClockCnv.cxx b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformClockCnv.cxx index 2ae9467033ddabd5b6c0e0fab94a5fb20c9c99de..a175dccc75b115fad4d53637e900d97d67552435 100644 --- a/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformClockCnv.cxx +++ b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformClockCnv.cxx @@ -3,3 +3,4 @@ */ // Dummy source file so that cmake will know this is a custom converter. +// xAODWaveformClockCnv.cxx diff --git a/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitAuxContainerCnv.cxx b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitAuxContainerCnv.cxx new file mode 100644 index 0000000000000000000000000000000000000000..31d86ebb89db520de8029ae21581a7ffca95ddd0 --- /dev/null +++ b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitAuxContainerCnv.cxx @@ -0,0 +1,6 @@ +/* + Copyright (C) 2020 CERN for the benefit of the FASER collaboration +*/ + +// Dummy source file so that cmake will know this is a custom converter. +// xAODWaveformHitAuxContainerCnv.cxx diff --git a/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitAuxContainerCnv.h b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitAuxContainerCnv.h new file mode 100644 index 0000000000000000000000000000000000000000..bffe321a489859d89c98a13d29e24ea4a5d7c338 --- /dev/null +++ b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitAuxContainerCnv.h @@ -0,0 +1,15 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2020 CERN for the benefit of the FASER collaboration +*/ + +#ifndef XAODFASERWAVEFORMATHENAPOOL_XAODWAVEFORMHITAUXCONTAINERCNV_H +#define XAODFASERWAVEFORMATHENAPOOL_XAODWAVEFORMHITAUXCONTAINERCNV_H + +#include "xAODFaserWaveform/WaveformHitAuxContainer.h" +#include "AthenaPoolCnvSvc/T_AthenaPoolAuxContainerCnv.h" + +typedef T_AthenaPoolAuxContainerCnv<xAOD::WaveformHitAuxContainer> xAODWaveformHitAuxContainerCnv; + +#endif // XAODFASERWAVEFORMATHENAPOOL_XAODFASERWAVEFORMHITAUXCONTAINERCNV_H diff --git a/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitContainerCnv.cxx b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitContainerCnv.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2cd6731a4992cdc4b8ec2be6fcc7eeded4690727 --- /dev/null +++ b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitContainerCnv.cxx @@ -0,0 +1,6 @@ +/* + Copyright (C) 2020 CERN for the benefit of the FASER collaboration +*/ + +// Dummy source file so that cmake will know this is a custom converter. +// xAODWaveformHitContainerCnv.cxx diff --git a/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitContainerCnv.h b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitContainerCnv.h new file mode 100644 index 0000000000000000000000000000000000000000..770bb1625a210f23efb850bda8223a06e6496b5e --- /dev/null +++ b/xAOD/xAODFaserWaveformAthenaPool/src/xAODWaveformHitContainerCnv.h @@ -0,0 +1,15 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2020 CERN for the benefit of the FASER collaboration +*/ + +#ifndef XAODFASERWAVEFORMATHENAPOOL_XAODWAVEFORMHITCONTAINERCNV_H +#define XAODFASERWAVEFORMATHENAPOOL_XAODWAVEFORMHITCONTAINERCNV_H + +#include "xAODFaserWaveform/WaveformHitContainer.h" +#include "AthenaPoolCnvSvc/T_AthenaPoolxAODCnv.h" + +typedef T_AthenaPoolxAODCnv<xAOD::WaveformHitContainer> xAODWaveformHitContainerCnv; + +#endif // XAODFASERWAVEFORMATHENAPOOL_XAODWAVEFORMHITCONTAINERCNV_H