29 m_tdt(
"Trig::TrigDecisionTool/TrigDecisionTool"),
46 msg(MSG::INFO) <<
"TrigIDR4Mon::TrigIDR4Mon() compiled: " << __DATE__ <<
" " << __TIME__ <<
endmsg;
115 msg(MSG::INFO) <<
"TrigIDR4Mon::TrigIDR4Mon() exiting " << gDirectory->GetName() <<
endmsg;
135 msg(MSG::DEBUG) <<
" ----- enter initialize() ----- " <<
endmsg;
137 msg(MSG::INFO) <<
"TrigIDR4Mon::initialize() " << gDirectory->GetName() <<
" " <<
m_sliceTag <<
endmsg;
144 std::cout <<
"TrigIDR4Mon::name = " << name() << std::endl;
145 std::cout <<
"TrigIDR4Mon::SliceTag = " <<
m_sliceTag << std::endl;
147 std::cout <<
"TrigIDR4Mon::Legacy = " <<
m_legacy << std::endl;
173 ATH_MSG_INFO(
" TrigIDR4Mon::book() " << gDirectory->GetName() );
183 std::string lastvtx =
"";
188 std::vector<std::string> chains;
195 std::vector<ToolHandle<GenericMonitoringTool>*> monTools;
198 ToolHandleArray<GenericMonitoringTool>::iterator toolitr =
m_monTools.begin();;
212 if ( chainName.
head() ==
"" ) {
214 std::string selectChain = chainName.
raw();
221 if (std::find(chains.begin(), chains.end(), selectChain) == chains.end()) {
222 chains.push_back( selectChain );
223 monTools.push_back( &(*toolitr) );
230 if ( chainName.
head().find(
"HLT_")==std::string::npos ) {
239 std::string selectChain = chainName.
head();
245 if ( selectChain==
"" ) {
246 msg(MSG::WARNING) <<
"^[[91;1m" <<
"No chain matched\tchain input " << chainName.
head() <<
" : " << chainName.
tail() <<
"^[[m"<<
endmsg;
251 std::string mchain = selectChain;
253 if ( chainName.
tail()!=
"" ) mchain +=
"/"+chainName.
tail();
254 if ( chainName.
roi()!=
"" ) mchain +=
"_"+chainName.
roi();
255 if ( chainName.
vtx()!=
"" ) mchain +=
"_"+chainName.
vtx();
257 if ( chainName.
extra()!=
"" ) mchain +=
"_"+chainName.
extra();
259 selectChain = chainName.
subs( selectChain );
261 if ( std::find(chains.begin(), chains.end(), selectChain) == chains.end() ) {
262 chains.push_back( selectChain );
263 monTools.push_back( &(*toolitr) );
278 return StatusCode::SUCCESS;
295 static std::once_flag flag;
296 std::call_once(flag, [&]() {
297 for (
unsigned i=0 ; i<selectChains.size() ; i++ ) {
298 ATH_MSG_DEBUG(
"\tchain " << selectChains[i] <<
" from TDT" );
301 for (
size_t i=selectChains.size() ; i-- ; ) {
303 ATH_MSG_INFO(
"^[[91;1m" <<
"configured chain " << selectChains[i] <<
"^[[m" );
309 for (
unsigned i=0 ; i<selectChains.size() ; i++ ) {
311 ATH_MSG_DEBUG(
"chain " << selectChains[i] <<
"\tpass: " << isPassed[i] <<
"\tprescale: " <<
m_tdt->getPrescale(selectChains[i]) );
322 return StatusCode::SUCCESS;
338 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
emacs: this is -* c++ -*-
emacs: this is -*- c++ -*-
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool msgLvl(const MSG::Level lvl) const
virtual StatusCode initialize() override
initialize
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
const std::string & extra() const
const std::string & roi() const
std::string subs(std::string s) const
const std::string & raw() const
const std::string & head() const
const std::string & tail() const
const std::string & vtx() const
const std::string & element() const
ToolHandle< Trig::TrigDecisionTool > m_tdt
double m_fiducial_radius
ntuple building variables
ToolHandleArray< GenericMonitoringTool > m_monTools
int m_vtxIndex
if performing the vertex analysis, the index of the offline vertex to look for
int m_selectParentTruthPdgId
SG::ReadHandleKeyArray< xAOD::VertexContainer > m_vtxdummykeys
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_trackdummykeys
std::string m_releaseMetaData
virtual StatusCode fillHistograms(const EventContext &context) const override
adds event to the monitoring histograms
std::string m_analysis_config
std::string m_sliceTag
additional string for the histogram directory
bool m_fileopen
if an ntple file open?
virtual StatusCode bookHistograms()
std::string m_outputFileName
std::vector< std::string > m_chainNames
do we need this ??? why not the base class ???
bool m_shifter
determine whether this should be treated as a shifter chain
std::vector< std::string > m_ntupleChainNames
virtual StatusCode finalize() override
virtual StatusCode initialize() override
initialize
bool m_runPurity
also run purity analyses
bool m_keepAllEvents
kepp events even if they fail the requested trigger chains
bool m_containTracks
do we want basic, or rigorous roi track containment
TrigIDR4Mon(const std::string &name, ISvcLocator *pSvcLocator)
bool m_useHighestPT
use only the highest pt tracks
std::vector< bool > isPassedForEach(unsigned int condition=TrigDefs::Physics) const
return vector with isPassed decision for each chain
std::vector< std::string > getListOfTriggers() const