![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
This tool can be used to identify the overlap of a V+jets and V+gamma sample or in fact between most V^n+gamma^m and V^n+gamma^(m-1) samples (e.g.
More...
#include <VGammaORTool.h>
|
| VGammaORTool (const std::string &name) |
|
virtual | ~VGammaORTool () override |
|
virtual StatusCode | inOverlap (bool &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override |
| Determine whether current event is in overlap region (set via reference). More...
|
|
virtual StatusCode | photonPtsOutsideDr (std::vector< float > &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override |
| Determine the pTs of photons outside the dR cut that is configured in tool initialization (dR_lepton_photon_cut). More...
|
|
virtual StatusCode | photonPtsOutsideDrs (std::map< float, std::vector< float > > &result, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const override |
| Determine the pTs of photons outside of several dR cuts that are configured in tool initialization (dR_lepton_photon_cuts). More...
|
|
virtual bool | frixioneIsolated (const xAOD::TruthParticle &photon, const xAOD::TruthParticleContainer &truthParticles, float dR0, float exponent, float epsilon) const override |
| Function determining whether a photon is frixione isolated from truthParticles Parameters as defined in https://arxiv.org/pdf/hep-ph/9801442. More...
|
|
std::vector< TLorentzVector > | getPhotonP4s (const xAOD::TruthParticleContainer &truthParticleContainer) const |
| Get final state photons from truthParticleContainer A minimum pT cut and isolation is applied according to tool configuration Filter function is applied, only photons from relevant origins are kept. More...
|
|
std::vector< TLorentzVector > | getLeptonP4s (const xAOD::TruthParticleContainer &truthParticleContainer) const |
| Get final state leptons from truthParticleContainer Filter function is applied, only leptons from relevant origins are kept. More...
|
|
virtual StatusCode | initialize () |
| Dummy implementation of the initialisation function. More...
|
|
virtual void | print () const |
| Print the state of the tool. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
StatusCode | photonPtsOutsideDrs (std::map< float, std::vector< float > > &result, const std::vector< float > &drCuts, const std::vector< TLorentzVector > *leptons=0, const std::vector< TLorentzVector > *photons=0, const std::vector< int > *lepton_origins=0, const std::vector< int > *photon_origins=0) const |
|
StatusCode | setInput (std::vector< TLorentzVector > &leptons_out, std::vector< TLorentzVector > &photons_out, const std::vector< TLorentzVector > *lepton_p4s, const std::vector< TLorentzVector > *photon_p4s, const std::vector< int > *lepton_origins, const std::vector< int > *photon_origins) const |
|
std::vector< TLorentzVector > | filterPhotonOrigins (const std::vector< TLorentzVector > &, const std::vector< int > &) const |
|
std::vector< TLorentzVector > | filterLeptonOrigins (const std::vector< TLorentzVector > &, const std::vector< int > &) const |
|
bool | isFromTau (const xAOD::TruthParticle &lepton, int nRecursions=0) const |
|
bool | checkPhotonPts (const std::vector< float > &photon_pts) const |
|
float | frixioneFunc (float dR, float dR0, float exponent, float epsilon) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
This tool can be used to identify the overlap of a V+jets and V+gamma sample or in fact between most V^n+gamma^m and V^n+gamma^(m-1) samples (e.g.
V+gammagamma vs V+gamma or VV+gamma vs VV). It can either decide whether an event is in the overlap region for fixed cuts on photons and lepton or be used to extract relevant information from the event so that the overlap removal (OR) can be performed at a later stage with a simple 'if' statement.
The OR functions (inOverlap(result), photonPtsOutsideDr(result), or photonPtsOutsideDrs(result)), set the result via reference and return a status code. Usually the tool will take leptons and photons from the current event but this behavior can be overwritten by explicitly setting leptons and photons as additional arguments to the functions.
Further documented at https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/VGammaORTool
Definition at line 37 of file VGammaORTool.h.
◆ StoreGateSvc_t
◆ VGammaORTool()
VGammaORTool::VGammaORTool |
( |
const std::string & |
name | ) |
|
Definition at line 8 of file VGammaORTool.cxx.
14 declareProperty(
"veto_lepton_origins",
m_lepton_veto_origins = {3, 5, 6, 7, 8, 9, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42});
16 declareProperty(
"preferred_lepton_origins",
m_preferred_lepton_origins = {1, 2, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21});
18 declareProperty(
"veto_photon_origins",
m_veto_photon_origins = {9, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36 ATH_MSG_ERROR(origin <<
" in both lepton origin and lepton veto origin, this is not correct.");
◆ ~VGammaORTool()
VGammaORTool::~VGammaORTool |
( |
| ) |
|
|
overridevirtual |
◆ checkPhotonPts()
bool VGammaORTool::checkPhotonPts |
( |
const std::vector< float > & |
photon_pts | ) |
const |
|
private |
Definition at line 350 of file VGammaORTool.cxx.
352 ATH_MSG_ERROR(
"photon_pT_cuts needs to be a non-empty list, when inOverlap is called, set as property or in constructor.");
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ filterLeptonOrigins()
std::vector< TLorentzVector > VGammaORTool::filterLeptonOrigins |
( |
const std::vector< TLorentzVector > & |
lepton_candidates, |
|
|
const std::vector< int > & |
lepton_origins |
|
) |
| const |
|
private |
Definition at line 204 of file VGammaORTool.cxx.
207 if (lepton_candidates.size() != lepton_origins.size()) {
209 "VGammaORTool::filterLeptonOrigins" <<
": size of lepton candidates (" << lepton_candidates.size() <<
") different from number of lepton origins (" << lepton_origins.size() <<
212 std::vector<TLorentzVector> lepton_p4s;
213 std::vector<TLorentzVector> leptons_not_vetoed_p4s;
215 for (
uint i = 0;
i < lepton_candidates.size();
i++) {
216 const TLorentzVector p4 = lepton_candidates[
i];
217 const int p_origin = lepton_origins[
i];
220 lepton_p4s.push_back(p4);
232 leptons_not_vetoed_p4s.push_back(p4);
238 for (
const auto&
l : leptons_not_vetoed_p4s) {
239 lepton_p4s.push_back(
l);
◆ filterPhotonOrigins()
std::vector< TLorentzVector > VGammaORTool::filterPhotonOrigins |
( |
const std::vector< TLorentzVector > & |
photon_candidates, |
|
|
const std::vector< int > & |
photon_origins |
|
) |
| const |
|
private |
Definition at line 181 of file VGammaORTool.cxx.
184 if (photon_candidates.size() != photon_origins.size()) {
186 "VGammaORTool::filterPhotonOrigins" <<
": size of photon candidates (" << photon_candidates.size() <<
") different from number of photon origins (" << photon_origins.size() <<
190 std::vector<TLorentzVector> photon_p4s;
191 for (
uint i = 0;
i < photon_candidates.size();
i++) {
192 const TLorentzVector p4 = photon_candidates[
i];
193 const int p_origin = photon_origins[
i];
197 photon_p4s.push_back(p4);
◆ frixioneFunc()
float VGammaORTool::frixioneFunc |
( |
float |
dR, |
|
|
float |
dR0, |
|
|
float |
exponent, |
|
|
float |
epsilon |
|
) |
| const |
|
private |
Definition at line 412 of file VGammaORTool.cxx.
413 return epsilon * TMath::Power((1 - TMath::Cos(dR)) / (1 - TMath::Cos(dR0)), exponent);
◆ frixioneIsolated()
Function determining whether a photon is frixione isolated from truthParticles Parameters as defined in https://arxiv.org/pdf/hep-ph/9801442.
Implements IVGammaORTool.
Definition at line 367 of file VGammaORTool.cxx.
375 std::map<float, float> dr_to_pt;
376 for (
const auto *
p : truthParticles) {
386 const float dRgamma =
photon.p4().DeltaR(
p->p4());
390 if (dr_to_pt.count(dRgamma) > 0) {
391 dr_to_pt[dRgamma] +=
p->pt();
393 dr_to_pt[dRgamma] =
p->pt();
399 for (
const auto& pair : dr_to_pt) {
400 sumPt += pair.second;
401 const float dRgamma = pair.first;
◆ getKey()
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
-
ptr | The 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.
121 #ifdef XAOD_STANDALONE
124 return evtStore()->event()->getKey( ptr );
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getLeptonP4s()
Get final state leptons from truthParticleContainer Filter function is applied, only leptons from relevant origins are kept.
Definition at line 249 of file VGammaORTool.cxx.
250 std::vector<const xAOD::TruthParticle*> tau_candidates;
251 std::vector<const xAOD::TruthParticle*> elmu_candidates;
252 for (
const auto *
p : truthParticles) {
262 if (std::abs(
p->pdgId()) == 15) {
263 bool childIsTau =
false;
264 bool hasChildren =
false;
266 for (
uint i = 0;
i <
p->nChildren();
i++) {
267 if (
p->child(
i) ==
nullptr)
continue;
270 if (
p->child(
i)->pdgId() ==
p->pdgId()) {
275 if (hasChildren && !childIsTau) {
276 tau_candidates.push_back(
p);
281 elmu_candidates.push_back(
p);
285 sort(tau_candidates.begin(), tau_candidates.end(),
287 return p1->pt() > p2->pt();
289 sort(elmu_candidates.begin(), elmu_candidates.end(),
291 return p1->pt() > p2->pt();
294 std::vector<const xAOD::TruthParticle*> lepton_candidates(tau_candidates);
295 lepton_candidates.insert(lepton_candidates.end(), elmu_candidates.begin(), elmu_candidates.end());
297 std::vector<TLorentzVector> lepton_p4s;
298 std::vector<int> lepton_origins;
300 for (
const auto&
p : lepton_candidates) {
301 const unsigned int origin = classifierParticleOriginAcc(*
p);
302 lepton_origins.push_back(origin);
303 lepton_p4s.push_back(
p->p4());
◆ 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
-
ptr | The 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.
108 #ifdef XAOD_STANDALONE
111 return evtStore()->event()->getName( ptr );
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getPhotonP4s()
Get final state photons from truthParticleContainer A minimum pT cut and isolation is applied according to tool configuration Filter function is applied, only photons from relevant origins are kept.
Definition at line 309 of file VGammaORTool.cxx.
310 std::vector<TLorentzVector> photon_p4s;
311 std::vector<int> photon_origins;
312 for (
const auto *
p : truthParticles) {
324 const unsigned int origin = classifierParticleOriginAcc(*
p);
325 photon_origins.push_back(origin);
326 photon_p4s.push_back(
p->p4());
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ initialize()
virtual StatusCode asg::AsgTool::initialize |
( |
| ) |
|
|
inlinevirtualinherited |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
Reimplemented in SimpleMuonTriggerScaleFactors, Trig::TrigMuonMatching, CP::MuonTriggerScaleFactors, Trig::TrigTauMatchingTool, IHIEventShapeMapTool, ST::SUSYObjDef_xAOD, InDetSecVtxTruthMatchTool, JetGrooming::RecSoftDrop, met::METMaker, AsgForwardElectronIsEMSelector, JetGrooming::JetTrimming, ORUtils::BaseOverlapTool, PMGTools::PMGSherpa22VJetsWeightTool, AsgElectronEfficiencyCorrectionTool, CP::ElectronChargeEfficiencyCorrectionTool, AsgForwardElectronLikelihoodTool, CorrectPFOTool, CP::IsolationCorrectionTool, TauAnalysisTools::TauTruthMatchingTool, EGammaAmbiguityTool, InDetVertexTruthMatchTool, AthOnnx::OnnxRuntimeSessionToolCPU, AthOnnx::OnnxRuntimeSessionToolCUDA, PuppiWeightTool, JetIsolationTool, JetBalancePFlowJvtTool, CP::FFJetSmearingTool, JetForwardPFlowJvtTool, MCTruthClassifier, InDet::InDetHardScatterSelectionTool, dRMatchingTool, xAOD::BPhysBlindingTool, CP::EgammaCalibrationAndSmearingTool, JetVertexTaggerTool, tauRecTools::TrackRNN, LVL1::L1CaloOfflineTriggerTowerTools, TauAnalysisTools::TauSelectionTool, JetRecTool, met::METAssociationTool, CP::TrackVertexAssociationTool, met::METRebuilder, met::METAssociator, xAOD::TrackIsolationTool, InDet::InDetTrackSelectionTool, egammaMVACalibTool, TrigConf::xAODConfigTool, JetCleaningTool, met::METCaloRegionsTool, ZDC::ZdcLEDAnalysisTool, CP::MuonCalibTool, LVL1::L1CaloCells2TriggerTowers, JetVertexFractionTool, LVL1BS::PpmByteStreamReadV1V2Tool, JetClusterer, JetForwardJvtToolBDT, CP::AsgFlagSelectionTool, TauTrackFinder, TauAnalysisTools::DiTauSelectionTool, JetClustererByVertex, JetBadChanCorrTool, xAOD::BPhysTrackVertexMapTool, JetModifiedMassDrop, xAOD::CaloIsolationTool, EnhancedBiasWeighter, BookkeeperTool, ZDC::RpdSubtractCentroidTool, InDet::InDetUsedInFitTrackDecoratorTool, CP::AsgPtEtaSelectionTool, TauAnalysisTools::BuildTruthTaus, top::EventSaverFlatNtuple, tauRecTools::TauTrackRNNClassifier, InDet::InDetSecVtxTrackSelectionTool, JetForwardJvtTool, JetPileupTag::JetVertexNNTagger, CP::EgammaIsGoodOQSelectionTool, CP::IsolationCloseByCorrectionTool, CP::MuonCalibIntScaleSmearTool, DiTauRecTools::DiTauIDVarCalculator, JetFinder, AsgElectronIsEMSelector, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, DiTauRecTools::DiTauDiscriminantTool, met::METBuilderTool, CP::AsgMaskSelectionTool, ElectronPhotonVariableCorrectionBase, ECUtils::EventCleaningTool, TauAnalysisTools::TauTruthTrackMatchingTool, met::METSoftTermsTool, LVL1::L1CaloLArTowerEnergy, HiggsTruthCategoryTool, IDTPM::TrackRoiSelectionTool, TauAnalysisTools::CommonDiTauEfficiencyTool, HIJetConstituentSubtractionTool, JetTrackSumMomentsTool, JetGrooming::SoftDrop, JetQGTaggerVariableTool, JetTrackMomentsTool, met::METTruthTool, CP::BaseLinearFakeBkgTool, PMGTools::PMGSherpaVjetsSysTool, ClusterMatching::CaloClusterMatchingTool, AsgPhotonEfficiencyCorrectionTool, InDet::JetTrackFilterTool, asg::DataHandleTestTool, xAODMaker::FileMetaDataTool, CP::BaseFakeBkgTool, InDet::InclusiveTrackFilterTool, InDet::InDetTrackTruthFilterTool, HIJetClusterSubtractorTool, CP::MVATrackVertexAssociationTool, IDTPM::RoiSelectionTool, ElectronPhotonVariableCorrectionTool, JetCalibrationTool, JetCaloQualityTool, JetOriginCorrectionTool, InDet::InDetTrackBiasingTool, HIJetClusterIndexAssociationTool, TauWPDecorator, TrigGlobalEfficiencyCorrectionTool, ZdcRecChannelToolV2, IDTPM::TrackObjectSelectionTool, CP::LhoodMM_tools, FlavorTagDiscriminants::GNNTool, FlavorTagDiscriminants::MultifoldGNNTool, CP::MuonSelectionTool, TauAnalysisTools::CommonDiTauSmearingTool, JSSTaggerBase, ZDC::ZdcAnalysisTool, IDTPM::TrackQualitySelectionTool, AsgElectronLikelihoodTool, CP::JetQGTagger, CP::JetJvtEfficiency, LVL1::L1CaloFcal23Cells2RxMappingTool, ORUtils::OverlapRemovalTool, Analysis::JetQuarkLabel, Ringer::AsgRingerSelectorTool, InDet::InDetTrackSmearingTool, JetCopier, JetGrooming::JetGroomer, met::METPhotonAssociator, JetECPSFractionTool, JetPtAssociationTool, met::METElectronAssociator, met::METTauAssociator, PMGTools::PMGDecayProductsSelectionTool, WeightToolBase, HIJetDRAssociationTool, JetClusterMomentsTool, met::METJetAssocTool, TauVertexFinder, IDTPM::JsonPlotsDefReadTool, TauAnalysisTools::DiTauSmearingTool, JetDRTrackAssocTool, JetReclusterer, TauDecayModeNNClassifier, BDTVertexWeightCalculator, asg::UnitTestTool1, IDTPM::DeltaRMatchingToolBase< T, R >, AsgElectronSelectorTool, JetReclusteringTool, met::METMuonAssociator, TauPi0CreateROI, TauShotFinder, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle, xAOD::TruthParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TruthParticle, xAOD::TrackParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle >, ZdcRecChannelToolLucrod, PMGTools::PMGTruthWeightTool, JetVoronoiMomentsTool, Trig::MatchFromCompositeTool, asg::UnitTestTool3, IDTPM::TruthTrackMatchingTool, CP::ApplyFakeFactor, AsgElectronChargeIDSelectorTool, HIJetMaxOverMeanTool, PanTau::Tool_FeatureExtractor, TauElectronVetoVariables, CP::IsolationSelectionTool, WeightsAgregator, EL::UnitTestTool, FlavorTagDiscriminants::TrackClassifier, JetLArHVTool, ZDC::ZdcTrigValidTool, IDTPM::TrackTruthMatchingTool, HI::HIPileupTool, InDet::InDetTrackTruthOriginTool, JetHelper::VarTool, FlavorTagDiscriminants::DL2Tool, BTaggingSelectionTool, EnergyCorrelatorGeneralizedRatiosTool, EnergyCorrelatorGeneralizedTool, EnergyCorrelatorRatiosTool, EnergyCorrelatorTool, TauEleOverlapChecker, TauJetRNNEvaluator, asg::UnitTestTool2, JetTruthLabelingTool, ZDC::ZdcRecTool, HIJetConstituentModifierTool, TauCalibrateLC, TauGNNEvaluator, TauPi0ScoreCalculator, TauRecToolBase, Trig::TrigEgammaEmulationPrecisionElectronHypoTool, asg::UnitTestTool1A, PDFWeight, HIEventShapeJetIteration, HIJetSignificanceTool, CP::JetQGTaggerBDT, JetWidthTool, TauVertexVariables, Trig::TrigEgammaEmulationPrecisionPhotonHypoTool, Trig::TrigEgammaMatchingTool, Trig::R3IParticleRetrievalTool, IDTPM::TruthTrackQualitySelectionTool, JetPileupLabelingTool, JetFromPseudojet, JetTruthParticleSelectorTool, Trig::TrigEgammaEmulationBaseHypoTool, CP::ApplyE2YFakeRate, ParticleScaleFactorTool, InDet::InDetTrackSystematicsTool, JetCaloQualityToolFE, Trig::MatchingTool, Trig::R3MatchingTool, IDTPM::OfflineTrackQualitySelectionTool, JetParticleAssociation, Trig::TrigEgammaEmulationChain, Trig::TrigEgammaEmulationFastCaloHypoTool, AthOnnx::OnnxRuntimeInferenceTool, xAODtoHepMCTool, HIEventShapeMapTool, HI::HIVertexSelectionTool, JetHelper::HistoInput2D, TauVertexedClusterDecorator, Trig::IParticleRetrievalTool, CP::AsymptMatrixTool, HI::HIEventSelectionTool, FlavorTagDiscriminants::HbbTagTool, JetConstituentFrac, JetGroomMRatio, JetHelper::HistoInput1D, JetHelper::TextInputMCJES, ExtendTrackToLayerTool, Trig::TypedScoringTool, TrackTruthSelectionTool, HIUEModulatorTool, JSSWTopTaggerANN, CP::JvtEfficiencyToolBase, JetEMScaleMomTool, MvaTESVariableDecorator, TauAODLeptonRemovalTool, TauCombinedTES, ParticleJetDeltaRLabelTool, HIEventShapeSummaryTool, FlavorTagDiscriminants::BTagAugmenterTool, FlavorTagDiscriminants::VRJetOverlapDecoratorTool, JetCaloEnergies, ParticleJetGhostLabelTool, FlavorTagDiscriminants::BTagMuonAugmenterTool, MBTSTimeFilterTool, JSSWTopTaggerDNN, SmoothedTopTagger, MvaTESEvaluator, CP::IsolationLowPtPLVTool, Trig::DRScoringTool, Trig::EgammaDRScoringTool, SmoothedWZTagger, CP::FJvtEfficiencyTool, CP::JvtSelectionToolBase, CP::NNJvtSelectionTool, AthAsgExUnittestTool, CP::JvtSelectionTool, BTaggingSelectionJsonTool, CP::FJvtSelectionTool, CP::JvtEfficiencyTool, CP::NNJvtEfficiencyTool, BookkeeperDumperTool, TrigFastCalibWithRings, top::ScaleFactorRetriever, BTaggingEfficiencyTool, BTaggingTruthTaggingTool, MissingCellListTool, JetVoronoiDiagramHelpers::Diagram, FastJetInterfaceTool, met::METSystematicsTool, Trig::TrigEgammaEmulationToolMT, JetAttributeRatioSelector, top::GhostTrackSystematicsMaker, top::TopObjectSelection, BTaggingEigenVectorRecompositionTool, LVL1::TrigT1CaloLWHistogramToolV1, LVL1::TrigT1CaloLWHistogramTool, Trig::TrigDecisionTool, CP::PhotonPointingTool, met::METRecoTool, CP::PhotonVertexSelectionTool, top::KLFitterTool, ZdcByteStreamReadV1V2Tool, CP::PileupReweightingTool, top::JetObjectCollectionMaker, LVL1::L1CaloxAODOfflineTriggerTowerTools, RCJet, LVL1::TrigT1CaloMonErrorToolV1, met::METTrackFilterTool, LVL1::TrigT1CaloMonErrorTool, SoftKillerWeightTool, EventDensityTool, met::METSignificance, ParticleLevelRCJetObjectLoader, JetUncertaintiesTool, top::TopToolStore, CP::JetTileCorrectionTool, xAODMaker::TriggerMenuMetaDataTool, D3PD::D3PDMCTruthClassifier, top::ElectronInJetSubtractionCollectionMaker, top::MuonObjectCollectionMaker, JetConstituentModSequence, top::EgammaObjectCollectionMaker, HistoGroupBase, AsgPhotonIsEMSelector, JetAttributeSelector, top::ObjectCollectionMaker, TrackVertexAssociationTool, met::METRefinerTool, TauAnalysisTools::CommonSmearingTool, top::GlobalLeptonTriggerCalculator, top::ScaleFactorCalculator, top::TrackSystematicsMaker, top::ElectronScaleFactorCalculator, top::JetScaleFactorCalculator, top::MuonScaleFactorCalculator, PanTau::Tool_DetailsArranger, LVL1::L1CaloMonitoringCaloTool, top::EventSaverxAOD, LVL1::L1CaloTTIdTools, top::SoftMuonObjectCollectionMaker, top::TauObjectCollectionMaker, JetInputElRemovalTool, TauAnalysisTools::CommonEfficiencyTool, top::BTagScaleFactorCalculator, top::MissingETObjectCollectionMaker, PanTau::PanTauProcessor, xAODMaker::TruthMetaDataTool, top::PDFScaleFactorCalculator, top::PhotonScaleFactorCalculator, top::PseudoTopReco, EventShapeCopier, met::METJetTool, GoodRunsListSelectionTool, top::EventSaverxAODNext, top::FwdElectronScaleFactorCalculator, FSR::FsrPhotonTool, Trig::StaticBunchCrossingTool, ZMassConstraint::ConstraintFit, TauAnalysisTools::TauEfficiencyCorrectionsTool, PanTau::Tool_DecayModeDeterminator, PanTau::Tool_ModeDiscriminator, CP::ElectronLRTOverlapRemovalTool, HIClusterSubtraction, JetAttributeHisto, JetPseudojetCopier, met::METEgammaAssociator, Trig::xAODBunchCrossingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, TauAnalysisTools::DiTauTruthMatchingTool, TauAnalysisTools::TauSmearingTool, top::JetMETCPTools, met::METTruthAssociator, PanTau::Tool_InformationStore, HistoDefinitionTool, PanTau::Tool_InputConverter, JetBottomUpSoftDrop, JetRecursiveSoftDrop, PMGTools::PMGCrossSectionTool, JetSoftDrop, TrigEgammaMatchingToolMT, DiTauMassTools::MissingMassToolV2, top::TauScaleFactorCalculator, top::TriggerCPTools, JetConstituentsRetriever, VoronoiWeightTool, top::GhostTrackCPTools, JetCaloCellQualityTool, JetContainerHistoFiller, ChargedHadronSubtractionTool, JetTrackSelectionTool, met::METRegionsTool, met::METSoftAssociator, PanTau::Tool_TauConstituentGetter, top::EventCleaningSelection, ConstituentSubtractorTool, top::EgammaCPTools, top::OtherCPTools, top::TopEventMaker, JetHistoBase, JetSelectorAttributeRunII, JetSplitter, CaloClusterConstituentsOrigin, JetTrackSelectionTool2, SimpleJetTrackSelectionTool, CP::MuonLRTOverlapRemovalTool, top::FlavorTaggingCPTools, top::TauCPTools, HistosForJetSelection, JetPruner, JetToolRunner, JetUsedInFitTrackDecoratorTool, top::TrackCPTools, JetTrimmer, NSubjettinessRatiosTool, CP::MuonEfficiencyScaleFactors, top::PileupScaleFactorCalculator, top::MuonCPTools, JetConstitFourMomTool, NSubjettinessTool, ZdcDataAccessV2, JetPseudojetRetriever, LVL1BS::TrigT1CaloDataAccessV2, PanTau::Tool_TauConstituentSelector, CopyTruthParticles, top::IsolationCPTools, top::OverlapRemovalCPTools, ClusterAtEMScaleTool, CP::IsolationHelper, top::BoostedTaggingCPTools, AsgDeadHVCellRemovalTool, ConstitTimeCutTool, Analysis::JetConeLabeling, JetSelectorAttribute, HIJetUEMonitoring, HIEfficiencyResponseHistos, JetSubStructureMomentToolsBase, AsgHelloTool, CopyTruthJetParticles, LeadingJetsRelations, EfficiencyResponseHistos, and JetEventSelector.
Definition at line 133 of file AsgTool.h.
133 {
return StatusCode::SUCCESS; }
◆ inOverlap()
StatusCode VGammaORTool::inOverlap |
( |
bool & |
result, |
|
|
const std::vector< TLorentzVector > * |
leptons = 0 , |
|
|
const std::vector< TLorentzVector > * |
photons = 0 , |
|
|
const std::vector< int > * |
lepton_origins = 0 , |
|
|
const std::vector< int > * |
photon_origins = 0 |
|
) |
| const |
|
overridevirtual |
Determine whether current event is in overlap region (set via reference).
The overlap region is defined by dR_lepton_photon_cut, photon_pT_cut and many more configurable parameters. Note that the function returns a status code. The first agument is the result, the remaining arguments are optional:
- If null pointers are given for leptons or photons, they will be taken from the event
- One can override this behaviour by manually specifying vectors of lepton/photon
- If lepton or photon origins are given in addition to the lepton four vectors, particles from irrelevant origins (e.g. decays) are filtered out This can be useful when working with derivations which store the origin but not the full truth record
Implements IVGammaORTool.
Definition at line 51 of file VGammaORTool.cxx.
56 std::vector<float> photon_pts;
59 return StatusCode::SUCCESS;
◆ inputHandles()
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.
◆ isFromTau()
◆ msg() [1/2]
◆ msg() [2/2]
◆ 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.
◆ msgLvl()
◆ outputHandles()
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.
◆ photonPtsOutsideDr()
StatusCode VGammaORTool::photonPtsOutsideDr |
( |
std::vector< float > & |
result, |
|
|
const std::vector< TLorentzVector > * |
leptons = 0 , |
|
|
const std::vector< TLorentzVector > * |
photons = 0 , |
|
|
const std::vector< int > * |
lepton_origins = 0 , |
|
|
const std::vector< int > * |
photon_origins = 0 |
|
) |
| const |
|
overridevirtual |
Determine the pTs of photons outside the dR cut that is configured in tool initialization (dR_lepton_photon_cut).
Calculates a vector of photon pts, ordered by descending pt. Once these values are calculated they can be stored and used to easily perform OR with arbitrary pT. Note that the function returns a status code. The first agument is the result, the remaining arguments are optional
- If null pointers are given for leptons or photons, they will be taken from the event
- One can override this behaviour by manually specifying vectors of lepton/photon
- If lepton or photon origins are given in addition to the lepton four vectors, particles from irrelevant origins (e.g. decays) are filtered out This can be useful when working with derivations which store the origin but not the full truth record
Implements IVGammaORTool.
Definition at line 65 of file VGammaORTool.cxx.
70 std::map<float, std::vector<float> > photon_pt_map;
73 return StatusCode::SUCCESS;
◆ photonPtsOutsideDrs() [1/2]
StatusCode VGammaORTool::photonPtsOutsideDrs |
( |
std::map< float, std::vector< float > > & |
result, |
|
|
const std::vector< float > & |
drCuts, |
|
|
const std::vector< TLorentzVector > * |
leptons = 0 , |
|
|
const std::vector< TLorentzVector > * |
photons = 0 , |
|
|
const std::vector< int > * |
lepton_origins = 0 , |
|
|
const std::vector< int > * |
photon_origins = 0 |
|
) |
| const |
|
private |
Definition at line 92 of file VGammaORTool.cxx.
99 std::vector<TLorentzVector> good_leptons;
100 std::vector<TLorentzVector> good_photons;
101 ANA_CHECK(
setInput(good_leptons,good_photons,leptons,photons,lepton_origins,photon_origins));
104 for (
const auto& drCut : drCuts) {
105 result[drCut] = std::vector<float>();
106 for (
const auto&
photon : good_photons) {
107 bool tooCloseToLepton =
false;
109 const float dr =
photon.DeltaR(good_leptons[i_lep]);
111 tooCloseToLepton =
true;
115 if (!tooCloseToLepton) {
123 return StatusCode::SUCCESS;
◆ photonPtsOutsideDrs() [2/2]
StatusCode VGammaORTool::photonPtsOutsideDrs |
( |
std::map< float, std::vector< float > > & |
result, |
|
|
const std::vector< TLorentzVector > * |
leptons = 0 , |
|
|
const std::vector< TLorentzVector > * |
photons = 0 , |
|
|
const std::vector< int > * |
lepton_origins = 0 , |
|
|
const std::vector< int > * |
photon_origins = 0 |
|
) |
| const |
|
overridevirtual |
Determine the pTs of photons outside of several dR cuts that are configured in tool initialization (dR_lepton_photon_cuts).
Calculates a mapping between dRs and vector of photon pts (ordered by descending pt). Once these values are calculated they can be stored and used to easily perform OR with arbitrary pT and multiple dR cuts. Note that the function returns a status code. The first agument is the result, the remaining arguments are optional
- If null pointers are given for leptons or photons, they will be taken from the event
- One can override this behaviour by manually specifying vectors of lepton/photon
- If lepton or photon origins are given in addition to the lepton four vectors, particles from irrelevant origins (e.g. decays) are filtered out This can be useful when working with derivations which store the origin but not the full truth record
Implements IVGammaORTool.
Definition at line 79 of file VGammaORTool.cxx.
85 return StatusCode::SUCCESS;
◆ print()
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, top::TopObjectSelection, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ renounce()
◆ renounceArray()
◆ setInput()
StatusCode VGammaORTool::setInput |
( |
std::vector< TLorentzVector > & |
leptons_out, |
|
|
std::vector< TLorentzVector > & |
photons_out, |
|
|
const std::vector< TLorentzVector > * |
lepton_p4s, |
|
|
const std::vector< TLorentzVector > * |
photon_p4s, |
|
|
const std::vector< int > * |
lepton_origins, |
|
|
const std::vector< int > * |
photon_origins |
|
) |
| const |
|
private |
Definition at line 128 of file VGammaORTool.cxx.
139 if(lepton_p4s==0 || photon_p4s==0){
149 if(lepton_origins!=0){
153 leptons_out = *lepton_p4s;
160 if(photon_origins!=0){
164 photons_out = *photon_p4s;
168 ATH_MSG_DEBUG(
"VGammaORTool::setInput" <<
": Found " << photons_out.size() <<
" photons.");
169 ATH_MSG_DEBUG(
"VGammaORTool::setInput" <<
": Found " << leptons_out.size() <<
" leptons.");
173 "VGammaORTool::setInput" <<
": Found " << leptons_out.size() <<
" leptons but expected " <<
m_n_leptons <<
".");
176 return StatusCode::SUCCESS;
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_abs_pdgids_excluded_from_iso
std::vector<int> VGammaORTool::m_abs_pdgids_excluded_from_iso |
|
private |
◆ m_detStore
◆ m_dR_lepton_photon_cut
float VGammaORTool::m_dR_lepton_photon_cut |
|
private |
◆ m_dR_lepton_photon_cuts
std::vector<float> VGammaORTool::m_dR_lepton_photon_cuts |
|
private |
◆ m_evtStore
◆ m_frixione_dR
float VGammaORTool::m_frixione_dR |
|
private |
◆ m_frixione_epsilon
float VGammaORTool::m_frixione_epsilon |
|
private |
◆ m_frixione_exponent
float VGammaORTool::m_frixione_exponent |
|
private |
◆ m_lepton_pdgIds
std::vector<int> VGammaORTool::m_lepton_pdgIds |
|
private |
◆ m_lepton_veto_origins
std::vector<int> VGammaORTool::m_lepton_veto_origins |
|
private |
◆ m_min_considered_photon_pT
float VGammaORTool::m_min_considered_photon_pT |
|
private |
◆ m_n_leptons
int VGammaORTool::m_n_leptons |
|
private |
◆ m_photon_pT_cuts
std::vector<float> VGammaORTool::m_photon_pT_cuts |
|
private |
◆ m_preferred_lepton_origins
std::vector<int> VGammaORTool::m_preferred_lepton_origins |
|
private |
◆ m_truthClassifier
◆ m_truthparticle_collection_name
std::string VGammaORTool::m_truthparticle_collection_name |
|
private |
◆ m_use_gamma_iso
bool VGammaORTool::m_use_gamma_iso |
|
private |
◆ m_varHandleArraysDeclared
◆ m_veto_photon_origins
std::vector<int> VGammaORTool::m_veto_photon_origins |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
std::string find(const std::string &s)
return a remapped string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
size_t nParents() const
Number of parents of this particle.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Class describing a truth particle in the MC record.
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
bool isStable(const T &p)
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int pdgId() const
PDG ID code.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>