![]() |
ATLAS Offline Software
|
#include <Calculator.h>
Classes | |
| class | Helper |
| struct | Period |
Public Member Functions | |
| Calculator (TrigGlobalEfficiencyCorrectionTool &parent, unsigned nPeriodsToReserve) | |
| bool | addPeriod (ImportData &data, const std::pair< unsigned, unsigned > &boundaries, const std::string &combination, bool useToys, std::size_t &uniqueElectronLeg, std::size_t &uniquePhotonLeg) |
| bool | compute (TrigGlobalEfficiencyCorrectionTool &parent, const LeptonList &leptons, unsigned runNumber, Efficiencies &efficiencies) |
| bool | checkTriggerMatching (TrigGlobalEfficiencyCorrectionTool &parent, bool &matched, const LeptonList &leptons, unsigned runNumber) |
| bool | checkTriggerMatching (TrigGlobalEfficiencyCorrectionTool &parent, bool &matched, std::unordered_map< std::string, bool > *matched_per_trigger, const LeptonList &leptons, unsigned runNumber) |
| bool | getRelevantTriggersForUser (TrigGlobalEfficiencyCorrectionTool &parent, std::vector< std::string > &triggers, unsigned runNumber) |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Functions providing the same interface as AthMessaging | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level of the object. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
Private Types | |
| using | LeptonList = TrigGlobalEfficiencyCorrectionTool::LeptonList |
| using | TrigDef = TrigGlobEffCorr::ImportData::TrigDef |
| using | GlobEffFunc |
Private Member Functions | |
| bool | aboveThreshold (const Lepton &p, std::size_t leg) const |
| template<typename Trig1L> | |
| auto | getLoosestLegAboveThreshold (const Lepton &lepton, const flat_set< Trig1L > &trigs, bool &success) -> std::enable_if_t< Trig1L::is1L(), std::size_t > |
| Efficiencies | getCachedTriggerLegEfficiencies (const Lepton &lepton, unsigned runNumber, std::size_t leg, bool &success) |
| bool | fillListOfLegsFor (const Lepton &lepton, const std::vector< TrigDef > &triggers, flat_set< std::size_t > &validLegs) const |
| bool | canTriggerBeFired (const TrigDef &trig, const std::vector< flat_set< std::size_t > > &firedLegs) const |
| const Period * | getPeriod (unsigned runNumber) const |
| bool | findUniqueLeg (xAOD::Type::ObjectType obj, std::size_t &uniqueLeg, const std::vector< TrigDef > &defs) |
| template<typename Trig1L> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig1L, Efficiencies &) -> std::enable_if_t< Trig1L::is1L(), bool > |
| One single-lepton trigger. | |
| template<typename Trig1L_obj1, typename Trig1L_obj2> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig1L_obj1 trig1, const Trig1L_obj2 trig2, Efficiencies &) -> std::enable_if_t< Trig1L_obj1::is1L() &&Trig1L_obj2::is1L() &&Trig1L_obj1::object() !=Trig1L_obj2::object(), bool > |
| Two single-lepton triggers, two object types. | |
| template<typename Trig1L> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const flat_set< Trig1L > &, Efficiencies &) -> std::enable_if_t< Trig1L::is1L(), bool > |
| Several single-lepton triggers, one object type. | |
| template<typename Trig1L_obj1, typename Trig1L_obj2> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const flat_set< Trig1L_obj1 > &trigs1, const flat_set< Trig1L_obj2 > &trigs2, Efficiencies &) -> std::enable_if_t< Trig1L_obj1::is1L() &&Trig1L_obj2::is1L() &&Trig1L_obj1::object() !=Trig1L_obj2::object(), bool > |
| Several single-lepton triggers, two object types. | |
| template<typename Trig2Lmix> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2Lmix, Efficiencies &) -> std::enable_if_t< Trig2Lmix::is2Lmix(), bool > |
| One mixed-flavour dilepton trigger. | |
| template<typename Trig2Lsym> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2Lsym, Efficiencies &) -> std::enable_if_t< Trig2Lsym::is2Lsym(), bool > |
| One symmetric dilepton trigger. | |
| template<typename Trig2Lasym> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2Lasym, Efficiencies &) -> std::enable_if_t< Trig2Lasym::is2Lasym(), bool > |
| One asymmetric dilepton trigger. | |
| template<typename Trig2Lmix, typename Trig1L_obj1, typename Trig1L_obj2> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2Lmix, const flat_set< Trig1L_obj1 > &, const flat_set< Trig1L_obj2 > &, Efficiencies &) -> std::enable_if_t< Trig2Lmix::is2Lmix() &&Trig1L_obj1::is1L() &&Trig2Lmix::object1()==Trig1L_obj1::object() &&Trig1L_obj2::is1L() &&Trig2Lmix::object2()==Trig1L_obj2::object(), bool > |
| One mixed-flavour dilepton trigger + single-lepton triggers. | |
| template<typename Trig2L, typename Trig1L> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2L, const Trig1L, Efficiencies &) -> std::enable_if_t< Trig2L::is2Lnomix() &&Trig1L::is1L() &&Trig2L::object()==Trig1L::object(), bool > |
| One dilepton trigger + one single-lepton trigger. | |
| template<typename Trig2Lsym, typename Trig1L> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2Lsym, const flat_set< Trig1L > &, Efficiencies &) -> std::enable_if_t< Trig2Lsym::is2Lsym() &&Trig1L::is1L() &&Trig1L::object()==Trig2Lsym::object(), bool > |
| One symmetric dilepton trigger + several single-lepton triggers. | |
| template<typename Trig2Lasym, typename Trig1L> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2Lasym, const flat_set< Trig1L > &, Efficiencies &) -> std::enable_if_t< Trig2Lasym::is2Lasym() &&Trig1L::is1L() &&Trig1L::object()==Trig2Lasym::object(), bool > |
| One asymmetric dilepton trigger + several single-lepton triggers. | |
| template<typename Trig2Lsym, typename Trig1L> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2Lsym, const Trig2Lsym, const flat_set< Trig1L > &, Efficiencies &) -> std::enable_if_t< Trig2Lsym::is2Lsym() &&Trig1L::is1L() &&Trig1L::object()==Trig2Lsym::object(), bool > |
| Two symmetric dilepton triggers + several single-lepton triggers. | |
| template<typename Trig2Lasym, typename Trig2Lsym, typename Trig1L> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2Lasym, const Trig2Lsym, const flat_set< Trig1L > &, Efficiencies &) -> std::enable_if_t< Trig2Lasym::is2Lasym() &&Trig2Lsym::is2Lsym() &&Trig2Lsym::object()==Trig2Lasym::object() &&Trig1L::is1L() &&Trig1L::object()==Trig2Lasym::object(), bool > |
| Two dilepton triggers (one asym., one sym.) + several single-lepton triggers. | |
| template<typename Trig3Lsym> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig3Lsym, Efficiencies &) -> std::enable_if_t< Trig3Lsym::is3Lsym(), bool > |
| One symmetric trilepton trigger. | |
| template<typename Trig3Lhalfsym> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig3Lhalfsym, Efficiencies &) -> std::enable_if_t< Trig3Lhalfsym::is3Lhalfsym(), bool > |
| One half-symmetric trilepton trigger. | |
| template<typename Trig2L, typename Trig2Lmix> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2L, const Trig2Lmix, Efficiencies &) -> std::enable_if_t< Trig2L::is2Lnomix() &&Trig2Lmix::is2Lmix() &&(Trig2Lmix::object1()==Trig2L::object()||Trig2Lmix::object2()==Trig2L::object()), bool > |
| One dilepton trigger + one mixed-flavour dilepton trigger. | |
| template<typename Trig2L_obj1, typename Trig2L_obj2, typename Trig2Lmix> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2L_obj1, const Trig2L_obj2, const Trig2Lmix, Efficiencies &) -> std::enable_if_t< Trig2Lmix::is2Lmix() &&Trig2L_obj1::is2Lnomix() &&Trig2L_obj1::object()==Trig2Lmix::object1() &&Trig2L_obj2::is2Lnomix() &&Trig2L_obj2::object()==Trig2Lmix::object2(), bool > |
| Combinaisons with 3 dilepton triggers including one mixed-flavour, and one sym. | |
| template<typename Trig2L_obj1, typename Trig2L_obj2, typename Trig2Lmix, typename Trig1L_obj1, typename Trig1L_obj2> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2L_obj1, const Trig2L_obj2, const Trig2Lmix, const flat_set< Trig1L_obj1 > &, const flat_set< Trig1L_obj2 > &, Efficiencies &) -> std::enable_if_t< Trig2Lmix::is2Lmix() &&Trig2L_obj1::is2Lnomix() &&Trig2L_obj1::object()==Trig2Lmix::object1() &&Trig2L_obj2::is2Lnomix() &&Trig2L_obj2::object()==Trig2Lmix::object2() &&Trig1L_obj1::is1L() &&Trig1L_obj1::object()==Trig2Lmix::object1() &&Trig1L_obj2::is1L() &&Trig1L_obj2::object()==Trig2Lmix::object2(), bool > |
| Same combinaisons with 3 dilepton triggers, + single-lepton triggers. | |
| template<typename Trig2L_obj1, typename Trig2Lsym_obj1, typename Trig2L_obj2, typename Trig2Lsym_obj2, typename Trig2Lmix, typename Trig1L_obj1, typename Trig1L_obj2> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig2L_obj1, const Trig2Lsym_obj1, const Trig2L_obj2, const Trig2Lsym_obj2, const Trig2Lmix, const Trig2Lmix, const flat_set< Trig1L_obj1 > &, const flat_set< Trig1L_obj2 > &, Efficiencies &) -> std::enable_if_t< Trig2Lmix::is2Lmix() &&Trig2L_obj1::is2Lnomix() &&Trig2L_obj1::object()==Trig2Lmix::object1() &&Trig2L_obj2::is2Lnomix() &&Trig2L_obj2::object()==Trig2Lmix::object2() &&Trig2Lsym_obj1::is2Lsym() &&Trig2Lsym_obj1::object()==Trig2Lmix::object1() &&Trig2Lsym_obj2::is2Lsym() &&Trig2Lsym_obj2::object()==Trig2Lmix::object2() &&Trig1L_obj1::is1L() &&Trig1L_obj1::object()==Trig2Lmix::object1() &&Trig1L_obj2::is1L() &&Trig1L_obj2::object()==Trig2Lmix::object2(), bool > |
| Six dilepton triggers (two mixed-flavour, two sym., two asym. | |
| template<typename Trig3Lmix> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig3Lmix, Efficiencies &) -> std::enable_if_t< Trig3Lmix::is3Lmix(), bool > |
| One mixed-flavour trilepton trigger. | |
| template<typename Trig3Lmix1, typename Trig3Lmix2> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig3Lmix1, const Trig3Lmix2, Efficiencies &) -> std::enable_if_t< Trig3Lmix1::is3Lmix() &&Trig3Lmix2::is3Lmix() &&Trig3Lmix1::object1()==Trig3Lmix2::object2() &&Trig3Lmix1::object2()==Trig3Lmix2::object1(), bool > |
| Two complementary mixed-flavour trilepton triggers. | |
| template<typename Trig4Lsym> | |
| auto | globalEfficiency (const LeptonList &, unsigned, const Trig4Lsym, Efficiencies &) -> std::enable_if_t< Trig4Lsym::is4Lsym(), bool > |
| One symmetric tetralepton trigger. | |
| bool | globalEfficiency_Factorized2 (const LeptonList &leptons, unsigned runNumber, GlobEffFunc func1, GlobEffFunc func2, Efficiencies &globalEfficiencies) |
| bool | globalEfficiency_Factorized3 (const LeptonList &leptons, unsigned runNumber, GlobEffFunc func1, GlobEffFunc func2, GlobEffFunc func3, Efficiencies &globalEfficiencies) |
| bool | globalEfficiency_Toys (const LeptonList &, unsigned, const std::vector< TrigDef > &triggers, Efficiencies &) |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| TrigGlobalEfficiencyCorrectionTool * | m_parent |
| std::vector< Period > | m_periods |
| pointer updated at each call to compute() because the parent tool might have been moved in-between | |
| std::map< std::pair< const Lepton *, std::size_t >, Efficiencies > | m_cachedEfficiencies |
| bool | m_forceUnitSF |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) | |
Friends | |
| class | CheckConfig |
Definition at line 26 of file Calculator.h.
|
private |
Definition at line 29 of file Calculator.h.
|
private |
Definition at line 27 of file Calculator.h.
Definition at line 28 of file Calculator.h.
| Calculator::Calculator | ( | TrigGlobalEfficiencyCorrectionTool & | parent, |
| unsigned | nPeriodsToReserve ) |
Definition at line 22 of file Calculator.cxx.
|
inlineprivate |
Definition at line 74 of file Calculator.h.
| bool Calculator::addPeriod | ( | ImportData & | data, |
| const std::pair< unsigned, unsigned > & | boundaries, | ||
| const std::string & | combination, | ||
| bool | useToys, | ||
| std::size_t & | uniqueElectronLeg, | ||
| std::size_t & | uniquePhotonLeg ) |
Choose the appropriate function to compute efficiencies for this particular trigger combination
Definition at line 29 of file Calculator.cxx.
|
private |
Definition at line 1476 of file Calculator.cxx.
| bool TrigGlobEffCorr::Calculator::checkTriggerMatching | ( | TrigGlobalEfficiencyCorrectionTool & | parent, |
| bool & | matched, | ||
| const LeptonList & | leptons, | ||
| unsigned | runNumber ) |
| bool Calculator::checkTriggerMatching | ( | TrigGlobalEfficiencyCorrectionTool & | parent, |
| bool & | matched, | ||
| std::unordered_map< std::string, bool > * | matched_per_trigger, | ||
| const LeptonList & | leptons, | ||
| unsigned | runNumber ) |
First, for each lepton, list the trigger leg(s) it is allowed to fire (depends on pT and selection tags)
Then for each trigger, call trigger matching tool for all possible (valid) lepton combinations
Get trigger chain name with a "HLT_" prefix
borrow the set of legs that can be fired by that lepton
return the set of legs back to the main container
Definition at line 144 of file Calculator.cxx.
| bool Calculator::compute | ( | TrigGlobalEfficiencyCorrectionTool & | parent, |
| const LeptonList & | leptons, | ||
| unsigned | runNumber, | ||
| Efficiencies & | efficiencies ) |
Definition at line 125 of file Calculator.cxx.
|
private |
Definition at line 1458 of file Calculator.cxx.
|
private |
initial non-zero value means that ListOfLegsPerTool is filled
Definition at line 89 of file Calculator.cxx.
|
private |
Definition at line 276 of file Calculator.cxx.
|
inlineprivate |
Definition at line 78 of file Calculator.h.
|
private |
Definition at line 111 of file Calculator.cxx.
| bool Calculator::getRelevantTriggersForUser | ( | TrigGlobalEfficiencyCorrectionTool & | parent, |
| std::vector< std::string > & | triggers, | ||
| unsigned | runNumber ) |
Definition at line 244 of file Calculator.cxx.
|
private |
Several single-lepton triggers, one object type.
Definition at line 388 of file Calculator.cxx.
|
private |
Several single-lepton triggers, two object types.
Definition at line 422 of file Calculator.cxx.
|
private |
One single-lepton trigger.
Definition at line 324 of file Calculator.cxx.
|
private |
Two single-lepton triggers, two object types.
Definition at line 351 of file Calculator.cxx.
|
inlineprivate |
One dilepton trigger + one single-lepton trigger.
Definition at line 601 of file Calculator.cxx.
|
private |
One dilepton trigger + one mixed-flavour dilepton trigger.
Definition at line 1108 of file Calculator.cxx.
|
private |
Same combinaisons with 3 dilepton triggers, + single-lepton triggers.
Definition at line 1194 of file Calculator.cxx.
|
private |
Combinaisons with 3 dilepton triggers including one mixed-flavour, and one sym.
/asym. dilepton for each flavour
Definition at line 1137 of file Calculator.cxx.
|
private |
Six dilepton triggers (two mixed-flavour, two sym., two asym.
/sym.) for two object types
Definition at line 1261 of file Calculator.cxx.
|
private |
One asymmetric dilepton trigger + several single-lepton triggers.
S1 v S3
S2 v S3
Definition at line 675 of file Calculator.cxx.
|
private |
Two dilepton triggers (one asym., one sym.) + several single-lepton triggers.
can't use tightestLeg==trig2Lsym because it might also be 0
this works because loosest1lepLeg is 0 if not on plateau...
note: secondLoosestLeg is valid because the loosest leg is either trig2Lasym(0) or trig2Lasym(1)
Definition at line 830 of file Calculator.cxx.
|
private |
One asymmetric dilepton trigger.
Definition at line 511 of file Calculator.cxx.
|
private |
One mixed-flavour dilepton trigger + single-lepton triggers.
Definition at line 562 of file Calculator.cxx.
|
private |
One mixed-flavour dilepton trigger.
Definition at line 463 of file Calculator.cxx.
|
private |
One symmetric dilepton trigger + several single-lepton triggers.
Definition at line 619 of file Calculator.cxx.
|
private |
Two symmetric dilepton triggers + several single-lepton triggers.
Definition at line 750 of file Calculator.cxx.
|
private |
One symmetric dilepton trigger.
Definition at line 484 of file Calculator.cxx.
|
private |
One half-symmetric trilepton trigger.
Definition at line 1034 of file Calculator.cxx.
|
private |
One mixed-flavour trilepton trigger.
Definition at line 1343 of file Calculator.cxx.
|
private |
Two complementary mixed-flavour trilepton triggers.
Definition at line 1364 of file Calculator.cxx.
|
private |
One symmetric trilepton trigger.
Definition at line 1007 of file Calculator.cxx.
|
private |
One symmetric tetralepton trigger.
Definition at line 1406 of file Calculator.cxx.
|
private |
Definition at line 1431 of file Calculator.cxx.
|
private |
Definition at line 1443 of file Calculator.cxx.
|
private |
0 = data, 1 = MC
Definition at line 1524 of file Calculator.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inherited |
The standard message stream.
Definition at line 49 of file AsgMessaging.cxx.
|
inherited |
The standard message stream.
| lvl | The message level to set the stream to |
Definition at line 57 of file AsgMessaging.cxx.
|
inherited |
Test the output level of the object.
| lvl | The message level to test against |
true If messages at level "lvl" will be printed Definition at line 41 of file AsgMessaging.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
friend |
Definition at line 320 of file Calculator.h.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
Definition at line 71 of file Calculator.h.
|
private |
Definition at line 72 of file Calculator.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Definition at line 66 of file Calculator.h.
|
private |
pointer updated at each call to compute() because the parent tool might have been moved in-between
Definition at line 69 of file Calculator.h.