|
ATLAS Offline Software
|
Go to the documentation of this file.
29 m_tdt(
"Trig::TrigDecisionTool/TrigDecisionTool"),
31 m_initialisePerRun(true),
33 m_keepAllEvents(false),
35 m_useHighestPT(false),
41 m_containTracks(false),
43 m_fiducial_radius(32),
44 m_requireDecision(false),
45 m_filter_on_roi(false)
47 msg(MSG::INFO) <<
"TrigR3Mon::TrigR3Mon() compiled: " << __DATE__ <<
" " << __TIME__ <<
endmsg;
152 std::cout <<
"TrigR3Mon::name = " <<
name() << std::endl;
153 std::cout <<
"TrigR3Mon::SliceTag = " <<
m_sliceTag << std::endl;
155 std::cout <<
"TrigR3Mon::Legacy = " <<
m_legacy << std::endl;
191 std::string lastvtx =
"";
200 if (
m_tdt->getNavigationFormat() ==
"TriggerElement" ) {
254 std::vector<std::string>
chains;
261 std::vector<ToolHandle<GenericMonitoringTool>*> monTools;
277 std::string selectChain =
chainName.raw();
283 chains.push_back( selectChain );
284 monTools.push_back( &(*toolitr) );
292 if (
chainName.head().find(
"HLT_")==std::string::npos ) {
299 std::string selectChain =
chainName.head();
305 if ( selectChain==
"" ) {
306 msg(MSG::WARNING) <<
"^[[91;1m" <<
"No chain matched\tchain input " <<
chainName.head() <<
" : " <<
chainName.tail() <<
"^[[m"<<
endmsg;
311 std::string mchain = selectChain;
318 if ( !
chainName.passed() ) mchain +=
"_DTE";
320 selectChain =
chainName.subs( selectChain );
323 std::cout <<
"\nTrigR3Mon::chain specification: " <<
chainName <<
"\t" <<
chainName.raw() << std::endl;
325 std::cout <<
"\tchain: " <<
chainName.head() << std::endl;
326 std::cout <<
"\tkey: " <<
chainName.tail() << std::endl;
327 std::cout <<
"\troi: " <<
chainName.roi() << std::endl;
328 std::cout <<
"\tvtx: " <<
chainName.vtx() << std::endl;
329 std::cout <<
"\tte: " <<
chainName.element() << std::endl;
330 std::cout <<
"\textra: " <<
chainName.extra() << std::endl;
335 int shifter_efid = 0;
339 int shifter_efid_run1 = 0;
347 if (
chainName.tail().find(
"_FTF")!=std::string::npos ) {
349 if ( shifter_ftf>=shifterChains ||
351 msg(
MSG::DEBUG) <<
"^[[91;1m" <<
"Matching chain " << selectChain <<
" excluded - Shifter chain already definied^[[m" <<
endmsg;
359 else if (
chainName.tail().find(
"_IDTrig")!=std::string::npos ||
chainName.tail().find(
"CosmicsN_EFID")!=std::string::npos ) {
362 if ( shifter_efid>shifterChains ) {
363 msg(
MSG::DEBUG) <<
"^[[91;1m" <<
"Matching chain " << selectChain <<
" excluded - Shifter chain already definied^[[m" <<
endmsg;
368 else if (
chainName.tail().find(
"_EFID")!=std::string::npos ) {
371 if ( shifter_efid_run1>shifterChains ) {
372 msg(
MSG::DEBUG) <<
"^[[91;1m" <<
"Matching chain " << selectChain <<
" excluded - Shifter chain already definied^[[m" <<
endmsg;
381 chains.push_back( selectChain );
382 monTools.push_back( &(*toolitr) );
395 std::vector<ChainString> allcs;
397 allcs.reserve(allchains.size());
401 std::vector<std::string> mtypes;
403 for (
size_t i=0 ;
i<allchains.size() ;
i++ ) {
405 if ( allcs.back().head().find(
"HLT_")==0 )
continue;
406 if ( allcs.back().head()==
"Offline" ) {
408 if ( allcs.back().tail()!=
"" ) {
409 if ( allcs.back().tail().find(
"+")==0 ) {
410 mtypes.push_back( allcs.back().tail().substr(1) );
411 ATH_MSG_INFO(
"Adding Offline reference collection: " << mtypes.back() );
414 if ( mtypes.size()<1 )
ATH_MSG_WARNING(
"Too Many reference collections : " << allcs.back().tail() );
416 mtypes.push_back( allcs.back().tail() );
417 ATH_MSG_INFO(
"Offline reference collection: " << mtypes.back() );
422 mtypes.push_back(
"" );
433 if ( probe.
extra().find(
"probe")!=std::string::npos ) {
435 std::string probe_key = probe.
extra().erase( probe.
extra().find(
"probe"), 5 ) ;
437 for (
size_t j=0 ; j<allchains.size() ; j++ ) {
442 if (
tag.head() != probe.
head() )
continue;
443 if (
tag.element() == probe.
element() )
continue;
444 if (
tag.extra().find(
"tag")==std::string::npos )
continue;
446 std::string tag_key =
tag.extra().erase(
tag.extra().find(
"tag"), 3 ) ;
448 if ( tag_key != probe_key )
continue;
451 double massMax = 150;
454 else tnp =
new TagNProbe(
"Offline", massMin, massMax );
476 filterTest, filterRef,
486 if ( mtypes.size()>0 ) analysis->
setTypes( mtypes );
500 std::string highestPT_str =
"";
501 std::string vtxindex_str =
"";
504 highestPT_str =
": using highest PT only";
510 vtxindex_str =
": searching for vertex index ";
544 return StatusCode::SUCCESS;
561 static std::once_flag
flag;
562 std::call_once(
flag, [&]() {
563 for (
unsigned i=0 ;
i<selectChains.size() ;
i++ ) {
567 for (
size_t i=selectChains.size() ;
i-- ; ) {
569 ATH_MSG_INFO(
"^[[91;1m" <<
"configured chain " << selectChains[
i] <<
"^[[m" );
575 for (
unsigned i=0 ;
i<selectChains.size() ;
i++ ) {
577 ATH_MSG_DEBUG(
"chain " << selectChains[
i] <<
"\tpass: " << isPassed[
i] <<
"\tprescale: " <<
m_tdt->getPrescale(selectChains[
i]) );
588 return StatusCode::SUCCESS;
606 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
void containTracks(bool b)
virtual StatusCode finalize() override
std::string find(const std::string &s)
return a remapped string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool m_shifter
determine whether this should be treated as a shifter chain
void setTypes(const std::vector< std::string > &t)
bool msgLvl(const MSG::Level lvl) const
std::vector< std::string > m_chainNames
#define ATH_MSG_VERBOSE(x)
std::vector< T_AnalysisConfig< AthReentrantAlgorithm > * > m_sequences
do we need this ??? why not the base class ???
std::vector< TrackFilter * > m_filters
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_trackdummykeys
virtual StatusCode initialize() override
initialize
bool m_useHighestPT
use only the highest pt tracks
Base class for Athena Monitoring Algorithms.
std::string extra() const
std::string m_outputFileName
ToolHandleArray< GenericMonitoringTool > m_monTools
bool m_containTracks
do we want basic, or rigorous roi track containment
emacs: this is -*- c++ -*-
SG::ReadHandleKeyArray< xAOD::VertexContainer > m_vtxdummykeys
int m_vtxIndex
if performing the vertex analysis, the index of the offline vertex to look for
int m_shifterChains
max number of shifter chains to use - must be < 2 at the moment
std::vector< std::string > m_ntupleChainNames
std::string m_analysis_config
::StatusCode StatusCode
StatusCode definition for legacy code.
void tag(const std::string &chainName)
getters and setters
std::string m_releaseMetaData
void set_fiducial_radius(double d)
std::string m_sliceTag
additional string for the histogram directory
std::string element() const
bool m_keepAllEvents
kepp events even if they fail the requested trigger chains
void set_monTool(ToolHandle< GenericMonitoringTool > *m)
virtual StatusCode fillHistograms(const EventContext &context) const override
adds event to the monitoring histograms
virtual StatusCode initialize() override
initialize
std::vector< TrackAssociator * > m_associators
bool m_fileopen
if an ntple file open?
void setMCTruthRef(bool b)
T_AnalysisConfigR3_Tier0< AthReentrantAlgorithm, AnalysisR3_Tier0 > AnalysisConfigR3_Tier0
void setOfflineRef(bool b)
void setRunPurity(bool b)
#define ATH_MSG_WARNING(x)
sadly need to include a root dependency, but no matter - the TIDA::Track class itself inherets from T...
std::vector< bool > isPassedForEach(unsigned int condition=TrigDefs::Physics) const
return vector with isPassed decision for each chain
bool m_runPurity
also run purity analyses
ToolHandle< Trig::TrigDecisionTool > m_tdt
int m_selectParentTruthPdgId
emacs: this is -*- c++ -*-
std::vector< std::string > getListOfTriggers() const
virtual StatusCode bookHistograms()
void setParentPdgID(int i=0)
double m_fiducial_radius
ntuple building variables
TrigR3Mon(const std::string &name, ISvcLocator *pSvcLocator)
void probe(const std::string &chainName)
emacs: this is -* c++ -*-