ATLAS Offline Software
Loading...
Searching...
No Matches
TrackAnalysisDefinitionSvc.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
10
13
15#include <algorithm>
16#include <memory>
17#include <unordered_map>
18
21
22
27{
28
29 ATH_MSG_DEBUG( "Initialising using TEST = " << m_testTypeStr.value() <<
30 " and REFERENCE = " << m_refTypeStr.value() );
31
33 m_isTestTrigger = m_testTypeStr.value().find("Trigger") != std::string::npos;
34 m_isTestEFTrigger = m_testTypeStr.value().find("EFTrigger") != std::string::npos;
35 m_isTestTruth = m_testTypeStr.value().find("Truth") != std::string::npos;
36 m_isTestOffline = m_testTypeStr.value().find("Offline") != std::string::npos;
37
38 m_isRefTrigger = m_refTypeStr.value().find("Trigger") != std::string::npos;
39 m_isRefEFTrigger = m_refTypeStr.value().find("EFTrigger") != std::string::npos;
40 m_isRefTruth = m_refTypeStr.value().find("Truth") != std::string::npos;
41 m_isRefOffline = m_refTypeStr.value().find("Offline") != std::string::npos;
42
45 m_useTruth = m_isTestTruth or m_isRefTruth or m_matchingType.value().find("EFTruthMatch") != std::string::npos;;
46 ATH_MSG_DEBUG( "USE TRUTH? " << m_useTruth );
48
50 if( m_doTrigNavigation ) {
51 for( size_t ic=0 ; ic<m_chainNames.size() ; ic++ ) {
52 ATH_MSG_DEBUG( "Input chain : " << m_chainNames[ic] );
53 m_configuredChains.push_back( m_chainNames[ic] );
54 }
55 } else {
57 m_configuredChains.push_back( "Offline" );
58 }
59
63 m_configuredChains.end() ),
64 m_configuredChains.end() );
65
66 return StatusCode::SUCCESS;
67}
68
73 return StatusCode::SUCCESS;
74}
75
79std::string TrackAnalysisDefinitionSvc::plotsFullDir( std::string chain ) const
80{
82 std::string topDir( m_dirName );
83 if( not topDir.empty() ) topDir += "/";
84
86 if( not chain.empty() ) chain += "/";
87
89 std::string subDir( m_subFolder );
90 if( subDir.empty() ) {
91 ATH_MSG_WARNING( "Empty plots sub-directory" );
92 } else {
94 if( subDir[0] == '/' ) {
95 subDir.erase( subDir.begin() );
96 }
98 if( subDir.back() != '/' ) subDir += "/";
99 }
100
101 return m_sortPlotsByChain.value() ?
102 topDir + chain + subDir :
103 topDir + subDir + chain;
104}
105
110{
112 using methodMap_t = std::unordered_map<
114 methodMap_t methodMap = {
116 { "gaussFit" , IDPVM::ResolutionHelper::Gauss_fit },
119 };
120
121 methodMap_t::const_iterator mitr = methodMap.find( m_resolMethod.value() );
122 if( mitr == methodMap.end() ) {
123 ATH_MSG_DEBUG( "Method " << m_resolMethod.value() <<
124 " not found. Using iterRMS by default." );
126 }
127 return mitr->second;
128}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
AthService to hold (and propagate) the basic properties of each defined TrackAnalysis and of their hi...
virtual unsigned int resolutionMethod() const override
std::vector< std::string > m_configuredChains
virtual StatusCode finalize() override final
BooleanProperty m_sortPlotsByChain
histogram properties
virtual std::string plotsFullDir(std::string chain="") const override
virtual StatusCode initialize() override final
local includes
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.