ATLAS Offline Software
Loading...
Searching...
No Matches
TauAnalysisTools::DiTauSelectionTool Class Reference

#include <DiTauSelectionTool.h>

Inheritance diagram for TauAnalysisTools::DiTauSelectionTool:

Public Types

Definition of the StoreGate-like object's definition
typedef ServiceHandle< StoreGateSvcMetaStore_t
 Type of the metadata store object in Athena.
typedef const ServiceHandle< StoreGateSvc > & MetaStorePtr_t
 Type of the metadata store pointer in standalone mode.

Public Member Functions

virtual StatusCode sysInitialize ()
 Function initialising the tool in the correct way in Athena.
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Functions providing access to the input/output metadata
MetaStorePtr_t inputMetaStore () const
 Accessor for the input metadata store.
MetaStorePtr_t outputMetaStore () const
 Accessor for the output metadata store.
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.
Callback functions helping in metadata reading/writing
void setUseIncidents (const bool flag)
virtual void handle (const Incident &inc)
 Function receiving incidents from IncidentSvc/TEvent.
virtual StatusCode beginInputFile ()
 Function called when a new input file is opened.
virtual StatusCode endInputFile ()
 Function called when the currently open input file got completely processed.
virtual StatusCode metaDataStop ()
 Function called when the tool should write out its metadata.

Protected Attributes

TFile * m_fOutFile
std::shared_ptr< TH1F > m_hCutFlow
Gaudi::Property< bool > m_bCreateControlPlots {this, "CreateControlPlots", false}
SG::ReadDecorHandleKey< xAOD::DiTauJetContainerm_OmniScoreDecorKey {this, "OmniScoreDecorName", "", "Name of OmniScore decoration"}
asg::AcceptInfo m_aAccept
 Object used to store selection information.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

virtual ASG_TOOL_CLASS2(DiTauSelectionTool, IAsgSelectionTool, TauAnalysisTools::IDiTauSelectionTool) public ~DiTauSelectionTool ()
 Create a proper constructor for Athena.
virtual StatusCode initialize () override
 Function initialising the tool.
virtual const asg::AcceptInfogetAcceptInfo () const override
 Get an object describing the "selection steps" of the tool.
virtual asg::AcceptData accept (const xAOD::IParticle *p) const override
 Get the decision using a generic IParticle pointer.
virtual asg::AcceptData accept (const xAOD::DiTauJet &tau) const override
 Get the decision for a specific TauJet object.
virtual void setOutFile (TFile *fOutFile) override
 Set output file for control histograms.
virtual void writeControlHistograms () override
 Write control histograms to output file.
virtual StatusCode beginEvent () override
 Function called when a new events is loaded.
template<typename T, typename U>
void FillRegionVector (std::vector< T > &vRegion, U tMin, U tMax) const
template<typename T, typename U>
void FillValueVector (std::vector< T > &vRegion, U tVal) const
template<typename T>
void PrintConfigRegion (const std::string &sCutName, std::vector< T > &vRegion) const
template<typename T>
void PrintConfigValue (const std::string &sCutName, std::vector< T > &vRegion) const
template<typename T>
void PrintConfigValue (const std::string &sCutName, T &sVal) const
void setupCutFlowHistogram ()
int convertStrToOmniIDWP (const std::string &sOmniIDWP) const
std::string convertOmniIDWPToStr (int iOmniIDWP) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::vector< float > m_vPtRegion
std::vector< float > m_vAbsEtaRegion
std::vector< float > m_vNSubjetsRegion
std::vector< int > m_vAbsCharges
std::vector< float > m_vOmniScoreRegion
std::string m_sOmniIDWP
bool m_useOmniScore =false
Gaudi::Property< std::string > m_sConfigPath {this, "ConfigPath", ""}
Gaudi::Property< int > m_iSelectionCuts {this, "SelectionCuts", NoDiTauCut}
Gaudi::Property< float > m_dPtMin {this, "PtMin", NAN}
Gaudi::Property< float > m_dPtMax {this, "PtMax", NAN}
Gaudi::Property< float > m_dAbsEtaMin {this, "AbsEtaMin", NAN}
Gaudi::Property< float > m_dAbsEtaMax {this, "AbsEtaMax", NAN}
Gaudi::Property< float > m_dNSubjetsMin {this, "NSubjetsMin", NAN}
Gaudi::Property< float > m_dNSubjetsMax {this, "NSubjetsMax", NAN}
Gaudi::Property< float > m_iAbsCharge {this, "AbsCharge", NAN}
Gaudi::Property< float > m_dOmniScoreMin {this, "OmniScoreMin", NAN}
Gaudi::Property< float > m_dOmniScoreMax {this, "OmniScoreMax", NAN}
Gaudi::Property< int > m_iOmniIDWP {this, "OmniIDWP", 0}
Gaudi::Property< std::vector< float > > m_vecPtRegion {this, "PtRegion", {}}
Gaudi::Property< std::vector< float > > m_vecAbsEtaRegion {this, "AbsEtaRegion",{}}
Gaudi::Property< std::vector< float > > m_vecNSubjetsRegion {this, "NSubjetsRegion", {}}
Gaudi::Property< std::vector< int > > m_vecAbsCharges {this, "AbsCharges", {}}
Gaudi::Property< std::vector< float > > m_vecOmniScoreRegion {this, "OmniScoreRegion", {}}
std::map< DiTauSelectionCuts, std::unique_ptr< TauAnalysisTools::DiTauSelectionCut > > m_cMap
MetaStore_t m_inputMetaStore
 Object accessing the input metadata store.
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store.
bool m_beginInputFileCalled
 Flag helping to discover when the tool misses the opening of the first input file.
bool m_useIncidents
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Friends

class DiTauSelectionCut
 need to define cut classes to be friends to access protected variables, needed for access of cut thresholds
class DiTauSelectionCutPt
class DiTauSelectionCutAbsEta
class DiTauSelectionCutNSubjets
class DiTauSelectionCutAbsCharge
class DiTauSelectionCutOmniScore
class DiTauSelectionCutOmniIDWP

Detailed Description

Definition at line 44 of file DiTauSelectionTool.h.

Member Typedef Documentation

◆ MetaStore_t

Type of the metadata store object in Athena.

Definition at line 66 of file AsgMetadataTool.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 68 of file AsgMetadataTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ accept() [1/2]

asg::AcceptData DiTauSelectionTool::accept ( const xAOD::DiTauJet & tau) const
overrideprivatevirtual

Get the decision for a specific TauJet object.

Implements TauAnalysisTools::IDiTauSelectionTool.

Definition at line 333 of file DiTauSelectionTool.cxx.

334{
335 asg::AcceptData acceptData (&m_aAccept);
336
337 int iNBin = 0;
338
340 {
341 // fill cutflow 'All' bin
342 m_hCutFlow->Fill(iNBin);
343 // fill main distributions before all cuts
344 for (const auto& entry : m_cMap)
345 entry.second->fillHistogramCutPre(xDiTau);
346 }
347 try
348 {
349 for (const auto& entry : m_cMap)
350 {
351 if (m_iSelectionCuts & entry.first)
352 {
353 if (!entry.second->accept(xDiTau, acceptData))
354 return acceptData;
355 else
356 {
358 {
359 // fill cutflow after each passed cut
360 iNBin++;
361 m_hCutFlow->Fill(iNBin);
362 }
363 }
364 }
365 }
366 }
367 catch (const std::runtime_error& error)
368 {
369 // LEGACY: In practical terms this should probably just throw, not
370 // print a warning/error and then continue on. However, I leave
371 // that to the experts who probably had a reason not to let the
372 // exception escape. For now I just downgraded it from error to
373 // warning and limited the number of warnings (04 Jan 22).
374 static std::atomic<uint64_t> warning_count (0u);
375 auto mycount = ++ warning_count;
376 if (mycount < 10u)
377 {
378 ATH_MSG_WARNING(error.what());
379 if (mycount == 9u)
380 ATH_MSG_WARNING ("this is your last warning");
381 }
382 }
383
384 // fill main distributions after all cuts
386 {
387 for (const auto& entry : m_cMap)
388 entry.second->fillHistogramCut(xDiTau);
389 }
390
391 // // Return the result:
392 return acceptData;
393}
#define ATH_MSG_WARNING(x)
std::map< DiTauSelectionCuts, std::unique_ptr< TauAnalysisTools::DiTauSelectionCut > > m_cMap
Gaudi::Property< bool > m_bCreateControlPlots
asg::AcceptInfo m_aAccept
Object used to store selection information.

◆ accept() [2/2]

asg::AcceptData DiTauSelectionTool::accept ( const xAOD::IParticle * p) const
overrideprivatevirtual

Get the decision using a generic IParticle pointer.

Implements IAsgSelectionTool.

Definition at line 311 of file DiTauSelectionTool.cxx.

312{
313 // Check if this is a jet:
314 if( xP->type() != xAOD::Type::Jet )
315 {
316 ATH_MSG_ERROR( "accept(...) Function received a non-jet" );
317 return asg::AcceptData (&m_aAccept);
318 }
319
320 // Cast it to a ditau:
321 const xAOD::DiTauJet* xDiTau = dynamic_cast< const xAOD::DiTauJet* >( xP );
322 if( ! xDiTau )
323 {
324 ATH_MSG_FATAL( "accept(...) Failed to cast particle to tau" );
325 return asg::AcceptData (&m_aAccept);
326 }
327
328 // Let the specific function do the work:
329 return accept( *xDiTau );
330}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
virtual asg::AcceptData accept(const xAOD::IParticle *p) const override
Get the decision using a generic IParticle pointer.
@ Jet
The object is a jet.
Definition ObjectType.h:40
DiTauJet_v1 DiTauJet
Definition of the current version.
Definition DiTauJet.h:17

◆ beginEvent()

StatusCode DiTauSelectionTool::beginEvent ( )
overrideprivatevirtual

Function called when a new events is loaded.

Dummy implementation that can be overridden by the derived tool.

Reimplemented from asg::AsgMetadataTool.

Definition at line 299 of file DiTauSelectionTool.cxx.

300{
301 return StatusCode::SUCCESS;
302}

◆ beginInputFile()

StatusCode asg::AsgMetadataTool::beginInputFile ( )
protectedvirtualinherited

Function called when a new input file is opened.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, BookkeeperDumperTool, BookkeeperTool, PMGTools::PMGTruthWeightTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, TauAnalysisTools::TauSmearingTool, Trig::TrigDecisionTool, Trig::xAODBunchCrossingTool, TrigConf::xAODConfigTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 185 of file AsgMetadataTool.cxx.

185 {
186
187 // Return gracefully:
188 return StatusCode::SUCCESS;
189 }

◆ convertOmniIDWPToStr()

std::string DiTauSelectionTool::convertOmniIDWPToStr ( int iOmniIDWP) const
private

Definition at line 510 of file DiTauSelectionTool.cxx.

511{
512 switch (iOmniIDWP)
513 {
514 case OMNIIDNONE:
515 return "OMNIIDNONE";
516 case OMNIIDVERYLOOSE:
517 return "OMNIIDVERYLOOSE";
518 case OMNIIDLOOSE:
519 return "OMNIIDLOOSE";
520 case OMNIIDMEDIUM:
521 return "OMNIIDMEDIUM";
522 case OMNIIDTIGHT:
523 return "OMNIIDTIGHT";
524
525 default:
526 ATH_MSG_WARNING( "OmniID working point with enum " << iOmniIDWP << " is unknown, the OmniIDWP cut will not accept any ditau!" );
527 return "";
528 }
529}

◆ convertStrToOmniIDWP()

int DiTauSelectionTool::convertStrToOmniIDWP ( const std::string & sOmniIDWP) const
private

Definition at line 497 of file DiTauSelectionTool.cxx.

498{
499 if (sOmniIDWP == "OMNIIDNONE") return int(OMNIIDNONE);
500 else if (sOmniIDWP == "OMNIIDVERYLOOSE") return int(OMNIIDVERYLOOSE);
501 else if (sOmniIDWP == "OMNIIDLOOSE") return int(OMNIIDLOOSE);
502 else if (sOmniIDWP == "OMNIIDMEDIUM") return int(OMNIIDMEDIUM);
503 else if (sOmniIDWP == "OMNIIDTIGHT") return int(OMNIIDTIGHT);
504
505 ATH_MSG_ERROR( "omni ID working point "<<sOmniIDWP<<" is unknown, the OmniIDWP cut will not accept any ditau!" );
506 return -1;
507}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ endInputFile()

StatusCode asg::AsgMetadataTool::endInputFile ( )
protectedvirtualinherited

Function called when the currently open input file got completely processed.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperDumperTool, BookkeeperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 193 of file AsgMetadataTool.cxx.

193 {
194
195 // Return gracefully:
196 return StatusCode::SUCCESS;
197 }

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ FillRegionVector()

template<typename T, typename U>
void DiTauSelectionTool::FillRegionVector ( std::vector< T > & vRegion,
U tMin,
U tMax ) const
private

Definition at line 445 of file DiTauSelectionTool.cxx.

446{
447 if (!vRegion.empty())
448 return;
449 if (!std::isnan(tMin)) // if tMin is NAN, then this assumption fails and -inf is added to the vector
450 vRegion.push_back(tMin);
451 else
452 vRegion.push_back(-std::numeric_limits<T>::infinity());
453
454 if (!std::isnan(tMax)) // if tMax is NAN, then this assumption fails and inf is added to the vector
455 vRegion.push_back(tMax);
456 else
457 vRegion.push_back(std::numeric_limits<T>::infinity());
458}

◆ FillValueVector()

template<typename T, typename U>
void DiTauSelectionTool::FillValueVector ( std::vector< T > & vRegion,
U tVal ) const
private

Definition at line 462 of file DiTauSelectionTool.cxx.

463{
464 if (!vRegion.empty())
465 return;
466 if (tVal == tVal) // if tMax is NAN, then this assumption fails and nothing is added to the vector
467 vRegion.push_back(tVal);
468}

◆ getAcceptInfo()

const asg::AcceptInfo & DiTauSelectionTool::getAcceptInfo ( ) const
overrideprivatevirtual

Get an object describing the "selection steps" of the tool.

Implements IAsgSelectionTool.

Definition at line 305 of file DiTauSelectionTool.cxx.

306{
307 return m_aAccept;
308}

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::TEvent, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::TEvent, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ handle()

void asg::AsgMetadataTool::handle ( const Incident & inc)
protectedvirtualinherited

Function receiving incidents from IncidentSvc/TEvent.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 135 of file AsgMetadataTool.cxx.

135 {
136
137 // Tell the user what's happening:
138 ATH_MSG_VERBOSE( "Callback received with incident: " << inc.type() );
139
140 // Call the appropriate member function:
141 if( inc.type() == IncidentType::BeginInputFile ) {
143 if( beginInputFile().isFailure() ) {
144 ATH_MSG_FATAL( "Failed to call beginInputFile()" );
145 throw std::runtime_error( "Couldn't call beginInputFile()" );
146 }
147 } else if( inc.type() == IncidentType::EndInputFile ) {
148 if( endInputFile().isFailure() ) {
149 ATH_MSG_FATAL( "Failed to call endInputFile()" );
150 throw std::runtime_error( "Couldn't call endInputFile()" );
151 }
152 } else if( inc.type() == IncidentType::BeginEvent ) {
153 // If the tool didn't catch the begin input file incident for the
154 // first input file of the job, then call the appropriate function
155 // now.
156 if( ! m_beginInputFileCalled ) {
158 if( beginInputFile().isFailure() ) {
159 ATH_MSG_FATAL( "Failed to call beginInputFile()" );
160 throw std::runtime_error( "Couldn't call beginInputFile()" );
161 }
162 }
163 if( beginEvent().isFailure() ) {
164 ATH_MSG_FATAL( "Failed to call beginEvent()" );
165 throw std::runtime_error( "Couldn't call beginEvent()" );
166 }
167
168 #ifdef XAOD_STANDALONE
169 } else if( inc.type() == IncidentType::MetaDataStop ) {
170 if( metaDataStop().isFailure() ) {
171 ATH_MSG_FATAL( "Failed to call metaDataStop()" );
172 throw std::runtime_error( "Couldn't call metaDataStop()" );
173 }
174
175 #endif // XAOD_STANDALONE
176 } else {
177 ATH_MSG_WARNING( "Unknown incident type received in AsgMetaDataTool: " << inc.type() );
178 }
179
180 return;
181 }
#define ATH_MSG_VERBOSE(x)
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
virtual StatusCode beginEvent()
Function called when a new events is loaded.
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.

◆ initialize()

StatusCode DiTauSelectionTool::initialize ( void )
overrideprivatevirtual

Function initialising the tool.

Implements TauAnalysisTools::IDiTauSelectionTool.

Definition at line 37 of file DiTauSelectionTool.cxx.

38{
39
40 m_vPtRegion = m_vecPtRegion.value();
45
46 bool bConfigViaConfigFile = !m_sConfigPath.empty();
47 bool bConfigViaProperties = false;
48 if (!bConfigViaProperties and !m_vPtRegion.empty()) bConfigViaProperties = true;
49 if (!bConfigViaProperties and !std::isnan(m_dPtMin.value())) bConfigViaProperties = true;
50 if (!bConfigViaProperties and !std::isnan(m_dPtMax.value())) bConfigViaProperties = true;
51 if (!bConfigViaProperties and !m_vAbsEtaRegion.empty()) bConfigViaProperties = true;
52 if (!bConfigViaProperties and !std::isnan(m_dAbsEtaMin.value())) bConfigViaProperties = true;
53 if (!bConfigViaProperties and !std::isnan(m_dAbsEtaMax.value())) bConfigViaProperties = true;
54 if (!bConfigViaProperties and !m_vNSubjetsRegion.empty()) bConfigViaProperties = true;
55 if (!bConfigViaProperties and !std::isnan(m_dNSubjetsMin.value())) bConfigViaProperties = true;
56 if (!bConfigViaProperties and !std::isnan(m_dNSubjetsMax.value())) bConfigViaProperties = true;
57 if (!bConfigViaProperties and !m_vAbsCharges.empty()) bConfigViaProperties = true;
58 if (!bConfigViaProperties and !std::isnan(m_iAbsCharge.value())) bConfigViaProperties = true;
59 if (!bConfigViaProperties and !m_vOmniScoreRegion.empty()) bConfigViaProperties = true;
60 if (!bConfigViaProperties and !std::isnan(m_dOmniScoreMin.value())) bConfigViaProperties = true;
61 if (!bConfigViaProperties and !std::isnan(m_dOmniScoreMax.value())) bConfigViaProperties = true;
62 if (!bConfigViaProperties and m_iOmniIDWP != 0) bConfigViaProperties = true;
63
64 if (bConfigViaConfigFile and bConfigViaProperties)
65 {
66 ATH_MSG_ERROR("Configured tool via setProperty and configuration file, which may lead to unexpected configuration. Please setup the DiTauSelectionTool using only one of the two methods. For further details please refer to the documentation https://gitlab.cern.ch/atlas/athena/blob/main/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-DiTauSelectionTool.rst or contact the TauCP group.");
67 return StatusCode::FAILURE;
68
69 }
70 if (!bConfigViaConfigFile and !bConfigViaProperties)
71 {
72 ATH_MSG_WARNING("No cut configuration provided, the tool will not do anything. For further details please refer to the documentation:");
73 ATH_MSG_WARNING("https://gitlab.cern.ch/atlas/athena/blob/main/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-DiTauSelectionTool.rst");
74 }
75
76 if (bConfigViaConfigFile)
77 {
78 TEnv rEnv;
79 std::string sInputFilePath = PathResolverFindCalibFile(m_sConfigPath);
80
81 if (!testFileForEOFContainsCharacters(sInputFilePath))
82 ATH_MSG_WARNING("Config file for DiTauSelectionTool with path "<<sInputFilePath<<" does not contain an empty last line. The tool might not be properly configured!");
83
84 rEnv.ReadFile(sInputFilePath.c_str(),
85 kEnvAll);
86
87 std::vector<std::string> vCuts;
88 // if Cuts are specified in the config file take these ones, if not take all
89 // specified in the config
90 if (rEnv.Defined("SelectionCuts"))
91 TauAnalysisTools::split(rEnv, "SelectionCuts", ' ', vCuts);
92 else
93 {
94 auto lList = rEnv.GetTable();
95 for( Int_t i = 0; i < lList->GetEntries(); ++i )
96 {
97 vCuts.push_back( lList->At( i )->GetName() );
98 }
99 }
100
101 int iSelectionCuts = 0;
102
103 for (const std::string& sCut : vCuts)
104 {
105 if (sCut == "PtRegion")
106 {
107 iSelectionCuts = iSelectionCuts | DiTauCutPt;
108 if (m_vPtRegion.empty())
109 TauAnalysisTools::split(rEnv,"PtRegion", ';', m_vPtRegion);
110 }
111 else if (sCut == "PtMin")
112 {
113 iSelectionCuts = iSelectionCuts | DiTauCutPt;
114 if (std::isnan(m_dPtMin.value()))
115 m_dPtMin = rEnv.GetValue("PtMin",NAN);
116 }
117 else if (sCut == "PtMax")
118 {
119 iSelectionCuts = iSelectionCuts | DiTauCutPt;
120 if (std::isnan(m_dPtMax.value()))
121 m_dPtMax = rEnv.GetValue("PtMax",NAN);
122 }
123 else if (sCut == "AbsEtaRegion")
124 {
125 iSelectionCuts = iSelectionCuts | DiTauCutAbsEta;
126 if (m_vAbsEtaRegion.empty())
127 TauAnalysisTools::split(rEnv,"AbsEtaRegion", ';', m_vAbsEtaRegion);
128 }
129 else if (sCut == "AbsEtaMin")
130 {
131 iSelectionCuts = iSelectionCuts | DiTauCutAbsEta;
132 if (std::isnan(m_dAbsEtaMin.value()))
133 m_dAbsEtaMin = rEnv.GetValue("AbsEtaMin",NAN);
134 }
135 else if (sCut == "AbsEtaMax")
136 {
137 iSelectionCuts = iSelectionCuts | DiTauCutAbsEta;
138 if (std::isnan(m_dAbsEtaMax.value()))
139 m_dAbsEtaMax = rEnv.GetValue("AbsEtaMax",NAN);
140 }
141 else if (sCut == "NSubjetsRegion")
142 {
143 iSelectionCuts = iSelectionCuts | DiTauCutNSubjets;
144 if (m_vNSubjetsRegion.empty())
145 TauAnalysisTools::split(rEnv,"NSubjetsRegion", ';', m_vNSubjetsRegion);
146 }
147 else if (sCut == "NSubjetsMin")
148 {
149 iSelectionCuts = iSelectionCuts | DiTauCutNSubjets;
150 if (std::isnan(m_dNSubjetsMin.value()))
151 m_dNSubjetsMin = rEnv.GetValue("NSubjetsMin",NAN);
152 }
153 else if (sCut == "NSubjetsMax")
154 {
155 iSelectionCuts = iSelectionCuts | DiTauCutNSubjets;
156 if (std::isnan(m_dNSubjetsMax.value()))
157 m_dNSubjetsMax = rEnv.GetValue("NSubjetsMax",NAN);
158 }
159 else if (sCut == "AbsCharges")
160 {
161 iSelectionCuts = iSelectionCuts | DiTauCutAbsCharge;
162 if (m_vAbsCharges.empty())
163 TauAnalysisTools::split(rEnv,"AbsCharges", ';', m_vAbsCharges);
164 }
165 else if (sCut == "AbsCharge")
166 {
167 iSelectionCuts = iSelectionCuts | DiTauCutAbsCharge;
168 if (std::isnan(m_iAbsCharge.value()))
169 m_iAbsCharge = rEnv.GetValue("AbsCharge",NAN);
170 }
171 else if (sCut == "OmniScoreRegion")
172 {
173 iSelectionCuts = iSelectionCuts | DiTauCutOmniScore;
174 if (m_vOmniScoreRegion.empty())
175 TauAnalysisTools::split(rEnv,"OmniScoreRegion", ';', m_vOmniScoreRegion);
176
177 // check if using OmniScore
178 m_useOmniScore = true;
179 }
180 else if (sCut == "OmniScoreMin")
181 {
182 iSelectionCuts = iSelectionCuts | DiTauCutOmniScore;
183 if (std::isnan(m_dOmniScoreMin.value()))
184 m_dOmniScoreMin = rEnv.GetValue("OmniScoreMin",NAN);
185
186 // check for possible mis-config in DiTau selection
187 for (const std::string& checkCut : vCuts){
188 if (checkCut.find("OmniScoreRegion") != std::string::npos) {
189 ATH_MSG_ERROR("Misconfig due to OmniScoreRegion and OmniScoreMin cuts both present in the config file. Please CHECK carefully config file again and choose of the two");
190 return StatusCode::FAILURE;
191 }
192 }
193
194 // check if using OmniScore
195 m_useOmniScore = true;
196 }
197 else if (sCut == "OmniScoreMax")
198 {
199 iSelectionCuts = iSelectionCuts | DiTauCutOmniScore;
200 if (std::isnan(m_dOmniScoreMax.value()))
201 m_dOmniScoreMax = rEnv.GetValue("OmniScoreMax",NAN);
202
203 // check for possible mis-config in DiTau selection
204 for (const std::string& checkCut : vCuts){
205 if (checkCut.find("OmniScoreRegion") != std::string::npos) {
206 ATH_MSG_ERROR("Misconfig due to OmniScoreRegion and OmniScoreMax cuts both present in the config file. Please CHECK carefully config file again and choose of the two");
207 return StatusCode::FAILURE;
208 }
209 }
210
211 // check if using OmniScore
212 m_useOmniScore = true;
213 }
214 else if (sCut == "OmniIDWP")
215 {
216 iSelectionCuts = iSelectionCuts | DiTauCutOmniIDWP;
217 if (m_iOmniIDWP == OMNIIDNONE){
218 m_iOmniIDWP = convertStrToOmniIDWP(rEnv.GetValue("OmniIDWP","OMNIIDNONE"));
219 }
220 // check for possible mis-config in Tau selection
221 for (const std::string& checkCut : vCuts){
222 if (checkCut.find("OmniScore") != std::string::npos) {
223 ATH_MSG_ERROR("Misconfig due to OmniIDWP and OmniScore cuts both present in the config file. Please CHECK carefully config file again");
224 return StatusCode::FAILURE;
225 }
226 }
227 }
228 else ATH_MSG_WARNING("Cut " << sCut << " is not available");
229 }
230
232 m_iSelectionCuts = iSelectionCuts;
233 }
234
235 // initialise the ReadDecorHandleKey if OmniScore is applied
236 if (m_useOmniScore) {
237 if(m_OmniScoreDecorKey.empty()) {
238 ATH_CHECK( m_OmniScoreDecorKey.assign("DiTauJets.omni_score"));
239 }
240 }
242
244
245 // specify all available cut descriptions
246 using map_type = std::map<DiTauSelectionCuts, std::unique_ptr<TauAnalysisTools::DiTauSelectionCut>>;
247 using pair_type = map_type::value_type;
248
249 pair_type elements[] =
250 {
251 {DiTauCutPt, std::make_unique<TauAnalysisTools::DiTauSelectionCutPt>(this)},
252 {DiTauCutAbsEta, std::make_unique<TauAnalysisTools::DiTauSelectionCutAbsEta>(this)},
253 {DiTauCutNSubjets, std::make_unique<TauAnalysisTools::DiTauSelectionCutNSubjets>(this)},
254 {DiTauCutAbsCharge, std::make_unique<TauAnalysisTools::DiTauSelectionCutAbsCharge>(this)},
255 {DiTauCutOmniScore, std::make_unique<TauAnalysisTools::DiTauSelectionCutOmniScore>(this)},
256 {DiTauCutOmniIDWP, std::make_unique<TauAnalysisTools::DiTauSelectionCutOmniIDWP>(this)},
257 };
258
259 m_cMap = { std::make_move_iterator( begin(elements) ), std::make_move_iterator( end(elements) ) };
260
261 ATH_MSG_INFO( "Initializing DiTauSelectionTool" );
267
271 PrintConfigValue ("AbsCharge", m_vAbsCharges);
273 PrintConfigValue ("OmniIDWP", m_sOmniIDWP);
274
275 std::string sCuts = "";
276 if (m_iSelectionCuts & DiTauCutPt) sCuts += "Pt ";
277 if (m_iSelectionCuts & DiTauCutAbsEta) sCuts += "AbsEta ";
278 if (m_iSelectionCuts & DiTauCutNSubjets) sCuts += "NSubjets ";
279 if (m_iSelectionCuts & DiTauCutAbsCharge) sCuts += "AbsCharge ";
280 if (m_iSelectionCuts & DiTauCutOmniScore) sCuts += "OmniScore ";
281 if (m_iSelectionCuts & DiTauCutOmniIDWP) sCuts += "OmniIDWP ";
282
283 ATH_MSG_DEBUG( "cuts: " << sCuts);
284
287
288 for ( const auto& entry : m_cMap ) {
289 if ( m_iSelectionCuts &entry.first ) {
290 entry.second->setAcceptInfo(m_aAccept);
291 }
292 }
293
294 return StatusCode::SUCCESS;
295}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Gaudi::Property< std::vector< float > > m_vecAbsEtaRegion
Gaudi::Property< std::string > m_sConfigPath
SG::ReadDecorHandleKey< xAOD::DiTauJetContainer > m_OmniScoreDecorKey
Gaudi::Property< std::vector< float > > m_vecNSubjetsRegion
int convertStrToOmniIDWP(const std::string &sOmniIDWP) const
Gaudi::Property< std::vector< int > > m_vecAbsCharges
void FillValueVector(std::vector< T > &vRegion, U tVal) const
void FillRegionVector(std::vector< T > &vRegion, U tMin, U tMax) const
void PrintConfigRegion(const std::string &sCutName, std::vector< T > &vRegion) const
Gaudi::Property< std::vector< float > > m_vecPtRegion
std::string convertOmniIDWPToStr(int iOmniIDWP) const
Gaudi::Property< std::vector< float > > m_vecOmniScoreRegion
void PrintConfigValue(const std::string &sCutName, std::vector< T > &vRegion) const
void split(const std::string &sInput, const char cDelim, std::vector< std::string > &vOut)
bool testFileForEOFContainsCharacters(const std::string &sFileName)
returns true if last line in file is empty or the line starts with the number sign

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ inputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore ( ) const
inherited

Accessor for the input metadata store.

Definition at line 93 of file AsgMetadataTool.cxx.

93 {
94
95#ifdef XAOD_STANDALONE
96 return &m_inputMetaStore;
97#else // XAOD_STANDALONE
98 return m_inputMetaStore;
99#endif // XAOD_STANDALONE
100 }
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.

◆ metaDataStop()

StatusCode asg::AsgMetadataTool::metaDataStop ( )
protectedvirtualinherited

Function called when the tool should write out its metadata.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperDumperTool, BookkeeperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 209 of file AsgMetadataTool.cxx.

209 {
210
211 // Return gracefully:
212 return StatusCode::SUCCESS;
213 }

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ outputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore ( ) const
inherited

Accessor for the output metadata store.

Definition at line 102 of file AsgMetadataTool.cxx.

102 {
103
104#ifdef XAOD_STANDALONE
105 return &m_outputMetaStore;
106#else // XAOD_STANDALONE
107 return m_outputMetaStore;
108#endif // XAOD_STANDALONE
109 }
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.

◆ print()

◆ PrintConfigRegion()

template<typename T>
void DiTauSelectionTool::PrintConfigRegion ( const std::string & sCutName,
std::vector< T > & vRegion ) const
private

Definition at line 472 of file DiTauSelectionTool.cxx.

473{
474 unsigned int iNumRegion = vRegion.size()/2;
475 for( unsigned int iRegion = 0; iRegion < iNumRegion; iRegion++ )
476 {
477 ATH_MSG_DEBUG( sCutName<<": " << vRegion.at(iRegion*2) << " to " << vRegion.at(iRegion*2+1) );
478 }
479}

◆ PrintConfigValue() [1/2]

template<typename T>
void DiTauSelectionTool::PrintConfigValue ( const std::string & sCutName,
std::vector< T > & vRegion ) const
private

Definition at line 483 of file DiTauSelectionTool.cxx.

484{
485 for (auto tVal : vRegion)
486 ATH_MSG_DEBUG( sCutName<<": " << tVal );
487}

◆ PrintConfigValue() [2/2]

template<typename T>
void DiTauSelectionTool::PrintConfigValue ( const std::string & sCutName,
T & sVal ) const
private

Definition at line 491 of file DiTauSelectionTool.cxx.

492{
493 ATH_MSG_DEBUG( sCutName<<": " << tVal );
494}

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setOutFile()

void DiTauSelectionTool::setOutFile ( TFile * fOutFile)
overrideprivatevirtual

Set output file for control histograms.

Implements TauAnalysisTools::IDiTauSelectionTool.

Definition at line 396 of file DiTauSelectionTool.cxx.

397{
398 m_fOutFile = fOutFile;
399}

◆ setupCutFlowHistogram()

void DiTauSelectionTool::setupCutFlowHistogram ( )
private

Definition at line 421 of file DiTauSelectionTool.cxx.

422{
423 // count number of cuts
424 int iNBins = 0;
425 for (const auto& entry : m_cMap)
426 if (m_iSelectionCuts & entry.first)
427 iNBins++;
428 // create cutflow histogram with iNBins+1 bins, where first bin is 'All' bin
429 m_hCutFlow = std::make_shared<TH1F>("hCutFlow","CutFlow;; events",iNBins+1,0,iNBins+1);
430 m_hCutFlow->GetXaxis()->SetBinLabel(1,"All");
431
432 // reusing this variable to reduce overhead
433 iNBins = 2;
434 // set bin labels
435 for (const auto& entry : m_cMap)
436 if (m_iSelectionCuts & entry.first)
437 {
438 m_hCutFlow->GetXaxis()->SetBinLabel(iNBins, entry.second->getName().c_str());
439 iNBins++;
440 }
441}

◆ setUseIncidents()

void asg::AsgMetadataTool::setUseIncidents ( const bool flag)
inlineprotectedinherited

Definition at line 132 of file AsgMetadataTool.h.

133 {
135 }
bool flag
Definition master.py:29

◆ sysInitialize()

StatusCode asg::AsgMetadataTool::sysInitialize ( )
virtualinherited

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.

Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.

Definition at line 115 of file AsgMetadataTool.cxx.

115 {
116
117#ifndef XAOD_STANDALONE
118 if (m_useIncidents) {
119 // Connect to the IncidentSvc:
120 ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
121 ATH_CHECK( incSvc.retrieve() );
122
123 // Set up the right callbacks: don't rethrow exceptions, any failure and we should end
124 incSvc->addListener( this, IncidentType::BeginEvent, 0, false );
125 }
126 // Let the base class do its thing:
127 ATH_CHECK( AlgTool::sysInitialize() );
128
129#endif // not XAOD_STANDALONE
130
131 // Return gracefully:
132 return StatusCode::SUCCESS;
133 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ writeControlHistograms()

void DiTauSelectionTool::writeControlHistograms ( )
overrideprivatevirtual

Write control histograms to output file.

create output directory

write cutflow histogram

Implements TauAnalysisTools::IDiTauSelectionTool.

Definition at line 402 of file DiTauSelectionTool.cxx.

403{
405 ATH_MSG_WARNING("CreateControlPlots was set to true, but no valid file pointer was provided");
407 {
409 m_fOutFile->mkdir((this->name()+"_control").c_str());
410 m_fOutFile->cd((this->name()+"_control").c_str());
412 m_hCutFlow->Write();
413
414 for (const auto& entry : m_cMap)
415 entry.second->writeControlHistograms();
416 }
417}

◆ ~DiTauSelectionTool()

DiTauSelectionTool::~DiTauSelectionTool ( )
privatevirtual

Create a proper constructor for Athena.

Definition at line 31 of file DiTauSelectionTool.cxx.

32{
33 m_cMap.clear();
34}

◆ DiTauSelectionCut

friend class DiTauSelectionCut
friend

need to define cut classes to be friends to access protected variables, needed for access of cut thresholds

Definition at line 50 of file DiTauSelectionTool.h.

◆ DiTauSelectionCutAbsCharge

friend class DiTauSelectionCutAbsCharge
friend

Definition at line 54 of file DiTauSelectionTool.h.

◆ DiTauSelectionCutAbsEta

friend class DiTauSelectionCutAbsEta
friend

Definition at line 52 of file DiTauSelectionTool.h.

◆ DiTauSelectionCutNSubjets

friend class DiTauSelectionCutNSubjets
friend

Definition at line 53 of file DiTauSelectionTool.h.

◆ DiTauSelectionCutOmniIDWP

friend class DiTauSelectionCutOmniIDWP
friend

Definition at line 56 of file DiTauSelectionTool.h.

◆ DiTauSelectionCutOmniScore

friend class DiTauSelectionCutOmniScore
friend

Definition at line 55 of file DiTauSelectionTool.h.

◆ DiTauSelectionCutPt

friend class DiTauSelectionCutPt
friend

Definition at line 51 of file DiTauSelectionTool.h.

Member Data Documentation

◆ m_aAccept

asg::AcceptInfo TauAnalysisTools::DiTauSelectionTool::m_aAccept
protected

Object used to store selection information.

Definition at line 155 of file DiTauSelectionTool.h.

◆ m_bCreateControlPlots

Gaudi::Property<bool> TauAnalysisTools::DiTauSelectionTool::m_bCreateControlPlots {this, "CreateControlPlots", false}
protected

Definition at line 151 of file DiTauSelectionTool.h.

151{this, "CreateControlPlots", false};

◆ m_beginInputFileCalled

bool asg::AsgMetadataTool::m_beginInputFileCalled
privateinherited

Flag helping to discover when the tool misses the opening of the first input file.

Definition at line 126 of file AsgMetadataTool.h.

◆ m_cMap

std::map<DiTauSelectionCuts, std::unique_ptr<TauAnalysisTools::DiTauSelectionCut> > TauAnalysisTools::DiTauSelectionTool::m_cMap
private

Definition at line 143 of file DiTauSelectionTool.h.

◆ m_dAbsEtaMax

Gaudi::Property<float> TauAnalysisTools::DiTauSelectionTool::m_dAbsEtaMax {this, "AbsEtaMax", NAN}
private

Definition at line 123 of file DiTauSelectionTool.h.

123{this, "AbsEtaMax", NAN};

◆ m_dAbsEtaMin

Gaudi::Property<float> TauAnalysisTools::DiTauSelectionTool::m_dAbsEtaMin {this, "AbsEtaMin", NAN}
private

Definition at line 122 of file DiTauSelectionTool.h.

122{this, "AbsEtaMin", NAN};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dNSubjetsMax

Gaudi::Property<float> TauAnalysisTools::DiTauSelectionTool::m_dNSubjetsMax {this, "NSubjetsMax", NAN}
private

Definition at line 125 of file DiTauSelectionTool.h.

125{this, "NSubjetsMax", NAN};

◆ m_dNSubjetsMin

Gaudi::Property<float> TauAnalysisTools::DiTauSelectionTool::m_dNSubjetsMin {this, "NSubjetsMin", NAN}
private

Definition at line 124 of file DiTauSelectionTool.h.

124{this, "NSubjetsMin", NAN};

◆ m_dOmniScoreMax

Gaudi::Property<float> TauAnalysisTools::DiTauSelectionTool::m_dOmniScoreMax {this, "OmniScoreMax", NAN}
private

Definition at line 128 of file DiTauSelectionTool.h.

128{this, "OmniScoreMax", NAN};

◆ m_dOmniScoreMin

Gaudi::Property<float> TauAnalysisTools::DiTauSelectionTool::m_dOmniScoreMin {this, "OmniScoreMin", NAN}
private

Definition at line 127 of file DiTauSelectionTool.h.

127{this, "OmniScoreMin", NAN};

◆ m_dPtMax

Gaudi::Property<float> TauAnalysisTools::DiTauSelectionTool::m_dPtMax {this, "PtMax", NAN}
private

Definition at line 121 of file DiTauSelectionTool.h.

121{this, "PtMax", NAN};

◆ m_dPtMin

Gaudi::Property<float> TauAnalysisTools::DiTauSelectionTool::m_dPtMin {this, "PtMin", NAN}
private

Definition at line 120 of file DiTauSelectionTool.h.

120{this, "PtMin", NAN};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fOutFile

TFile* TauAnalysisTools::DiTauSelectionTool::m_fOutFile
protected

Definition at line 138 of file DiTauSelectionTool.h.

◆ m_hCutFlow

std::shared_ptr<TH1F> TauAnalysisTools::DiTauSelectionTool::m_hCutFlow
protected

Definition at line 139 of file DiTauSelectionTool.h.

◆ m_iAbsCharge

Gaudi::Property<float> TauAnalysisTools::DiTauSelectionTool::m_iAbsCharge {this, "AbsCharge", NAN}
private

Definition at line 126 of file DiTauSelectionTool.h.

126{this, "AbsCharge", NAN};

◆ m_inputMetaStore

MetaStore_t asg::AsgMetadataTool::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 119 of file AsgMetadataTool.h.

◆ m_iOmniIDWP

Gaudi::Property<int> TauAnalysisTools::DiTauSelectionTool::m_iOmniIDWP {this, "OmniIDWP", 0}
private

Definition at line 129 of file DiTauSelectionTool.h.

129{this, "OmniIDWP", 0};

◆ m_iSelectionCuts

Gaudi::Property<int> TauAnalysisTools::DiTauSelectionTool::m_iSelectionCuts {this, "SelectionCuts", NoDiTauCut}
private

Definition at line 119 of file DiTauSelectionTool.h.

119{this, "SelectionCuts", NoDiTauCut};

◆ m_OmniScoreDecorKey

SG::ReadDecorHandleKey<xAOD::DiTauJetContainer> TauAnalysisTools::DiTauSelectionTool::m_OmniScoreDecorKey {this, "OmniScoreDecorName", "", "Name of OmniScore decoration"}
protected

Definition at line 152 of file DiTauSelectionTool.h.

152{this, "OmniScoreDecorName", "", "Name of OmniScore decoration"};

◆ m_outputMetaStore

MetaStore_t asg::AsgMetadataTool::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 121 of file AsgMetadataTool.h.

◆ m_sConfigPath

Gaudi::Property<std::string> TauAnalysisTools::DiTauSelectionTool::m_sConfigPath {this, "ConfigPath", ""}
private

Definition at line 118 of file DiTauSelectionTool.h.

118{this, "ConfigPath", ""};

◆ m_sOmniIDWP

std::string TauAnalysisTools::DiTauSelectionTool::m_sOmniIDWP
private

Definition at line 114 of file DiTauSelectionTool.h.

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.h.

◆ m_useOmniScore

bool TauAnalysisTools::DiTauSelectionTool::m_useOmniScore =false
private

Definition at line 116 of file DiTauSelectionTool.h.

◆ m_vAbsCharges

std::vector<int> TauAnalysisTools::DiTauSelectionTool::m_vAbsCharges
private

Definition at line 110 of file DiTauSelectionTool.h.

◆ m_vAbsEtaRegion

std::vector<float> TauAnalysisTools::DiTauSelectionTool::m_vAbsEtaRegion
private

Definition at line 106 of file DiTauSelectionTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vecAbsCharges

Gaudi::Property<std::vector<int> > TauAnalysisTools::DiTauSelectionTool::m_vecAbsCharges {this, "AbsCharges", {}}
private

Definition at line 134 of file DiTauSelectionTool.h.

134{this, "AbsCharges", {}};

◆ m_vecAbsEtaRegion

Gaudi::Property<std::vector<float> > TauAnalysisTools::DiTauSelectionTool::m_vecAbsEtaRegion {this, "AbsEtaRegion",{}}
private

Definition at line 132 of file DiTauSelectionTool.h.

132{this, "AbsEtaRegion",{}};

◆ m_vecNSubjetsRegion

Gaudi::Property<std::vector<float> > TauAnalysisTools::DiTauSelectionTool::m_vecNSubjetsRegion {this, "NSubjetsRegion", {}}
private

Definition at line 133 of file DiTauSelectionTool.h.

133{this, "NSubjetsRegion", {}};

◆ m_vecOmniScoreRegion

Gaudi::Property<std::vector<float> > TauAnalysisTools::DiTauSelectionTool::m_vecOmniScoreRegion {this, "OmniScoreRegion", {}}
private

Definition at line 135 of file DiTauSelectionTool.h.

135{this, "OmniScoreRegion", {}};

◆ m_vecPtRegion

Gaudi::Property<std::vector<float> > TauAnalysisTools::DiTauSelectionTool::m_vecPtRegion {this, "PtRegion", {}}
private

Definition at line 131 of file DiTauSelectionTool.h.

131{this, "PtRegion", {}};

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vNSubjetsRegion

std::vector<float> TauAnalysisTools::DiTauSelectionTool::m_vNSubjetsRegion
private

Definition at line 108 of file DiTauSelectionTool.h.

◆ m_vOmniScoreRegion

std::vector<float> TauAnalysisTools::DiTauSelectionTool::m_vOmniScoreRegion
private

Definition at line 112 of file DiTauSelectionTool.h.

◆ m_vPtRegion

std::vector<float> TauAnalysisTools::DiTauSelectionTool::m_vPtRegion
private

Definition at line 104 of file DiTauSelectionTool.h.


The documentation for this class was generated from the following files: