Skip to content
Snippets Groups Projects
Commit 46019fa8 authored by Tobias Bockh's avatar Tobias Bockh
Browse files

added summary information to finalize function of CKF and added flag to turn off diagnostics

parent 265f1096
No related branches found
No related tags found
1 merge request!213CKF
Showing
with 351 additions and 328 deletions
...@@ -64,6 +64,10 @@ public: ...@@ -64,6 +64,10 @@ public:
virtual Acts::MagneticFieldContext getMagneticFieldContext(const EventContext& ctx) const; virtual Acts::MagneticFieldContext getMagneticFieldContext(const EventContext& ctx) const;
private: private:
size_t m_numberOfEvents {0};
size_t m_numberOfTrackSeeds {0};
size_t m_numberOfFittedTracks {0};
size_t m_numberOfSelectedTracks {0};
void computeSharedHits(std::vector<IndexSourceLink>* sourceLinks, TrackFinderResult& results) const; void computeSharedHits(std::vector<IndexSourceLink>* sourceLinks, TrackFinderResult& results) const;
std::shared_ptr<TrackFinderFunction> m_fit; std::shared_ptr<TrackFinderFunction> m_fit;
std::unique_ptr<const Acts::Logger> m_logger; std::unique_ptr<const Acts::Logger> m_logger;
...@@ -79,6 +83,7 @@ public: ...@@ -79,6 +83,7 @@ public:
Gaudi::Property<bool> m_resolvePassive {this, "resolvePassive", false}; Gaudi::Property<bool> m_resolvePassive {this, "resolvePassive", false};
Gaudi::Property<bool> m_resolveMaterial {this, "resolveMaterial", true}; Gaudi::Property<bool> m_resolveMaterial {this, "resolveMaterial", true};
Gaudi::Property<bool> m_resolveSensitive {this, "resolveSensitive", true}; Gaudi::Property<bool> m_resolveSensitive {this, "resolveSensitive", true};
Gaudi::Property<bool> m_noDiagnostics {this, "noDiagnostics", true, "Set ACTS logging level to INFO and do not run performance writer, states writer or summary writer"};
Gaudi::Property<double> m_maxSteps {this, "maxSteps", 10000}; Gaudi::Property<double> m_maxSteps {this, "maxSteps", 10000};
Gaudi::Property<double> m_chi2Max {this, "chi2Max", 15}; Gaudi::Property<double> m_chi2Max {this, "chi2Max", 15};
Gaudi::Property<unsigned long> m_nMax {this, "nMax", 10}; Gaudi::Property<unsigned long> m_nMax {this, "nMax", 10};
......
...@@ -33,6 +33,7 @@ private: ...@@ -33,6 +33,7 @@ private:
this, "McEventCollection", "BeamTruthEvent"}; this, "McEventCollection", "BeamTruthEvent"};
ToolHandle<IFaserActsExtrapolationTool> m_extrapolationTool { ToolHandle<IFaserActsExtrapolationTool> m_extrapolationTool {
this, "ExtrapolationTool", "FaserActsExtrapolationTool"}; this, "ExtrapolationTool", "FaserActsExtrapolationTool"};
Gaudi::Property<bool> m_noDiagnostics {this, "noDiagnostics", true, "Set ACTS logging level to INFO and do not run performance writer, states writer or summary writer"};
Gaudi::Property<std::string> m_filePath{this, "FilePath", "performance_ckf.root"}; Gaudi::Property<std::string> m_filePath{this, "FilePath", "performance_ckf.root"};
TFile* m_outputFile{nullptr}; TFile* m_outputFile{nullptr};
......
...@@ -40,6 +40,7 @@ private: ...@@ -40,6 +40,7 @@ private:
const FaserSCT_ID* m_idHelper{nullptr}; const FaserSCT_ID* m_idHelper{nullptr};
const TrackerDD::SCT_DetectorManager* m_detMgr {nullptr}; const TrackerDD::SCT_DetectorManager* m_detMgr {nullptr};
Gaudi::Property<bool> m_noDiagnostics {this, "noDiagnostics", true, "Set ACTS logging level to INFO and do not run performance writer, states writer or summary writer"};
Gaudi::Property<std::string> m_filePath {this, "FilePath", "track_states_ckf.root", "Output root file"}; Gaudi::Property<std::string> m_filePath {this, "FilePath", "track_states_ckf.root", "Output root file"};
Gaudi::Property<std::string> m_treeName {this, "TreeName", "tree", "Tree name"}; Gaudi::Property<std::string> m_treeName {this, "TreeName", "tree", "Tree name"};
Gaudi::Property<bool> m_mc {this, "MC", false}; Gaudi::Property<bool> m_mc {this, "MC", false};
......
...@@ -40,6 +40,7 @@ private: ...@@ -40,6 +40,7 @@ private:
ToolHandle<IFaserActsExtrapolationTool> m_extrapolationTool { ToolHandle<IFaserActsExtrapolationTool> m_extrapolationTool {
this, "ExtrapolationTool", "FaserActsExtrapolationTool"}; this, "ExtrapolationTool", "FaserActsExtrapolationTool"};
Gaudi::Property<bool> m_noDiagnostics {this, "noDiagnostics", true, "Set ACTS logging level to INFO and do not run performance writer, states writer or summary writer"};
Gaudi::Property<std::string> m_filePath{this, "FilePath", "track_summary_ckf.root", "Output root file"}; Gaudi::Property<std::string> m_filePath{this, "FilePath", "track_summary_ckf.root", "Output root file"};
Gaudi::Property<std::string> m_treeName{this, "TreeName", "tree", "Tree name"}; Gaudi::Property<std::string> m_treeName{this, "TreeName", "tree", "Tree name"};
......
...@@ -52,20 +52,26 @@ def CombinatorialKalmanFilterCfg(flags, **kwargs): ...@@ -52,20 +52,26 @@ def CombinatorialKalmanFilterCfg(flags, **kwargs):
track_seed_tool.std_cluster = 0.023 track_seed_tool.std_cluster = 0.023
track_seed_tool.origin = 0 track_seed_tool.origin = 0
actsExtrapolationTool = CompFactory.FaserActsExtrapolationTool("FaserActsExtrapolationTool")
actsExtrapolationTool.MaxSteps = 1000
actsExtrapolationTool.TrackingGeometryTool = CompFactory.FaserActsTrackingGeometryTool("TrackingGeometryTool")
trajectory_states_writer_tool = CompFactory.RootTrajectoryStatesWriterTool() trajectory_states_writer_tool = CompFactory.RootTrajectoryStatesWriterTool()
trajectory_states_writer_tool.noDiagnostics = kwargs["noDiagnostics"]
trajectory_states_writer_tool.MC = True trajectory_states_writer_tool.MC = True
trajectory_summary_writer_tool = CompFactory.RootTrajectorySummaryWriterTool() trajectory_summary_writer_tool = CompFactory.RootTrajectorySummaryWriterTool()
trajectory_summary_writer_tool .noDiagnostics = kwargs["noDiagnostics"]
actsExtrapolationTool = CompFactory.FaserActsExtrapolationTool("FaserActsExtrapolationTool")
actsExtrapolationTool.MaxSteps = 1000
actsExtrapolationTool.TrackingGeometryTool = CompFactory.FaserActsTrackingGeometryTool("TrackingGeometryTool")
performance_writer_tool = CompFactory.PerformanceWriterTool("PerformanceWriterTool") performance_writer_tool = CompFactory.PerformanceWriterTool("PerformanceWriterTool")
performance_writer_tool.noDiagnostics = kwargs["noDiagnostics"]
performance_writer_tool.ExtrapolationTool = actsExtrapolationTool performance_writer_tool.ExtrapolationTool = actsExtrapolationTool
ckf = CompFactory.CombinatorialKalmanFilterAlg(**kwargs) ckf = CompFactory.CombinatorialKalmanFilterAlg(**kwargs)
ckf.TrackSeed = track_seed_tool ckf.TrackSeed = track_seed_tool
ckf.ActsLogging = "INFO" ckf.ActsLogging = "INFO"
ckf.noDiagnostics = kwargs["noDiagnostics"]
ckf.RootTrajectoryStatesWriterTool = trajectory_states_writer_tool ckf.RootTrajectoryStatesWriterTool = trajectory_states_writer_tool
ckf.RootTrajectorySummaryWriterTool = trajectory_summary_writer_tool ckf.RootTrajectorySummaryWriterTool = trajectory_summary_writer_tool
ckf.PerformanceWriterTool = performance_writer_tool ckf.PerformanceWriterTool = performance_writer_tool
......
...@@ -36,22 +36,16 @@ StatusCode CombinatorialKalmanFilterAlg::initialize() { ...@@ -36,22 +36,16 @@ StatusCode CombinatorialKalmanFilterAlg::initialize() {
ATH_CHECK(m_trackingGeometryTool.retrieve()); ATH_CHECK(m_trackingGeometryTool.retrieve());
ATH_CHECK(m_trackSeedTool.retrieve()); ATH_CHECK(m_trackSeedTool.retrieve());
// ATH_CHECK(m_trackCollection.initialize()); // ATH_CHECK(m_trackCollection.initialize());
if (m_performanceWriter) { ATH_CHECK(m_performanceWriterTool.retrieve());
ATH_CHECK(m_performanceWriterTool.retrieve()); ATH_CHECK(m_trajectoryStatesWriterTool.retrieve());
} ATH_CHECK(m_trajectorySummaryWriterTool.retrieve());
if (m_statesWriter) {
ATH_CHECK(m_trajectoryStatesWriterTool.retrieve());
}
if (m_summaryWriter) {
ATH_CHECK(m_trajectorySummaryWriterTool.retrieve());
}
ATH_CHECK(detStore()->retrieve(m_idHelper,"FaserSCT_ID")); ATH_CHECK(detStore()->retrieve(m_idHelper,"FaserSCT_ID"));
m_fit = makeTrackFinderFunction(m_trackingGeometryTool->trackingGeometry(), m_fit = makeTrackFinderFunction(m_trackingGeometryTool->trackingGeometry(),
m_resolvePassive, m_resolveMaterial, m_resolveSensitive); m_resolvePassive, m_resolveMaterial, m_resolveSensitive);
// FIXME fix Acts logging level // FIXME fix Acts logging level
if (m_actsLogging == "VERBOSE") { if (m_actsLogging == "VERBOSE" && !m_noDiagnostics) {
m_logger = Acts::getDefaultLogger("KalmanFitter", Acts::Logging::VERBOSE); m_logger = Acts::getDefaultLogger("KalmanFitter", Acts::Logging::VERBOSE);
} else if (m_actsLogging == "DEBUG") { } else if (m_actsLogging == "DEBUG" && !m_noDiagnostics) {
m_logger = Acts::getDefaultLogger("KalmanFitter", Acts::Logging::DEBUG); m_logger = Acts::getDefaultLogger("KalmanFitter", Acts::Logging::DEBUG);
} else { } else {
m_logger = Acts::getDefaultLogger("KalmanFitter", Acts::Logging::INFO); m_logger = Acts::getDefaultLogger("KalmanFitter", Acts::Logging::INFO);
...@@ -63,6 +57,7 @@ StatusCode CombinatorialKalmanFilterAlg::initialize() { ...@@ -63,6 +57,7 @@ StatusCode CombinatorialKalmanFilterAlg::initialize() {
StatusCode CombinatorialKalmanFilterAlg::execute() { StatusCode CombinatorialKalmanFilterAlg::execute() {
const EventContext& ctx = Gaudi::Hive::currentContext(); const EventContext& ctx = Gaudi::Hive::currentContext();
m_numberOfEvents++;
ATH_CHECK(m_trackCollection.initialize()); ATH_CHECK(m_trackCollection.initialize());
SG::WriteHandle<TrackCollection> trackContainer{m_trackCollection,ctx}; SG::WriteHandle<TrackCollection> trackContainer{m_trackCollection,ctx};
...@@ -109,22 +104,22 @@ StatusCode CombinatorialKalmanFilterAlg::execute() { ...@@ -109,22 +104,22 @@ StatusCode CombinatorialKalmanFilterAlg::execute() {
// Perform the track finding for all initial parameters // Perform the track finding for all initial parameters
ATH_MSG_DEBUG("Invoke track finding with " << initialParameters->size() << " seeds."); ATH_MSG_DEBUG("Invoke track finding with " << initialParameters->size() << " seeds.");
m_numberOfTrackSeeds += initialParameters->size();
IndexSourceLinkContainer tmp; IndexSourceLinkContainer tmp;
for (const auto& sl : *sourceLinks) { for (const auto& sl : *sourceLinks) {
tmp.emplace_hint(tmp.end(), sl); tmp.emplace_hint(tmp.end(), sl);
} }
auto results = (*m_fit)(tmp, *initialParameters, options); auto results = (*m_fit)(tmp, *initialParameters, options);
m_numberOfFittedTracks += results.size();
std::vector<TrackQuality> trackQuality; std::vector<TrackQuality> trackQuality;
selectTracks(results, trackQuality); selectTracks(results, trackQuality);
for (const auto& track : trackQuality) {
ATH_MSG_VERBOSE("?? " << track.nMeasurements << ", " << track.chi2);
}
TrackFinderResult selectedResults; TrackFinderResult selectedResults;
for (size_t i = 0; i < std::min(trackQuality.size(), (size_t)m_nTrajectories); ++i) { for (size_t i = 0; i < std::min(trackQuality.size(), (size_t)m_nTrajectories); ++i) {
selectedResults.push_back(Acts::Result<Acts::CombinatorialKalmanFilterResult<IndexSourceLink>>(trackQuality[i].track)); selectedResults.push_back(Acts::Result<Acts::CombinatorialKalmanFilterResult<IndexSourceLink>>(trackQuality[i].track));
} }
m_numberOfSelectedTracks += selectedResults.size();
/* /*
TrackFinderResult minTrackRequirements {}; TrackFinderResult minTrackRequirements {};
for (auto& result : results) { for (auto& result : results) {
...@@ -201,13 +196,13 @@ StatusCode CombinatorialKalmanFilterAlg::execute() { ...@@ -201,13 +196,13 @@ StatusCode CombinatorialKalmanFilterAlg::execute() {
} }
} }
if (m_statesWriter) { if (m_statesWriter && !m_noDiagnostics) {
ATH_CHECK(m_trajectoryStatesWriterTool->write(geoctx, trajectories)); ATH_CHECK(m_trajectoryStatesWriterTool->write(geoctx, trajectories));
} }
if (m_summaryWriter) { if (m_summaryWriter && !m_noDiagnostics) {
ATH_CHECK(m_trajectorySummaryWriterTool->write(geoctx, trajectories)); ATH_CHECK(m_trajectorySummaryWriterTool->write(geoctx, trajectories));
} }
if (m_performanceWriter) { if (m_performanceWriter && !m_noDiagnostics) {
ATH_CHECK(m_performanceWriterTool->write(geoctx, trajectories)); ATH_CHECK(m_performanceWriterTool->write(geoctx, trajectories));
} }
ATH_CHECK(trackContainer.record(std::move(outputTracks))); ATH_CHECK(trackContainer.record(std::move(outputTracks)));
...@@ -217,6 +212,11 @@ StatusCode CombinatorialKalmanFilterAlg::execute() { ...@@ -217,6 +212,11 @@ StatusCode CombinatorialKalmanFilterAlg::execute() {
StatusCode CombinatorialKalmanFilterAlg::finalize() { StatusCode CombinatorialKalmanFilterAlg::finalize() {
ATH_MSG_INFO("CombinatorialKalmanFilterAlg::finalize()");
ATH_MSG_INFO(m_numberOfEvents << " events processed.");
ATH_MSG_INFO(m_numberOfTrackSeeds << " seeds.");
ATH_MSG_INFO(m_numberOfFittedTracks << " fitted tracks.");
ATH_MSG_INFO(m_numberOfSelectedTracks << " good fitted tracks.");
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
......
...@@ -11,43 +11,46 @@ PerformanceWriterTool::PerformanceWriterTool( ...@@ -11,43 +11,46 @@ PerformanceWriterTool::PerformanceWriterTool(
StatusCode PerformanceWriterTool::initialize() { StatusCode PerformanceWriterTool::initialize() {
ATH_CHECK(m_extrapolationTool.retrieve()); if (!m_noDiagnostics) {
ATH_CHECK(m_mcEventCollectionKey.initialize()); ATH_CHECK(m_extrapolationTool.retrieve());
ATH_CHECK(m_simDataCollectionKey.initialize()); ATH_CHECK(m_mcEventCollectionKey.initialize());
ATH_CHECK(m_simDataCollectionKey.initialize());
std::string filePath = m_filePath;
m_outputFile = TFile::Open(filePath.c_str(), "RECREATE"); std::string filePath = m_filePath;
if (m_outputFile == nullptr) { m_outputFile = TFile::Open(filePath.c_str(), "RECREATE");
ATH_MSG_WARNING("Unable to open output file at " << m_filePath); if (m_outputFile == nullptr) {
return StatusCode::RECOVERABLE; ATH_MSG_WARNING("Unable to open output file at " << m_filePath);
} return StatusCode::RECOVERABLE;
}
// initialize the residual and efficiency plots tool // initialize the residual and efficiency plots tool
m_resPlotTool.book(m_resPlotCache); m_resPlotTool.book(m_resPlotCache);
m_effPlotTool.book(m_effPlotCache); m_effPlotTool.book(m_effPlotCache);
m_summaryPlotTool.book(m_summaryPlotCache); m_summaryPlotTool.book(m_summaryPlotCache);
}
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
StatusCode PerformanceWriterTool::finalize() { StatusCode PerformanceWriterTool::finalize() {
// fill residual and pull details into additional hists if (!m_noDiagnostics) {
m_resPlotTool.refinement(m_resPlotCache); // fill residual and pull details into additional hists
if (m_outputFile) { m_resPlotTool.refinement(m_resPlotCache);
m_outputFile->cd(); if (m_outputFile) {
m_resPlotTool.write(m_resPlotCache); m_outputFile->cd();
m_effPlotTool.write(m_effPlotCache); m_resPlotTool.write(m_resPlotCache);
m_summaryPlotTool.write(m_summaryPlotCache); m_effPlotTool.write(m_effPlotCache);
ATH_MSG_VERBOSE("Wrote performance plots to '" << m_outputFile->GetPath() << "'"); m_summaryPlotTool.write(m_summaryPlotCache);
} ATH_MSG_VERBOSE("Wrote performance plots to '" << m_outputFile->GetPath() << "'");
}
m_resPlotTool.clear(m_resPlotCache); m_resPlotTool.clear(m_resPlotCache);
m_effPlotTool.clear(m_effPlotCache); m_effPlotTool.clear(m_effPlotCache);
m_summaryPlotTool.clear(m_summaryPlotCache); m_summaryPlotTool.clear(m_summaryPlotCache);
if (m_outputFile) { if (m_outputFile) {
m_outputFile->Close(); m_outputFile->Close();
}
} }
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
......
...@@ -23,184 +23,187 @@ RootTrajectoryStatesWriterTool::RootTrajectoryStatesWriterTool( ...@@ -23,184 +23,187 @@ RootTrajectoryStatesWriterTool::RootTrajectoryStatesWriterTool(
: AthAlgTool(type, name, parent) {} : AthAlgTool(type, name, parent) {}
StatusCode RootTrajectoryStatesWriterTool::initialize() { StatusCode RootTrajectoryStatesWriterTool::initialize() {
ATH_CHECK(m_mcEventCollectionKey.initialize()); if (!m_noDiagnostics) {
ATH_CHECK(m_simDataCollectionKey.initialize()); ATH_CHECK(m_mcEventCollectionKey.initialize());
ATH_CHECK(m_faserSiHitKey.initialize()); ATH_CHECK(m_simDataCollectionKey.initialize());
ATH_CHECK(detStore()->retrieve(m_idHelper, "FaserSCT_ID")); ATH_CHECK(m_faserSiHitKey.initialize());
ATH_CHECK(detStore()->retrieve(m_detMgr, "SCT")); ATH_CHECK(detStore()->retrieve(m_idHelper, "FaserSCT_ID"));
ATH_CHECK(detStore()->retrieve(m_detMgr, "SCT"));
std::string filePath = m_filePath;
std::string treeName = m_treeName; std::string filePath = m_filePath;
m_outputFile = TFile::Open(filePath.c_str(), "RECREATE"); std::string treeName = m_treeName;
if (m_outputFile == nullptr) { m_outputFile = TFile::Open(filePath.c_str(), "RECREATE");
ATH_MSG_ERROR("Unable to open output file at " << m_filePath); if (m_outputFile == nullptr) {
return StatusCode::FAILURE; ATH_MSG_ERROR("Unable to open output file at " << m_filePath);
} return StatusCode::FAILURE;
m_outputFile->cd(); }
m_outputTree = new TTree(treeName.c_str(), treeName.c_str()); m_outputFile->cd();
if (m_outputTree == nullptr) { m_outputTree = new TTree(treeName.c_str(), treeName.c_str());
ATH_MSG_ERROR("Unable to create TTree"); if (m_outputTree == nullptr) {
return StatusCode::FAILURE; ATH_MSG_ERROR("Unable to create TTree");
} return StatusCode::FAILURE;
}
m_outputTree = new TTree("tree", "tree");
m_outputTree->Branch("event_nr", &m_eventNr);
m_outputTree->Branch("multiTraj_nr", &m_multiTrajNr);
m_outputTree->Branch("subTraj_nr", &m_subTrajNr);
m_outputTree->Branch("t_x", &m_t_x);
m_outputTree->Branch("t_y", &m_t_y);
m_outputTree->Branch("t_z", &m_t_z);
m_outputTree->Branch("t_dx", &m_t_dx);
m_outputTree->Branch("t_dy", &m_t_dy);
m_outputTree->Branch("t_dz", &m_t_dz);
m_outputTree->Branch("t_eLOC0", &m_t_eLOC0);
m_outputTree->Branch("t_eLOC1", &m_t_eLOC1);
m_outputTree->Branch("t_ePHI", &m_t_ePHI);
m_outputTree->Branch("t_eTHETA", &m_t_eTHETA);
m_outputTree->Branch("t_eQOP", &m_t_eQOP);
m_outputTree->Branch("t_eT", &m_t_eT);
m_outputTree->Branch("nStates", &m_nStates);
m_outputTree->Branch("nMeasurements", &m_nMeasurements);
m_outputTree->Branch("volume_id", &m_volumeID);
m_outputTree->Branch("layer_id", &m_layerID);
m_outputTree->Branch("module_id", &m_moduleID);
m_outputTree->Branch("station", &m_station);
m_outputTree->Branch("layer", &m_layer);
m_outputTree->Branch("phi_module", &m_phi_module);
m_outputTree->Branch("eta_module", &m_eta_module);
m_outputTree->Branch("side", &m_side);
m_outputTree->Branch("pathLength", &m_pathLength);
m_outputTree->Branch("l_x_hit", &m_lx_hit);
m_outputTree->Branch("l_y_hit", &m_ly_hit);
m_outputTree->Branch("g_x_hit", &m_x_hit);
m_outputTree->Branch("g_y_hit", &m_y_hit);
m_outputTree->Branch("g_z_hit", &m_z_hit);
m_outputTree->Branch("res_x_hit", &m_res_x_hit);
m_outputTree->Branch("res_y_hit", &m_res_y_hit);
m_outputTree->Branch("err_x_hit", &m_err_x_hit);
m_outputTree->Branch("err_y_hit", &m_err_y_hit);
m_outputTree->Branch("pull_x_hit", &m_pull_x_hit);
m_outputTree->Branch("pull_y_hit", &m_pull_y_hit);
m_outputTree->Branch("dim_hit", &m_dim_hit);
m_outputTree->Branch("nPredicted", &m_nParams[0]);
m_outputTree->Branch("predicted", &m_hasParams[0]);
m_outputTree->Branch("eLOC0_prt", &m_eLOC0[0]);
m_outputTree->Branch("eLOC1_prt", &m_eLOC1[0]);
m_outputTree->Branch("ePHI_prt", &m_ePHI[0]);
m_outputTree->Branch("eTHETA_prt", &m_eTHETA[0]);
m_outputTree->Branch("eQOP_prt", &m_eQOP[0]);
m_outputTree->Branch("eT_prt", &m_eT[0]);
m_outputTree->Branch("res_eLOC0_prt", &m_res_eLOC0[0]);
m_outputTree->Branch("res_eLOC1_prt", &m_res_eLOC1[0]);
m_outputTree->Branch("res_ePHI_prt", &m_res_ePHI[0]);
m_outputTree->Branch("res_eTHETA_prt", &m_res_eTHETA[0]);
m_outputTree->Branch("res_eQOP_prt", &m_res_eQOP[0]);
m_outputTree->Branch("res_eT_prt", &m_res_eT[0]);
m_outputTree->Branch("err_eLOC0_prt", &m_err_eLOC0[0]);
m_outputTree->Branch("err_eLOC1_prt", &m_err_eLOC1[0]);
m_outputTree->Branch("err_ePHI_prt", &m_err_ePHI[0]);
m_outputTree->Branch("err_eTHETA_prt", &m_err_eTHETA[0]);
m_outputTree->Branch("err_eQOP_prt", &m_err_eQOP[0]);
m_outputTree->Branch("err_eT_prt", &m_err_eT[0]);
m_outputTree->Branch("pull_eLOC0_prt", &m_pull_eLOC0[0]);
m_outputTree->Branch("pull_eLOC1_prt", &m_pull_eLOC1[0]);
m_outputTree->Branch("pull_ePHI_prt", &m_pull_ePHI[0]);
m_outputTree->Branch("pull_eTHETA_prt", &m_pull_eTHETA[0]);
m_outputTree->Branch("pull_eQOP_prt", &m_pull_eQOP[0]);
m_outputTree->Branch("pull_eT_prt", &m_pull_eT[0]);
m_outputTree->Branch("g_x_prt", &m_x[0]);
m_outputTree->Branch("g_y_prt", &m_y[0]);
m_outputTree->Branch("g_z_prt", &m_z[0]);
m_outputTree->Branch("px_prt", &m_px[0]);
m_outputTree->Branch("py_prt", &m_py[0]);
m_outputTree->Branch("pz_prt", &m_pz[0]);
m_outputTree->Branch("eta_prt", &m_eta[0]);
m_outputTree->Branch("pT_prt", &m_pT[0]);
m_outputTree->Branch("nFiltered", &m_nParams[1]);
m_outputTree->Branch("filtered", &m_hasParams[1]);
m_outputTree->Branch("eLOC0_flt", &m_eLOC0[1]);
m_outputTree->Branch("eLOC1_flt", &m_eLOC1[1]);
m_outputTree->Branch("ePHI_flt", &m_ePHI[1]);
m_outputTree->Branch("eTHETA_flt", &m_eTHETA[1]);
m_outputTree->Branch("eQOP_flt", &m_eQOP[1]);
m_outputTree->Branch("eT_flt", &m_eT[1]);
m_outputTree->Branch("res_eLOC0_flt", &m_res_eLOC0[1]);
m_outputTree->Branch("res_eLOC1_flt", &m_res_eLOC1[1]);
m_outputTree->Branch("res_ePHI_flt", &m_res_ePHI[1]);
m_outputTree->Branch("res_eTHETA_flt", &m_res_eTHETA[1]);
m_outputTree->Branch("res_eQOP_flt", &m_res_eQOP[1]);
m_outputTree->Branch("res_eT_flt", &m_res_eT[1]);
m_outputTree->Branch("err_eLOC0_flt", &m_err_eLOC0[1]);
m_outputTree->Branch("err_eLOC1_flt", &m_err_eLOC1[1]);
m_outputTree->Branch("err_ePHI_flt", &m_err_ePHI[1]);
m_outputTree->Branch("err_eTHETA_flt", &m_err_eTHETA[1]);
m_outputTree->Branch("err_eQOP_flt", &m_err_eQOP[1]);
m_outputTree->Branch("err_eT_flt", &m_err_eT[1]);
m_outputTree->Branch("pull_eLOC0_flt", &m_pull_eLOC0[1]);
m_outputTree->Branch("pull_eLOC1_flt", &m_pull_eLOC1[1]);
m_outputTree->Branch("pull_ePHI_flt", &m_pull_ePHI[1]);
m_outputTree->Branch("pull_eTHETA_flt", &m_pull_eTHETA[1]);
m_outputTree->Branch("pull_eQOP_flt", &m_pull_eQOP[1]);
m_outputTree->Branch("pull_eT_flt", &m_pull_eT[1]);
m_outputTree->Branch("g_x_flt", &m_x[1]);
m_outputTree->Branch("g_y_flt", &m_y[1]);
m_outputTree->Branch("g_z_flt", &m_z[1]);
m_outputTree->Branch("px_flt", &m_px[1]);
m_outputTree->Branch("py_flt", &m_py[1]);
m_outputTree->Branch("pz_flt", &m_pz[1]);
m_outputTree->Branch("eta_flt", &m_eta[1]);
m_outputTree->Branch("pT_flt", &m_pT[1]);
m_outputTree->Branch("nSmoothed", &m_nParams[2]);
m_outputTree->Branch("smoothed", &m_hasParams[2]);
m_outputTree->Branch("eLOC0_smt", &m_eLOC0[2]);
m_outputTree->Branch("eLOC1_smt", &m_eLOC1[2]);
m_outputTree->Branch("ePHI_smt", &m_ePHI[2]);
m_outputTree->Branch("eTHETA_smt", &m_eTHETA[2]);
m_outputTree->Branch("eQOP_smt", &m_eQOP[2]);
m_outputTree->Branch("eT_smt", &m_eT[2]);
m_outputTree->Branch("res_eLOC0_smt", &m_res_eLOC0[2]);
m_outputTree->Branch("res_eLOC1_smt", &m_res_eLOC1[2]);
m_outputTree->Branch("res_ePHI_smt", &m_res_ePHI[2]);
m_outputTree->Branch("res_eTHETA_smt", &m_res_eTHETA[2]);
m_outputTree->Branch("res_eQOP_smt", &m_res_eQOP[2]);
m_outputTree->Branch("res_eT_smt", &m_res_eT[2]);
m_outputTree->Branch("err_eLOC0_smt", &m_err_eLOC0[2]);
m_outputTree->Branch("err_eLOC1_smt", &m_err_eLOC1[2]);
m_outputTree->Branch("err_ePHI_smt", &m_err_ePHI[2]);
m_outputTree->Branch("err_eTHETA_smt", &m_err_eTHETA[2]);
m_outputTree->Branch("err_eQOP_smt", &m_err_eQOP[2]);
m_outputTree->Branch("err_eT_smt", &m_err_eT[2]);
m_outputTree->Branch("pull_eLOC0_smt", &m_pull_eLOC0[2]);
m_outputTree->Branch("pull_eLOC1_smt", &m_pull_eLOC1[2]);
m_outputTree->Branch("pull_ePHI_smt", &m_pull_ePHI[2]);
m_outputTree->Branch("pull_eTHETA_smt", &m_pull_eTHETA[2]);
m_outputTree->Branch("pull_eQOP_smt", &m_pull_eQOP[2]);
m_outputTree->Branch("pull_eT_smt", &m_pull_eT[2]);
m_outputTree->Branch("g_x_smt", &m_x[2]);
m_outputTree->Branch("g_y_smt", &m_y[2]);
m_outputTree->Branch("g_z_smt", &m_z[2]);
m_outputTree->Branch("px_smt", &m_px[2]);
m_outputTree->Branch("py_smt", &m_py[2]);
m_outputTree->Branch("pz_smt", &m_pz[2]);
m_outputTree->Branch("eta_smt", &m_eta[2]);
m_outputTree->Branch("pT_smt", &m_pT[2]);
m_outputTree->Branch("chi2", &m_chi2);
m_outputTree = new TTree("tree", "tree");
m_outputTree->Branch("event_nr", &m_eventNr);
m_outputTree->Branch("multiTraj_nr", &m_multiTrajNr);
m_outputTree->Branch("subTraj_nr", &m_subTrajNr);
m_outputTree->Branch("t_x", &m_t_x);
m_outputTree->Branch("t_y", &m_t_y);
m_outputTree->Branch("t_z", &m_t_z);
m_outputTree->Branch("t_dx", &m_t_dx);
m_outputTree->Branch("t_dy", &m_t_dy);
m_outputTree->Branch("t_dz", &m_t_dz);
m_outputTree->Branch("t_eLOC0", &m_t_eLOC0);
m_outputTree->Branch("t_eLOC1", &m_t_eLOC1);
m_outputTree->Branch("t_ePHI", &m_t_ePHI);
m_outputTree->Branch("t_eTHETA", &m_t_eTHETA);
m_outputTree->Branch("t_eQOP", &m_t_eQOP);
m_outputTree->Branch("t_eT", &m_t_eT);
m_outputTree->Branch("nStates", &m_nStates);
m_outputTree->Branch("nMeasurements", &m_nMeasurements);
m_outputTree->Branch("volume_id", &m_volumeID);
m_outputTree->Branch("layer_id", &m_layerID);
m_outputTree->Branch("module_id", &m_moduleID);
m_outputTree->Branch("station", &m_station);
m_outputTree->Branch("layer", &m_layer);
m_outputTree->Branch("phi_module", &m_phi_module);
m_outputTree->Branch("eta_module", &m_eta_module);
m_outputTree->Branch("side", &m_side);
m_outputTree->Branch("pathLength", &m_pathLength);
m_outputTree->Branch("l_x_hit", &m_lx_hit);
m_outputTree->Branch("l_y_hit", &m_ly_hit);
m_outputTree->Branch("g_x_hit", &m_x_hit);
m_outputTree->Branch("g_y_hit", &m_y_hit);
m_outputTree->Branch("g_z_hit", &m_z_hit);
m_outputTree->Branch("res_x_hit", &m_res_x_hit);
m_outputTree->Branch("res_y_hit", &m_res_y_hit);
m_outputTree->Branch("err_x_hit", &m_err_x_hit);
m_outputTree->Branch("err_y_hit", &m_err_y_hit);
m_outputTree->Branch("pull_x_hit", &m_pull_x_hit);
m_outputTree->Branch("pull_y_hit", &m_pull_y_hit);
m_outputTree->Branch("dim_hit", &m_dim_hit);
m_outputTree->Branch("nPredicted", &m_nParams[0]);
m_outputTree->Branch("predicted", &m_hasParams[0]);
m_outputTree->Branch("eLOC0_prt", &m_eLOC0[0]);
m_outputTree->Branch("eLOC1_prt", &m_eLOC1[0]);
m_outputTree->Branch("ePHI_prt", &m_ePHI[0]);
m_outputTree->Branch("eTHETA_prt", &m_eTHETA[0]);
m_outputTree->Branch("eQOP_prt", &m_eQOP[0]);
m_outputTree->Branch("eT_prt", &m_eT[0]);
m_outputTree->Branch("res_eLOC0_prt", &m_res_eLOC0[0]);
m_outputTree->Branch("res_eLOC1_prt", &m_res_eLOC1[0]);
m_outputTree->Branch("res_ePHI_prt", &m_res_ePHI[0]);
m_outputTree->Branch("res_eTHETA_prt", &m_res_eTHETA[0]);
m_outputTree->Branch("res_eQOP_prt", &m_res_eQOP[0]);
m_outputTree->Branch("res_eT_prt", &m_res_eT[0]);
m_outputTree->Branch("err_eLOC0_prt", &m_err_eLOC0[0]);
m_outputTree->Branch("err_eLOC1_prt", &m_err_eLOC1[0]);
m_outputTree->Branch("err_ePHI_prt", &m_err_ePHI[0]);
m_outputTree->Branch("err_eTHETA_prt", &m_err_eTHETA[0]);
m_outputTree->Branch("err_eQOP_prt", &m_err_eQOP[0]);
m_outputTree->Branch("err_eT_prt", &m_err_eT[0]);
m_outputTree->Branch("pull_eLOC0_prt", &m_pull_eLOC0[0]);
m_outputTree->Branch("pull_eLOC1_prt", &m_pull_eLOC1[0]);
m_outputTree->Branch("pull_ePHI_prt", &m_pull_ePHI[0]);
m_outputTree->Branch("pull_eTHETA_prt", &m_pull_eTHETA[0]);
m_outputTree->Branch("pull_eQOP_prt", &m_pull_eQOP[0]);
m_outputTree->Branch("pull_eT_prt", &m_pull_eT[0]);
m_outputTree->Branch("g_x_prt", &m_x[0]);
m_outputTree->Branch("g_y_prt", &m_y[0]);
m_outputTree->Branch("g_z_prt", &m_z[0]);
m_outputTree->Branch("px_prt", &m_px[0]);
m_outputTree->Branch("py_prt", &m_py[0]);
m_outputTree->Branch("pz_prt", &m_pz[0]);
m_outputTree->Branch("eta_prt", &m_eta[0]);
m_outputTree->Branch("pT_prt", &m_pT[0]);
m_outputTree->Branch("nFiltered", &m_nParams[1]);
m_outputTree->Branch("filtered", &m_hasParams[1]);
m_outputTree->Branch("eLOC0_flt", &m_eLOC0[1]);
m_outputTree->Branch("eLOC1_flt", &m_eLOC1[1]);
m_outputTree->Branch("ePHI_flt", &m_ePHI[1]);
m_outputTree->Branch("eTHETA_flt", &m_eTHETA[1]);
m_outputTree->Branch("eQOP_flt", &m_eQOP[1]);
m_outputTree->Branch("eT_flt", &m_eT[1]);
m_outputTree->Branch("res_eLOC0_flt", &m_res_eLOC0[1]);
m_outputTree->Branch("res_eLOC1_flt", &m_res_eLOC1[1]);
m_outputTree->Branch("res_ePHI_flt", &m_res_ePHI[1]);
m_outputTree->Branch("res_eTHETA_flt", &m_res_eTHETA[1]);
m_outputTree->Branch("res_eQOP_flt", &m_res_eQOP[1]);
m_outputTree->Branch("res_eT_flt", &m_res_eT[1]);
m_outputTree->Branch("err_eLOC0_flt", &m_err_eLOC0[1]);
m_outputTree->Branch("err_eLOC1_flt", &m_err_eLOC1[1]);
m_outputTree->Branch("err_ePHI_flt", &m_err_ePHI[1]);
m_outputTree->Branch("err_eTHETA_flt", &m_err_eTHETA[1]);
m_outputTree->Branch("err_eQOP_flt", &m_err_eQOP[1]);
m_outputTree->Branch("err_eT_flt", &m_err_eT[1]);
m_outputTree->Branch("pull_eLOC0_flt", &m_pull_eLOC0[1]);
m_outputTree->Branch("pull_eLOC1_flt", &m_pull_eLOC1[1]);
m_outputTree->Branch("pull_ePHI_flt", &m_pull_ePHI[1]);
m_outputTree->Branch("pull_eTHETA_flt", &m_pull_eTHETA[1]);
m_outputTree->Branch("pull_eQOP_flt", &m_pull_eQOP[1]);
m_outputTree->Branch("pull_eT_flt", &m_pull_eT[1]);
m_outputTree->Branch("g_x_flt", &m_x[1]);
m_outputTree->Branch("g_y_flt", &m_y[1]);
m_outputTree->Branch("g_z_flt", &m_z[1]);
m_outputTree->Branch("px_flt", &m_px[1]);
m_outputTree->Branch("py_flt", &m_py[1]);
m_outputTree->Branch("pz_flt", &m_pz[1]);
m_outputTree->Branch("eta_flt", &m_eta[1]);
m_outputTree->Branch("pT_flt", &m_pT[1]);
m_outputTree->Branch("nSmoothed", &m_nParams[2]);
m_outputTree->Branch("smoothed", &m_hasParams[2]);
m_outputTree->Branch("eLOC0_smt", &m_eLOC0[2]);
m_outputTree->Branch("eLOC1_smt", &m_eLOC1[2]);
m_outputTree->Branch("ePHI_smt", &m_ePHI[2]);
m_outputTree->Branch("eTHETA_smt", &m_eTHETA[2]);
m_outputTree->Branch("eQOP_smt", &m_eQOP[2]);
m_outputTree->Branch("eT_smt", &m_eT[2]);
m_outputTree->Branch("res_eLOC0_smt", &m_res_eLOC0[2]);
m_outputTree->Branch("res_eLOC1_smt", &m_res_eLOC1[2]);
m_outputTree->Branch("res_ePHI_smt", &m_res_ePHI[2]);
m_outputTree->Branch("res_eTHETA_smt", &m_res_eTHETA[2]);
m_outputTree->Branch("res_eQOP_smt", &m_res_eQOP[2]);
m_outputTree->Branch("res_eT_smt", &m_res_eT[2]);
m_outputTree->Branch("err_eLOC0_smt", &m_err_eLOC0[2]);
m_outputTree->Branch("err_eLOC1_smt", &m_err_eLOC1[2]);
m_outputTree->Branch("err_ePHI_smt", &m_err_ePHI[2]);
m_outputTree->Branch("err_eTHETA_smt", &m_err_eTHETA[2]);
m_outputTree->Branch("err_eQOP_smt", &m_err_eQOP[2]);
m_outputTree->Branch("err_eT_smt", &m_err_eT[2]);
m_outputTree->Branch("pull_eLOC0_smt", &m_pull_eLOC0[2]);
m_outputTree->Branch("pull_eLOC1_smt", &m_pull_eLOC1[2]);
m_outputTree->Branch("pull_ePHI_smt", &m_pull_ePHI[2]);
m_outputTree->Branch("pull_eTHETA_smt", &m_pull_eTHETA[2]);
m_outputTree->Branch("pull_eQOP_smt", &m_pull_eQOP[2]);
m_outputTree->Branch("pull_eT_smt", &m_pull_eT[2]);
m_outputTree->Branch("g_x_smt", &m_x[2]);
m_outputTree->Branch("g_y_smt", &m_y[2]);
m_outputTree->Branch("g_z_smt", &m_z[2]);
m_outputTree->Branch("px_smt", &m_px[2]);
m_outputTree->Branch("py_smt", &m_py[2]);
m_outputTree->Branch("pz_smt", &m_pz[2]);
m_outputTree->Branch("eta_smt", &m_eta[2]);
m_outputTree->Branch("pT_smt", &m_pT[2]);
m_outputTree->Branch("chi2", &m_chi2);
}
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
StatusCode RootTrajectoryStatesWriterTool::finalize() { StatusCode RootTrajectoryStatesWriterTool::finalize() {
m_outputFile->cd(); if (!m_noDiagnostics) {
m_outputTree->Write(); m_outputFile->cd();
m_outputFile->Close(); m_outputTree->Write();
m_outputFile->Close();
}
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
......
...@@ -32,94 +32,98 @@ RootTrajectorySummaryWriterTool::RootTrajectorySummaryWriterTool( ...@@ -32,94 +32,98 @@ RootTrajectorySummaryWriterTool::RootTrajectorySummaryWriterTool(
StatusCode RootTrajectorySummaryWriterTool::initialize() { StatusCode RootTrajectorySummaryWriterTool::initialize() {
ATH_CHECK(m_simDataCollectionKey.initialize()); if (!m_noDiagnostics) {
ATH_CHECK(m_mcEventCollectionKey.initialize()); ATH_CHECK(m_simDataCollectionKey.initialize());
ATH_CHECK(detStore()->retrieve(m_idHelper, "FaserSCT_ID")); ATH_CHECK(m_mcEventCollectionKey.initialize());
ATH_CHECK(detStore()->retrieve(m_idHelper, "FaserSCT_ID"));
std::string filePath = m_filePath;
std::string treeName = m_treeName; std::string filePath = m_filePath;
m_outputFile = TFile::Open(filePath.c_str(), "RECREATE"); std::string treeName = m_treeName;
if (m_outputFile == nullptr) { m_outputFile = TFile::Open(filePath.c_str(), "RECREATE");
ATH_MSG_WARNING("Unable to open output file at " << m_filePath); if (m_outputFile == nullptr) {
return StatusCode::RECOVERABLE; ATH_MSG_WARNING("Unable to open output file at " << m_filePath);
} return StatusCode::RECOVERABLE;
m_outputFile->cd(); }
m_outputTree = new TTree(treeName.c_str(), treeName.c_str()); m_outputFile->cd();
if (m_outputTree == nullptr) { m_outputTree = new TTree(treeName.c_str(), treeName.c_str());
ATH_MSG_ERROR("Unable to create TTree"); if (m_outputTree == nullptr) {
return StatusCode::FAILURE; ATH_MSG_ERROR("Unable to create TTree");
} return StatusCode::FAILURE;
}
m_outputTree = new TTree("tree", "tree"); m_outputTree = new TTree("tree", "tree");
m_outputTree->Branch("event_nr", &m_eventNr); m_outputTree->Branch("event_nr", &m_eventNr);
m_outputTree->Branch("multiTraj_nr", &m_multiTrajNr); m_outputTree->Branch("multiTraj_nr", &m_multiTrajNr);
m_outputTree->Branch("subTraj_nr", &m_subTrajNr); m_outputTree->Branch("subTraj_nr", &m_subTrajNr);
m_outputTree->Branch("nStates", &m_nStates); m_outputTree->Branch("nStates", &m_nStates);
m_outputTree->Branch("nMeasurements", &m_nMeasurements); m_outputTree->Branch("nMeasurements", &m_nMeasurements);
m_outputTree->Branch("nOutliers", &m_nOutliers); m_outputTree->Branch("nOutliers", &m_nOutliers);
m_outputTree->Branch("nHoles", &m_nHoles); m_outputTree->Branch("nHoles", &m_nHoles);
m_outputTree->Branch("nSharedHits", &m_nSharedHits); m_outputTree->Branch("nSharedHits", &m_nSharedHits);
m_outputTree->Branch("chi2Sum", &m_chi2Sum); m_outputTree->Branch("chi2Sum", &m_chi2Sum);
m_outputTree->Branch("NDF", &m_NDF); m_outputTree->Branch("NDF", &m_NDF);
m_outputTree->Branch("measurementChi2", &m_measurementChi2); m_outputTree->Branch("measurementChi2", &m_measurementChi2);
m_outputTree->Branch("outlierChi2", &m_outlierChi2); m_outputTree->Branch("outlierChi2", &m_outlierChi2);
m_outputTree->Branch("measurementVolume", &m_measurementVolume); m_outputTree->Branch("measurementVolume", &m_measurementVolume);
m_outputTree->Branch("measurementLayer", &m_measurementLayer); m_outputTree->Branch("measurementLayer", &m_measurementLayer);
m_outputTree->Branch("outlierVolume", &m_outlierVolume); m_outputTree->Branch("outlierVolume", &m_outlierVolume);
m_outputTree->Branch("outlierLayer", &m_outlierLayer); m_outputTree->Branch("outlierLayer", &m_outlierLayer);
m_outputTree->Branch("nMajorityHits", &m_nMajorityHits); m_outputTree->Branch("nMajorityHits", &m_nMajorityHits);
m_outputTree->Branch("majorityParticleId", &m_majorityParticleId); m_outputTree->Branch("majorityParticleId", &m_majorityParticleId);
m_outputTree->Branch("t_charge", &m_t_charge); m_outputTree->Branch("t_charge", &m_t_charge);
m_outputTree->Branch("t_time", &m_t_time); m_outputTree->Branch("t_time", &m_t_time);
m_outputTree->Branch("t_vx", &m_t_vx); m_outputTree->Branch("t_vx", &m_t_vx);
m_outputTree->Branch("t_vy", &m_t_vy); m_outputTree->Branch("t_vy", &m_t_vy);
m_outputTree->Branch("t_vz", &m_t_vz); m_outputTree->Branch("t_vz", &m_t_vz);
m_outputTree->Branch("t_px", &m_t_px); m_outputTree->Branch("t_px", &m_t_px);
m_outputTree->Branch("t_py", &m_t_py); m_outputTree->Branch("t_py", &m_t_py);
m_outputTree->Branch("t_pz", &m_t_pz); m_outputTree->Branch("t_pz", &m_t_pz);
m_outputTree->Branch("t_theta", &m_t_theta); m_outputTree->Branch("t_theta", &m_t_theta);
m_outputTree->Branch("t_phi", &m_t_phi); m_outputTree->Branch("t_phi", &m_t_phi);
m_outputTree->Branch("t_eta", &m_t_eta); m_outputTree->Branch("t_eta", &m_t_eta);
m_outputTree->Branch("t_p", &m_t_p); m_outputTree->Branch("t_p", &m_t_p);
m_outputTree->Branch("t_pT", &m_t_pT); m_outputTree->Branch("t_pT", &m_t_pT);
m_outputTree->Branch("hasFittedParams", &m_hasFittedParams); m_outputTree->Branch("hasFittedParams", &m_hasFittedParams);
m_outputTree->Branch("eLOC0_fit", &m_eLOC0_fit); m_outputTree->Branch("eLOC0_fit", &m_eLOC0_fit);
m_outputTree->Branch("eLOC1_fit", &m_eLOC1_fit); m_outputTree->Branch("eLOC1_fit", &m_eLOC1_fit);
m_outputTree->Branch("ePHI_fit", &m_ePHI_fit); m_outputTree->Branch("ePHI_fit", &m_ePHI_fit);
m_outputTree->Branch("eTHETA_fit", &m_eTHETA_fit); m_outputTree->Branch("eTHETA_fit", &m_eTHETA_fit);
m_outputTree->Branch("eQOP_fit", &m_eQOP_fit); m_outputTree->Branch("eQOP_fit", &m_eQOP_fit);
m_outputTree->Branch("eT_fit", &m_eT_fit); m_outputTree->Branch("eT_fit", &m_eT_fit);
m_outputTree->Branch("err_eLOC0_fit", &m_err_eLOC0_fit); m_outputTree->Branch("err_eLOC0_fit", &m_err_eLOC0_fit);
m_outputTree->Branch("err_eLOC1_fit", &m_err_eLOC1_fit); m_outputTree->Branch("err_eLOC1_fit", &m_err_eLOC1_fit);
m_outputTree->Branch("err_ePHI_fit", &m_err_ePHI_fit); m_outputTree->Branch("err_ePHI_fit", &m_err_ePHI_fit);
m_outputTree->Branch("err_eTHETA_fit", &m_err_eTHETA_fit); m_outputTree->Branch("err_eTHETA_fit", &m_err_eTHETA_fit);
m_outputTree->Branch("err_eQOP_fit", &m_err_eQOP_fit); m_outputTree->Branch("err_eQOP_fit", &m_err_eQOP_fit);
m_outputTree->Branch("err_eT_fit", &m_err_eT_fit); m_outputTree->Branch("err_eT_fit", &m_err_eT_fit);
m_outputTree->Branch("res_eLOC0_fit", &m_res_eLOC0_fit); m_outputTree->Branch("res_eLOC0_fit", &m_res_eLOC0_fit);
m_outputTree->Branch("res_eLOC1_fit", &m_res_eLOC1_fit); m_outputTree->Branch("res_eLOC1_fit", &m_res_eLOC1_fit);
m_outputTree->Branch("res_ePHI_fit", &m_res_ePHI_fit); m_outputTree->Branch("res_ePHI_fit", &m_res_ePHI_fit);
m_outputTree->Branch("res_eTHETA_fit", &m_res_eTHETA_fit); m_outputTree->Branch("res_eTHETA_fit", &m_res_eTHETA_fit);
m_outputTree->Branch("res_eQOP_fit", &m_res_eQOP_fit); m_outputTree->Branch("res_eQOP_fit", &m_res_eQOP_fit);
m_outputTree->Branch("res_eT_fit", &m_res_eT_fit); m_outputTree->Branch("res_eT_fit", &m_res_eT_fit);
m_outputTree->Branch("pull_eLOC0_fit", &m_pull_eLOC0_fit); m_outputTree->Branch("pull_eLOC0_fit", &m_pull_eLOC0_fit);
m_outputTree->Branch("pull_eLOC1_fit", &m_pull_eLOC1_fit); m_outputTree->Branch("pull_eLOC1_fit", &m_pull_eLOC1_fit);
m_outputTree->Branch("pull_ePHI_fit", &m_pull_ePHI_fit); m_outputTree->Branch("pull_ePHI_fit", &m_pull_ePHI_fit);
m_outputTree->Branch("pull_eTHETA_fit", &m_pull_eTHETA_fit); m_outputTree->Branch("pull_eTHETA_fit", &m_pull_eTHETA_fit);
m_outputTree->Branch("pull_eQOP_fit", &m_pull_eQOP_fit); m_outputTree->Branch("pull_eQOP_fit", &m_pull_eQOP_fit);
m_outputTree->Branch("pull_eT_fit", &m_pull_eT_fit); m_outputTree->Branch("pull_eT_fit", &m_pull_eT_fit);
}
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
StatusCode RootTrajectorySummaryWriterTool::finalize() { StatusCode RootTrajectorySummaryWriterTool::finalize() {
m_outputFile->cd(); if (!m_noDiagnostics) {
m_outputTree->Write(); m_outputFile->cd();
m_outputFile->Close(); m_outputTree->Write();
m_outputFile->Close();
}
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
......
...@@ -6,25 +6,22 @@ from AthenaCommon.Constants import DEBUG, VERBOSE, INFO ...@@ -6,25 +6,22 @@ from AthenaCommon.Constants import DEBUG, VERBOSE, INFO
from AthenaCommon.Configurable import Configurable from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags from CalypsoConfiguration.AllConfigFlags import ConfigFlags
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
from WaveRecAlgs.WaveRecAlgsConfig import WaveformReconstructionCfg from FaserByteStreamCnvSvc.FaserByteStreamCnvSvcConfig import FaserByteStreamCnvSvcCfg
from TrackerPrepRawDataFormation.TrackerPrepRawDataFormationConfig import FaserSCT_ClusterizationCfg from TrackerPrepRawDataFormation.TrackerPrepRawDataFormationConfig import FaserSCT_ClusterizationCfg
from TrackerSpacePointFormation.TrackerSpacePointFormationConfig import TrackerSpacePointFinderCfg
from TrackerSeedFinder.TrackerSeedFinderConfig import TrackerSeedFinderCfg
from FaserActsKalmanFilter.CombinatorialKalmanFilterConfig import CombinatorialKalmanFilterCfg from FaserActsKalmanFilter.CombinatorialKalmanFilterConfig import CombinatorialKalmanFilterCfg
from TrackerSegmentFit.TrackerSegmentFitConfig import SegmentFitAlgCfg
log.setLevel(DEBUG) log.setLevel(DEBUG)
Configurable.configurableRun3Behavior = True Configurable.configurableRun3Behavior = True
ConfigFlags.Input.Files = ['/eos/project-f/faser-commissioning/TI12Data/Run-004411/Faser-Physics-004411-00000.raw'] ConfigFlags.Input.Files = ['/home/tboeckh/Documents/data/raw/TI12/MiddleStationTrack.raw']
ConfigFlags.Output.ESDFileName = "myCKF.ESD.pool.root" ConfigFlags.Output.ESDFileName = "CKF.ESD.pool.root"
ConfigFlags.Output.AODFileName = "myCKF.AOD.pool.root"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-01" ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-01"
ConfigFlags.IOVDb.DatabaseInstance = "OFLP200" # Use MC conditions for now ConfigFlags.IOVDb.DatabaseInstance = "OFLP200"
ConfigFlags.Input.ProjectName = "data21" # Needed to bypass autoconfig ConfigFlags.Input.ProjectName = "data21"
ConfigFlags.Input.isMC = False # Needed to bypass autoconfig ConfigFlags.Input.isMC = False
ConfigFlags.GeoModel.FaserVersion = "FASER-01" # FASER geometry ConfigFlags.GeoModel.FaserVersion = "FASER-01"
ConfigFlags.Common.isOnline = False ConfigFlags.Common.isOnline = False
ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.Beam.NumberOfCollisions = 0. ConfigFlags.Beam.NumberOfCollisions = 0.
...@@ -32,24 +29,26 @@ ConfigFlags.Detector.GeometryFaserSCT = True ...@@ -32,24 +29,26 @@ ConfigFlags.Detector.GeometryFaserSCT = True
ConfigFlags.lock() ConfigFlags.lock()
acc = MainServicesCfg(ConfigFlags) acc = MainServicesCfg(ConfigFlags)
#acc.merge(PoolReadCfg(ConfigFlags))
acc.merge(PoolWriteCfg(ConfigFlags)) acc.merge(PoolWriteCfg(ConfigFlags))
from FaserByteStreamCnvSvc.FaserByteStreamCnvSvcConfig import FaserByteStreamCnvSvcCfg
acc.merge(FaserByteStreamCnvSvcCfg(ConfigFlags)) acc.merge(FaserByteStreamCnvSvcCfg(ConfigFlags))
acc.merge(WaveformReconstructionCfg(ConfigFlags)) acc.merge(FaserSCT_ClusterizationCfg(ConfigFlags, DataObjectName="SCT_LEVELMODE_RDOs", ClusterToolTimingPattern="X1X"))
acc.merge(FaserSCT_ClusterizationCfg(ConfigFlags, DataObjectName="SCT_EDGEMODE_RDOs")) acc.merge(SegmentFitAlgCfg(ConfigFlags))
acc.merge(TrackerSpacePointFinderCfg(ConfigFlags)) acc.merge(CombinatorialKalmanFilterCfg(ConfigFlags, noDiagnostics=True))
acc.merge(TrackerSeedFinderCfg(ConfigFlags))
acc.merge(CombinatorialKalmanFilterCfg(ConfigFlags))
logging.getLogger('forcomps').setLevel(VERBOSE) # logging.getLogger('forcomps').setLevel(VERBOSE)
acc.foreach_component("*").OutputLevel = VERBOSE # acc.foreach_component("*").OutputLevel = VERBOSE
acc.foreach_component("*ClassID*").OutputLevel = INFO # acc.foreach_component("*ClassID*").OutputLevel = INFO
acc.getService("StoreGateSvc").Dump = True # acc.getService("StoreGateSvc").Dump = True
acc.getService("ConditionStore").Dump = True # acc.getService("ConditionStore").Dump = True
acc.printConfig(withDetails=True) # acc.printConfig(withDetails=True)
ConfigFlags.dump() # ConfigFlags.dump()
sc = acc.run(maxEvents=-1) # Hack to avoid problem with our use of MC databases when isMC = False
replicaSvc = acc.getService("DBReplicaSvc")
replicaSvc.COOLSQLiteVetoPattern = ""
replicaSvc.UseCOOLSQLite = True
replicaSvc.UseCOOLFrontier = False
replicaSvc.UseGeomSQLite = True
sc = acc.run(maxEvents=-1)
sys.exit(not sc.isSuccess()) sys.exit(not sc.isSuccess())
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