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

enable SG

parent d4de9bdb
No related branches found
No related tags found
No related merge requests found
Pipeline #2564769 failed
......@@ -11,7 +11,7 @@ def ClusterReadExampleCfg(flags, **kwargs):
# clusterTool = acc.popToolsAndMerge(FaserSCT_ClusterizationToolCfg(flags))
# kwargs.setdefault("SCT_ClusteringTool", clusterTool)
# kwargs.setdefault("DataObjectName", "SCT_RDOs")
#kwargs.setdefault("ClustersName", "SCT_ClusterContainer")
kwargs.setdefault("ClustersName", "SCT_ClusterContainer")
# kwargs.setdefault("SCT_FlaggedCondData", "SCT_Flags")
TEST_ClusterReadAlg=CompFactory.ClusterReadAlg
acc.addEventAlgo(TEST_ClusterReadAlg(**kwargs))
......
......
......@@ -39,7 +39,7 @@ StatusCode ClusterReadAlg::initialize() {
ATH_MSG_INFO("ClusterReadAlg::initialize()");
ATH_CHECK(m_faserTriggerDataKey.initialize());
//ATH_CHECK(m_clusterContainerKey.initialize());
ATH_CHECK(m_clusterContainerKey.initialize());
ATH_CHECK(m_trackCollection.initialize());
// Get the SCT ID helper
......@@ -80,14 +80,14 @@ StatusCode ClusterReadAlg::execute(const EventContext& ctx) const
SG::WriteHandle trackContainer{m_trackCollection, ctx};
std::unique_ptr<TrackCollection> outputTracks = std::make_unique<TrackCollection>();
//SG::ReadHandle<xAOD::FaserTriggerData> triggerContainer{m_faserTriggerDataKey, ctx};
//ATH_CHECK(triggerContainer.isValid());
SG::ReadHandle<xAOD::FaserTriggerData> triggerContainer{m_faserTriggerDataKey, ctx};
ATH_CHECK(triggerContainer.isValid());
++m_numberOfTriggeredEvents;
//SG::ReadHandle<FaserSCT_ClusterContainer> clusterContainer{m_clusterContainerKey, ctx};
//ATH_CHECK(clusterContainer.isValid());
SG::ReadHandle<Tracker::FaserSCT_ClusterContainer> clusterContainer{m_clusterContainerKey, ctx};
ATH_CHECK(clusterContainer.isValid());
// Loop over stations
......@@ -95,6 +95,19 @@ StatusCode ClusterReadAlg::execute(const EventContext& ctx) const
ATH_CHECK(trackContainer.record(std::move(outputTracks)));
//RDO borrowed stuff
// Handles created from handle keys behave like pointers to the corresponding container
SG::ReadHandle<McEventCollection> h_mcEvents(m_mcEventKey);
ATH_MSG_INFO("Read McEventContainer with " << h_mcEvents->size() << " events");
if (h_mcEvents->size() == 0) return StatusCode::FAILURE;
// h_mcEvents->at(0)->print( msg().stream() );
//SG::ReadHandle<FaserSiHitCollection> h_siHits(m_faserSiHitKey);
//ATH_MSG_INFO("Read FaserSiHitCollection with " << h_siHits->size() << " hits");
SG::ReadHandle<FaserSCT_RDO_Container> h_sctRDO(m_faserRdoKey);
//SG::ReadHandle<TrackerSimDataCollection> h_collectionMap(m_sctMap);
// Done
return StatusCode::SUCCESS;
}
......
......
......@@ -35,6 +35,10 @@
#include <TH1.h>
#include <math.h>
#include <TProfile.h>
#include "GeneratorObjects/McEventCollection.h"
//#include "TrackerSimEvent/FaserSiHitCollection.h"
#include "TrackerRawData/FaserSCT_RDO_Container.h"
//#include "TrackerSimData/TrackerSimDataCollection.h"
class FaserSCT_ID;
class ISvcLocator;
......@@ -86,7 +90,7 @@ class ClusterReadAlg : public AthReentrantAlgorithm, AthHistogramming
const FaserSCT_ID* m_idHelper;
SG::ReadHandleKey<xAOD::FaserTriggerData> m_faserTriggerDataKey { this, "FaserTriggerDataKey", "FaserTriggerData", "ReadHandleKey for xAOD::FaserTriggerData" };
//SG::ReadHandleKey<FaserSCT_ClusterContainer> m_clusterContainerKey { this, "ClustersName", "SCT_ClusterContainer", "FaserSCT cluster container" };
SG::ReadHandleKey<Tracker::FaserSCT_ClusterContainer> m_clusterContainerKey { this, "ClustersName", "SCT_ClusterContainer", "FaserSCT cluster container" };
SG::WriteHandleKey<TrackCollection> m_trackCollection { this, "OutputCollection", "ClusterFit", "Output track collection name" };
DoubleProperty m_zCenter { this, "ZCenter", 2300.0, "Global z position at which to reconstruct track parameters"};
......@@ -113,6 +117,12 @@ class ClusterReadAlg : public AthReentrantAlgorithm, AthHistogramming
TH1* m_hist; // Example histogram
TH1* m_incAnglHist;
TProfile* m_hprof;
SG::ReadHandleKey<McEventCollection> m_mcEventKey { this, "McEventCollection", "TruthEvent" };
//SG::ReadHandleKey<FaserSiHitCollection> m_faserSiHitKey { this, "FaserSiHitCollection", "SCT_Hits" };
SG::ReadHandleKey<FaserSCT_RDO_Container> m_faserRdoKey { this, "FaserSCT_RDO_Container", "SCT_RDOs"};
//SG::ReadHandleKey<TrackerSimDataCollection> m_sctMap {this, "TrackerSimDataCollection", "SCT_SDO_Map"};
};
// For the THistSvc
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment