Skip to content
Snippets Groups Projects
Commit 3cf89b9b authored by Savannah Rose Shively's avatar Savannah Rose Shively
Browse files

initial draft

parent 5e7f84a0
No related branches found
No related tags found
No related merge requests found
Pipeline #2984699 failed
...@@ -9,7 +9,7 @@ atlas_subdir( TrackerEfficiencyExample ) ...@@ -9,7 +9,7 @@ atlas_subdir( TrackerEfficiencyExample )
atlas_add_component( TrackerEfficiencyExample atlas_add_component( TrackerEfficiencyExample
src/*.cxx src/*.h src/*.cxx src/*.h
src/components/*.cxx src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps xAODFaserWaveform ScintRawEvent LINK_LIBRARIES AthenaBaseComps xAODFaserWaveform WaveRawEvent
GaudiKernel GaudiKernel
AthViews StoreGateLib SGtests ) AthViews StoreGateLib SGtests )
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <TBranch.h> #include <TBranch.h>
//static const std::string moduleFailureReason{"TrackerEfficiencyAlg: Exceeds max clusters"}; //static const std::string moduleFailureReason{"TrackerEfficiencyAlg: Exceeds max clusters"};
// Constructor with parameters: // Constructor with parameters:
...@@ -24,12 +25,16 @@ TrackerEfficiencyAlg::TrackerEfficiencyAlg(const std::string& name, ISvcLocator* ...@@ -24,12 +25,16 @@ TrackerEfficiencyAlg::TrackerEfficiencyAlg(const std::string& name, ISvcLocator*
m_idHelper{nullptr}, m_idHelper{nullptr},
m_histSvc ( "THistSvc/THistSvc", name ){} m_histSvc ( "THistSvc/THistSvc", name ){}
//TrackerEfficiencyAlg::~TrackerEfficiencyAlg(){}
// Initialize method: // Initialize method:
StatusCode TrackerEfficiencyAlg::initialize() { StatusCode TrackerEfficiencyAlg::initialize() {
ATH_MSG_INFO("TrackerEfficiencyAlg::initialize()"); ATH_MSG_INFO("TrackerEfficiencyAlg::initialize()");
ATH_CHECK( m_CaloWaveformContainer.initialize() );
// Tree // Tree
m_tree = new TTree("residTree","Cosmics residuals"); m_tree = new TTree("TrackerTree","PH_Varname");
//hist test //hist test
m_hist = new TH1D("Stations", "Stations hit", 4, 0, 3); m_hist = new TH1D("Stations", "Stations hit", 4, 0, 3);
...@@ -40,7 +45,10 @@ StatusCode TrackerEfficiencyAlg::initialize() { ...@@ -40,7 +45,10 @@ StatusCode TrackerEfficiencyAlg::initialize() {
StatusCode TrackerEfficiencyAlg::execute(const EventContext& ctx) const StatusCode TrackerEfficiencyAlg::execute(const EventContext& ctx) const
{ {
// Done SG::ReadHandle<RawWaveformContainer> caloHandle(m_CaloWaveformContainer, ctx);
ATH_MSG_INFO("Found ReadHandle for CaloWaveforms");
ATH_MSG_INFO(*caloHandle);
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
......
...@@ -29,16 +29,17 @@ ...@@ -29,16 +29,17 @@
#include <math.h> #include <math.h>
#include <TProfile.h> #include <TProfile.h>
//Waveform
#include "xAODFaserWaveform/WaveformHitContainer.h"
#include "WaveRawEvent/RawWaveformContainer.h"
class FaserSCT_ID; class FaserSCT_ID;
class ISvcLocator; class ISvcLocator;
class StatusCode; class StatusCode;
class TH1; class TH1;
class TTree; class TTree;
namespace Trk
{
class TrackStateOnSurface;
}
class TrackerEfficiencyAlg : public AthReentrantAlgorithm, AthHistogramming class TrackerEfficiencyAlg : public AthReentrantAlgorithm, AthHistogramming
{ {
...@@ -46,26 +47,23 @@ class TrackerEfficiencyAlg : public AthReentrantAlgorithm, AthHistogramming ...@@ -46,26 +47,23 @@ class TrackerEfficiencyAlg : public AthReentrantAlgorithm, AthHistogramming
/// Constructor with parameters: /// Constructor with parameters:
TrackerEfficiencyAlg(const std::string& name, ISvcLocator* pSvcLocator); TrackerEfficiencyAlg(const std::string& name, ISvcLocator* pSvcLocator);
virtual ~TrackerEfficiencyAlg(){}; virtual ~TrackerEfficiencyAlg(){};
/** @name Usual algorithm methods */
//@{
///Retrieve the tools used and initialize variables ///Retrieve the tools used and initialize variables
virtual StatusCode initialize() override; virtual StatusCode initialize() override;
///Form clusters and record them in StoreGate (detector store) ///Form clusters and record them in StoreGate (detector store)
virtual StatusCode execute(const EventContext& ctx) const override; virtual StatusCode execute(const EventContext& ctx) const override;
///Clean up and release the collection containers ///Clean up and release the collection containers
virtual StatusCode finalize() override; virtual StatusCode finalize() override;
//Make this algorithm clonable.
virtual bool isClonable() const override { return true; }
//@}
const ServiceHandle<ITHistSvc>& histSvc() const; const ServiceHandle<ITHistSvc>& histSvc() const;
private: private:
/** @name Disallow default instantiation, copy, assignment */ SG::ReadHandleKey<RawWaveformContainer> m_CaloWaveformContainer
//@{ { this, "CaloWaveformContainerKey", "CaloWaveforms", "ReadHandleKey for CaloWaveforms Container"};
TrackerEfficiencyAlg() = delete; //SG::ReadHandleKey<Waveform> m_WaveformHitContainer
TrackerEfficiencyAlg(const TrackerEfficiencyAlg&) = delete; //{ this, "CaloWaveformContainerKey", "CaloWaveforms", "ReadHandleKey for CaloWaveforms Container"};
TrackerEfficiencyAlg &operator=(const TrackerEfficiencyAlg&) = delete;
//@}
const FaserSCT_ID* m_idHelper; const FaserSCT_ID* m_idHelper;
ServiceHandle<ITHistSvc> m_histSvc; ServiceHandle<ITHistSvc> m_histSvc;
......
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